Fortinet black logo

User Guide

Configure a template

24.1.0
Copy Link
Copy Doc ID af1daa65-c273-11ec-9fd1-fa163e15d75b:993563
Download PDF

Configure a template

You can configure a new or existing template at any time by going to the template's details page.

Configure a new or existing template

To configure a template, perform the following steps:

  1. Go to the page of the template that you want to edit.

  2. Select the name of the template or the Edit icon.


    The Template Configuration drawer will slide out.

  3. Edit the following settings as needed:

    • General – Change the name of the template and select a server group for the template to reside in.

    • Tags – Enter tags that can help define the instance where the template will be applied. Agent heartbeat tags can also be defined here.

    • Attributes – Add key-value pairs that can provide structured instance metadata.

    • FQDNs and IPs – Add additional interface names. See Additional IP addresses or FQDNs.

    • Description – Enter a description for the template.

    • Parent Instance – (Optional) The device upstream from this server that it depends on. If the parent device experiences an outage, this server's outage notifications will be suppressed.

    • SNMP Credentials – Add an SNMP credential to the template.

    • Prometheus Endpoints – Integrate the instance where the template will be applied with Prometheus. To add a Prometheus endpoint:

      • Select Add Endpoint.

      • Select a Host Name.

      • Enter the Prometheus endpoint. For example prometheus-rabbitmq-exporter-7fb45675b-nvqbk:9419/metrics.

      • Select Save Changes.
        The Host Name will be computed when the template is applied and the URI will then be appended.

  4. Select Save Changes.

Port filtering

For network device templates, you can filter the number of ports that you can monitor using Port Scope. To configure the ports to be monitored, click the link below Port Scope.

The following options are available:

  • Use Device’s Settings – Add the ports for monitoring as configured on the network device.

  • All Ports – Add all of the ports on the device for monitoring.

  • By Name Filter – Select the ports that will be monitored using regex or the port’s name.

Continual matching

One of the great benefits of using templates in hand with the FortiMonitor server agent is the continual discovery of new resources. Every hour (or when manually triggered), the FortiMonitor server agent looks for new resources on the server - things such as drives/partitions, network interfaces, applications, etc. By default, as we find these new resources, we will run them through the metric rules you have defined in your template. If the new resources match any of the defined metric rules, we'll begin monitoring them according to your template definition.

To turn this feature off, uncheck the continual discovery option that appears in the Apply template confirmation modal when applying the template to a server instance.

Dynamic variables

You can also use dynamic variables in your templates if needed, read our article about it here.

Monitoring location

You can choose to select any monitoring location you would like for a template. This monitoring location will then override the monitoring location of any server you apply it do. If you do not want this to happen select Not specified for your Primary Monitoring Location.

You can also choose to set your monitoring locations on any individual network service checks you may create for this template. This can be useful if, for example, you want a template that does ping checks from multiple locations around the world.

Alert timelines

You can assign the following Alert timelines to the template by selecting Alert Timeline from the Details tab of the template:

  • Primary Alert Timeline – The primary alert timeline to use for server incidents.

  • Agent Heartbeat Alert Timeline – Determines which alert timeline to send alerts to when no communication is being received from the FortiMonitor Agent.

  • Auxiliary Timeline – Auxiliary timelines can be used as an alternate list of contacts to notify in addition to the primary timeline contacts. This is equivalent to copying someone on an email. Also, depending on the type of the instance, you can specify an alert timeline for each of the following incident types:

    • Network service incidents

    • SNMP metric incidents

    • SNMP heartbeat incidents

  • SNMP Heartbeat Alert Timeline – Determines which alert timeline to send alerts to when no communication is being received from SNMP polling.

  • Metric Heartbeat Alert Timeline – Determines which Alert Timeline to send alerts to when no communication is received from one or more metrics configured on the instance.

See Assign Alert Timelines for more information.

Configure template metrics

  1. To configure template metrics, open an existing template.

  2. To add checks, go to the Monitoring config tab and select Add Monitoring.

  3. Configure the metrics and thresholds as required. Keep in mind, thresholds set will also be set when a template is applied to a server.

There will be no detected metrics, but you can select the checks you want to configure from the catalog. Remember that these should be basic checks, as they will be applied to multiple servers.

Pattern matching

Often, naming across your infrastructure resources does not match exactly - whether it's network interfaces, disk drives/partitions, or database instances; however, they are often close enough that a simple pattern match will allow you to target your desired resource.

To help you deal with this ambiguity and minimize the number of template metrics you have to manage, FortiMonitor templates support two types of pattern matching - positive pattern matching and negative pattern matching.

Configuration

Under the Filters tab of a metric's configuration drawer, you can choose your match selection preference from the following:

  • Select from list - If you are creating a template off of a server, you will still retain the ability to pick discovered resource options from a select list.

  • Positive match - allows you to supply alpha-numeric characters and wildcards * to match against resources. For example, if your network interfaces were eth01, eth02, and nic01, you could match just the first two with eth*. When you apply the template, only the first two interfaces would have monitoring added.

  • Negative match - is as you'd expect, the opposite. By providing a pattern of eth* would lead to only the nic01 interface to have monitoring added to it.

Additional IP addresses or FQDNs

If you would like your template to be able to apply to servers with multiple IP addresses then you will want to use this field. Here you will invent your labels for those multiple IP addresses. For example, if you want this template to cover servers with both a public and a private IP address you could enter PublicIP, PrivateIP into this field. When applying a template with additional IP addresses you will be given the option to map the additional IP addresses of the template to the additional IP addresses of your server.

The Agent manifest file will also let you take advantage of this feature with Interface Mapping, to learn more about this you can see this article.

Configure a template

You can configure a new or existing template at any time by going to the template's details page.

Configure a new or existing template

To configure a template, perform the following steps:

  1. Go to the page of the template that you want to edit.

  2. Select the name of the template or the Edit icon.


    The Template Configuration drawer will slide out.

  3. Edit the following settings as needed:

    • General – Change the name of the template and select a server group for the template to reside in.

    • Tags – Enter tags that can help define the instance where the template will be applied. Agent heartbeat tags can also be defined here.

    • Attributes – Add key-value pairs that can provide structured instance metadata.

    • FQDNs and IPs – Add additional interface names. See Additional IP addresses or FQDNs.

    • Description – Enter a description for the template.

    • Parent Instance – (Optional) The device upstream from this server that it depends on. If the parent device experiences an outage, this server's outage notifications will be suppressed.

    • SNMP Credentials – Add an SNMP credential to the template.

    • Prometheus Endpoints – Integrate the instance where the template will be applied with Prometheus. To add a Prometheus endpoint:

      • Select Add Endpoint.

      • Select a Host Name.

      • Enter the Prometheus endpoint. For example prometheus-rabbitmq-exporter-7fb45675b-nvqbk:9419/metrics.

      • Select Save Changes.
        The Host Name will be computed when the template is applied and the URI will then be appended.

  4. Select Save Changes.

Port filtering

For network device templates, you can filter the number of ports that you can monitor using Port Scope. To configure the ports to be monitored, click the link below Port Scope.

The following options are available:

  • Use Device’s Settings – Add the ports for monitoring as configured on the network device.

  • All Ports – Add all of the ports on the device for monitoring.

  • By Name Filter – Select the ports that will be monitored using regex or the port’s name.

Continual matching

One of the great benefits of using templates in hand with the FortiMonitor server agent is the continual discovery of new resources. Every hour (or when manually triggered), the FortiMonitor server agent looks for new resources on the server - things such as drives/partitions, network interfaces, applications, etc. By default, as we find these new resources, we will run them through the metric rules you have defined in your template. If the new resources match any of the defined metric rules, we'll begin monitoring them according to your template definition.

To turn this feature off, uncheck the continual discovery option that appears in the Apply template confirmation modal when applying the template to a server instance.

Dynamic variables

You can also use dynamic variables in your templates if needed, read our article about it here.

Monitoring location

You can choose to select any monitoring location you would like for a template. This monitoring location will then override the monitoring location of any server you apply it do. If you do not want this to happen select Not specified for your Primary Monitoring Location.

You can also choose to set your monitoring locations on any individual network service checks you may create for this template. This can be useful if, for example, you want a template that does ping checks from multiple locations around the world.

Alert timelines

You can assign the following Alert timelines to the template by selecting Alert Timeline from the Details tab of the template:

  • Primary Alert Timeline – The primary alert timeline to use for server incidents.

  • Agent Heartbeat Alert Timeline – Determines which alert timeline to send alerts to when no communication is being received from the FortiMonitor Agent.

  • Auxiliary Timeline – Auxiliary timelines can be used as an alternate list of contacts to notify in addition to the primary timeline contacts. This is equivalent to copying someone on an email. Also, depending on the type of the instance, you can specify an alert timeline for each of the following incident types:

    • Network service incidents

    • SNMP metric incidents

    • SNMP heartbeat incidents

  • SNMP Heartbeat Alert Timeline – Determines which alert timeline to send alerts to when no communication is being received from SNMP polling.

  • Metric Heartbeat Alert Timeline – Determines which Alert Timeline to send alerts to when no communication is received from one or more metrics configured on the instance.

See Assign Alert Timelines for more information.

Configure template metrics

  1. To configure template metrics, open an existing template.

  2. To add checks, go to the Monitoring config tab and select Add Monitoring.

  3. Configure the metrics and thresholds as required. Keep in mind, thresholds set will also be set when a template is applied to a server.

There will be no detected metrics, but you can select the checks you want to configure from the catalog. Remember that these should be basic checks, as they will be applied to multiple servers.

Pattern matching

Often, naming across your infrastructure resources does not match exactly - whether it's network interfaces, disk drives/partitions, or database instances; however, they are often close enough that a simple pattern match will allow you to target your desired resource.

To help you deal with this ambiguity and minimize the number of template metrics you have to manage, FortiMonitor templates support two types of pattern matching - positive pattern matching and negative pattern matching.

Configuration

Under the Filters tab of a metric's configuration drawer, you can choose your match selection preference from the following:

  • Select from list - If you are creating a template off of a server, you will still retain the ability to pick discovered resource options from a select list.

  • Positive match - allows you to supply alpha-numeric characters and wildcards * to match against resources. For example, if your network interfaces were eth01, eth02, and nic01, you could match just the first two with eth*. When you apply the template, only the first two interfaces would have monitoring added.

  • Negative match - is as you'd expect, the opposite. By providing a pattern of eth* would lead to only the nic01 interface to have monitoring added to it.

Additional IP addresses or FQDNs

If you would like your template to be able to apply to servers with multiple IP addresses then you will want to use this field. Here you will invent your labels for those multiple IP addresses. For example, if you want this template to cover servers with both a public and a private IP address you could enter PublicIP, PrivateIP into this field. When applying a template with additional IP addresses you will be given the option to map the additional IP addresses of the template to the additional IP addresses of your server.

The Agent manifest file will also let you take advantage of this feature with Interface Mapping, to learn more about this you can see this article.