Fortinet Document Library

Version:


Table of Contents

User Guide

21.4.0
Copy Link

Dynamic variables

If you have common patterns in your infrastructure monitoring, FortiMonitor’s templating support can be a powerful option to streamline your configuration and maintain consistency. 

One complication with templates is being able to capture dynamic elements that will change with each server. Within the options tab for each network service check, you can use dynamic variables to be filled in with specific details which will be dictated by the server’s configuration. The variables will be replaced by the coinciding values upon application of the templates.

Standard Variables

There are standard variables relating to the server’s properties which are listed below. Alternatively, you can use our server attribute system to introduce your own custom attributes. Simply use the attribute name in the macro name.

[[fqdn]] – This field would be replaced with the server’s primary FQDN

[[server_name]] – This field would be replaced with the Server Name

[[server_group]] – This field would be replaced with the Server Group that the server is located in

[[attribute_name]] – This field will be replaced with the value of the attribute referenced. So, if you had an attribute key named operating_system, and the value was Ubuntu, you could reference [[operating_system]] in your check options and it it would be translated to Ubuntu.

Demonstration of Usage:

  • Below you can see a screenshot of a website instance called “docs.panopta.com” within the Panopta Control panel. This instance has the following attributes: type:article, location:us, content:templates. We are going to use the content:template attribute to apply a metric.

  • In the below screenshot, there is a template called “Website Template”. We will be applying this template to docs.panopta.com. In this template, we specified an HTTPS GET check to apply the following path for an HTTPS metric: /article/[[content]] 

NOTE: [[content]] is the attribute key found on docs.panopta.com (refer to the above screenshot)

Below is a screenshot of the configuration made to set up this path. You can access this when editing your HTTPS GET metric.


After saving the template configuration, and applying it to the instance “docs.panopta.com”, we can now see that there is a metric called HTTPS GET /articles/templates from Chicago 3. This took the key (content) from the instance, and applied the corresponding value (template) to this metric.


Dynamic variables

If you have common patterns in your infrastructure monitoring, FortiMonitor’s templating support can be a powerful option to streamline your configuration and maintain consistency. 

One complication with templates is being able to capture dynamic elements that will change with each server. Within the options tab for each network service check, you can use dynamic variables to be filled in with specific details which will be dictated by the server’s configuration. The variables will be replaced by the coinciding values upon application of the templates.

Standard Variables

There are standard variables relating to the server’s properties which are listed below. Alternatively, you can use our server attribute system to introduce your own custom attributes. Simply use the attribute name in the macro name.

[[fqdn]] – This field would be replaced with the server’s primary FQDN

[[server_name]] – This field would be replaced with the Server Name

[[server_group]] – This field would be replaced with the Server Group that the server is located in

[[attribute_name]] – This field will be replaced with the value of the attribute referenced. So, if you had an attribute key named operating_system, and the value was Ubuntu, you could reference [[operating_system]] in your check options and it it would be translated to Ubuntu.

Demonstration of Usage:

  • Below you can see a screenshot of a website instance called “docs.panopta.com” within the Panopta Control panel. This instance has the following attributes: type:article, location:us, content:templates. We are going to use the content:template attribute to apply a metric.

  • In the below screenshot, there is a template called “Website Template”. We will be applying this template to docs.panopta.com. In this template, we specified an HTTPS GET check to apply the following path for an HTTPS metric: /article/[[content]] 

NOTE: [[content]] is the attribute key found on docs.panopta.com (refer to the above screenshot)

Below is a screenshot of the configuration made to set up this path. You can access this when editing your HTTPS GET metric.


After saving the template configuration, and applying it to the instance “docs.panopta.com”, we can now see that there is a metric called HTTPS GET /articles/templates from Chicago 3. This took the key (content) from the instance, and applied the corresponding value (template) to this metric.