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.
 
 

423 lines
22 KiB

<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>4.4</version>
<date>2020-03-02T14:10:38Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>Model_SNMP_Interfaces</template>
<name>Model_SNMP_Interfaces</name>
<templates>
<template>
<name>Model_SNMP_Device</name>
</template>
</templates>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<discovery_rules>
<discovery_rule>
<name>Interfaces</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>discovery[{#IFINDEX},IF-MIB::ifIndex,{#IFNAME},IF-MIB::ifName,{#IFDESCR},IF-MIB::ifDescr,{#IFSTATUS},IF-MIB::ifOperStatus]</snmp_oid>
<key>ifIndex.discovery</key>
<delay>1h</delay>
<filter>
<conditions>
<condition>
<macro>{#IFSTATUS}</macro>
<value>^(1|2)$</value>
<formulaid>B</formulaid>
</condition>
<condition>
<macro>{#IFNAME}</macro>
<value>^Po[1-9]\d\d?</value>
<operator>NOT_MATCHES_REGEX</operator>
<formulaid>A</formulaid>
</condition>
</conditions>
</filter>
<lifetime>2d</lifetime>
<item_prototypes>
<item_prototype>
<name>Admin status of {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifAdminStatus.{#SNMPINDEX}</snmp_oid>
<key>ifAdminStatus[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>6h</delay>
<history>30d</history>
<trends>0</trends>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>{#IFNAME} interface alias</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifAlias.{#SNMPINDEX}</snmp_oid>
<key>ifAlias[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>6h</delay>
<history>30d</history>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>{#IFNAME} interface description</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifDescr.{#SNMPINDEX}</snmp_oid>
<key>ifDescr[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>6h</delay>
<history>30d</history>
<trends>0</trends>
<value_type>CHAR</value_type>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Rejected inbound packets on {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifInDiscards.{#SNMPINDEX}</snmp_oid>
<key>ifInDiscards[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>1h</delay>
<history>30d</history>
<trends>730d</trends>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>SIMPLE_CHANGE</type>
<params/>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Inbound errors on {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifInErrors.{#SNMPINDEX}</snmp_oid>
<key>ifInErrors[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>15m</delay>
<history>30d</history>
<trends>730d</trends>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>SIMPLE_CHANGE</type>
<params/>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Inbound trafic on {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifHCInOctets.{#SNMPINDEX}</snmp_oid>
<key>ifInOctets[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>5m</delay>
<history>30d</history>
<trends>730d</trends>
<units>bps</units>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
<step>
<type>MULTIPLIER</type>
<params>8</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>3200</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Last state change for {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifLastChange.{#SNMPINDEX}</snmp_oid>
<key>ifLastChange[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>10m</delay>
<history>30d</history>
<trends>0</trends>
<units>s</units>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>MULTIPLIER</type>
<params>0.01</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Operational status of {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifOperStatus.{#SNMPINDEX}</snmp_oid>
<key>ifOperStatus[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>10m</delay>
<history>30d</history>
<trends>0</trends>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Rejected outbound packets on {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifOutDiscards.{#SNMPINDEX}</snmp_oid>
<key>ifOutDiscards[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>1h</delay>
<history>30d</history>
<trends>730d</trends>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>SIMPLE_CHANGE</type>
<params/>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Outbound errors on {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifOutErrors.{#SNMPINDEX}</snmp_oid>
<key>ifOutErrors[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>15m</delay>
<history>30d</history>
<trends>730d</trends>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>SIMPLE_CHANGE</type>
<params/>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>1d</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
<item_prototype>
<name>Outbound trafic on {#IFNAME}</name>
<type>SNMPV2</type>
<snmp_community>{$SNMP_COMMUNITY}</snmp_community>
<snmp_oid>IF-MIB::ifHCOutOctets.{#SNMPINDEX}</snmp_oid>
<key>ifOutOctets[{#IFINDEX},{#SNMPINDEX}]</key>
<delay>5m</delay>
<history>30d</history>
<trends>730d</trends>
<units>bps</units>
<applications>
<application>
<name>Interface(s)</name>
</application>
</applications>
<preprocessing>
<step>
<type>CHANGE_PER_SECOND</type>
<params/>
</step>
<step>
<type>MULTIPLIER</type>
<params>8</params>
</step>
<step>
<type>DISCARD_UNCHANGED_HEARTBEAT</type>
<params>3200</params>
</step>
</preprocessing>
<request_method>POST</request_method>
</item_prototype>
</item_prototypes>
<trigger_prototypes>
<trigger_prototype>
<expression>{$ALERT_ON_IF_CHANGE}=1 and ({Model_SNMP_Interfaces:sysUpTimeInstance.last()}-{Model_SNMP_Interfaces:ifLastChange[{#IFINDEX},{#SNMPINDEX}].last()})&lt;1800 and {Model_SNMP_Interfaces:ifLastChange[{#IFINDEX},{#SNMPINDEX}].last()} &gt; 0</expression>
<name>{#IFNAME} state changed</name>
<priority>AVERAGE</priority>
</trigger_prototype>
</trigger_prototypes>
<graph_prototypes>
<graph_prototype>
<name>Trafic on {#IFNAME} ({#IFINDEX} - {#IFDESCR})</name>
<percent_left>0.9500</percent_left>
<percent_right>0.9500</percent_right>
<graph_items>
<graph_item>
<drawtype>FILLED_REGION</drawtype>
<color>00CF00</color>
<item>
<host>Model_SNMP_Interfaces</host>
<key>ifInOctets[{#IFINDEX},{#SNMPINDEX}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>1</sortorder>
<drawtype>BOLD_LINE</drawtype>
<color>002A97</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Model_SNMP_Interfaces</host>
<key>ifOutOctets[{#IFINDEX},{#SNMPINDEX}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>2</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>FFAB00</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Model_SNMP_Interfaces</host>
<key>ifInDiscards[{#IFINDEX},{#SNMPINDEX}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>3</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>F51D30</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Model_SNMP_Interfaces</host>
<key>ifInErrors[{#IFINDEX},{#SNMPINDEX}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>4</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>C4FD3D</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Model_SNMP_Interfaces</host>
<key>ifOutDiscards[{#IFINDEX},{#SNMPINDEX}]</key>
</item>
</graph_item>
<graph_item>
<sortorder>5</sortorder>
<drawtype>GRADIENT_LINE</drawtype>
<color>00694A</color>
<yaxisside>RIGHT</yaxisside>
<item>
<host>Model_SNMP_Interfaces</host>
<key>ifOutErrors[{#IFINDEX},{#SNMPINDEX}]</key>
</item>
</graph_item>
</graph_items>
</graph_prototype>
</graph_prototypes>
<request_method>POST</request_method>
</discovery_rule>
</discovery_rules>
<macros>
<macro>
<macro>{$ALERT_ON_IF_CHANGE}</macro>
<value>0</value>
</macro>
<macro>
<macro>{$SNMP_COMMUNITY}</macro>
<value>public</value>
</macro>
</macros>
</template>
</templates>
</zabbix_export>