<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export><version>5.0</version><date>2021-11-21T21:57:36Z</date><groups><group><name>Templates/Applications</name></group></groups><templates><template><template>App Lighttpd by Zabbix Agent</template><name>App Lighttpd by Zabbix Agent</name><description>## Overview

A very simple Zabbix Agent template for monitoring Lighttpd using the ModStatus module.



## Author

Dave Humphrey (dave@uesp.net)

</description><groups><group><name>Templates/Applications</name></group></groups><applications><application><name>Lighttpd</name></application><application><name>Zabbix raw items</name></application></applications><items><item><name>Lighttpd: Total bytes</name><type>DEPENDENT</type><key>lighttpd.bytes</key><delay>0</delay><value_type>FLOAT</value_type><units>B</units><description>Total bytes served since restart</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;TrafficTotal&quot;]</params></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Bytes per second</name><type>DEPENDENT</type><key>lighttpd.bytes.rate</key><delay>0</delay><history>7d</history><value_type>FLOAT</value_type><units>Bps</units><description>Calculated as change rate for 'TrafficTotal' stat.</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;TrafficTotal&quot;]</params></step><step><type>CHANGE_PER_SECOND</type><params/></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Request Rate 5 sec</name><type>DEPENDENT</type><key>lighttpd.requests.average5s</key><delay>0</delay><history>7d</history><value_type>FLOAT</value_type><units>req/sec</units><description>Average request rate in the last 5 sec as recorded by Lighttpd.</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;RequestAverage5s&quot;]</params></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Requets per second</name><type>DEPENDENT</type><key>lighttpd.requests.rate</key><delay>0</delay><history>7d</history><value_type>FLOAT</value_type><description>Calculated as change rate for 'RequestsTotal' stat.</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;RequestsTotal&quot;]</params></step><step><type>CHANGE_PER_SECOND</type><params/></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Total Requests</name><type>DEPENDENT</type><key>lighttpd.requests.total</key><delay>0</delay><history>7d</history><description>Total requests since server started</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;RequestsTotal&quot;]</params></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Busy servers</name><type>DEPENDENT</type><key>lighttpd.servers.busy</key><delay>0</delay><history>7d</history><description>Number of Lighttpd threads currently serving requests.</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;BusyServers&quot;]</params></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Idle Servers</name><type>DEPENDENT</type><key>lighttpd.servers.idle</key><delay>0</delay><history>7d</history><description>Current number of Lighttpd threads that are idle and waiting for a request</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;IdleServers&quot;]</params></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Traffic Average 5 sec</name><type>DEPENDENT</type><key>lighttpd.traffic.average5s</key><delay>0</delay><history>7d</history><value_type>FLOAT</value_type><units>B/sec</units><description>Average traffic rate in the last 5 sec as recorded by Lighttpd.</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;TrafficAverage5s&quot;]</params></step><step><type>MULTIPLIER</type><params>1024</params></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item></item><item><name>Lighttpd: Uptime</name><type>DEPENDENT</type><key>lighttpd.uptime</key><delay>0</delay><history>7d</history><units>uptime</units><description>Service uptime in seconds</description><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>JSONPATH</type><params>$[&quot;Uptime&quot;]</params></step></preprocessing><master_item><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key></master_item><triggers><trigger><expression>{last()}&lt;10m</expression><name>Lighttpd: has been restarted (uptime &lt; 10m)</name><priority>INFO</priority><description>Uptime is less than 10 minutes</description><manual_close>YES</manual_close></trigger></triggers></item><item><name>Lighttpd: Service response time</name><key>net.tcp.service.perf[http,&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key><history>7d</history><value_type>FLOAT</value_type><units>s</units><applications><application><name>Lighttpd</name></application></applications><triggers><trigger><expression>{min(5m)}&gt;{$LIGHTTPD.RESPONSE_TIME.MAX.WARN}</expression><name>Lighttpd: Service response time is too high (over {$LIGHTTPD.RESPONSE_TIME.MAX.WARN}s for 5m)</name><priority>WARNING</priority><manual_close>YES</manual_close><dependencies><dependency><name>Lighttpd: Process is not running</name><expression>{App Lighttpd by Zabbix Agent:proc.num[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;].last()}=0</expression></dependency><dependency><name>Lighttpd: Service is down</name><expression>{App Lighttpd by Zabbix Agent:net.tcp.service[http,&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;].last()}=0</expression></dependency></dependencies></trigger></triggers></item><item><name>Lighttpd: Service ping</name><key>net.tcp.service[http,&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key><history>7d</history><applications><application><name>Lighttpd</name></application></applications><preprocessing><step><type>DISCARD_UNCHANGED_HEARTBEAT</type><params>10m</params></step></preprocessing><triggers><trigger><expression>{last()}=0</expression><name>Lighttpd: Service is down</name><priority>AVERAGE</priority><manual_close>YES</manual_close><dependencies><dependency><name>Lighttpd: Process is not running</name><expression>{App Lighttpd by Zabbix Agent:proc.num[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;].last()}=0</expression></dependency></dependencies></trigger></triggers></item><item><name>Lighttpd: CPU utilization</name><key>proc.cpu.util[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;]</key><history>7d</history><value_type>FLOAT</value_type><units>%</units><description>Process CPU utilization percentage.</description><applications><application><name>Lighttpd</name></application></applications></item><item><name>Lighttpd: Memory usage (rss)</name><key>proc.mem[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;,,,,rss]</key><history>7d</history><units>B</units><description>Resident set size memory used by process in bytes.</description><applications><application><name>Lighttpd</name></application></applications></item><item><name>Lighttpd: Memory usage (vsize)</name><key>proc.mem[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;,,,,vsize]</key><history>7d</history><units>B</units><description>Virtual memory size used by process in bytes.</description><applications><application><name>Lighttpd</name></application></applications></item><item><name>Lighttpd: Number of processes running</name><key>proc.num[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;]</key><history>7d</history><applications><application><name>Lighttpd</name></application></applications><triggers><trigger><expression>{last()}=0</expression><name>Lighttpd: Process is not running</name><priority>HIGH</priority></trigger></triggers></item><item><name>Lighttpd: Get status</name><key>web.page.get[&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PATH}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;]</key><history>1h</history><trends>0</trends><value_type>TEXT</value_type><description>Getting data from a machine-readable version of the Lighttpd status page.&#13;
https://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModStatus</description><applications><application><name>Zabbix raw items</name></application></applications><preprocessing><step><type>REGEX</type><params>\n\s?\n((?:.|[[:space:]])*)
\1</params></step></preprocessing><triggers><trigger><expression>{nodata(30m)}=1</expression><name>Lighttpd: Failed to fetch status page (or no data for 30m)</name><priority>WARNING</priority><description>Zabbix has not received data for items for the last 30 minutes.</description><manual_close>YES</manual_close><dependencies><dependency><name>Lighttpd: Process is not running</name><expression>{App Lighttpd by Zabbix Agent:proc.num[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;].last()}=0</expression></dependency><dependency><name>Lighttpd: Service is down</name><expression>{App Lighttpd by Zabbix Agent:net.tcp.service[http,&quot;{$LIGHTTPD.STATUS.HOST}&quot;,&quot;{$LIGHTTPD.STATUS.PORT}&quot;].last()}=0</expression></dependency></dependencies></trigger></triggers></item></items><macros><macro><macro>{$LIGHTTPD.PROCESS_NAME}</macro><value>lighttpd</value><description>Lighttpd server process name</description></macro><macro><macro>{$LIGHTTPD.RESPONSE_TIME.MAX.WARN}</macro><value>10</value><description>Maximum Lighttpd response time in seconds for trigger expression</description></macro><macro><macro>{$LIGHTTPD.STATUS.HOST}</macro><value>127.0.0.1</value><description>Hostname or IP address of  the Lighttpd status page</description></macro><macro><macro>{$LIGHTTPD.STATUS.PATH}</macro><value>server-status?json</value><description>The URL path to the Lighttpd stats page</description></macro><macro><macro>{$LIGHTTPD.STATUS.PORT}</macro><value>80</value><description>The port of the Lighttpd status page</description></macro></macros></template></templates><graphs><graph><name>Lighttpd: Memory usage</name><graph_items><graph_item><color>1A7C11</color><item><host>App Lighttpd by Zabbix Agent</host><key>proc.mem[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;,,,,vsize]</key></item></graph_item><graph_item><sortorder>1</sortorder><color>2774A4</color><item><host>App Lighttpd by Zabbix Agent</host><key>proc.mem[&quot;{$LIGHTTPD.PROCESS_NAME}&quot;,,,,rss]</key></item></graph_item></graph_items></graph><graph><name>Lighttpd: Requests per second</name><graph_items><graph_item><color>1A7C11</color><item><host>App Lighttpd by Zabbix Agent</host><key>lighttpd.requests.rate</key></item></graph_item></graph_items></graph></graphs></zabbix_export>
