zabbix_export: version: '6.2' date: '2022-06-07T19:36:36Z' template_groups: - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6 name: Templates/Applications templates: - uuid: 1cbda0970410435684135884d0cb7090 template: 'PHP-FPM by Zabbix agent' name: 'PHP-FPM by Zabbix agent' description: | Get PHP-FPM metrics using Zabbix agent running on Linux. Template tooling version used: 0.41 groups: - name: Templates/Applications items: - uuid: 9ae9e2a8003a48a7a482ef6d6ae9886c name: 'PHP-FPM: Accepted connections per second' type: DEPENDENT key: php-fpm.conn_accepted.rate delay: '0' history: 7d value_type: FLOAT description: 'The number of accepted requests per second.' preprocessing: - type: JSONPATH parameters: - '$.[''accepted conn'']' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: connections - uuid: edc6b68194fe499facfb6b22425ff0d4 name: 'PHP-FPM: Listen queue' type: DEPENDENT key: php-fpm.listen_queue delay: '0' history: 7d description: 'The current number of connections that have been initiated, but not yet accepted.' preprocessing: - type: JSONPATH parameters: - '$.[''listen queue'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: listen-queue - uuid: aff9f072b06a4b56afb0e0f44b2c83a4 name: 'PHP-FPM: Listen queue, len' type: DEPENDENT key: php-fpm.listen_queue_len delay: '0' history: 7d description: 'Size of the socket queue of pending connections.' preprocessing: - type: JSONPATH parameters: - '$.[''listen queue len'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: listen-queue - uuid: de0a543bee5a46c88085b2aba2f4976f name: 'PHP-FPM: Listen queue, max' type: DEPENDENT key: php-fpm.listen_queue_max delay: '0' history: 7d description: 'The maximum number of requests in the queue of pending connections since this FPM pool has started.' preprocessing: - type: JSONPATH parameters: - '$.[''max listen queue'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: listen-queue - uuid: dfabcd55c13449c29a48b70fdce77674 name: 'PHP-FPM: Queue usage' type: CALCULATED key: php-fpm.listen_queue_usage history: 7d value_type: FLOAT units: '%' params: 'last(//php-fpm.listen_queue)/(last(//php-fpm.listen_queue_len)+(last(//php-fpm.listen_queue_len)=0))*100' description: 'Queue utilization' tags: - tag: component value: application triggers: - uuid: a11264f0e1174b7fb81b457dad1a745f expression: 'min(/PHP-FPM by Zabbix agent/php-fpm.listen_queue_usage,15m) > {$PHP_FPM.QUEUE.WARN.MAX}' name: 'PHP-FPM: Queue utilization is high' event_name: 'PHP-FPM: Queue utilization is high (over {$PHP_FPM.QUEUE.WARN.MAX}% for 15m)' priority: WARNING description: 'The queue for this pool reached {$PHP_FPM.QUEUE.WARN.MAX}% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted.' tags: - tag: scope value: capacity - uuid: e9d49669cf58492a9d5ef7ff997e1a40 name: 'PHP-FPM: Max children reached' type: DEPENDENT key: php-fpm.max_children delay: '0' history: 7d description: 'The number of times that pm.max_children has been reached since the php-fpm pool started' preprocessing: - type: JSONPATH parameters: - '$.[''max children reached'']' - type: SIMPLE_CHANGE parameters: - '' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: application - uuid: 830e04be30f04e50ac0fa4783ecdc677 name: 'PHP-FPM: Pool name' type: DEPENDENT key: php-fpm.name delay: '0' history: 7d trends: '0' value_type: CHAR description: 'The name of current pool.' preprocessing: - type: JSONPATH parameters: - $.pool - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 3h master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: application - uuid: 250f346008984a95829dba08d0f95838 name: 'PHP-FPM: Ping' type: DEPENDENT key: php-fpm.ping delay: '0' history: 7d valuemap: name: 'Service state' preprocessing: - type: REGEX parameters: - '{$PHP_FPM.PING.REPLY}($|\n)' - '1' error_handler: CUSTOM_VALUE error_handler_params: '0' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]' tags: - tag: component value: health triggers: - uuid: 10d92102d7a24327ada7869a41119fee expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.ping)=0 or nodata(/PHP-FPM by Zabbix agent/php-fpm.ping,3m)=1' name: 'PHP-FPM: Service is down' priority: HIGH manual_close: 'YES' dependencies: - name: 'PHP-FPM: Process is not running' expression: 'last(/PHP-FPM by Zabbix agent/proc.num["{$PHP_FPM.PROCESS_NAME}"])=0' tags: - tag: scope value: availability - uuid: 8ebee5fc8c854a96b34ed743e3dd0154 name: 'PHP-FPM: Processes, active' type: DEPENDENT key: php-fpm.processes_active delay: '0' history: 7d description: 'The total number of active processes.' preprocessing: - type: JSONPATH parameters: - '$.[''active processes'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: system - uuid: 11cfd028325242a58d61d9e83aee640b name: 'PHP-FPM: Processes, idle' type: DEPENDENT key: php-fpm.processes_idle delay: '0' history: 7d description: 'The total number of idle processes.' preprocessing: - type: JSONPATH parameters: - '$.[''idle processes'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: system - uuid: 3858218f90684bb19cbe27fc9aedf404 name: 'PHP-FPM: Processes, max active' type: DEPENDENT key: php-fpm.processes_max_active delay: '0' history: 7d description: 'The highest value that ''active processes'' has reached since the php-fpm server started.' preprocessing: - type: JSONPATH parameters: - '$.[''max active processes'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: application - uuid: a79af6cf38ec45518055c64aa7f1f5a2 name: 'PHP-FPM: Processes, total' type: DEPENDENT key: php-fpm.processes_total delay: '0' history: 7d description: 'The total number of server processes currently running.' preprocessing: - type: JSONPATH parameters: - '$.[''total processes'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: system - uuid: 5ab12fc9f4ef49e5bbf7b2c6a840879e name: 'PHP-FPM: Process manager' type: DEPENDENT key: php-fpm.process_manager delay: '0' history: 7d trends: '0' value_type: CHAR description: 'The method used by the process manager to control the number of child processes for this pool.' preprocessing: - type: JSONPATH parameters: - '$.[''process manager'']' - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 3h master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: application triggers: - uuid: 231e0fbfb6e94f34b790576766244602 expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.process_manager,#1)<>last(/PHP-FPM by Zabbix agent/php-fpm.process_manager,#2)' name: 'PHP-FPM: Manager changed' event_name: 'PHP-FPM: Manager changed (new value received: {ITEM.VALUE})' priority: INFO description: 'PHP-FPM manager changed. Ack to close.' manual_close: 'YES' tags: - tag: scope value: notice - uuid: 4d17b6d89ac94d0880eac6962ebf7347 name: 'PHP-FPM: Slow requests' type: DEPENDENT key: php-fpm.slow_requests delay: '0' history: 7d description: 'The number of requests that exceeded your request_slowlog_timeout value.' preprocessing: - type: JSONPATH parameters: - '$.[''slow requests'']' - type: SIMPLE_CHANGE parameters: - '' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: application triggers: - uuid: f30147d8e92f48aa8fedc2d28b8d7c70 expression: 'min(/PHP-FPM by Zabbix agent/php-fpm.slow_requests,#3)>0' name: 'PHP-FPM: Detected slow requests' priority: WARNING description: 'PHP-FPM detected slow request. A slow request means that it took more time to execute than expected (defined in the configuration of your pool).' tags: - tag: scope value: performance - uuid: 4e4d6eda8fbb4dd2ba7f48fba5723473 name: 'PHP-FPM: Start time' type: DEPENDENT key: php-fpm.start_time delay: '0' history: 7d units: unixtime description: 'The time when this pool was started.' preprocessing: - type: JSONPATH parameters: - '$.[''start time'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: application - uuid: 2a19b306712a47999e70d3ec30e39b05 name: 'PHP-FPM: Uptime' type: DEPENDENT key: php-fpm.uptime delay: '0' history: 7d units: s description: 'How long has this pool been running.' preprocessing: - type: JSONPATH parameters: - '$.[''start since'']' master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' tags: - tag: component value: application triggers: - uuid: bdf9962aee2049a8aec000b037b94d60 expression: 'nodata(/PHP-FPM by Zabbix agent/php-fpm.uptime,30m)=1' name: 'PHP-FPM: Failed to fetch info data' event_name: 'PHP-FPM: Failed to fetch info data (or no data for 30m)' priority: INFO description: 'Zabbix has not received data for items for the last 30 minutes' manual_close: 'YES' dependencies: - name: 'PHP-FPM: Process is not running' expression: 'last(/PHP-FPM by Zabbix agent/proc.num["{$PHP_FPM.PROCESS_NAME}"])=0' tags: - tag: scope value: notice - uuid: c6966a6c3ff0452ab4fd112c9299e624 expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.uptime)<10m' name: 'PHP-FPM: has been restarted' event_name: 'PHP-FPM: has been restarted (uptime < 10m)' priority: INFO description: 'Uptime is less than 10 minutes.' manual_close: 'YES' tags: - tag: scope value: notice - uuid: b53e2e356317468f9d6d3272eb755650 name: 'PHP-FPM: Version' type: DEPENDENT key: php-fpm.version delay: '0' history: 7d trends: '0' value_type: CHAR description: 'Current version PHP. Get from HTTP-Header "X-Powered-By" and may not work if you change default HTTP-headers.' preprocessing: - type: REGEX parameters: - '^[.\s\S]*X-Powered-By: PHP/([.\d]{1,})' - \1 error_handler: DISCARD_VALUE - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 3h master_item: key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]' tags: - tag: component value: application triggers: - uuid: fb110a37f0fc4a62b51df72e33bc3448 expression: 'last(/PHP-FPM by Zabbix agent/php-fpm.version,#1)<>last(/PHP-FPM by Zabbix agent/php-fpm.version,#2) and length(last(/PHP-FPM by Zabbix agent/php-fpm.version))>0' name: 'PHP-FPM: Version has changed' event_name: 'PHP-FPM: Version has changed (new version: {ITEM.VALUE})' priority: INFO description: 'PHP-FPM version has changed. Ack to close.' manual_close: 'YES' tags: - tag: scope value: notice - uuid: a709eaae52ad4128a129c618db6525d2 name: 'PHP-FPM: CPU utilization' key: 'proc.cpu.util["{$PHP_FPM.PROCESS_NAME}"]' history: 7d value_type: FLOAT units: '%' description: 'Process CPU utilization percentage.' tags: - tag: component value: cpu - uuid: ef771994ec9e482babf872d9f867d500 name: 'PHP-FPM: Memory usage, %' key: 'proc.mem["{$PHP_FPM.PROCESS_NAME}",,,,pmem]' history: 7d value_type: FLOAT units: '%' description: 'Memory used percentage relative to total memory available.' tags: - tag: component value: memory - uuid: f55a5ef29f864d0a8c1af25df2372f7c name: 'PHP-FPM: Memory usage (rss)' key: 'proc.mem["{$PHP_FPM.PROCESS_NAME}",,,,rss]' history: 7d units: B description: 'Resident set size memory used by process in bytes.' tags: - tag: component value: memory - uuid: ab8dc0d1ce344fe8ae6a22716a168fbd name: 'PHP-FPM: Number of processes running' key: 'proc.num["{$PHP_FPM.PROCESS_NAME}"]' history: 7d tags: - tag: component value: system triggers: - uuid: 21a03d0ada634602ae9089a2cf3b4d70 expression: 'last(/PHP-FPM by Zabbix agent/proc.num["{$PHP_FPM.PROCESS_NAME}"])=0' name: 'PHP-FPM: Process is not running' priority: HIGH tags: - tag: scope value: availability - uuid: c0c438492c63453496e83938745ffffc name: 'PHP-FPM: php-fpm_ping' key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.PING.PAGE}","{$PHP_FPM.PORT}"]' history: '0' trends: '0' value_type: TEXT tags: - tag: component value: health - uuid: 09ec73291f21417ab8f19f56fda3331f name: 'PHP-FPM: Get status page' key: 'web.page.get["{$PHP_FPM.HOST}","{$PHP_FPM.STATUS.PAGE}?json","{$PHP_FPM.PORT}"]' history: '0' trends: '0' value_type: TEXT preprocessing: - type: REGEX parameters: - '^[.\s\S]*({.+})' - \1 tags: - tag: component value: raw tags: - tag: class value: application - tag: target value: php-fpm macros: - macro: '{$PHP_FPM.HOST}' value: localhost description: 'Hostname or IP of PHP-FPM status host or container.' - macro: '{$PHP_FPM.PING.PAGE}' value: ping description: 'The path of PHP-FPM ping page.' - macro: '{$PHP_FPM.PING.REPLY}' value: pong description: 'Expected reply to the ping.' - macro: '{$PHP_FPM.PORT}' value: '80' description: 'The port of PHP-FPM status host or container.' - macro: '{$PHP_FPM.PROCESS_NAME}' value: php-fpm description: 'PHP-FPM process name' - macro: '{$PHP_FPM.QUEUE.WARN.MAX}' value: '80' description: 'The maximum PHP-FPM queue usage percent for trigger expression.' - macro: '{$PHP_FPM.STATUS.PAGE}' value: status description: 'The path of PHP-FPM status page.' valuemaps: - uuid: 1caa1e7c41e14c7492ab8112f93ea068 name: 'Service state' mappings: - value: '0' newvalue: Down - value: '1' newvalue: Up graphs: - uuid: 36cd028132d94585877ad5726f0f9e3d name: 'PHP-FPM: Process' graph_items: - color: 1A7C11 item: host: 'PHP-FPM by Zabbix agent' key: php-fpm.processes_max_active - sortorder: '1' color: 2774A4 item: host: 'PHP-FPM by Zabbix agent' key: php-fpm.processes_idle - sortorder: '2' color: F63100 item: host: 'PHP-FPM by Zabbix agent' key: php-fpm.processes_total - sortorder: '3' color: A54F10 item: host: 'PHP-FPM by Zabbix agent' key: php-fpm.processes_active - uuid: 768a3e8aaa4741239887b55be5842f4a name: 'PHP-FPM: Queue' graph_items: - color: 1A7C11 item: host: 'PHP-FPM by Zabbix agent' key: php-fpm.listen_queue_len - sortorder: '1' color: 2774A4 item: host: 'PHP-FPM by Zabbix agent' key: php-fpm.listen_queue - sortorder: '2' color: F63100 item: host: 'PHP-FPM by Zabbix agent' key: php-fpm.listen_queue_max