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.
 
 

363 lines
18 KiB

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.0</version>
<date>2021-06-19T12:08:45Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Template_App_Multipath</template>
<name>Template_App_Multipath</name>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<discovery_rules>
<discovery_rule>
<name>Multipath devices discovery</name>
<key>vfs.mpath.discovery[mpath]</key>
<delay>20m</delay>
<lifetime>2d</lifetime>
<item_prototypes>
<item_prototype>
<name>Multipath info for {#MPATH_DEV}</name>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
<delay>5m</delay>
<history>0</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
</item_prototype>
<item_prototype>
<name>Multipath: Status for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},dm_st]</key>
<delay>0</delay>
<history>30d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.dm_st</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{str(active)}&lt;&gt;1</expression>
<name>mpath device {#MPATH_DEV} is in {ITEM.LASTVALUE1} state</name>
<priority>AVERAGE</priority>
</trigger_prototype>
<trigger_prototype>
<expression>{nodata(1800)}=1</expression>
<name>No more monitoring data for {#MPATH_DEV}</name>
<priority>AVERAGE</priority>
<manual_close>YES</manual_close>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Multipath: Errors for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},errors]</key>
<delay>0</delay>
<history>30d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.errors</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Number device failures for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},failures]</key>
<delay>0</delay>
<history>60d</history>
<units>!errors</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.failures</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{last()}&gt;0</expression>
<name>Failures on mpath device {#MPATH_DEV}</name>
<priority>AVERAGE</priority>
<manual_close>YES</manual_close>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Multipath: Features for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},features]</key>
<delay>0</delay>
<history>30d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.features</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{change()}&lt;&gt;0</expression>
<recovery_mode>NONE</recovery_mode>
<name>Features for mpath {#MPATH_DEV} changed</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
<item_prototype>
<name>Multipath: Number of active paths for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},paths_num_active]</key>
<delay>0</delay>
<history>60d</history>
<units>!path(s)</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.paths_num_active</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Number of inactive paths for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},paths_num_inactive]</key>
<delay>0</delay>
<history>60d</history>
<units>!path(s)</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.paths_num_inactive</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Number of paths having issues for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},paths_num_ko]</key>
<delay>0</delay>
<history>60d</history>
<units>!path(s)</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.paths_num_ko</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Number of operational paths for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},paths_num_ok]</key>
<delay>0</delay>
<history>60d</history>
<units>!path(s)</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.paths_num_ok</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Total number of paths for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},paths_num_total]</key>
<delay>0</delay>
<history>60d</history>
<units>!path(s)</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.paths_num_total</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Paths with issues for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},paths_with_issue]</key>
<delay>0</delay>
<history>30d</history>
<trends>0</trends>
<value_type>TEXT</value_type>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.paths_with_issue</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Number path failures for {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},path_failures]</key>
<delay>0</delay>
<history>60d</history>
<units>!path(s)</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.path_failures</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
</item_prototype>
<item_prototype>
<name>Multipath: Size of the device {#MPATH_DEV}</name>
<type>DEPENDENT</type>
<key>vfs.mpath[{#MPATH_DEV},size]</key>
<delay>0</delay>
<history>60d</history>
<units>B</units>
<applications>
<application>
<name>mpath</name>
</application>
</applications>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$.size</params>
</step>
</preprocessing>
<master_item>
<key>vfs.mpath.info[{#MPATH_DEV}]</key>
</master_item>
<trigger_prototypes>
<trigger_prototype>
<expression>{change()}&lt;&gt;0</expression>
<recovery_mode>NONE</recovery_mode>
<name>Size of mpath {#MPATH_DEV} changed</name>
<priority>INFO</priority>
<manual_close>YES</manual_close>
</trigger_prototype>
</trigger_prototypes>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{Template_App_Multipath:vfs.mpath[{#MPATH_DEV},path_failures].last()}&gt;0 or {Template_App_Multipath:vfs.mpath[{#MPATH_DEV},paths_num_ko].last()}&gt;0 or {Template_App_Multipath:vfs.mpath[{#MPATH_DEV},failures].last()}&gt;0 or {Template_App_Multipath:vfs.mpath[{#MPATH_DEV},paths_num_ok].last()}&lt;&gt;{Template_App_Multipath:vfs.mpath[{#MPATH_DEV},paths_num_active].last()} or {Template_App_Multipath:vfs.mpath[{#MPATH_DEV},paths_with_issue].strlen()}&lt;&gt;0</expression>
<name>Issues detected on {#MPATH_DEV} ({ITEM.VALUE6})</name>
<priority>WARNING</priority>
</trigger_prototype>
</trigger_prototypes>
</discovery_rule>
</discovery_rules>
</template>
</templates>
</zabbix_export>