zabbix_export: version: '7.0' template_groups: - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6 name: Templates/Applications templates: - uuid: 948d046cb2894e5c8d07767a518cc1a9 template: 'HAProxy by HTTP' name: 'HAProxy by HTTP' description: | Get metrics from status page using HTTP agent https://www.haproxy.com/blog/exploring-the-haproxy-stats-page/. Example configuration of HAProxy: frontend stats bind *:8404 stats enable stats uri /stats stats refresh 10s #stats auth Username:Password # Authentication credentials You can discuss this template or leave feedback on our forum https://www.zabbix.com/forum/zabbix-suggestions-and-feedback/393527-discussion-thread-for-official-zabbix-template-haproxy Generated by official Zabbix template tool "Templator" 2.0.0 vendor: name: Zabbix version: 7.0-0 groups: - name: Templates/Applications items: - uuid: 93a0ea1e5b0145b5bd2dcdb698d367c2 name: 'HAProxy: Get stats' type: HTTP_AGENT key: haproxy.get history: '0' trends: '0' value_type: TEXT authtype: BASIC username: '{$HAPROXY.USERNAME}' password: '{$HAPROXY.PASSWORD}' description: 'HAProxy Statistics Report in CSV format' preprocessing: - type: REGEX parameters: - '# ([\s\S]*)\n' - \1 - type: CSV_TO_JSON parameters: - '' - '' - '1' url: '{$HAPROXY.STATS.SCHEME}://{HOST.CONN}:{$HAPROXY.STATS.PORT}/{$HAPROXY.STATS.PATH};csv' tags: - tag: component value: raw - uuid: 6af51d085a2f41f983bc3b20c6f4cc22 name: 'HAProxy: Get nodes' type: DEPENDENT key: haproxy.get.nodes delay: '0' history: '0' trends: '0' value_type: TEXT description: 'Array for LLD rules.' preprocessing: - type: JAVASCRIPT parameters: - 'return JSON.stringify(JSON.parse(value),[''mode'',''pxname'',''svname''])' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: haproxy.get tags: - tag: component value: raw - uuid: 123c03c715494faea6b1d4f8b8fa564d name: 'HAProxy: Get stats page' type: HTTP_AGENT key: haproxy.get_html history: '0' trends: '0' value_type: TEXT authtype: BASIC username: '{$HAPROXY.USERNAME}' password: '{$HAPROXY.PASSWORD}' description: 'HAProxy Statistics Report HTML' url: '{$HAPROXY.STATS.SCHEME}://{HOST.CONN}:{$HAPROXY.STATS.PORT}/{$HAPROXY.STATS.PATH}' tags: - tag: component value: raw - uuid: 06a33ebaed3148889c19eba2de859d70 name: 'HAProxy: Uptime' type: DEPENDENT key: haproxy.uptime delay: '0' history: 7d value_type: FLOAT units: s preprocessing: - type: JAVASCRIPT parameters: - | try { var t = value.match(/(\d+)d (\d+)h(\d+)m(\d+)s/); return t[1] * 86400 + t[2] * 3600 + t[3] * 60 + t[4] * 1; } catch (error) { throw "HAProxy uptime is not found : " + error; } master_item: key: haproxy.get_html tags: - tag: component value: application triggers: - uuid: ff606f3c571340389562fabc9e814463 expression: 'last(/HAProxy by HTTP/haproxy.uptime)<10m' name: 'HAProxy: has been restarted' event_name: 'HAProxy: has been restarted (uptime < 10m)' priority: INFO description: 'Uptime is less than 10 minutes.' manual_close: 'YES' tags: - tag: scope value: notice - uuid: a2cd747feaaf4c278972ac7adbd9015a name: 'HAProxy: Version' type: DEPENDENT key: haproxy.version delay: '0' trends: '0' value_type: CHAR preprocessing: - type: REGEX parameters: - 'HAProxy version ([^,]*),' - \1 error_handler: CUSTOM_ERROR error_handler_params: 'HAProxy version is not found' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1d master_item: key: haproxy.get_html tags: - tag: component value: application triggers: - uuid: c4b8346311a34cd19ebc8fbab53737fe expression: 'last(/HAProxy by HTTP/haproxy.version,#1)<>last(/HAProxy by HTTP/haproxy.version,#2) and length(last(/HAProxy by HTTP/haproxy.version))>0' name: 'HAProxy: Version has changed' event_name: 'HAProxy: Version has changed (new version: {ITEM.VALUE})' priority: INFO description: 'HAProxy version has changed. Acknowledge to close the problem manually.' manual_close: 'YES' tags: - tag: scope value: notice - uuid: 6f9c22a840764181be9cf98609e7f691 name: 'HAProxy: Service response time' type: SIMPLE key: 'net.tcp.service.perf["{$HAPROXY.STATS.SCHEME}","{HOST.CONN}","{$HAPROXY.STATS.PORT}"]' history: 7d value_type: FLOAT units: s tags: - tag: component value: health - tag: component value: network triggers: - uuid: 1fed5fffc6414e0babe362c0ad742e43 expression: 'min(/HAProxy by HTTP/net.tcp.service.perf["{$HAPROXY.STATS.SCHEME}","{HOST.CONN}","{$HAPROXY.STATS.PORT}"],5m)>{$HAPROXY.RESPONSE_TIME.MAX.WARN}' name: 'HAProxy: Service response time is too high' event_name: 'HAProxy: Service response time is too high (over {$HAPROXY.RESPONSE_TIME.MAX.WARN} for 5m)' priority: WARNING manual_close: 'YES' dependencies: - name: 'HAProxy: Service is down' expression: 'last(/HAProxy by HTTP/net.tcp.service["{$HAPROXY.STATS.SCHEME}","{HOST.CONN}","{$HAPROXY.STATS.PORT}"])=0' tags: - tag: scope value: performance - uuid: 68cb52357d7443d79373df3890ed175f name: 'HAProxy: Service status' type: SIMPLE key: 'net.tcp.service["{$HAPROXY.STATS.SCHEME}","{HOST.CONN}","{$HAPROXY.STATS.PORT}"]' history: 7d valuemap: name: 'Service state' preprocessing: - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 10m tags: - tag: component value: health - tag: component value: network triggers: - uuid: b346943ac4d04a96bcef42f3c43fc555 expression: 'last(/HAProxy by HTTP/net.tcp.service["{$HAPROXY.STATS.SCHEME}","{HOST.CONN}","{$HAPROXY.STATS.PORT}"])=0' name: 'HAProxy: Service is down' priority: AVERAGE manual_close: 'YES' tags: - tag: scope value: availability discovery_rules: - uuid: 7b4ab1338cdf4e499c1fdea4c886ae9a name: 'Backend discovery' type: DEPENDENT key: haproxy.backend.discovery delay: '0' filter: evaltype: AND conditions: - macro: '{#SVNAME}' value: BACKEND formulaid: B - macro: '{#MODE}' value: http|tcp formulaid: A description: 'Discovery backends' item_prototypes: - uuid: d5d9c5c0d84d41d597c85a3562e9b4fa name: 'HAProxy Backend {#PXNAME}: Number of active servers' type: DEPENDENT key: 'haproxy.backend.act[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Number of active servers.' preprocessing: - type: JSONPATH parameters: - $.act - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: servers - uuid: 08debce7e9084094b38fd1100e03c553 name: 'HAProxy Backend {#PXNAME}: Number of backup servers' type: DEPENDENT key: 'haproxy.backend.bck[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Number of backup servers.' preprocessing: - type: JSONPATH parameters: - $.bck - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: servers - uuid: 8a53b50c1ce441c18fe6e6d5e0ad48d6 name: 'HAProxy Backend {#PXNAME}: Incoming traffic' type: DEPENDENT key: 'haproxy.backend.bin.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: bps description: 'Number of bits received by the backend' preprocessing: - type: JSONPATH parameters: - $.bin - type: MULTIPLIER parameters: - '8' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: network - uuid: 1c24125e97014d4ba6a8155af5744d38 name: 'HAProxy Backend {#PXNAME}: Outgoing traffic' type: DEPENDENT key: 'haproxy.backend.bout.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: bps description: 'Number of bits sent by the backend' preprocessing: - type: JSONPATH parameters: - $.bout - type: MULTIPLIER parameters: - '8' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: network - uuid: 59eeafe66fe34334a81d736f62b88ec0 name: 'HAProxy Backend {#PXNAME}: Responses denied per second' type: DEPENDENT key: 'haproxy.backend.dresp.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Responses denied due to security concerns (ACL-restricted).' preprocessing: - type: JSONPATH parameters: - $.dresp - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses - uuid: e885cb2b53a941cd932211c4ccf334f6 name: 'HAProxy Backend {#PXNAME}: Errors connection per second' type: DEPENDENT key: 'haproxy.backend.econ.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of requests that encountered an error attempting to connect to a backend server.' preprocessing: - type: JSONPATH parameters: - $.econ - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: connections - uuid: c42f04d1a00c4d4fa96705746cb32631 name: 'HAProxy Backend {#PXNAME}: Response errors per second' type: DEPENDENT key: 'haproxy.backend.eresp.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of requests whose responses yielded an error' preprocessing: - type: JSONPATH parameters: - $.eresp - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses trigger_prototypes: - uuid: efe5a794bd47419398aa3aa35a177f08 expression: 'min(/HAProxy by HTTP/haproxy.backend.eresp.rate[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.BACK_ERESP.MAX.WARN}' name: 'HAProxy backend {#PXNAME}: Number of responses with error is high' event_name: 'HAProxy backend {#PXNAME}: Number of responses with error is more than {$HAPROXY.BACK_ERESP.MAX.WARN} for 5m' priority: WARNING description: 'Number of requests on backend, whose responses yielded an error, is more than {$HAPROXY.BACK_ERESP.MAX.WARN}.' tags: - tag: scope value: notice - uuid: 55edb3b8afaa4ee2961d1fead3653dbd name: 'HAProxy Backend {#PXNAME}: Number of responses with codes 1xx per second' type: DEPENDENT key: 'haproxy.backend.hrsp_1xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of informational HTTP responses per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_1xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses - uuid: a4e5dd0c25c3471e82e28b88b6b42e39 name: 'HAProxy Backend {#PXNAME}: Number of responses with codes 2xx per second' type: DEPENDENT key: 'haproxy.backend.hrsp_2xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of successful HTTP responses per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_2xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses - uuid: 7e32a61240004b99bf19caf29c5d1409 name: 'HAProxy Backend {#PXNAME}: Number of responses with codes 3xx per second' type: DEPENDENT key: 'haproxy.backend.hrsp_3xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP redirections per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_3xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses - uuid: 9519222f512e46d8ae1a7ca3a47f3970 name: 'HAProxy Backend {#PXNAME}: Number of responses with codes 4xx per second' type: DEPENDENT key: 'haproxy.backend.hrsp_4xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP client errors per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_4xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses - uuid: fdaa48cf19164fed8c3f00cc42c3bab8 name: 'HAProxy Backend {#PXNAME}: Number of responses with codes 5xx per second' type: DEPENDENT key: 'haproxy.backend.hrsp_5xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP server errors per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_5xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses - uuid: 7985131c621d49419dfe5bcfecb675f2 name: 'HAProxy Backend {#PXNAME}: Unassigned requests' type: DEPENDENT key: 'haproxy.backend.qcur[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Current number of requests unassigned in queue.' preprocessing: - type: JSONPATH parameters: - $.qcur master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: requests trigger_prototypes: - uuid: be428614e0874726b63d79150813542d expression: 'min(/HAProxy by HTTP/haproxy.backend.qcur[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.BACK_QCUR.MAX.WARN}' name: 'HAProxy backend {#PXNAME}: Current number of requests unassigned in queue is high' event_name: 'HAProxy backend {#PXNAME}: Current number of requests unassigned in queue is more than {$HAPROXY.BACK_QCUR.MAX.WARN} for 5m' priority: WARNING description: 'Current number of requests on backend unassigned in queue is more than {$HAPROXY.BACK_QCUR.MAX.WARN}.' tags: - tag: scope value: notice - uuid: 1592ee4ff7b2448a9e044a0ad7904693 name: 'HAProxy Backend {#PXNAME}: Time in queue' type: DEPENDENT key: 'haproxy.backend.qtime[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: s description: 'Average time spent in queue (in ms) for the last 1,024 requests' preprocessing: - type: JSONPATH parameters: - $.qtime - type: MULTIPLIER parameters: - '0.001' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: requests trigger_prototypes: - uuid: fa8211069df846a1b2ee8afcdd52f4a0 expression: 'min(/HAProxy by HTTP/haproxy.backend.qtime[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.BACK_QTIME.MAX.WARN}' name: 'HAProxy backend {#PXNAME}: Average time spent in queue is high' event_name: 'HAProxy backend {#PXNAME}: Average time spent in queue is more than {$HAPROXY.BACK_QTIME.MAX.WARN} for 5m' priority: WARNING description: 'Average time spent in queue (in ms) for the last 1,024 requests is more than {$HAPROXY.BACK_QTIME.MAX.WARN}.' tags: - tag: scope value: performance - uuid: 8446abe2825848c7a11fb7d567f9e3a1 name: 'HAProxy Backend {#PXNAME}: Raw data' type: DEPENDENT key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' delay: '0' history: '0' trends: '0' value_type: TEXT description: 'The raw data of the Backend with the name `{#PXNAME}`' preprocessing: - type: JSONPATH parameters: - '$.[?(@.pxname == ''{#PXNAME}'' && @.svname == ''{#SVNAME}'')].first()' master_item: key: haproxy.get tags: - tag: backend value: '{#PXNAME}' - tag: component value: raw - uuid: 5ddd3cd8af904faaa69f34df442c9717 name: 'HAProxy Backend {#PXNAME}: Responses time' type: DEPENDENT key: 'haproxy.backend.rtime[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: s description: 'Average backend response time (in ms) for the last 1,024 requests' preprocessing: - type: JSONPATH parameters: - $.rtime - type: MULTIPLIER parameters: - '0.001' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: responses trigger_prototypes: - uuid: 90c0bd8c280246b7903ac90c32553fd5 expression: 'min(/HAProxy by HTTP/haproxy.backend.rtime[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.BACK_RTIME.MAX.WARN}' name: 'HAProxy backend {#PXNAME}: Average response time is high' event_name: 'HAProxy backend {#PXNAME}: Average response time is more than {$HAPROXY.BACK_RTIME.MAX.WARN} for 5m' priority: WARNING description: 'Average backend response time (in ms) for the last 1,024 requests is more than {$HAPROXY.BACK_RTIME.MAX.WARN}.' tags: - tag: scope value: performance - uuid: 16bb7ee405a84bb4865c46fdf996511f name: 'HAProxy Backend {#PXNAME}: Status' type: DEPENDENT key: 'haproxy.backend.status[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d trends: '0' value_type: CHAR description: | Possible values: UP - The server is reporting as healthy. DOWN - The server is reporting as unhealthy and unable to receive requests. NOLB - You've added http-check disable-on-404 to the backend and the health checked URL has returned an HTTP 404 response. MAINT - The server has been disabled or put into maintenance mode. DRAIN - The server has been put into drain mode. no check - Health checks are not enabled for this server. preprocessing: - type: JSONPATH parameters: - $.status - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 10m master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: health trigger_prototypes: - uuid: 5ea80b42a6be4df48f048a5aa253c923 expression: 'count(/HAProxy by HTTP/haproxy.backend.status[{#PXNAME},{#SVNAME}],#5,"eq","DOWN")=5' name: 'HAProxy backend {#PXNAME}: Server is DOWN' opdata: 'Current value: {ITEM.LASTVALUE1}' priority: AVERAGE description: 'Backend is not available.' tags: - tag: scope value: availability - uuid: 76d9497f428142268a5c1eeb24cbbad7 name: 'HAProxy Backend {#PXNAME}: Sessions per second' type: DEPENDENT key: 'haproxy.backend.stot.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Cumulative number of sessions (end-to-end connections) per second.' preprocessing: - type: JSONPATH parameters: - $.stot - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: sessions - uuid: f1d26d9c409d4983b7f94ff412ae72f3 name: 'HAProxy Backend {#PXNAME}: Weight' type: DEPENDENT key: 'haproxy.backend.weight[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Total effective weight.' preprocessing: - type: JSONPATH parameters: - $.weight - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: balancer - uuid: 00d3038c7df34512ae39ba1051712674 name: 'HAProxy Backend {#PXNAME}: Redispatched requests per second' type: DEPENDENT key: 'haproxy.backend.wredis.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of times a request was redispatched to a different backend.' preprocessing: - type: JSONPATH parameters: - $.wredis - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: requests - uuid: e0eafe2c4d0d40e492822e43f6cf108e name: 'HAProxy Backend {#PXNAME}: Retried connections per second' type: DEPENDENT key: 'haproxy.backend.wretr.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of times a connection was retried.' preprocessing: - type: JSONPATH parameters: - $.wretr - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.backend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: backend value: '{#PXNAME}' - tag: component value: connections graph_prototypes: - uuid: 47e7dc2c8ff2424eb81f396f83dbb2c0 name: 'HAProxy: Backend {#PXNAME} In/Out traffic' graph_items: - drawtype: GRADIENT_LINE color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.backend.bin.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' drawtype: GRADIENT_LINE color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.backend.bout.rate[{#PXNAME},{#SVNAME}]' - uuid: 2160a789b142498cb2d3e401ee992edb name: 'HAProxy: Backend {#PXNAME} Redispatched requests and retried connections per second' graph_items: - color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.backend.wredis.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.backend.wretr.rate[{#PXNAME},{#SVNAME}]' - uuid: 816e4062fc7b45bea96c2a2fbc171088 name: 'HAProxy: Backend {#PXNAME} Responses by HTTP code' type: STACKED graph_items: - color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.backend.hrsp_1xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.backend.hrsp_2xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '2' color: 00611C item: host: 'HAProxy by HTTP' key: 'haproxy.backend.hrsp_3xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '3' color: F7941D item: host: 'HAProxy by HTTP' key: 'haproxy.backend.hrsp_4xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '4' color: FC6EA3 item: host: 'HAProxy by HTTP' key: 'haproxy.backend.hrsp_5xx.rate[{#PXNAME},{#SVNAME}]' master_item: key: haproxy.get.nodes lld_macro_paths: - lld_macro: '{#MODE}' path: $.mode - lld_macro: '{#PXNAME}' path: $.pxname - lld_macro: '{#SVNAME}' path: $.svname overrides: - name: 'Discard HTTP status codes' step: '1' filter: conditions: - macro: '{#MODE}' value: tcp formulaid: A operations: - operationobject: ITEM_PROTOTYPE operator: LIKE value: 'Number of responses with codes' status: ENABLED discover: NO_DISCOVER - uuid: 37629de766fd4c61a1618f9d1f1e2eab name: 'Frontend discovery' type: DEPENDENT key: haproxy.frontend.discovery delay: '0' filter: evaltype: AND conditions: - macro: '{#SVNAME}' value: FRONTEND formulaid: B - macro: '{#MODE}' value: http|tcp formulaid: A description: 'Discovery frontends' item_prototypes: - uuid: 6dac4d4e912b4f8fb7def6bab98d8dc4 name: 'HAProxy Frontend {#PXNAME}: Incoming traffic' type: DEPENDENT key: 'haproxy.frontend.bin.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: bps description: 'Number of bits received by the frontend' preprocessing: - type: JSONPATH parameters: - $.bin - type: MULTIPLIER parameters: - '8' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: network - tag: frontend value: '{#PXNAME}' - uuid: 5550e3842d00486999c822b0d514b78e name: 'HAProxy Frontend {#PXNAME}: Outgoing traffic' type: DEPENDENT key: 'haproxy.frontend.bout.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: bps description: 'Number of bits sent by the frontend' preprocessing: - type: JSONPATH parameters: - $.bout - type: MULTIPLIER parameters: - '8' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: network - tag: frontend value: '{#PXNAME}' - uuid: 819b1559cf294958ab03cae8663eb7e3 name: 'HAProxy Frontend {#PXNAME}: Denied requests per second' type: DEPENDENT key: 'haproxy.frontend.dreq.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Requests denied due to security concerns (ACL-restricted) per second.' preprocessing: - type: JSONPATH parameters: - $.dreq - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: requests - tag: frontend value: '{#PXNAME}' trigger_prototypes: - uuid: 4d8ac22673944752979263b34521af65 expression: 'min(/HAProxy by HTTP/haproxy.frontend.dreq.rate[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.FRONT_DREQ.MAX.WARN}' name: 'HAProxy frontend {#PXNAME}: Number of requests denied is high' event_name: 'HAProxy frontend {#PXNAME}: Number of requests denied is more than {$HAPROXY.FRONT_DREQ.MAX.WARN} for 5m' priority: WARNING description: 'Number of requests denied due to security concerns (ACL-restricted) is more than {$HAPROXY.FRONT_DREQ.MAX.WARN}.' tags: - tag: scope value: notice - uuid: 0b2a1b9e1c9045519e4ac52d5d83e86b name: 'HAProxy Frontend {#PXNAME}: Request errors per second' type: DEPENDENT key: 'haproxy.frontend.ereq.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of request errors per second.' preprocessing: - type: JSONPATH parameters: - $.ereq - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: requests - tag: frontend value: '{#PXNAME}' trigger_prototypes: - uuid: c51ac95f4d4a46e1ac1df1d057197f6e expression: 'min(/HAProxy by HTTP/haproxy.frontend.ereq.rate[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.FRONT_EREQ.MAX.WARN}' name: 'HAProxy frontend {#PXNAME}: Number of request errors is high' event_name: 'HAProxy frontend {#PXNAME}: Number of request errors is more than {$HAPROXY.FRONT_EREQ.MAX.WARN} for 5m' priority: WARNING description: 'Number of request errors is more than {$HAPROXY.FRONT_EREQ.MAX.WARN}.' tags: - tag: scope value: notice - uuid: c287463b994c40caaaeb195a4dca5d37 name: 'HAProxy Frontend {#PXNAME}: Number of responses with codes 1xx per second' type: DEPENDENT key: 'haproxy.frontend.hrsp_1xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of informational HTTP responses per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_1xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: frontend value: '{#PXNAME}' - uuid: 41cd2084595d482ea204f9edc62a985a name: 'HAProxy Frontend {#PXNAME}: Number of responses with codes 2xx per second' type: DEPENDENT key: 'haproxy.frontend.hrsp_2xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of successful HTTP responses per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_2xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: frontend value: '{#PXNAME}' - uuid: f1ae1b8f477449c9832e80bfd145211a name: 'HAProxy Frontend {#PXNAME}: Number of responses with codes 3xx per second' type: DEPENDENT key: 'haproxy.frontend.hrsp_3xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP redirections per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_3xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: frontend value: '{#PXNAME}' - uuid: f1635a2f379b4542b9c44c9d5224fc4d name: 'HAProxy Frontend {#PXNAME}: Number of responses with codes 4xx per second' type: DEPENDENT key: 'haproxy.frontend.hrsp_4xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP client errors per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_4xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: frontend value: '{#PXNAME}' - uuid: cf9ae6b634fd4acc92c180bc10c9b0f5 name: 'HAProxy Frontend {#PXNAME}: Number of responses with codes 5xx per second' type: DEPENDENT key: 'haproxy.frontend.hrsp_5xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP server errors per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_5xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: frontend value: '{#PXNAME}' - uuid: 6c09de61332c4d56a4b90ee4e9ab6fe2 name: 'HAProxy Frontend {#PXNAME}: Sessions rate' type: DEPENDENT key: 'haproxy.frontend.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Number of sessions created per second' preprocessing: - type: JSONPATH parameters: - $.rate master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: sessions - tag: frontend value: '{#PXNAME}' - uuid: e0a67c04834645e4b59cf6bab5353f84 name: 'HAProxy Frontend {#PXNAME}: Raw data' type: DEPENDENT key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' delay: '0' history: '0' trends: '0' value_type: TEXT description: 'The raw data of the Frontend with the name `{#PXNAME}`' preprocessing: - type: JSONPATH parameters: - '$.[?(@.pxname == ''{#PXNAME}'' && @.svname == ''{#SVNAME}'')].first()' master_item: key: haproxy.get tags: - tag: component value: raw - tag: frontend value: '{#PXNAME}' - uuid: 7097695ee69e4b7895c0d885606b8456 name: 'HAProxy Frontend {#PXNAME}: Requests rate' type: DEPENDENT key: 'haproxy.frontend.req_rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'HTTP requests per second' preprocessing: - type: JSONPATH parameters: - $.req_rate master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: requests - tag: frontend value: '{#PXNAME}' - uuid: 7985345dcd274811ac6a2e69940f6cb7 name: 'HAProxy Frontend {#PXNAME}: Established sessions' type: DEPENDENT key: 'haproxy.frontend.scur[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'The current number of established sessions.' preprocessing: - type: JSONPATH parameters: - $.scur master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: sessions - tag: frontend value: '{#PXNAME}' - uuid: 8b185b2272244229865315cc0139d43f name: 'HAProxy Frontend {#PXNAME}: Session limits' type: DEPENDENT key: 'haproxy.frontend.slim[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'The most simultaneous sessions that are allowed, as defined by the maxconn setting in the frontend.' preprocessing: - type: JSONPATH parameters: - $.slim - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: sessions - tag: frontend value: '{#PXNAME}' - uuid: 6e7372afcd6842c0865a1480973fc8e5 name: 'HAProxy Frontend {#PXNAME}: Status' type: DEPENDENT key: 'haproxy.frontend.status[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d trends: '0' value_type: CHAR description: | Possible values: OPEN, STOP. When Status is OPEN, the frontend is operating normally and ready to receive traffic. preprocessing: - type: JSONPATH parameters: - $.status - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 6h master_item: key: 'haproxy.frontend.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: health - tag: frontend value: '{#PXNAME}' - uuid: 53efa6139fe3400283c96ec76eb20855 name: 'HAProxy Frontend {#PXNAME}: Session utilization' type: CALCULATED key: 'haproxy.frontend.sutil[{#PXNAME},{#SVNAME}]' history: 7d value_type: FLOAT units: '%' params: 'last(//haproxy.frontend.scur[{#PXNAME},{#SVNAME}]) / last(//haproxy.frontend.slim[{#PXNAME},{#SVNAME}]) * 100' description: 'Percentage of sessions used (scur / slim * 100).' tags: - tag: component value: sessions - tag: frontend value: '{#PXNAME}' trigger_prototypes: - uuid: ad33db7c356342e78ee19e904c981f1f expression: 'min(/HAProxy by HTTP/haproxy.frontend.sutil[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.FRONT_SUTIL.MAX.WARN}' name: 'HAProxy frontend {#PXNAME}: Session utilization is high' event_name: 'HAProxy frontend {#PXNAME}: Session utilization is more than {$HAPROXY.FRONT_SUTIL.MAX.WARN}% for 5m' priority: WARNING description: 'Alerting on this metric is essential to ensure your server has sufficient capacity to handle all concurrent sessions. Unlike requests, upon reaching the session limit HAProxy will deny additional clients until resource consumption drops. Furthermore, if you find your session usage percentage to be hovering above 80%, it could be time to either modify HAProxy''s configuration to allow more sessions, or migrate your HAProxy server to a bigger box.' tags: - tag: scope value: performance graph_prototypes: - uuid: 29c858f57e5447758c9bb39008ba7aa9 name: 'HAProxy: Frontend {#PXNAME} Errors and denials per second' graph_items: - color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.ereq.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.dreq.rate[{#PXNAME},{#SVNAME}]' - uuid: b7db5c68269b46d4b009f5a6c769e13e name: 'HAProxy: Frontend {#PXNAME} In/Out traffic' graph_items: - drawtype: GRADIENT_LINE color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.bin.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' drawtype: GRADIENT_LINE color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.bout.rate[{#PXNAME},{#SVNAME}]' - uuid: 1550af17c1fe4509922b87dd7d60e8b7 name: 'HAProxy: Frontend {#PXNAME} Requests and sessions per second' graph_items: - color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.req_rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.rate[{#PXNAME},{#SVNAME}]' - uuid: 82817ba44621444c90f7b4dc8abb3107 name: 'HAProxy: Frontend {#PXNAME} Responses by HTTP code' type: STACKED graph_items: - color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.hrsp_1xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.hrsp_2xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '2' color: 00611C item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.hrsp_3xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '3' color: F7941D item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.hrsp_4xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '4' color: FC6EA3 item: host: 'HAProxy by HTTP' key: 'haproxy.frontend.hrsp_5xx.rate[{#PXNAME},{#SVNAME}]' master_item: key: haproxy.get.nodes lld_macro_paths: - lld_macro: '{#MODE}' path: $.mode - lld_macro: '{#PXNAME}' path: $.pxname - lld_macro: '{#SVNAME}' path: $.svname overrides: - name: 'Discard HTTP status codes' step: '1' filter: conditions: - macro: '{#MODE}' value: tcp formulaid: A operations: - operationobject: ITEM_PROTOTYPE operator: LIKE value: 'Number of responses with codes' status: ENABLED discover: NO_DISCOVER - uuid: 134455ad7e8c4444a78255cb2e3fa98b name: 'Server discovery' type: DEPENDENT key: haproxy.server.discovery delay: '0' filter: evaltype: AND conditions: - macro: '{#SVNAME}' value: FRONTEND|BACKEND operator: NOT_MATCHES_REGEX formulaid: B - macro: '{#MODE}' value: http|tcp formulaid: A description: 'Discovery servers' item_prototypes: - uuid: bd19603777534fe38c9aa1888903d2fa name: 'HAProxy {#PXNAME} {#SVNAME}: Server is active' type: DEPENDENT key: 'haproxy.server.act[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Shows whether the server is active (marked with a Y) or a backup (marked with a -).' valuemap: name: 'Server mode' preprocessing: - type: JSONPATH parameters: - $.act - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: role - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 49b7da6cc75c4bb7ad2c3b7c25beccb5 name: 'HAProxy {#PXNAME} {#SVNAME}: Server is backup' type: DEPENDENT key: 'haproxy.server.bck[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Shows whether the server is a backup (marked with a Y) or active (marked with a -).' valuemap: name: 'Server mode' preprocessing: - type: JSONPATH parameters: - $.bck - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: role - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 355525dba53747c899f19fe4114a3ca4 name: 'HAProxy {#PXNAME} {#SVNAME}: Incoming traffic' type: DEPENDENT key: 'haproxy.server.bin.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: bps description: 'Number of bits received by the backend' preprocessing: - type: JSONPATH parameters: - $.bin - type: MULTIPLIER parameters: - '8' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: network - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 0d721252dd3946818f87815a56ced8d0 name: 'HAProxy {#PXNAME} {#SVNAME}: Outgoing traffic' type: DEPENDENT key: 'haproxy.server.bout.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: bps description: 'Number of bits sent by the backend' preprocessing: - type: JSONPATH parameters: - $.bout - type: MULTIPLIER parameters: - '8' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: network - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 6fe4502c3b534ee6b9a39a3fcc8d0b98 name: 'HAProxy {#PXNAME} {#SVNAME}: Status of last health check' type: DEPENDENT key: 'haproxy.server.check_status[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d trends: '0' value_type: CHAR description: | Status of last health check, one of: UNK -> unknown INI -> initializing SOCKERR -> socket error L4OK -> check passed on layer 4, no upper layers testing enabled L4TOUT -> layer 1-4 timeout L4CON -> layer 1-4 connection problem, for example "Connection refused" (tcp rst) or "No route to host" (icmp) L6OK -> check passed on layer 6 L6TOUT -> layer 6 (SSL) timeout L6RSP -> layer 6 invalid response - protocol error L7OK -> check passed on layer 7 L7OKC -> check conditionally passed on layer 7, for example 404 with disable-on-404 L7TOUT -> layer 7 (HTTP/SMTP) timeout L7RSP -> layer 7 invalid response - protocol error L7STS -> layer 7 response error, for example HTTP 5xx Notice: If a check is currently running, the last known status will be reported, prefixed with "* ". e. g. "* L7OK". preprocessing: - type: JSONPATH parameters: - $.check_status - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 10m master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: health - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' trigger_prototypes: - uuid: 6c4f8cf76ab046aaa4bd51e41cc10de7 expression: 'find(/HAProxy by HTTP/haproxy.server.check_status[{#PXNAME},{#SVNAME}],#3,"regexp","(?:L[4-7]OK|^$)")=0' name: 'HAProxy {#PXNAME} {#SVNAME}: Health check error' opdata: 'Current value: {ITEM.LASTVALUE1}' priority: WARNING description: 'Please check the server for faults.' dependencies: - name: 'HAProxy {#PXNAME} {#SVNAME}: Server is DOWN' expression: 'count(/HAProxy by HTTP/haproxy.server.status[{#PXNAME},{#SVNAME}],#5,"eq","DOWN")=5' tags: - tag: scope value: notice - uuid: 6e5824eca488428eb61a17d1d4efd055 name: 'HAProxy {#PXNAME} {#SVNAME}: Responses denied per second' type: DEPENDENT key: 'haproxy.server.dresp.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Responses denied due to security concerns (ACL-restricted).' preprocessing: - type: JSONPATH parameters: - $.dresp - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 18533da75eb142dbb216acc7af3bde4b name: 'HAProxy {#PXNAME} {#SVNAME}: Errors connection per second' type: DEPENDENT key: 'haproxy.server.econ.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of requests that encountered an error attempting to connect to a backend server.' preprocessing: - type: JSONPATH parameters: - $.econ - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: connections - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 3412ca47e4fe4481b434f95dda566c5e name: 'HAProxy {#PXNAME} {#SVNAME}: Response errors per second' type: DEPENDENT key: 'haproxy.server.eresp.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of requests whose responses yielded an error.' preprocessing: - type: JSONPATH parameters: - $.eresp - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' trigger_prototypes: - uuid: bf952df23dac4b059d0219b204449830 expression: 'min(/HAProxy by HTTP/haproxy.server.eresp.rate[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.SERVER_ERESP.MAX.WARN}' name: 'HAProxy {#PXNAME} {#SVNAME}: Number of responses with error is high' event_name: 'HAProxy {#PXNAME} {#SVNAME}: Number of responses with error is more than {$HAPROXY.SERVER_ERESP.MAX.WARN} for 5m' priority: WARNING description: 'Number of requests on server, whose responses yielded an error, is more than {$HAPROXY.SERVER_ERESP.MAX.WARN}.' tags: - tag: scope value: notice - uuid: b0a39c6bdf7b4db0a27fce9c0e08aecb name: 'HAProxy {#PXNAME} {#SVNAME}: Number of responses with codes 1xx per second' type: DEPENDENT key: 'haproxy.server.hrsp_1xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of informational HTTP responses per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_1xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 786330b63708432c963725c83fa1791e name: 'HAProxy {#PXNAME} {#SVNAME}: Number of responses with codes 2xx per second' type: DEPENDENT key: 'haproxy.server.hrsp_2xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of successful HTTP responses per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_2xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 1a96152c277d4018acced2f9d9ffd6cd name: 'HAProxy {#PXNAME} {#SVNAME}: Number of responses with codes 3xx per second' type: DEPENDENT key: 'haproxy.server.hrsp_3xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP redirections per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_3xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 66076fc3a6fc401cb1423fb015dfe187 name: 'HAProxy {#PXNAME} {#SVNAME}: Number of responses with codes 4xx per second' type: DEPENDENT key: 'haproxy.server.hrsp_4xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP client errors per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_4xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 631d2471fc7346a5b0ce8379a400f13e name: 'HAProxy {#PXNAME} {#SVNAME}: Number of responses with codes 5xx per second' type: DEPENDENT key: 'haproxy.server.hrsp_5xx.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of HTTP server errors per second.' preprocessing: - type: JSONPATH parameters: - $.hrsp_5xx - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: responses - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: ff7d8b0633ce4e119ad2f8976ce0ea18 name: 'HAProxy {#PXNAME} {#SVNAME}: Server was selected per second' type: DEPENDENT key: 'haproxy.server.lbtot.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of times that server was selected.' preprocessing: - type: JSONPATH parameters: - $.lbtot - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: connections - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 0bc4c4f25d00423b9dc188c9dbe34db0 name: 'HAProxy {#PXNAME} {#SVNAME}: Unassigned requests' type: DEPENDENT key: 'haproxy.server.qcur[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Current number of requests unassigned in queue.' preprocessing: - type: JSONPATH parameters: - $.qcur master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: requests - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' trigger_prototypes: - uuid: 24e803eab76244d38ff90f2fce396b7f expression: 'min(/HAProxy by HTTP/haproxy.server.qcur[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.SERVER_QCUR.MAX.WARN}' name: 'HAProxy {#PXNAME} {#SVNAME}: Current number of requests unassigned in queue is high' event_name: 'HAProxy {#PXNAME} {#SVNAME}: Current number of requests unassigned in queue is more than {$HAPROXY.SERVER_QCUR.MAX.WARN} for 5m' priority: WARNING description: 'Current number of requests unassigned in queue is more than {$HAPROXY.SERVER_QCUR.MAX.WARN}.' tags: - tag: scope value: notice - uuid: d2d92c67b546498d929b1e38b7a48561 name: 'HAProxy {#PXNAME} {#SVNAME}: Configured maxqueue' type: DEPENDENT key: 'haproxy.server.qlimit[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Configured maxqueue for the server, or nothing in the value is 0 (default, meaning no limit).' preprocessing: - type: JSONPATH parameters: - $.qlimit - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 6h - type: MATCHES_REGEX parameters: - ^\d+$ error_handler: CUSTOM_VALUE error_handler_params: '0' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: queues - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: aa3b73b8d06a463f84b10621461c1577 name: 'HAProxy {#PXNAME} {#SVNAME}: Time in queue' type: DEPENDENT key: 'haproxy.server.qtime[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: s description: 'Average time spent in queue (in ms) for the last 1,024 requests.' preprocessing: - type: JSONPATH parameters: - $.qtime - type: MULTIPLIER parameters: - '0.001' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: requests - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' trigger_prototypes: - uuid: f6d92dc0d2334ca4a7a4c0c81f60c44c expression: 'min(/HAProxy by HTTP/haproxy.server.qtime[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.SERVER_QTIME.MAX.WARN}' name: 'HAProxy {#PXNAME} {#SVNAME}: Average time spent in queue is high' event_name: 'HAProxy {#PXNAME} {#SVNAME}: Average time spent in queue is more than {$HAPROXY.SERVER_QTIME.MAX.WARN} for 5m' priority: WARNING description: 'Average time spent in queue (in ms) for the last 1,024 requests is more than {$HAPROXY.SERVER_QTIME.MAX.WARN}.' tags: - tag: scope value: performance - uuid: a0cd94ee26f141f9ab02d902ef0fe30c name: 'HAProxy Server {#PXNAME} {#SVNAME}: Raw data' type: DEPENDENT key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' delay: '0' history: '0' trends: '0' value_type: TEXT description: 'The raw data of the Server named `{#SVNAME}` and the proxy with the name `{#PXNAME}`' preprocessing: - type: JSONPATH parameters: - '$.[?(@.pxname == ''{#PXNAME}'' && @.svname == ''{#SVNAME}'')].first()' master_item: key: haproxy.get tags: - tag: component value: raw - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: f790d237b494452a9b77b4f002a7ca46 name: 'HAProxy {#PXNAME} {#SVNAME}: Responses time' type: DEPENDENT key: 'haproxy.server.rtime[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT units: s description: 'Average server response time (in ms) for the last 1,024 requests.' preprocessing: - type: JSONPATH parameters: - $.rtime - type: MULTIPLIER parameters: - '0.001' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: health - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' trigger_prototypes: - uuid: 5a0444417ebf47cab0218e8407f04354 expression: 'min(/HAProxy by HTTP/haproxy.server.rtime[{#PXNAME},{#SVNAME}],5m)>{$HAPROXY.SERVER_RTIME.MAX.WARN}' name: 'HAProxy {#PXNAME} {#SVNAME}: Average response time is high' event_name: 'HAProxy {#PXNAME} {#SVNAME}: Average response time is more than {$HAPROXY.SERVER_RTIME.MAX.WARN} for 5m' priority: WARNING description: 'Average server response time (in ms) for the last 1,024 requests is more than {$HAPROXY.SERVER_RTIME.MAX.WARN}.' tags: - tag: scope value: performance - uuid: 80ceac1d54e94e50988bf205318392a8 name: 'HAProxy {#PXNAME} {#SVNAME}: Status' type: DEPENDENT key: 'haproxy.server.status[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d trends: '0' value_type: CHAR preprocessing: - type: JSONPATH parameters: - $.status - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 10m master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: health - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' trigger_prototypes: - uuid: ccf6dbe8970f4f9f9223027e676aa57e expression: 'count(/HAProxy by HTTP/haproxy.server.status[{#PXNAME},{#SVNAME}],#5,"eq","DOWN")=5' name: 'HAProxy {#PXNAME} {#SVNAME}: Server is DOWN' opdata: 'Current value: {ITEM.LASTVALUE1}' priority: WARNING description: 'Server is not available.' tags: - tag: scope value: availability - uuid: 10cfb75db0ef4a9fb33670480303522b name: 'HAProxy {#PXNAME} {#SVNAME}: Sessions per second' type: DEPENDENT key: 'haproxy.server.stot.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Cumulative number of sessions (end-to-end connections) per second.' preprocessing: - type: JSONPATH parameters: - $.stot - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: sessions - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: b8b0e8b0c3904335aa391f0727aac871 name: 'HAProxy {#PXNAME} {#SVNAME}: Weight' type: DEPENDENT key: 'haproxy.server.weight[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d description: 'Effective weight.' preprocessing: - type: JSONPATH parameters: - $.weight - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 1h master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: balancer - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: d7419ca33427455688a08ecff8ad6fb0 name: 'HAProxy {#PXNAME} {#SVNAME}: Redispatched requests per second' type: DEPENDENT key: 'haproxy.server.wredis.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of times a request was redispatched to a different backend.' preprocessing: - type: JSONPATH parameters: - $.wredis - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: requests - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' - uuid: 96cfadc919d8457ebb7519e11ac93d79 name: 'HAProxy {#PXNAME} {#SVNAME}: Retried connections per second' type: DEPENDENT key: 'haproxy.server.wretr.rate[{#PXNAME},{#SVNAME}]' delay: '0' history: 7d value_type: FLOAT description: 'Number of times a connection was retried.' preprocessing: - type: JSONPATH parameters: - $.wretr - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'haproxy.server.raw[{#PXNAME},{#SVNAME}]' tags: - tag: component value: connections - tag: server value: '{#PXNAME}' - tag: service value: '{#SVNAME}' graph_prototypes: - uuid: b7170d909b78413daa7057320d4280d8 name: 'HAProxy: {#PXNAME} {#SVNAME} In/Out traffic' graph_items: - drawtype: GRADIENT_LINE color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.server.bin.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' drawtype: GRADIENT_LINE color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.server.bout.rate[{#PXNAME},{#SVNAME}]' - uuid: d9b0d6babaf04daa942f121aab2d5b9c name: 'HAProxy: {#PXNAME} {#SVNAME} Responses by HTTP code' type: STACKED graph_items: - color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.server.hrsp_1xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '1' color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.server.hrsp_2xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '2' color: 00611C item: host: 'HAProxy by HTTP' key: 'haproxy.server.hrsp_3xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '3' color: F7941D item: host: 'HAProxy by HTTP' key: 'haproxy.server.hrsp_4xx.rate[{#PXNAME},{#SVNAME}]' - sortorder: '4' color: FC6EA3 item: host: 'HAProxy by HTTP' key: 'haproxy.server.hrsp_5xx.rate[{#PXNAME},{#SVNAME}]' - uuid: 5e1c8f6bf6c04ef6a60ce221c44c6ab6 name: 'HAProxy: {#PXNAME} {#SVNAME} Response time and time in queue' graph_items: - color: 199C0D item: host: 'HAProxy by HTTP' key: 'haproxy.server.rtime[{#PXNAME},{#SVNAME}]' - sortorder: '1' color: F63100 item: host: 'HAProxy by HTTP' key: 'haproxy.server.qtime[{#PXNAME},{#SVNAME}]' master_item: key: haproxy.get.nodes lld_macro_paths: - lld_macro: '{#MODE}' path: $.mode - lld_macro: '{#PXNAME}' path: $.pxname - lld_macro: '{#SVNAME}' path: $.svname overrides: - name: 'Discard HTTP status codes' step: '1' filter: conditions: - macro: '{#MODE}' value: tcp formulaid: A operations: - operationobject: ITEM_PROTOTYPE operator: LIKE value: 'Number of responses with codes' status: ENABLED discover: NO_DISCOVER tags: - tag: class value: software - tag: target value: haproxy macros: - macro: '{$HAPROXY.BACK_ERESP.MAX.WARN}' value: '10' description: 'Maximum of responses with error on Backend for trigger expression.' - macro: '{$HAPROXY.BACK_QCUR.MAX.WARN}' value: '10' description: 'Maximum number of requests on Backend unassigned in queue for trigger expression.' - macro: '{$HAPROXY.BACK_QTIME.MAX.WARN}' value: 10s description: 'Maximum of average time spent in queue on Backend for trigger expression.' - macro: '{$HAPROXY.BACK_RTIME.MAX.WARN}' value: 10s description: 'Maximum of average Backend response time for trigger expression.' - macro: '{$HAPROXY.FRONT_DREQ.MAX.WARN}' value: '10' description: 'The HAProxy maximum denied requests for trigger expression.' - macro: '{$HAPROXY.FRONT_EREQ.MAX.WARN}' value: '10' description: 'The HAProxy maximum number of request errors for trigger expression.' - macro: '{$HAPROXY.FRONT_SUTIL.MAX.WARN}' value: '80' description: 'Maximum of session usage percentage on frontend for trigger expression.' - macro: '{$HAPROXY.PASSWORD}' description: 'The password of the HAProxy stats page.' - macro: '{$HAPROXY.RESPONSE_TIME.MAX.WARN}' value: 10s description: 'The HAProxy stats page maximum response time in seconds for trigger expression.' - macro: '{$HAPROXY.SERVER_ERESP.MAX.WARN}' value: '10' description: 'Maximum of responses with error on server for trigger expression.' - macro: '{$HAPROXY.SERVER_QCUR.MAX.WARN}' value: '10' description: 'Maximum number of requests on server unassigned in queue for trigger expression.' - macro: '{$HAPROXY.SERVER_QTIME.MAX.WARN}' value: 10s description: 'Maximum of average time spent in queue on server for trigger expression.' - macro: '{$HAPROXY.SERVER_RTIME.MAX.WARN}' value: 10s description: 'Maximum of average server response time for trigger expression.' - macro: '{$HAPROXY.STATS.PATH}' value: stats description: 'The path of the HAProxy stats page.' - macro: '{$HAPROXY.STATS.PORT}' value: '8404' description: 'The port of the HAProxy stats host or container.' - macro: '{$HAPROXY.STATS.SCHEME}' value: http description: 'The scheme of HAProxy stats page(http/https).' - macro: '{$HAPROXY.USERNAME}' description: 'The username of the HAProxy stats page.' dashboards: - uuid: 7910c0c96e014d68966c5ac989e9ebb7 name: 'HAProxy Backend performance' pages: - widgets: - type: graphprototype width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: Backend {#PXNAME} Redispatched requests and retried connections per second' - type: graphprototype 'y': '5' width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: Backend {#PXNAME} Responses by HTTP code' - type: graphprototype 'y': '10' width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: Backend {#PXNAME} In/Out traffic' - uuid: d6ba5079de1c49bb9e0e5c47112b3ff9 name: 'HAProxy Frontend performance' pages: - widgets: - type: graphprototype width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: Frontend {#PXNAME} Requests and sessions per second' - type: graphprototype 'y': '5' width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: Frontend {#PXNAME} Errors and denials per second' - type: graphprototype 'y': '10' width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: Frontend {#PXNAME} Responses by HTTP code' - type: graphprototype 'y': '15' width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: Frontend {#PXNAME} In/Out traffic' - uuid: f41c3a3976dc483d98a386273ab5678f name: 'HAProxy Server performance' pages: - widgets: - type: graphprototype width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: {#PXNAME} {#SVNAME} Response time and time in queue' - type: graphprototype 'y': '5' width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: {#PXNAME} {#SVNAME} Responses by HTTP code' - type: graphprototype 'y': '10' width: '24' height: '5' fields: - type: INTEGER name: columns value: '1' - type: INTEGER name: rows value: '1' - type: GRAPH_PROTOTYPE name: graphid value: host: 'HAProxy by HTTP' name: 'HAProxy: {#PXNAME} {#SVNAME} In/Out traffic' valuemaps: - uuid: 450c1b2c6d58432b8a5b34dd3b5e8870 name: 'Server mode' mappings: - value: '0' newvalue: '-' - value: '1' newvalue: 'Y' - uuid: a8a0c20f1d404a79900064ac5d11a8b2 name: 'Service state' mappings: - value: '0' newvalue: Down - value: '1' newvalue: Up