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.

724 lines
34 KiB

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2021-06-19T12:07:00Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template SNMP QNAP NAS</template>
<name>Template SNMP QNAP NAS</name>
<templates>
<template>
<name>Template_SNMP_Interfaces</name>
</template>
</templates>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>Hard disks</name>
</application>
<application>
<name>Memory</name>
</application>
<application>
<name>Network interfaces</name>
</application>
<application>
<name>System</name>
</application>
<application>
<name>Sytem fans</name>
</application>
<application>
<name>Volumes</name>
</application>
</applications>
<items>
<item>
<name>CPU temperature</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.5.0</snmp_oid>
<key>CPU-TemperatureEX</key>
<delay>5m</delay>
<trends>1825d</trends>
<units>°C</units>
<description>CPU temperature in centigrade</description>
<applications>
<application>
<name>System</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{min(15m)}&gt;{$QNAP_CPU_TEMP_CRIT}</expression>
<name>CPU temp on {HOST.HOST} is {ITEM.LASTVALUE1}</name>
<priority>HIGH</priority>
</trigger>
<trigger>
<expression>{min(15m)}&gt;{$QNAP_CPU_TEMP_WARN}</expression>
<name>CPU temp on {HOST.HOST} is {ITEM.LASTVALUE1}</name>
<priority>WARNING</priority>
<dependencies>
<dependency>
<name>CPU temp on {HOST.HOST} is {ITEM.LASTVALUE1}</name>
<expression>{Template SNMP QNAP NAS:CPU-TemperatureEX.min(15m)}&gt;{$QNAP_CPU_TEMP_CRIT}</expression>
</dependency>
</dependencies>
</trigger>
</triggers>
</item>
<item>
<name>Device system name</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.13.0</snmp_oid>
<key>HostNameEX</key>
<delay>3600</delay>
<history>7d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<description>Host name</description>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>Device model name</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.12.0</snmp_oid>
<key>ModelNameEX</key>
<delay>6h</delay>
<history>1d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>Device firmware revision</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.2.1.47.1.1.1.1.9.1</snmp_oid>
<key>PhysicalFirmwareRev</key>
<delay>30m</delay>
<history>30d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<inventory_link>SOFTWARE</inventory_link>
<applications>
<application>
<name>System</name>
</application>
</applications>
<preprocessing>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<triggers>
<trigger>
<expression>{diff(0)}&gt;0</expression>
<name>Firmware on {HOST.NAME} is changed</name>
<priority>INFO</priority>
</trigger>
</triggers>
</item>
<item>
<name>Device hardware revision</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.2.1.47.1.1.1.1.8.1</snmp_oid>
<key>PhysicalHardwareRev</key>
<delay>6h</delay>
<history>1d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<inventory_link>HARDWARE</inventory_link>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>Device software revision</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.2.1.47.1.1.1.1.10.1</snmp_oid>
<key>PhysicalSoftwareRev</key>
<delay>3600</delay>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>Device vendor name</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.2.1.47.1.1.1.1.12.1</snmp_oid>
<key>sysPhysicalMfgName</key>
<delay>3600</delay>
<history>1d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<inventory_link>VENDOR</inventory_link>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>CPU usage</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.1.0</snmp_oid>
<key>SystemCPU-UsageEX</key>
<delay>60</delay>
<trends>1825d</trends>
<units>%</units>
<description>System CPU usage</description>
<applications>
<application>
<name>System</name>
</application>
</applications>
<triggers>
<trigger>
<expression>{min(15m)}&gt;80</expression>
<name>CPU utilization on {HOST.NAME} is over 80% for 15 min</name>
<priority>WARNING</priority>
</trigger>
<trigger>
<expression>{min(15m)}&gt;95</expression>
<name>CPU utilization on {HOST.NAME} is over 95% for 15 min</name>
<priority>AVERAGE</priority>
</trigger>
</triggers>
</item>
<item>
<name>System free memory</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.3.0</snmp_oid>
<key>SystemFreeMemEX</key>
<delay>2m</delay>
<trends>1825d</trends>
<units>B</units>
<applications>
<application>
<name>System</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1000</params>
</step>
</preprocessing>
</item>
<item>
<name>System free memory (%)</name>
<type>CALCULATED</type>
<key>SystemPFreeMemEX</key>
<delay>2m</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<params>last(SystemFreeMemEX)/(last(SystemTotalMemEX)/100)</params>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>System temperature</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.6.0</snmp_oid>
<key>SystemTemperatureEX</key>
<delay>5m</delay>
<trends>1825d</trends>
<units>°C</units>
<description>System temperature in centigrade</description>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>System total memory</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.2.0</snmp_oid>
<key>SystemTotalMemEX</key>
<delay>10800</delay>
<trends>1825d</trends>
<units>b</units>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>System used memory</name>
<type>CALCULATED</type>
<key>SystemUsedMemEX</key>
<delay>2m</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>B</units>
<params>last(SystemTotalMemEX)-last(SystemFreeMemEX)</params>
<applications>
<application>
<name>System</name>
</application>
</applications>
</item>
<item>
<name>System uptime</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.2.1.25.1.1.0</snmp_oid>
<key>sysUptime</key>
<delay>60s</delay>
<trends>1825d</trends>
<units>uptime</units>
<applications>
<application>
<name>System</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>0.01</params>
</step>
</preprocessing>
<triggers>
<trigger>
<expression>{change(0)}&lt;0</expression>
<name>{HOST.NAME} has just been restarted</name>
<priority>HIGH</priority>
</trigger>
</triggers>
</item>
</items>
<discovery_rules>
<discovery_rule>
<name>System fans discovery</name>
<type>SNMP_AGENT</type>
<snmp_oid>discovery[{#SNMPVALUE},.1.3.6.1.4.1.24681.1.3.15.1.2]</snmp_oid>
<key>sysFans.discovery</key>
<delay>1h</delay>
<item_prototypes>
<item_prototype>
<name>Speed of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.15.1.3.{#SNMPINDEX}</snmp_oid>
<key>SysFanSpeedEX[{#SNMPINDEX}]</key>
<delay>60</delay>
<history>1d</history>
<units>RPM</units>
<applications>
<application>
<name>Sytem fans</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{max(60)}=0</expression>
<name>{#SNMPVALUE} fan on {HOST.NAME} possibly is stopped</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
</discovery_rule>
<discovery_rule>
<name>Hard disks discovery</name>
<type>SNMP_AGENT</type>
<snmp_oid>discovery[{#SNMPVALUE},.1.3.6.1.4.1.24681.1.3.11.1.2,{#DISK_STATUS},.1.3.6.1.4.1.24681.1.3.11.1.4]</snmp_oid>
<key>sysHDs.discovery</key>
<delay>1h</delay>
<filter>
<conditions>
<condition>
<macro>{#DISK_STATUS}</macro>
<value>-5</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>A</formulaid>
</condition>
</conditions>
</filter>
<item_prototypes>
<item_prototype>
<name>Capacity of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.11.1.6.{#SNMPINDEX}</snmp_oid>
<key>HdCapacityEX[{#SNMPINDEX}]</key>
<delay>2h</delay>
<trends>1825d</trends>
<units>B</units>
<applications>
<application>
<name>Hard disks</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>Model of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.11.1.5.{#SNMPINDEX}</snmp_oid>
<key>HdModelEX[{#SNMPINDEX}]</key>
<delay>2h</delay>
<history>30d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>Hard disks</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>S.M.A.R.T. info of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.11.1.7.{#SNMPINDEX}</snmp_oid>
<key>HdSmartInfoEX[{#SNMPINDEX}]</key>
<delay>5m</delay>
<history>30d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>Hard disks</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{iregexp(abnormal)}=1</expression>
<name>SMART state of {#SNMPVALUE} on {HOST.NAME} is ABNORMAL</name>
<priority>AVERAGE</priority>
<description>Abnormal&#13;
1. Any SMART value is equal or less than trhreshold.&#13;
2. Hard Disk temperature is higher than 65 degree C.&#13;
--------&#13;
QNAP Knowledgebase</description>
</trigger_prototype>
<trigger_prototype>
<expression>{iregexp(normal)}=1</expression>
<name>SMART state of {#SNMPVALUE} on {HOST.NAME} is not GOOD ({ITEM.VALUE1})</name>
<priority>WARNING</priority>
<description>Normal&#13;
1. Any Smart value is equal or less than threhold + (initial_SMART_value - threhold)/2. For example, if the initial SMART value is 100, the current value is 50, the threshold is 20, then the Smart value, 50, is less than 20+(100-20)/2. Thus, the health level would be Normal.&#13;
2. Any SMART test(Rapid or Complete) result of last 20 times is abnormal.&#13;
3. Hard Disk temperature is between 55 to 65 degree C.&#13;
--------&#13;
QNAP Knowledgebase</description>
<dependencies>
<dependency>
<name>SMART state of {#SNMPVALUE} on {HOST.NAME} is ABNORMAL</name>
<expression>{Template SNMP QNAP NAS:HdSmartInfoEX[{#SNMPINDEX}].iregexp(abnormal)}=1</expression>
</dependency>
</dependencies>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Status of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.11.1.4.{#SNMPINDEX}</snmp_oid>
<key>HdStatusEX[{#SNMPINDEX}]</key>
<delay>5m</delay>
<history>30d</history>
<trends>0</trends>
<value_type>FLOAT</value_type>
<applications>
<application>
<name>Hard disks</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{last(0)}&lt;&gt;0</expression>
<name>Disk {#SNMPVALUE} on {HOST.NAME} must be checked ({ITEM.LASTVALUE1})</name>
<priority>WARNING</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{last(0)}&lt;&gt;0</expression>
<name>State of {#SNMPVALUE} on {HOST.NAME} is not &quot;Ready&quot; ({ITEM.VALUE1})</name>
<priority>INFO</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Temperature of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.11.1.3.{#SNMPINDEX}</snmp_oid>
<key>HdTemperatureEX[{#SNMPINDEX}]</key>
<delay>5m</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>C</units>
<applications>
<application>
<name>Hard disks</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{min(15m)}&gt;{$HD_TEMPERATURE_WARNING}</expression>
<name>Temperature of {#SNMPVALUE} on {HOST.NAME} is {ITEM.LASTVALUE1}</name>
<priority>WARNING</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{min(15m)}&gt;{$QNAP_HD_TEMP_CRIT}</expression>
<name>Temperature of {#SNMPVALUE} on {HOST.NAME} is {ITEM.LASTVALUE1}</name>
<priority>HIGH</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
</discovery_rule>
<discovery_rule>
<name>Volumes discovery</name>
<type>SNMP_AGENT</type>
<snmp_oid>discovery[{#SNMPVALUE},.1.3.6.1.4.1.24681.1.3.17.1.2]</snmp_oid>
<key>sysVolumes.discovery</key>
<delay>1h</delay>
<lifetime>7d</lifetime>
<item_prototypes>
<item_prototype>
<name>Free size of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.17.1.5.{#SNMPINDEX}</snmp_oid>
<key>SysVolumeFreeSizeEX[{#SNMPINDEX}]</key>
<delay>10m</delay>
<trends>1825d</trends>
<units>B</units>
<applications>
<application>
<name>Volumes</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item_prototype>
<item_prototype>
<name>Free size of {#SNMPVALUE} (%)</name>
<type>CALCULATED</type>
<key>SysVolumePFreeSizeEX[{#SNMPINDEX}]</key>
<delay>10m</delay>
<trends>1825d</trends>
<value_type>FLOAT</value_type>
<units>%</units>
<params>last(SysVolumeFreeSizeEX[{#SNMPINDEX}])/(last(SysVolumeTotalSizeEX[{#SNMPINDEX}])/100)</params>
<applications>
<application>
<name>Volumes</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{last(0)}&lt;(100-{$QNAP_VOL_USAGE_WARN})</expression>
<name>Only {ITEM.LASTVALUE1} free space on volume {#SNMPVALUE}</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Status of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.17.1.6.{#SNMPINDEX}</snmp_oid>
<key>SysVolumeStatusEX[{#SNMPINDEX}]</key>
<delay>10m</delay>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>Volumes</name>
</application>
</applications>
<trigger_prototypes>
<trigger_prototype>
<expression>{regexp(Ready)}&lt;&gt;1</expression>
<name>{#SNMPVALUE} is not ready</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Total size of {#SNMPVALUE}</name>
<type>SNMP_AGENT</type>
<snmp_oid>.1.3.6.1.4.1.24681.1.3.17.1.4.{#SNMPINDEX}</snmp_oid>
<key>SysVolumeTotalSizeEX[{#SNMPINDEX}]</key>
<delay>1h</delay>
<trends>1825d</trends>
<units>B</units>
<applications>
<application>
<name>Volumes</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>1024</params>
</step>
</preprocessing>
</item_prototype>
<item_prototype>
<name>Used size of {#SNMPVALUE}</name>
<type>CALCULATED</type>
<key>SysVolumeUsedSizeEX[{#SNMPINDEX}]</key>
<delay>10m</delay>
<trends>1825d</trends>
<units>B</units>
<params>last(SysVolumeTotalSizeEX[{#SNMPINDEX}])-last(SysVolumeFreeSizeEX[{#SNMPINDEX}])</params>
<applications>
<application>
<name>Volumes</name>
</application>
</applications>
</item_prototype>
</item_prototypes>
<graph_prototypes>
<graph_prototype>
<name>Volume {#SNMPVALUE} usage</name>
<ymin_type_1>FIXED</ymin_type_1>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>8888FF</color>
<calc_fnc>MAX</calc_fnc>
<item>
<host>Template SNMP QNAP NAS</host>
<key>SysVolumeTotalSizeEX[{#SNMPINDEX}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>FILLED_REGION</drawtype>
<color>008800</color>
<calc_fnc>MAX</calc_fnc>
<item>
<host>Template SNMP QNAP NAS</host>
<key>SysVolumeUsedSizeEX[{#SNMPINDEX}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$QNAP_CPU_TEMP_CRIT}</macro>
<value>70</value>
</macro>
<macro>
<macro>{$QNAP_CPU_TEMP_WARN}</macro>
<value>60</value>
</macro>
<macro>
<macro>{$QNAP_HD_TEMP_CRIT}</macro>
<value>55</value>
</macro>
<macro>
<macro>{$QNAP_HD_TEMP_WARN}</macro>
<value>47</value>
</macro>
<macro>
<macro>{$QNAP_VOL_USAGE_WARN}</macro>
<value>90</value>
</macro>
<macro>
<macro>{$SNMP_COMMUNITY}</macro>
<value>public</value>
</macro>
<macro>
<macro>{$SNMP_PORT}</macro>
<value>161</value>
</macro>
</macros>
</template>
</templates>
<graphs>
<graph>
<name>CPU utilization</name>
<ymin_type_1>FIXED</ymin_type_1>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>FF0000</color>
<item>
<host>Template SNMP QNAP NAS</host>
<key>SystemCPU-UsageEX</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>Device temperature</name>
<ymin_type_1>FIXED</ymin_type_1>
<graph_items>
<graph_item>
<color>BB0000</color>
<item>
<host>Template SNMP QNAP NAS</host>
<key>CPU-TemperatureEX</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<color>0000BB</color>
<item>
<host>Template SNMP QNAP NAS</host>
<key>SystemTemperatureEX</key>
</item>
</graph_item>
</graph_items>
</graph>
<graph>
<name>Memory usage</name>
<ymin_type_1>FIXED</ymin_type_1>
<graph_items>
<graph_item>
<drawtype>GRADIENT_LINE</drawtype>
<color>B2EBF2</color>
<calc_fnc>MAX</calc_fnc>
<item>
<host>Template SNMP QNAP NAS</host>
<key>SystemTotalMemEX</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>FILLED_REGION</drawtype>
<color>66BB6A</color>
<item>
<host>Template SNMP QNAP NAS</host>
<key>SystemUsedMemEX</key>
</item>
</graph_item>
</graph_items>
</graph>
</graphs>
</zabbix_export>