Table of Contents

HTTP template operation

Steps to ensure correct operation of templates that collect metrics with HTTP agent:

1. Create a host in Zabbix and specify an IP address or DNS name of the monitoring target as the main interface. This is needed for the {HOST.CONN} macro to resolve properly in the template items.
2. Link the template to the host created in step 1 (if the template is not available in your Zabbix installation, you may need to import the template's .xml file first - see Templates out-of-the-box section for instructions).
3. Adjust the values of mandatory macros as needed.
4. Configure the instance being monitored to allow sharing data with Zabbix - see instructions in the Additional steps/comments column.

This page contains only a minimum set of macros and setup steps that are required for proper template operation. A detailed description of a template, including the full list of macros, items and triggers, is available in the template's Readme.md file (accessible by clicking on a template name).

Template Mandatory macros Additional steps/comments
Apache by HTTP {$APACHE.STATUS.HOST} - the hostname or IP address of Apache status page (default: 127.0.0.1).
{$APACHE.STATUS.PATH} - the URL path (default: server-status?auto).
{$APACHE.STATUS.PORT} - the port of Apache status page (default: 80).
{$APACHE.STATUS.SCHEME} - the request scheme. Supported: http (default), https.
Apache module mod_status should be set (see Apache documentation for details).
To check availability, run:
httpd -M 2>/dev/null \| grep status_module

Apache configuration example:
<Location "/server-status">
SetHandler server-status
Require host example.com
</Location>
Asterisk by HTTP {$AMI.PORT} - AMI port number for checking service availability (default: 8088).
{$AMI.SECRET} - the Asterisk Manager secret (default: zabbix).
{$AMI.URL} - the Asterisk Manager API URL in the format
<scheme>://<host>:<port>/<prefix>/rawman
(default: http://asterisk:8088/asterisk/rawman).
{$AMI.USERNAME} - the Asterisk Manager name.
1. Enable the mini-HTTP Server.

2. Add the option webenabled=yes to the general section of manager.conf file.

3. Create Asterisk Manager user in the Asterisk instance.
ClickHouse by HTTP {$CLICKHOUSE.PORT} - the port of ClickHouse HTTP endpoint (default: 8123).
{$CLICKHOUSE.SCHEME} - the request scheme. Supported: http (default), https.
{$CLICKHOUSE.USER}, {$CLICKHOUSE.PASSWORD} - ClickHouse login credentials (default username: zabbix, password: zabbix_pass).
If you don't need authentication, remove headers from HTTP agent type items.
Create a ClickHouse user with a 'web' profile and permission to view databases (see ClickHouse documentation for details).

See template's Readme.md file for a ready-to-use zabbix.xml file configuration.
Cloudflare by HTTP {$CLOUDFLARE.API.TOKEN} - Cloudflare API token value (default: `<change>`).
{$CLOUDFLARE.ZONE_ID} - Cloudflare Site Zone ID (default: `<change>`).
Cloudflare API Tokens are available in the Cloudflare account under My Profile→ API Tokens.
Zone ID is available in the Cloudflare account under Account Home → Site.
DELL PowerEdge R720 by HTTP,
DELL PowerEdge R740 by HTTP,
DELL PowerEdge R820 by HTTP,
DELL PowerEdge R840 by HTTP
{$API.URL} - Dell iDRAC Redfish API URL in the format <scheme>://<host>:<port> (default: <Put your URL here>)
{$API.USER}, {$API.PASSWORD} - Dell iDRAC login credentials (default: not set).
In the Dell iDRAC interface of your server:
1. Enable Redfish API .
2. Create a user for monitoring with read-only permissions.
Elasticsearch Cluster by HTTP {$ELASTICSEARCH.PORT} - the port of the Elasticsearch host (default: 9200).
{$ELASTICSEARCH.SCHEME} - the request scheme. Supported: http (default), https.
{$ELASTICSEARCH.USERNAME}, {$ELASTICSEARCH.PASSWORD} - login credentials, required only if used for Elasticsearch authentication.
Etcd by HTTP {$ETCD.PORT}- the port used by Etcd API endpoint (default: 2379).
{$ETCD.SCHEME} - the request scheme. Supported: http (default), https.
{$ETCD.USER}, {$ETCD.PASSWORD} - login credentials, required only if used for Etcd authentication.
Metrics are collected from /metrics endpoint; to specify the endpoint's location use --listen-metrics-urls flag (see Etcd documentation for details).

To verify, whether Etcd is configured to allow metric collection, run:
curl -L http://localhost:2379/metrics

To check, if Etcd is accessible from Zabbix proxy or Zabbix server run:
curl -L http:%%//<etcd_node_adress>:2379/metrics%%

The template should be added to each node with Etcd.
GitLab by HTTP {$GITLAB.PORT} - the port of GitLab web endpoint (default: 80)
{$GITLAB.URL} - GitLab instance URL (default: localhost)
This template works with self-hosted GitLab instances; metrics are collected from the /metrics endpoint.

To access the metrics, the client IP address must be explicitly allowed (see GitLab documentation for details).

Note, that certain metrics may not be available for a particular GitLab instance version and configuration.
Hadoop by HTTP {$HADOOP.NAMENODE.HOST} - the Hadoop NameNode host IP address or FQDN (default: NameNode).
{$HADOOP.NAMENODE.PORT} - the Hadoop NameNode web-UI port (default: 9870).
{$HADOOP.RESOURCEMANAGER.HOST} - the Hadoop ResourceManager host IP address or FQDN (default: ResourceManager).
{$HADOOP.RESOURCEMANAGER.PORT} - the Hadoop ResourceManager web-UI port (default: 8088).
Metrics are collected by polling the Hadoop API remotely using an HTTP agent and JSONPath preprocessing. Zabbix server (or proxy) executes direct requests to ResourceManager, NodeManagers, NameNode, DataNodes APIs.
HAProxy by HTTP {$HAPROXY.STATS.PATH} - the path of HAProxy Stats page (default: stats).
{$HAPROXY.STATS.PORT} - the port of the HAProxy Stats host or container (default: 8404).
{$HAPROXY.STATS.SCHEME} - the request scheme. Supported: http (default), https.
HAProxy Stats page should be set up (see HAProxy blog post for details or template's Readme.md for configuration example).
HashiCorp Vault by HTTP {$VAULT.API.PORT} - the port on which the Vault listens for API requests (default: 8200).
{$VAULT.API.SCHEME} - the API request scheme. Supported: http (default), https.
{$VAULT.HOST} - Vault host name (default: <PUT YOUR VAULT HOST>).
{$VAULT.TOKEN} - Vault authorization token (default: <PUT YOUR AUTH TOKEN>).
1. Configure the Vault API (see official documentation for details).
2. Create a Vault service token, then copy and paste it into {$VAULT.TOKEN} macro value in Zabbix.
Hikvision camera by HTTP {$HIKVISION_ISAPI_PORT} - ISAPI port on a device (default: 80).
{$USER}, {$PASSWORD} - camera login credentials (default username: admin, password: 1234).
InfluxDB by HTTP {$INFLUXDB.API.TOKEN} - InfluxDB API authorization token (default: ``).
{$INFLUXDB.URL} - InfluxDB instance URL in the format <scheme>://<host>:<port> (default: http://localhost:8086).
This template collects internal service metrics from the InfluxDB /metrics endpoint of self-hosted InfluxDB instances.

See InfluxDB documentation for details.
Jenkins by HTTP {$JENKINS.API.KEY} - API key to access Metrics Servlet; required for common metrics (default: ``).
{$JENKINS.API.TOKEN} - API token for HTTP BASIC authentication; required for monitoring computers and builds (default: ``).
{$JENKINS.URL} - Jenkins URL in the format <scheme>://<host>:<port>; required for monitoring computers and builds (default: ``).
{$JENKINS.USER} - username for HTTP BASIC authentication; required for monitoring computers and builds (default: zabbix).
Metrics are collected by requests to Metrics API.

For common metrics: install and configure Metrics plugin parameters according to the official documentation. Issue an API key for access to the Metrics Servlet, then use it as {$JENKINS.API.KEY} macro value.

For monitoring computers and builds: create an API token for the Jenkins user that will be used for monitoring, then use it as {$JENKINS.API.TOKEN} macro value. See Jenkins documentation for details.
Microsoft SharePoint by HTTP {$SHAREPOINT.URL} - portal page URL, for example http://sharepoint.companyname.local/ (default: ``).
{$SHAREPOINT.ROOT} - a root directory; only the specified directory and all its subfolders will be monitored (default: /Shared Documents)
{$SHAREPOINT.USER}, {$SHAREPOINT.PASSWORD} - SharePoint login credentials (default: not set).
The template contains additional macros, which can be used to filter out certain dictionaries and types during LLD process (see template's Readme.md for the description of available filter macros).
NetApp AFF A700 by HTTP {$URL} - AFF700 cluster URL address (default: ' ' )
{$USERNAME}, {PASSWORD} - AFF700 login credentials (default: not set).
Create a host for AFF A700 with cluster management IP as the Zabbix agent interface.
NGINX by HTTP {$NGINX.STUB_STATUS.HOST} - the hostname or IP address of NGINX stub_status host or container (default: localhost).
{$NGINX.STUB_STATUS.PATH} - the path of NGINX stub_status page (default: basic_status).
{$NGINX.STUB_STATUS.PORT} - the port of NGINX stub_status host or container (default: 80).
{$NGINX.STUB_STATUS.SCHEME} - the request scheme. Supported: http (default), https.
'ngx_http_stub_status_module should be set up (see NGINX documentation for details or template's Readme.md for configuration example).
To check availability, run:
nginx -V 2>&1 \| grep -o with-http_stub_status_module
NGINX Plus by HTTP {$NGINX.API.ENDPOINT} - NGINX Plus API URL in the format <scheme>://<host>:<port>/<location>/ (default: ' '). 1. Enable NGINX Plus API (see NGINX documentation for details).
2. Set the macro {$NGINX.API.ENDPOINT}
3. If required, use other template macros to filter out discovery operations and discover only required zones and upstreams.
PHP-FPM by HTTP {$PHP_FPM.HOST} - a hostname or an IP of PHP-FPM status host or container (default: localhost).
{$PHP_FPM.PING.PAGE} - PHP-FPM ping page path (default:ping).
{$PHP_FPM.PORT} - the port of PHP-FPM status host or container (default: 80).
{$PHP_FPM.PROCESS_NAME} - PHP-FPM process name (default: php-fpm).
{$PHP_FPM.SCHEME} - the request scheme. Supported: http (default), https.
{$PHP_FPM.STATUS.PAGE} - PHP-FPM status page path (default:status).
1. Open the php-fpm configuration file and enable the status page:
pm.status_path = /status
ping.path = /ping

2. Validate the syntax: $ php-fpm7 -t

3. Reload the php-fpm service.

4. In the Nginx Server Block (virtual host) configuration file, add (see template's Readme.md for an expanded example with comments):
location ~ ^/(status\|ping)$ {
access_log off;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}

5. Check the syntax: $ nginx -t

6. Reload Nginx

7. Verify: curl -L 127.0.0.1/status
RabbitMQ cluster by HTTP {$RABBITMQ.API.CLUSTER_HOST} - the hostname or IP address of RabbitMQ cluster API endpoint (default: 127.0.0.1).
{$RABBITMQ.API.SCHEME} - the request scheme. Supported: http (default), https.
{$RABBITMQ.API.USER}, {$RABBITMQ.API.PASSWORD} - RabbitMQ login credentials (default username: zbx_monitor, password: zabbix).
Enable RabbitMQ management plugin (see RabbitMQ documentation).

To create a RabbitMQ user with necessary permissions for monitoring, run:
'' rabbitmqctl add_user zbx_monitor <PASSWORD> ''
rabbitmqctl set_permissions -p / zbx_monitor %% "" "" ".*"%%
rabbitmqctl set_user_tags zbx_monitor monitoring

If the cluster consists of several nodes, it is recommended to assign the cluster template to a separate balancing host. In case of a single-node installation, the cluster template can be assigned to the host with a node template.
TiDB by HTTP {$TIDB.PORT} - The port of TiDB server metrics web endpoint (default: 10080)
{$TIDB.URL} - TiDB server URL (default: localhost).
This template works with TiDB server of PingCAP TiDB cluster.
Internal service metrics are collected from TiDB /metrics endpoint and TiDB monitoring API.
TiDB PD by HTTP {$TIDB.PORT} - The port of TiDB server metrics web endpoint (default: 2379)
{$TIDB.URL} - TiDB server URL (default: localhost).
This template works with PD server of PingCAP TiDB cluster.
Internal service metrics are collected from PD /metrics endpoint and TiDB monitoring API.
TiDB TiKV by HTTP {$TIDB.PORT} - The port of TiDB server metrics web endpoint (default: 20180)
{$TIDB.URL} - TiDB server URL (default: localhost).
This template works with TiKV server of PingCAP TiDB cluster.
Internal service metrics are collected from TiKV /metrics endpoint.
Travis CI by HTTP {$TRAVIS.API.TOKEN} - Travis API Token (default: not set)
{$TRAVIS.API.URL} - Travis API URL (default: api.travis-ci.com).
Travis API authentication token can be found in the User → Settings → API authentication section.
{$TRAVIS.API.URL} format for a private project is api.travis-ci.com.
{$TRAVIS.API.URL} format for an enterprise project is api.example.com (replace example.com with the domain Travis CI is running on).
VMWare SD-WAN VeloCloud by HTTP {$VELOCLOUD.TOKEN} - VMware SD-WAN Orchestrator API Token (default: ``).
{$VELOCLOUD.URL} - VMware SD-WAN Orchestrator URL, for example, velocloud.net (default: ``).
API token should be created in the VMware SD-WAN Orchestrator (see VMware documentation for details).
ZooKeeper by HTTP {$ZOOKEEPER.COMMAND_URL} - admin.commandURL; the URL for listing and issuing commands relative to the root URL (default: commands).
{ZOOKEEPER.PORT} - admin.serverPort; the port the embedded Jetty server listens on (default: 8080).
{$ZOOKEEPER.SCHEME} - the request scheme. Supported: http (default), https.
Metrics are collected from each ZooKeeper node by requests to AdminServer (enabled by default). See ZooKeeper documentation to enable or configure AdminServer.