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.

1169 lines
62 KiB

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2020-10-20T16:41:47Z</date>
<groups>
<group>
<name>Modèles</name>
</group>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template_OS_Linux_Server</template>
<name>Template_OS_Linux_Server</name>
<templates>
<template>
<name>Template_App_Multipath</name>
</template>
<template>
<name>Template_OS_Linux_minimal</name>
</template>
<template>
<name>Template_Ping</name>
</template>
</templates>
<groups>
<group>
<name>Modèles</name>
</group>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>System</name>
</application>
</applications>
<items>
<item>
<name>Number of sshd processes</name>
<key>proc.num[sshd]</key>
<delay>15m</delay>
<history>30d</history>
<trends>0</trends>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<request_method>POST</request_method>
<triggers>
<trigger>
<expression>{last(0)}&lt;1</expression>
<name>le démon sshd n'est pas en fonctionnement</name>
<priority>AVERAGE</priority>
</trigger>
</triggers>
</item>
<item>
<name>UTC time</name>
<key>system.localtime</key>
<delay>15m</delay>
<history>30d</history>
<trends>0</trends>
<applications>
<application>
<name>System</name>
</application>
</applications>
<request_method>POST</request_method>
<triggers>
<trigger>
<expression>{fuzzytime(180)}=0</expression>
<recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
<recovery_expression>{fuzzytime(120)}=1</recovery_expression>
<name>Important time shift</name>
<priority>WARNING</priority>
</trigger>
</triggers>
</item>
<item>
<name>$1 hash</name>
<key>vfs.file.md5sum[/usr/sbin/sshd]</key>
<delay>30m</delay>
<history>30d</history>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Integrity</name>
</application>
</applications>
<preprocessing>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
<triggers>
<trigger>
<expression>{diff(0)}&gt;0</expression>
<name>/usr/sbin/sshd changed</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
</items>
<discovery_rules>
<discovery_rule>
<name>Découverte onduleurs</name>
<key>hardware.ups.discovery[]</key>
<delay>1800</delay>
<lifetime>1d</lifetime>
<item_prototypes>
<item_prototype>
<name>UPS: Taux de charge de la batterie pour {#UPSNAME}</name>
<key>hardware.ups[{#UPSNAME},battery.charge]</key>
<trends>1825d</trends>
<units>%</units>
<applications>
<application>
<name>Hardware</name>
</application>
</applications>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>UPS: Charge de l'onduleur {#UPSNAME}</name>
<key>hardware.ups[{#UPSNAME},ups.load]</key>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Hardware</name>
</application>
</applications>
<request_method>POST</request_method>
<trigger_prototypes>
<trigger_prototype>
<expression>{last(0)}&gt;90</expression>
<name>l'onduleur {#UPSNAME} est en surcharge</name>
<priority>AVERAGE</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>UPS: État de l'onduleur {#UPSNAME}</name>
<key>hardware.ups[{#UPSNAME},ups.status]</key>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Hardware</name>
</application>
</applications>
<request_method>POST</request_method>
<trigger_prototypes>
<trigger_prototype>
<expression>{str(OB)}=0 and {str(LB)}=0 and {str(OL)}=0 and {str(RB)}=0 and {strlen(0)}&lt;&gt;0 or ({strlen(0)}=0 and {strlen(#2)}=0)</expression>
<name>L'onduleur {#UPSNAME} est dans l'état {ITEM.LASTVALUE1}</name>
<priority>WARNING</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{str(OB)}=1 or {str(LB)}=1</expression>
<name>l'onduleur {#UPSNAME} fonctionne sur batterie</name>
<priority>AVERAGE</priority>
<dependencies>
<dependency>
<name>{#UPSNAME} a un niveau de batterie faible</name>
<expression>{Template_OS_Linux_Server:hardware.ups[{#UPSNAME},ups.status].str(LB)}=1</expression>
</dependency>
</dependencies>
</trigger_prototype>
<trigger_prototype>
<expression>{str(RB)}=1</expression>
<name>la batterie de l'onduleur {#UPSNAME} est défectueuse</name>
<priority>AVERAGE</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{str(LB)}=1</expression>
<name>{#UPSNAME} a un niveau de batterie faible</name>
<priority>HIGH</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template_OS_Linux_Server:hardware.ups[{#UPSNAME},ups.status].nodata(15m)}=1 and {Template_OS_Linux_Server:agent.ping.nodata(15m)}=0 and {Template_OS_Linux_Server:net.tcp.service[tcp,,{$ZBX_AGENT_PORT}].min(1800)}&gt;0</expression>
<name>l'onduleur {#UPSNAME} ne remonte plus d'information</name>
<priority>WARNING</priority>
<description>Alerte si comm avec l'agent est OK, mais plus de news de l'onduleur</description>
<dependencies>
<dependency>
<name>No ping response from {HOST.IP1}</name>
<expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(180,strict)}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum({$DOWN_CRITICAL})}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&gt;={$PING_ALERT_FROM_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&lt;={$PING_ALERT_TO_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&gt;={$PING_ALERT_FROM_HOUR} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&lt;={$PING_ALERT_TO_HOUR}</expression>
<recovery_expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].sum(180)}&gt;3</recovery_expression>
</dependency>
<dependency>
<name>Unreachable Zabbix agent</name>
<expression>{Template_OS_Linux_Server:agent.ping.nodata({$ZBX_UNREACHABLE_TIMEOUT})}=1 and {Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(120,strict)} = 0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum(120)}&gt;0</expression>
</dependency>
</dependencies>
</trigger_prototype>
</trigger_prototypes>
<request_method>POST</request_method>
</discovery_rule>
<discovery_rule>
<name>Apache httpd discovery</name>
<key>httpd.discovery</key>
<delay>2h</delay>
<lifetime>10d</lifetime>
<item_prototypes>
<item_prototype>
<name>httpd: Info</name>
<key>httpd[{#HTTPD_STATUS_URI},all]</key>
<delay>5m</delay>
<history>0</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>httpd: Busy workers</name>
<type>DEPENDENT</type>
<key>httpd[{#HTTPD_STATUS_URI},busyworkers]</key>
<delay>0</delay>
<trends>1825d</trends>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.busyworkers</params>
</step>
</preprocessing>
<master_item>
<key>httpd[{#HTTPD_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>httpd: Average requests size</name>
<type>DEPENDENT</type>
<key>httpd[{#HTTPD_STATUS_URI},bytesperreq]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>B</units>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.bytesperreq</params>
</step>
</preprocessing>
<master_item>
<key>httpd[{#HTTPD_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>httpd: Bandwidth</name>
<type>DEPENDENT</type>
<key>httpd[{#HTTPD_STATUS_URI},bytespersec]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>b/s</units>
<applications>
<application>
<name>Applications</name>
</application>
<application>
<name>Network</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.total_kbytes</params>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
<step>
<type>MULTIPLIER</type>
<params>8192</params>
</step>
</preprocessing>
<master_item>
<key>httpd[{#HTTPD_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>httpd: Idle workers</name>
<type>DEPENDENT</type>
<key>httpd[{#HTTPD_STATUS_URI},idleworkers]</key>
<delay>0</delay>
<trends>1825d</trends>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.idleworkers</params>
</step>
</preprocessing>
<master_item>
<key>httpd[{#HTTPD_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>httpd: Requests per sec</name>
<type>DEPENDENT</type>
<key>httpd[{#HTTPD_STATUS_URI},reqpersec]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>r/s</units>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.total_accesses</params>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
</preprocessing>
<master_item>
<key>httpd[{#HTTPD_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
</item_prototypes>
<graph_prototypes>
<graph_prototype>
<name>Service: {#HTTPD_STATUS_URI}: Processes</name>
<graph_items>
<graph_item>
<color>1A7C11</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>httpd[{#HTTPD_STATUS_URI},idleworkers]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>2774A4</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>httpd[{#HTTPD_STATUS_URI},busyworkers]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
<graph_prototype>
<name>Service: {#HTTPD_STATUS_URI}: Requests</name>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>F63100</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>httpd[{#HTTPD_STATUS_URI},bytespersec]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>BOLD_LINE</drawtype>
<color>0000EE</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Template_OS_Linux_Server</host>
<key>httpd[{#HTTPD_STATUS_URI},reqpersec]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<drawtype>DASHED_LINE</drawtype>
<color>00EE00</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>httpd[{#HTTPD_STATUS_URI},bytesperreq]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
<request_method>POST</request_method>
</discovery_rule>
<discovery_rule>
<name>Nginx discovery</name>
<key>nginx.discovery</key>
<delay>2h</delay>
<lifetime>10d</lifetime>
<item_prototypes>
<item_prototype>
<name>Nginx: Active connections</name>
<type>DEPENDENT</type>
<key>nginx.status.dep[{#NGINX_STATUS_URI},active_conn]</key>
<delay>0</delay>
<history>180d</history>
<trends>1825d</trends>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.active_connections</params>
</step>
</preprocessing>
<master_item>
<key>nginx.status[{#NGINX_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Nginx: Connection per sec</name>
<type>DEPENDENT</type>
<key>nginx.status.dep[{#NGINX_STATUS_URI},conn_per_sec]</key>
<delay>0</delay>
<history>180d</history>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>c/s</units>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.total_connections</params>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
</preprocessing>
<master_item>
<key>nginx.status[{#NGINX_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Nginx: Keepalive connections</name>
<type>DEPENDENT</type>
<key>nginx.status.dep[{#NGINX_STATUS_URI},keep_alive_conn]</key>
<delay>0</delay>
<history>180d</history>
<trends>1825d</trends>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.keep_alive</params>
</step>
</preprocessing>
<master_item>
<key>nginx.status[{#NGINX_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Nginx: Requests per sec</name>
<type>DEPENDENT</type>
<key>nginx.status.dep[{#NGINX_STATUS_URI},req_per_sec]</key>
<delay>0</delay>
<history>180d</history>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>r/s</units>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.total_requests</params>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
</preprocessing>
<master_item>
<key>nginx.status[{#NGINX_STATUS_URI},all]</key>
</master_item>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Nginx: Info</name>
<key>nginx.status[{#NGINX_STATUS_URI},all]</key>
<delay>5m</delay>
<history>0</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<request_method>POST</request_method>
</item_prototype>
</item_prototypes>
<graph_prototypes>
<graph_prototype>
<name>Service: {#NGINX_STATUS_URI}: Requests</name>
<graph_items>
<graph_item>
<drawtype>DASHED_LINE</drawtype>
<color>1A7C11</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>nginx.status.dep[{#NGINX_STATUS_URI},conn_per_sec]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>F63100</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>nginx.status.dep[{#NGINX_STATUS_URI},req_per_sec]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<color>2774A4</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Template_OS_Linux_Server</host>
<key>nginx.status.dep[{#NGINX_STATUS_URI},active_conn]</key>
</item>
</graph_item>
<graph_item>
<sortorder>3</sortorder>
<color>000000</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Template_OS_Linux_Server</host>
<key>nginx.status.dep[{#NGINX_STATUS_URI},keep_alive_conn]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
<request_method>POST</request_method>
</discovery_rule>
<discovery_rule>
<name>PVE nodes discovery</name>
<key>pve.discovery[nodes,ping]</key>
<delay>1h</delay>
<lifetime>1h</lifetime>
<item_prototypes>
<item_prototype>
<name>Latence du node {#PVE_NODE_NAME}</name>
<type>DEPENDENT</type>
<key>net.icmp.info[{#PVE_NODE_IP},latency]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>s</units>
<applications>
<application>
<name>Latency</name>
</application>
<application>
<name>Network</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.latency</params>
</step>
</preprocessing>
<master_item>
<key>net.icmp[{#PVE_NODE_IP},all]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{avg(10m)}&gt;{$PVE_NODE_MAX_LATENCY}</expression>
<name>High latency with {#PVE_NODE_NAME}</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Taux de perte de ping pour le node {#PVE_NODE_NAME}</name>
<type>DEPENDENT</type>
<key>net.icmp.info[{#PVE_NODE_IP},loss]</key>
<delay>0</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<applications>
<application>
<name>Latency</name>
</application>
<application>
<name>Network</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.loss</params>
</step>
</preprocessing>
<master_item>
<key>net.icmp[{#PVE_NODE_IP},all]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{avg(15m)}&gt;{$PVE_NODE_MAX_LOSS}</expression>
<name>Ping loss with {#PVE_NODE_NAME}</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Ping du node {#PVE_NODE_NAME}</name>
<type>DEPENDENT</type>
<key>net.icmp.info[{#PVE_NODE_IP},respond]</key>
<delay>0</delay>
<trends>1825d</trends>
<applications>
<application>
<name>Latency</name>
</application>
<application>
<name>Network</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.respond</params>
</step>
</preprocessing>
<master_item>
<key>net.icmp[{#PVE_NODE_IP},all]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Stat ICMP du node {#PVE_NODE_NAME}</name>
<key>net.icmp[{#PVE_NODE_IP},all]</key>
<delay>5s</delay>
<history>0</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>Latency</name>
</application>
<application>
<name>Network</name>
</application>
</applications>
</item_prototype>
</item_prototypes>
<graph_prototypes>
<graph_prototype>
<name>Réponse du node {#PVE_NODE_NAME}</name>
<ymin_type_1>FIXED</ymin_type_1>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>4CAF50</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>net.icmp.info[{#PVE_NODE_IP},latency]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>F63100</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Template_OS_Linux_Server</host>
<key>net.icmp.info[{#PVE_NODE_IP},loss]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
</discovery_rule>
<discovery_rule>
<name>HP SmartArray RAID discovery</name>
<key>raid.hp.discovery</key>
<delay>2h</delay>
<lifetime>10d</lifetime>
<item_prototypes>
<item_prototype>
<name>RAID status for slot {#SLOT}</name>
<key>raid.hp.status[{#SLOT}]</key>
<delay>15m</delay>
<history>30d</history>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Disks</name>
</application>
<application>
<name>Hardware</name>
</application>
<application>
<name>Integrity</name>
</application>
</applications>
<request_method>POST</request_method>
<trigger_prototypes>
<trigger_prototype>
<expression>{nodata(1h)}=1</expression>
<name>No monitoring for RAID slot {#SLOT}</name>
<priority>WARNING</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{str(OK)} = 0 or {str(CRITICAL)} = 1</expression>
<name>RAID issue (controler {#MODEL}, slot {#SLOT})</name>
<priority>HIGH</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
<request_method>POST</request_method>
</discovery_rule>
<discovery_rule>
<name>megaraid RAID discovery</name>
<key>raid.mega.discovery</key>
<delay>2h</delay>
<lifetime>1d</lifetime>
<item_prototypes>
<item_prototype>
<name>MegaRAID status ({#CONTROLLERNO})</name>
<key>raid.mega.status[{$MEGARAID_SPARES},{$MEGARAID_IGNORE_OTHER},{$MEGARAID_IGNORE_MEDIA},{#CONTROLLERNO}]</key>
<delay>15m</delay>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Disks</name>
</application>
<application>
<name>Hardware</name>
</application>
</applications>
<request_method>POST</request_method>
<trigger_prototypes>
<trigger_prototype>
<expression>{str(CRITICAL)}=1</expression>
<name>Degraded RAID on controler {#CONTROLLERNO}</name>
<priority>HIGH</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{str(OK: Drives:0)}=1 or ({str(OK)}=0 and {str(WARNING)}=0 and {str(CRITICAL)}=0)</expression>
<name>RAID monitoring problem on {#CONTROLLERNO}</name>
<priority>WARNING</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{str(WARNING)}=1</expression>
<name>RAID warning on controler {#CONTROLLERNO}</name>
<priority>AVERAGE</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template_OS_Linux_Server:raid.mega.status[{$MEGARAID_SPARES},{$MEGARAID_IGNORE_OTHER},{$MEGARAID_IGNORE_MEDIA},{#CONTROLLERNO}].nodata(1h)}=1 and {Template_OS_Linux_Server:net.tcp.service[tcp,,{$ZBX_AGENT_PORT}].min(1800)}&gt;0</expression>
<name>No monitoring for RAID controler {#CONTROLLERNO}</name>
<priority>WARNING</priority>
<dependencies>
<dependency>
<name>No ping response from {HOST.IP1}</name>
<expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(180,strict)}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum({$DOWN_CRITICAL})}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&gt;={$PING_ALERT_FROM_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&lt;={$PING_ALERT_TO_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&gt;={$PING_ALERT_FROM_HOUR} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&lt;={$PING_ALERT_TO_HOUR}</expression>
<recovery_expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].sum(180)}&gt;3</recovery_expression>
</dependency>
<dependency>
<name>Unreachable Zabbix agent</name>
<expression>{Template_OS_Linux_Server:agent.ping.nodata({$ZBX_UNREACHABLE_TIMEOUT})}=1 and {Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(120,strict)} = 0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum(120)}&gt;0</expression>
</dependency>
</dependencies>
</trigger_prototype>
</trigger_prototypes>
<request_method>POST</request_method>
</discovery_rule>
<discovery_rule>
<name>mdadm RAID discovery</name>
<key>raid.sw.discovery</key>
<delay>2h</delay>
<filter>
<conditions>
<condition>
<macro>{#STATUS}</macro>
<value>active</value>
<formulaid>A</formulaid>
</condition>
</conditions>
</filter>
<lifetime>10d</lifetime>
<item_prototypes>
<item_prototype>
<name>{#DEVICE} status</name>
<key>raid.sw.status[{#DEVICE}]</key>
<delay>5m</delay>
<history>30d</history>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Disks</name>
</application>
<application>
<name>Hardware</name>
</application>
</applications>
<request_method>POST</request_method>
<trigger_prototypes>
<trigger_prototype>
<expression>{str(OK)}=0 and {str(WARNING)}=0</expression>
<name>RAID volume {#DEVICE} is degraded</name>
<priority>HIGH</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{str(WARNING)}=1 and {$EXT_BACKUPS}=0</expression>
<name>RAID volume {#DEVICE} is rebuilding</name>
<priority>AVERAGE</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template_OS_Linux_Server:raid.sw.status[{#DEVICE}].nodata(1h)}=1 and {Template_OS_Linux_Server:net.tcp.service[tcp,,{$ZBX_AGENT_PORT}].min(1800)}&gt;0</expression>
<name>No data from {#DEVICE}</name>
<priority>WARNING</priority>
<dependencies>
<dependency>
<name>No ping response from {HOST.IP1}</name>
<expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(180,strict)}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum({$DOWN_CRITICAL})}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&gt;={$PING_ALERT_FROM_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&lt;={$PING_ALERT_TO_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&gt;={$PING_ALERT_FROM_HOUR} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&lt;={$PING_ALERT_TO_HOUR}</expression>
<recovery_expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].sum(180)}&gt;3</recovery_expression>
</dependency>
<dependency>
<name>Unreachable Zabbix agent</name>
<expression>{Template_OS_Linux_Server:agent.ping.nodata({$ZBX_UNREACHABLE_TIMEOUT})}=1 and {Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(120,strict)} = 0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum(120)}&gt;0</expression>
</dependency>
</dependencies>
</trigger_prototype>
</trigger_prototypes>
<request_method>POST</request_method>
</discovery_rule>
<discovery_rule>
<name>VDO volume discovery</name>
<key>vfs.vdo.discovery[volumes]</key>
<delay>2h</delay>
<lifetime>10d</lifetime>
<item_prototypes>
<item_prototype>
<name>VDO: Info for {#VDO_VOL}</name>
<key>vfs.vdo.vol.all[{#VDO_VOL}]</key>
<delay>10m</delay>
<history>0</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>Disks</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>VDO: {#VDO_VOL}: Operating Mode</name>
<type>DEPENDENT</type>
<key>vfs.vdo.vol.info[{#VDO_VOL},operating_mode]</key>
<delay>0</delay>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Disks</name>
</application>
<application>
<name>Integrity</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.operating_mode</params>
</step>
</preprocessing>
<master_item>
<key>vfs.vdo.vol.all[{#VDO_VOL}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{str(normal)}&lt;&gt;1</expression>
<name>VDO volume {#VDO_VOL} is in {ITEM.LASTVALUE1} operating mode</name>
<priority>HIGH</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>VDO: {#VDO_VOL}: Saving percent</name>
<type>DEPENDENT</type>
<key>vfs.vdo.vol.info[{#VDO_VOL},saving_percent]</key>
<delay>0</delay>
<trends>1825d</trends>
<units>%</units>
<applications>
<application>
<name>Disks</name>
</application>
<application>
<name>Integrity</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.saving_percent</params>
</step>
</preprocessing>
<master_item>
<key>vfs.vdo.vol.all[{#VDO_VOL}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>VDO: {#VDO_VOL}: Used percent</name>
<type>DEPENDENT</type>
<key>vfs.vdo.vol.info[{#VDO_VOL},used_percent]</key>
<delay>0</delay>
<trends>1825d</trends>
<units>%</units>
<applications>
<application>
<name>Disks</name>
</application>
<application>
<name>Integrity</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.used_percent</params>
</step>
</preprocessing>
<master_item>
<key>vfs.vdo.vol.all[{#VDO_VOL}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{last()}&gt;80</expression>
<name>VDO volume {#VDO_VOL} almost full ({ITEM.LASTVALUE1})</name>
<priority>HIGH</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>VDO: {#VDO_VOL}: Version</name>
<type>DEPENDENT</type>
<key>vfs.vdo.vol.info[{#VDO_VOL},version]</key>
<delay>0</delay>
<trends>1825d</trends>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.version</params>
</step>
</preprocessing>
<master_item>
<key>vfs.vdo.vol.all[{#VDO_VOL}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{diff()}=1</expression>
<name>VDO volume {#VDO_VOL} version changed</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>VDO: {#VDO_VOL}: Write Policy</name>
<type>DEPENDENT</type>
<key>vfs.vdo.vol.info[{#VDO_VOL},write_policy]</key>
<delay>0</delay>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Disks</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.write_policy</params>
</step>
</preprocessing>
<master_item>
<key>vfs.vdo.vol.all[{#VDO_VOL}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{diff()}=1</expression>
<name>Write policy for vol {#VDO_VOL} changed</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
<graph_prototypes>
<graph_prototype>
<name>Système: VDO: Occupation {#VDO_VOL}</name>
<ymin_type_1>FIXED</ymin_type_1>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>1A7C11</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>vfs.vdo.vol.info[{#VDO_VOL},used_percent]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>F63100</color>
<item>
<host>Template_OS_Linux_Server</host>
<key>vfs.vdo.vol.info[{#VDO_VOL},saving_percent]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
</discovery_rule>
<discovery_rule>
<name>Zimbra services discovery</name>
<key>zimbra.discovery[services]</key>
<delay>7200</delay>
<lifetime>10d</lifetime>
<item_prototypes>
<item_prototype>
<name>Status for {#ZM_SERVICE}</name>
<key>zimbra.status[{#ZM_SERVICE}]</key>
<delay>15m</delay>
<history>30d</history>
<trends>0</trends>
<applications>
<application>
<name>Applications</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{last()}&lt;&gt;1</expression>
<name>Zimbra service {#ZM_SERVICE} isn't working</name>
<priority>AVERAGE</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$EXT_BACKUPS}</macro>
<value>0</value>
</macro>
<macro>
<macro>{$MAX_PROCESSES}</macro>
<value>500</value>
</macro>
<macro>
<macro>{$MEGARAID_IGNORE_MEDIA}</macro>
<value>0</value>
</macro>
<macro>
<macro>{$MEGARAID_IGNORE_OTHER}</macro>
<value>0</value>
</macro>
<macro>
<macro>{$MEGARAID_SPARES}</macro>
<value>0</value>
</macro>
<macro>
<macro>{$PVE_NODE_MAX_LATENCY}</macro>
<value>0.005</value>
</macro>
<macro>
<macro>{$PVE_NODE_MAX_LOSS}</macro>
<value>2</value>
</macro>
<macro>
<macro>{$REBOOT_WARN_DAY}</macro>
<value>7200</value>
</macro>
<macro>
<macro>{$REBOOT_WARN_NIGHT}</macro>
<value>21600</value>
</macro>
<macro>
<macro>{$ZBX_UNREACHABLE_TIMEOUT}</macro>
<value>600</value>
</macro>
</macros>
</template>
</templates>
<triggers>
<trigger>
<expression>{Template_OS_Linux_Server:agent.ping.nodata({$ZBX_UNREACHABLE_TIMEOUT})}=1 and {Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(120,strict)} = 0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum(120)}&gt;0</expression>
<name>Unreachable Zabbix agent</name>
<priority>DISASTER</priority>
<dependencies>
<dependency>
<name>No ping information received in last 3 minutes</name>
<expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(180,strict)}=1</expression>
</dependency>
<dependency>
<name>No ping response from {HOST.IP1}</name>
<expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].nodata(180,strict)}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].sum({$DOWN_CRITICAL})}=0 and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&gt;={$PING_ALERT_FROM_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].dayofweek(0)}&lt;={$PING_ALERT_TO_DAY} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&gt;={$PING_ALERT_FROM_HOUR} and {Template_OS_Linux_Server:icmpping[,2,,,2000].time(0)}&lt;={$PING_ALERT_TO_HOUR}</expression>
<recovery_expression>{Template_OS_Linux_Server:icmpping[,2,,,2000].sum(180)}&gt;3</recovery_expression>
</dependency>
</dependencies>
</trigger>
<trigger>
<expression>({Template_OS_Linux_Server:system.uptime.last(0)}&lt;{$REBOOT_WARN_DAY} and ({Template_OS_Linux_Server:system.uptime.last(0)}&gt;090000 and {Template_OS_Linux_Server:system.uptime.last(0)}&lt;230000)) or ({Template_OS_Linux_Server:system.uptime.last(0)}&lt;{$REBOOT_WARN_NIGHT} and ({Template_OS_Linux_Server:system.uptime.last(0)}&gt;230000 or {Template_OS_Linux_Server:system.uptime.last(0)}&lt;090000))</expression>
<name>{HOST.NAME} rebooted {ITEM.LASTVALUE1} ago</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</zabbix_export>