<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>5.0</version>
    <date>2020-07-03T13:34:51Z</date>
    <groups>
        <group>
            <name>Templates SNMP Devices</name>
        </group>
    </groups>
    <templates>
        <template>
            <template>Arista temperature SNMP</template>
            <name>Arista temperature SNMP</name>
            <groups>
                <group>
                    <name>Templates SNMP Devices</name>
                </group>
            </groups>
            <applications>
                <application>
                    <name>Fan speed</name>
                </application>
                <application>
                    <name>Fan status</name>
                </application>
                <application>
                    <name>Temperature</name>
                </application>
                <application>
                    <name>Temperature critical threshold</name>
                </application>
                <application>
                    <name>Temperature status</name>
                </application>
                <application>
                    <name>Temperature warning threshold</name>
                </application>
                <application>
                    <name>Voltage</name>
                </application>
            </applications>
            <discovery_rules>
                <discovery_rule>
                    <name>Temperature discovery</name>
                    <type>SNMP_AGENT</type>
                    <snmp_oid>discovery[{#SENSOR_TYPE},1.3.6.1.2.1.99.1.1.1.1,{#SENSOR_DESC},1.3.6.1.2.1.47.1.1.1.1.2,{#THRESHOLD_WARN},1.3.6.1.4.1.30065.3.12.1.1.1.3,{#THRESHOLD_CRIT},1.3.6.1.4.1.30065.3.12.1.1.1.4]</snmp_oid>
                    <key>arista.temp.new</key>
                    <filter>
                        <conditions>
                            <condition>
                                <macro>{#SENSOR_TYPE}</macro>
                                <value>8</value>
                                <formulaid>A</formulaid>
                            </condition>
                        </conditions>
                    </filter>
                    <item_prototypes>
                        <item_prototype>
                            <name>{#SENSOR_DESC}: Temperature status</name>
                            <type>SNMP_AGENT</type>
                            <snmp_oid>1.3.6.1.2.1.99.1.1.1.5.{#SNMPINDEX}</snmp_oid>
                            <key>sensor.temp.status[entPhySensorOperStatus.{#SNMPINDEX}]</key>
                            <description>MIB: ENTITY-SENSORS-MIB&#13;
The operational status of the sensor {#SENSOR_DESC}</description>
                            <applications>
                                <application>
                                    <name>Temperature</name>
                                </application>
                                <application>
                                    <name>Temperature status</name>
                                </application>
                            </applications>
                            <valuemap>
                                <name>ENTITY-SENSORS-MIB::EntitySensorStatus</name>
                            </valuemap>
                        </item_prototype>
                        <item_prototype>
                            <name>{#SENSOR_DESC}: Temperature critical threshold</name>
                            <type>SNMP_AGENT</type>
                            <snmp_oid>1.3.6.1.4.1.30065.3.12.1.1.1.4.{#SNMPINDEX}</snmp_oid>
                            <key>sensor.temp.value[aristaEntSensorThresholdHighCritical.{#SNMPINDEX}]</key>
                            <value_type>FLOAT</value_type>
                            <units>°C</units>
                            <description>The high critical value for the given sensor at which point the entity's alarm status is set to critical.</description>
                            <applications>
                                <application>
                                    <name>Temperature critical threshold</name>
                                </application>
                            </applications>
                            <preprocessing>
                                <step>
                                    <type>MULTIPLIER</type>
                                    <params>0.1</params>
                                </step>
                            </preprocessing>
                        </item_prototype>
                        <item_prototype>
                            <name>{#SENSOR_DESC}: Temperature warning threshold</name>
                            <type>SNMP_AGENT</type>
                            <snmp_oid>1.3.6.1.4.1.30065.3.12.1.1.1.3.{#SNMPINDEX}</snmp_oid>
                            <key>sensor.temp.value[aristaEntSensorThresholdHighWarning.{#SNMPINDEX}]</key>
                            <value_type>FLOAT</value_type>
                            <units>°C</units>
                            <description>The high threshold value for the given sensor at which point the entity's alarm status is set to warning.</description>
                            <applications>
                                <application>
                                    <name>Temperature warning threshold</name>
                                </application>
                            </applications>
                            <preprocessing>
                                <step>
                                    <type>MULTIPLIER</type>
                                    <params>0.1</params>
                                </step>
                            </preprocessing>
                        </item_prototype>
                        <item_prototype>
                            <name>{#SENSOR_DESC}: Temperature</name>
                            <type>SNMP_AGENT</type>
                            <snmp_oid>1.3.6.1.2.1.99.1.1.1.4.{#SNMPINDEX}</snmp_oid>
                            <key>sensor.temp.value[entPhySensorValue.{#SNMPINDEX}]</key>
                            <value_type>FLOAT</value_type>
                            <units>°C</units>
                            <applications>
                                <application>
                                    <name>Temperature</name>
                                </application>
                            </applications>
                            <preprocessing>
                                <step>
                                    <type>MULTIPLIER</type>
                                    <params>0.1</params>
                                </step>
                            </preprocessing>
                        </item_prototype>
                    </item_prototypes>
                    <trigger_prototypes>
                        <trigger_prototype>
                            <expression>{Arista temperature SNMP:sensor.temp.value[entPhySensorValue.{#SNMPINDEX}].avg(5m)}&gt;{Arista temperature SNMP:sensor.temp.value[aristaEntSensorThresholdHighCritical.{#SNMPINDEX}].last()}</expression>
                            <recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
                            <recovery_expression>{Arista temperature SNMP:sensor.temp.value[entPhySensorValue.{#SNMPINDEX}].avg(5m)}&lt;{Arista temperature SNMP:sensor.temp.value[aristaEntSensorThresholdHighCritical.{#SNMPINDEX}].last()}-3</recovery_expression>
                            <name>{#SENSOR_INFO}: Temperature is above critical threshold</name>
                            <opdata>Last value:{ITEM.LASTVALUE1}</opdata>
                            <priority>HIGH</priority>
                            <description>This trigger uses temperature sensor values as well as temperature sensor status if available</description>
                        </trigger_prototype>
                        <trigger_prototype>
                            <expression>{Arista temperature SNMP:sensor.temp.value[entPhySensorValue.{#SNMPINDEX}].avg(5m)}&gt;{Arista temperature SNMP:sensor.temp.value[aristaEntSensorThresholdHighWarning.{#SNMPINDEX}].last()}</expression>
                            <recovery_mode>RECOVERY_EXPRESSION</recovery_mode>
                            <recovery_expression>{Arista temperature SNMP:sensor.temp.value[entPhySensorValue.{#SNMPINDEX}].avg(5m)}&lt;{Arista temperature SNMP:sensor.temp.value[aristaEntSensorThresholdHighWarning.{#SNMPINDEX}].last()}-3</recovery_expression>
                            <name>{#SENSOR_INFO}: Temperature is above warning threshold</name>
                            <opdata>Last value:{ITEM.LASTVALUE1}</opdata>
                            <priority>WARNING</priority>
                            <description>This trigger uses temperature sensor values as well as temperature sensor status if available</description>
                            <dependencies>
                                <dependency>
                                    <name>{#SENSOR_INFO}: Temperature is above critical threshold</name>
                                    <expression>{Arista temperature SNMP:sensor.temp.value[entPhySensorValue.{#SNMPINDEX}].avg(5m)}&gt;{Arista temperature SNMP:sensor.temp.value[aristaEntSensorThresholdHighCritical.{#SNMPINDEX}].last()}</expression>
                                    <recovery_expression>{Arista temperature SNMP:sensor.temp.value[entPhySensorValue.{#SNMPINDEX}].avg(5m)}&lt;{Arista temperature SNMP:sensor.temp.value[aristaEntSensorThresholdHighCritical.{#SNMPINDEX}].last()}-3</recovery_expression>
                                </dependency>
                            </dependencies>
                        </trigger_prototype>
                    </trigger_prototypes>
                </discovery_rule>
                <discovery_rule>
                    <name>Voltage discovery</name>
                    <type>SNMP_AGENT</type>
                    <snmp_oid>discovery[{#SENSOR_TYPE},1.3.6.1.2.1.99.1.1.1.1,{#SENSOR_DESC},1.3.6.1.2.1.47.1.1.1.1.2,{#THRESHOLD_WARN},1.3.6.1.4.1.30065.3.12.1.1.1.3,{#THRESHOLD_CRIT},1.3.6.1.4.1.30065.3.12.1.1.1.4]</snmp_oid>
                    <key>arista.voltage</key>
                    <delay>3m</delay>
                    <filter>
                        <conditions>
                            <condition>
                                <macro>{#SENSOR_TYPE}</macro>
                                <value>3</value>
                                <formulaid>A</formulaid>
                            </condition>
                            <condition>
                                <macro>{#SENSOR_TYPE}</macro>
                                <value>4</value>
                                <formulaid>B</formulaid>
                            </condition>
                        </conditions>
                    </filter>
                    <item_prototypes>
                        <item_prototype>
                            <name>{#SENSOR_DESC}: Voltage</name>
                            <type>SNMP_AGENT</type>
                            <snmp_oid>1.3.6.1.2.1.99.1.1.1.4.{#SNMPINDEX}</snmp_oid>
                            <key>sensor.voltage[entPhySensorValue.{#SNMPINDEX}]</key>
                            <value_type>FLOAT</value_type>
                            <units>V</units>
                            <applications>
                                <application>
                                    <name>Voltage</name>
                                </application>
                            </applications>
                        </item_prototype>
                    </item_prototypes>
                </discovery_rule>
                <discovery_rule>
                    <name>Fan Discovery</name>
                    <type>SNMP_AGENT</type>
                    <snmp_oid>discovery[{#SENSOR_TYPE},1.3.6.1.2.1.99.1.1.1.1,{#SENSOR_INFO},1.3.6.1.2.1.47.1.1.1.1.2]</snmp_oid>
                    <key>fan.discovery.new</key>
                    <delay>3m</delay>
                    <filter>
                        <conditions>
                            <condition>
                                <macro>{#SENSOR_TYPE}</macro>
                                <value>10</value>
                                <formulaid>A</formulaid>
                            </condition>
                        </conditions>
                    </filter>
                    <lifetime>0</lifetime>
                    <item_prototypes>
                        <item_prototype>
                            <name>{#SENSOR_INFO}: Fan speed</name>
                            <type>SNMP_AGENT</type>
                            <snmp_oid>1.3.6.1.2.1.99.1.1.1.4.{#SNMPINDEX}</snmp_oid>
                            <key>sensor.fan.speed[entPhySensorValue.{#SNMPINDEX}]</key>
                            <units>rpm</units>
                            <applications>
                                <application>
                                    <name>Fan speed</name>
                                </application>
                            </applications>
                        </item_prototype>
                        <item_prototype>
                            <name>{#SENSOR_INFO}: Fan status</name>
                            <type>SNMP_AGENT</type>
                            <snmp_oid>1.3.6.1.2.1.99.1.1.1.5.{#SNMPINDEX}</snmp_oid>
                            <key>sensor.fan.status[entPhySensorOperStatus.{#SNMPINDEX}]</key>
                            <delay>3m</delay>
                            <applications>
                                <application>
                                    <name>Fan status</name>
                                </application>
                            </applications>
                            <valuemap>
                                <name>ENTITY-SENSORS-MIB::EntitySensorStatus</name>
                            </valuemap>
                        </item_prototype>
                    </item_prototypes>
                </discovery_rule>
            </discovery_rules>
        </template>
    </templates>
    <value_maps>
        <value_map>
            <name>ENTITY-SENSORS-MIB::EntitySensorStatus</name>
            <mappings>
                <mapping>
                    <value>1</value>
                    <newvalue>ok</newvalue>
                </mapping>
                <mapping>
                    <value>2</value>
                    <newvalue>unavailable</newvalue>
                </mapping>
                <mapping>
                    <value>3</value>
                    <newvalue>nonoperational</newvalue>
                </mapping>
            </mappings>
        </value_map>
    </value_maps>
</zabbix_export>


