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.
| Template | Mandatory macros | Additional steps/comments |
|---|---|---|
| Template App 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> |
| Template App Elasticsearch Cluster by HTTP | {$ELASTICSEARCH.PORT} - the port of the Elasticsearch host (default: 9200) {$ELASTICSEARCH.SCHEME} - request scheme. Supported: http (default), https {$ELASTICSEARCH.USERNAME}, {$ELASTICSEARCH.PASSWORD} - login credentials, required only if used for Elasticsearch authentication. | - |
| Template App Etcd by HTTP | {$ETCD.PORT}- the port used by Etcd API endpoint (default: 2379) {$ETCD.SCHEME} - 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. |
| Template App 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} - 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). |
| Template App 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} - 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 |
| Template App 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} - 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 nessesary 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. |
| Template DB ClickHouse by HTTP | {$CLICKHOUSE.PORT} - the port of ClickHouse HTTP endpoint (default: 8123) {$CLICKHOUSE.SCHEME} - 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. |