zabbix_export: version: '5.4' date: '2021-11-21T21:57:38Z' groups: - uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6 name: Templates/Applications templates: - uuid: 1cbdc69fe3964d2fa7a749e73346da91 template: 'App Lighttpd by Zabbix Agent' name: 'App Lighttpd by Zabbix Agent' description: | ## Overview A very simple Zabbix Agent template for monitoring Lighttpd using the ModStatus module. ## Author Dave Humphrey (dave@uesp.net) groups: - name: Templates/Applications items: - uuid: bfd8ca63ecde4ae78eeb7cbecc3c790b name: 'Lighttpd: Total bytes' type: DEPENDENT key: lighttpd.bytes delay: '0' value_type: FLOAT units: B description: 'Total bytes served since restart' preprocessing: - type: JSONPATH parameters: - '$["TrafficTotal"]' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: 7bbf2633be5649ce9c09c678b542b219 name: 'Lighttpd: Bytes per second' type: DEPENDENT key: lighttpd.bytes.rate delay: '0' history: 7d value_type: FLOAT units: Bps description: 'Calculated as change rate for ''TrafficTotal'' stat.' preprocessing: - type: JSONPATH parameters: - '$["TrafficTotal"]' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: 49794c8930d84e29aeb8f86429035534 name: 'Lighttpd: Request Rate 5 sec' type: DEPENDENT key: lighttpd.requests.average5s delay: '0' history: 7d value_type: FLOAT units: req/sec description: 'Average request rate in the last 5 sec as recorded by Lighttpd.' preprocessing: - type: JSONPATH parameters: - '$["RequestAverage5s"]' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: de70c53495d9464b9236d0f0f7d2a9b0 name: 'Lighttpd: Requets per second' type: DEPENDENT key: lighttpd.requests.rate delay: '0' history: 7d value_type: FLOAT description: 'Calculated as change rate for ''RequestsTotal'' stat.' preprocessing: - type: JSONPATH parameters: - '$["RequestsTotal"]' - type: CHANGE_PER_SECOND parameters: - '' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: ffd356f10aa4492ebf271b492736d34d name: 'Lighttpd: Total Requests' type: DEPENDENT key: lighttpd.requests.total delay: '0' history: 7d description: 'Total requests since server started' preprocessing: - type: JSONPATH parameters: - '$["RequestsTotal"]' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: cef42acec1c546cb9966363a58abaa58 name: 'Lighttpd: Busy servers' type: DEPENDENT key: lighttpd.servers.busy delay: '0' history: 7d description: 'Number of Lighttpd threads currently serving requests.' preprocessing: - type: JSONPATH parameters: - '$["BusyServers"]' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: bc2d612abbcc4c6daa9e11671483e39c name: 'Lighttpd: Idle Servers' type: DEPENDENT key: lighttpd.servers.idle delay: '0' history: 7d description: 'Current number of Lighttpd threads that are idle and waiting for a request' preprocessing: - type: JSONPATH parameters: - '$["IdleServers"]' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: aaa73a708a374b5383899cc669c245ec name: 'Lighttpd: Traffic Average 5 sec' type: DEPENDENT key: lighttpd.traffic.average5s delay: '0' history: 7d value_type: FLOAT units: B/sec description: 'Average traffic rate in the last 5 sec as recorded by Lighttpd.' preprocessing: - type: JSONPATH parameters: - '$["TrafficAverage5s"]' - type: MULTIPLIER parameters: - '1024' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd - uuid: 95edb4b5c7314a7896efd9bf1b66b498 name: 'Lighttpd: Uptime' type: DEPENDENT key: lighttpd.uptime delay: '0' history: 7d units: uptime description: 'Service uptime in seconds' preprocessing: - type: JSONPATH parameters: - '$["Uptime"]' master_item: key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' tags: - tag: Application value: Lighttpd triggers: - uuid: 11439cba1dcf4a69b9a5837e65d65fb7 expression: 'last(/App Lighttpd by Zabbix Agent/lighttpd.uptime)<10m' name: 'Lighttpd: has been restarted (uptime < 10m)' priority: INFO description: 'Uptime is less than 10 minutes' manual_close: 'YES' - uuid: 57636cc00e7e4ab4929f5a389a5a5a52 name: 'Lighttpd: Service response time' key: 'net.tcp.service.perf[http,"{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PORT}"]' history: 7d value_type: FLOAT units: s tags: - tag: Application value: Lighttpd triggers: - uuid: a89fc7b3422e458290222ac72971abde expression: 'min(/App Lighttpd by Zabbix Agent/net.tcp.service.perf[http,"{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PORT}"],5m)>{$LIGHTTPD.RESPONSE_TIME.MAX.WARN}' name: 'Lighttpd: Service response time is too high (over {$LIGHTTPD.RESPONSE_TIME.MAX.WARN}s for 5m)' priority: WARNING manual_close: 'YES' dependencies: - name: 'Lighttpd: Process is not running' expression: 'last(/App Lighttpd by Zabbix Agent/proc.num["{$LIGHTTPD.PROCESS_NAME}"])=0' - name: 'Lighttpd: Service is down' expression: 'last(/App Lighttpd by Zabbix Agent/net.tcp.service[http,"{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PORT}"])=0' - uuid: 4b8d326c29374d69a3f17b32df405788 name: 'Lighttpd: Service ping' key: 'net.tcp.service[http,"{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PORT}"]' history: 7d preprocessing: - type: DISCARD_UNCHANGED_HEARTBEAT parameters: - 10m tags: - tag: Application value: Lighttpd triggers: - uuid: 5ccdc180561b48f6b0d227afb3fc88e4 expression: 'last(/App Lighttpd by Zabbix Agent/net.tcp.service[http,"{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PORT}"])=0' name: 'Lighttpd: Service is down' priority: AVERAGE manual_close: 'YES' dependencies: - name: 'Lighttpd: Process is not running' expression: 'last(/App Lighttpd by Zabbix Agent/proc.num["{$LIGHTTPD.PROCESS_NAME}"])=0' - uuid: d887de3b739441ffb13c473ba2d71365 name: 'Lighttpd: CPU utilization' key: 'proc.cpu.util["{$LIGHTTPD.PROCESS_NAME}"]' history: 7d value_type: FLOAT units: '%' description: 'Process CPU utilization percentage.' tags: - tag: Application value: Lighttpd - uuid: 1501167bef5448608402e2e8cc9cbce5 name: 'Lighttpd: Memory usage (rss)' key: 'proc.mem["{$LIGHTTPD.PROCESS_NAME}",,,,rss]' history: 7d units: B description: 'Resident set size memory used by process in bytes.' tags: - tag: Application value: Lighttpd - uuid: dee3ccd2267644ef8933f9d164708eea name: 'Lighttpd: Memory usage (vsize)' key: 'proc.mem["{$LIGHTTPD.PROCESS_NAME}",,,,vsize]' history: 7d units: B description: 'Virtual memory size used by process in bytes.' tags: - tag: Application value: Lighttpd - uuid: 8611bd66eeae41169fd1de02e15e0573 name: 'Lighttpd: Number of processes running' key: 'proc.num["{$LIGHTTPD.PROCESS_NAME}"]' history: 7d tags: - tag: Application value: Lighttpd triggers: - uuid: 6a3c4c8cfaf944909be7db1d777f4a59 expression: 'last(/App Lighttpd by Zabbix Agent/proc.num["{$LIGHTTPD.PROCESS_NAME}"])=0' name: 'Lighttpd: Process is not running' priority: HIGH - uuid: 25bd7668bc8f47e2afae62ae9914fa2f name: 'Lighttpd: Get status' key: 'web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"]' history: 1h trends: '0' value_type: TEXT description: | Getting data from a machine-readable version of the Lighttpd status page. https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModStatus preprocessing: - type: REGEX parameters: - '\n\s?\n((?:.|[[:space:]])*)' - \1 tags: - tag: Application value: 'Zabbix raw items' triggers: - uuid: f30723b7093343e1837922bc888bd53c expression: 'nodata(/App Lighttpd by Zabbix Agent/web.page.get["{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PATH}","{$LIGHTTPD.STATUS.PORT}"],30m)=1' name: 'Lighttpd: Failed to fetch status page (or no data for 30m)' priority: WARNING description: 'Zabbix has not received data for items for the last 30 minutes.' manual_close: 'YES' dependencies: - name: 'Lighttpd: Process is not running' expression: 'last(/App Lighttpd by Zabbix Agent/proc.num["{$LIGHTTPD.PROCESS_NAME}"])=0' - name: 'Lighttpd: Service is down' expression: 'last(/App Lighttpd by Zabbix Agent/net.tcp.service[http,"{$LIGHTTPD.STATUS.HOST}","{$LIGHTTPD.STATUS.PORT}"])=0' macros: - macro: '{$LIGHTTPD.PROCESS_NAME}' value: lighttpd description: 'Lighttpd server process name' - macro: '{$LIGHTTPD.RESPONSE_TIME.MAX.WARN}' value: '10' description: 'Maximum Lighttpd response time in seconds for trigger expression' - macro: '{$LIGHTTPD.STATUS.HOST}' value: 127.0.0.1 description: 'Hostname or IP address of the Lighttpd status page' - macro: '{$LIGHTTPD.STATUS.PATH}' value: 'server-status?json' description: 'The URL path to the Lighttpd stats page' - macro: '{$LIGHTTPD.STATUS.PORT}' value: '80' description: 'The port of the Lighttpd status page' graphs: - uuid: 26acba954e5948eca313696a3a279f8e name: 'Lighttpd: Memory usage' graph_items: - color: 1A7C11 item: host: 'App Lighttpd by Zabbix Agent' key: 'proc.mem["{$LIGHTTPD.PROCESS_NAME}",,,,vsize]' - sortorder: '1' color: 2774A4 item: host: 'App Lighttpd by Zabbix Agent' key: 'proc.mem["{$LIGHTTPD.PROCESS_NAME}",,,,rss]' - uuid: dea4a2cb68af4f46a4497bd6e685f8d4 name: 'Lighttpd: Requests per second' graph_items: - color: 1A7C11 item: host: 'App Lighttpd by Zabbix Agent' key: lighttpd.requests.rate