Additional scripts for Zabbix agent on Linux to discover and monitor several services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

409 lines
16 KiB

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.4</version>
<date>2020-01-16T17:32:11Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template_App_Squid</template>
<name>Template_App_Squid</name>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<items>
<item>
<name>Squid: Used memory</name>
<key>proc.mem[squid]</key>
<delay>5m</delay>
<trends>1825d</trends>
<units>B</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
</item>
<item>
<name>Squid: Number of processes</name>
<key>proc.num[squid]</key>
<delay>5m</delay>
<trends>1825d</trends>
<units>!process</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{last()}&lt;1</expression>
<name>Squid is not running</name>
<priority>AVERAGE</priority>
</trigger>
</triggers>
</item>
<item>
<name>Squid: Info</name>
<key>squid.check[all]</key>
<delay>300s</delay>
<history>0</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
</item>
<item>
<name>Squid: Number of clients</name>
<type>DEPENDENT</type>
<key>squid.check[clients_num]</key>
<delay>0</delay>
<trends>1825d</trends>
<units>!client(s)</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.clients_num</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
<item>
<name>Squid: Used CPU</name>
<type>DEPENDENT</type>
<key>squid.check[cpu_usage_avg_5min]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.cpu_usage_avg_5min</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
<item>
<name>Squid: Requests hit percent served from disk</name>
<type>DEPENDENT</type>
<key>squid.check[disk_hits_req_percent]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.disk_hits_req_percent</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
<item>
<name>Squid: Used file descriptors percent</name>
<type>DEPENDENT</type>
<key>squid.check[fd_used_percent]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.fd_used_percent</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
<triggers>
<trigger>
<expression>{last()}&gt;80</expression>
<name>Squid is nearly out of free file descrptors</name>
<priority>WARNING</priority>
</trigger>
</triggers>
</item>
<item>
<name>Squid: Requests hit percent</name>
<type>DEPENDENT</type>
<key>squid.check[hits_req_percent]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.hits_req_percent</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
<item>
<name>Squid: Mean object size</name>
<type>DEPENDENT</type>
<key>squid.check[mean_object_size]</key>
<delay>0</delay>
<trends>1825d</trends>
<units>B</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.mean_object_size</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
<item>
<name>Squid: Requests hit percent served from memory</name>
<type>DEPENDENT</type>
<key>squid.check[mem_hits_req_percent]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.mem_hits_req_percent</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
<item>
<name>Squid: Requests</name>
<type>DEPENDENT</type>
<key>squid.check[requests]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>req/s</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.requests</params>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
<item>
<name>Squid: Used disk storage percent</name>
<type>DEPENDENT</type>
<key>squid.check[stor_swap_used_percent]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Cache</name>
</application>
<application>
<name>Web</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.stor_swap_used_percent</params>
</step>
</preprocessing>
<master_item>
<key>squid.check[all]</key>
</master_item>
</item>
</items>
<macros>
<macro>
<macro>{$SQUID_STATUS_URL}</macro>
<value>http://127.0.0.1:3128/squid-internal-mgr/info</value>
</macro>
</macros>
</template>
</templates>
<graphs>
<graph>
<name>Squid: Hit ratio</name>
<graph_items>
<graph_item>
<color>1A7C11</color>
<item>
<host>Template_App_Squid</host>
<key>squid.check[hits_req_percent]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>F63100</color>
<item>
<host>Template_App_Squid</host>
<key>squid.check[disk_hits_req_percent]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<color>2774A4</color>
<item>
<host>Template_App_Squid</host>
<key>squid.check[mem_hits_req_percent]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>Squid: Requests</name>
<graph_items>
<graph_item>
<drawtype>BOLD_LINE</drawtype>
<color>1565C0</color>
<item>
<host>Template_App_Squid</host>
<key>squid.check[requests]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>BOLD_LINE</drawtype>
<color>E91E63</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Template_App_Squid</host>
<key>squid.check[clients_num]</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>Squid: Resources</name>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>FF0000</color>
<item>
<host>Template_App_Squid</host>
<key>squid.check[cpu_usage_avg_5min]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>0040FF</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Template_App_Squid</host>
<key>proc.mem[squid]</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
</zabbix_export>