Skip to main content
PRosenlind
Explorer III
April 6, 2024
Question

FortiManager DeviceDB information into Jinja templates

  • April 6, 2024
  • 1 reply
  • 1768 views

Hi community,

 

I was having a look at this part of the admin guide: https://docs.fortinet.com/document/fortimanager/7.4.2/administration-guide/906193/using-fortimanager-device-database-variables-in-jinja

And I saw this script:

{%- for intf in DEVDB_system_interface %}
{%- if intf.type == 'physical' %}
Interface Name: {{intf.name}}
-- Interface Allowaccess: {{intf.allowaccess}}
-- Interface Type: {{intf.type}}
-- Interface IP: {{intf.ip}}
-- Interface Mode: {{intf.mode}}
-- Interface VDOM: {{intf.vdom}}
{%- endif %}
{%- endfor %}

 

I did not find any reference for the DEVDB_system_interface in the article, are there any complete documentation somewhere that I've missed regarding which different syntaxes you can use to call different parts of the FMG Device DB information? 

BR,
Per

    1 reply

    smkml
    Staff
    Staff
    April 7, 2024

    Hi @PRosenlind ,

     

    The supported System Interface and Device Database variables are shown in top of the article.
    https://docs.fortinet.com/document/fortimanager/7.4.2/administration-guide/906193/using-fortimanager-device-database-variables-in-jinja

    supported variable.png

     

    PRosenlind
    Explorer III
    April 7, 2024

    Hi,

    I know about this, but I don't really understand where the 

    DEVDB_system_interface 

     comes from. Can you explain this to me? (I can guess the syntax from how the fortigate CLI works ofc, but haven't found it in the docs, that's what i'm saying.)

    PRosenlind
    Explorer III
    April 8, 2024

    This is also something that I cannot find in the docs outside of the example:

    vm_interface_number