<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
    <version>5.2</version>
    <date>2026-10-07T00:00:00Z</date>
    <groups>
        <group>
            <name>Templates/MiRCA</name>
        </group>
    </groups>
    <templates>
        <template>
            <template>MiRCA Device</template>
            <name>MiRCA Device</name>
            <description>MiRCA board: system OIDs and the DS18B20 board temperature. SNMP v2c, Ethernet interface only (W5500). Default community 'public' (set {$SNMP_COMMUNITY}). Link the 'MiRCA Port N &lt;protocol&gt;' templates for the devices on the serial ports.</description>
            <groups>
                <group>
                    <name>Templates/MiRCA</name>
                </group>
            </groups>
            <applications>
                <application>
                    <name>General</name>
                </application>
                <application>
                    <name>Temperature</name>
                </application>
            </applications>
            <items>
                <item>
                    <name>System name</name>
                    <type>SNMP_AGENT</type>
                    <snmp_oid>1.3.6.1.2.1.1.5.0</snmp_oid>
                    <key>mirca.sysname</key>
                    <delay>{$MIRCA.INTERVAL.SLOW}</delay>
                    <history>14d</history>
                    <trends>0</trends>
                    <value_type>CHAR</value_type>
                    <description>nodename setting</description>
                    <inventory_link>NAME</inventory_link>
                    <applications>
                        <application>
                            <name>General</name>
                        </application>
                    </applications>
                    <preprocessing>
                        <step>
                            <type>DISCARD_UNCHANGED_HEARTBEAT</type>
                            <parameters>
                                <parameter>12h</parameter>
                            </parameters>
                        </step>
                    </preprocessing>
                </item>
                <item>
                    <name>Firmware</name>
                    <type>SNMP_AGENT</type>
                    <snmp_oid>1.3.6.1.2.1.1.1.0</snmp_oid>
                    <key>mirca.firmware</key>
                    <delay>{$MIRCA.INTERVAL.SLOW}</delay>
                    <history>14d</history>
                    <trends>0</trends>
                    <value_type>CHAR</value_type>
                    <description>sysDescr: 'MiRCA &lt;FW_VERSION&gt;'</description>
                    <inventory_link>OS</inventory_link>
                    <applications>
                        <application>
                            <name>General</name>
                        </application>
                    </applications>
                    <preprocessing>
                        <step>
                            <type>DISCARD_UNCHANGED_HEARTBEAT</type>
                            <parameters>
                                <parameter>12h</parameter>
                            </parameters>
                        </step>
                    </preprocessing>
                </item>
                <item>
                    <name>Board temperature (DS18B20)</name>
                    <type>SNMP_AGENT</type>
                    <snmp_oid>1.3.6.1.2.1.6540.1.0</snmp_oid>
                    <key>mirca.ds18b20</key>
                    <delay>{$MIRCA.INTERVAL}</delay>
                    <history>14d</history>
                    <trends>365d</trends>
                    <value_type>FLOAT</value_type>
                    <units>°C</units>
                    <description>-127 °C: sensor not connected</description>
                    <applications>
                        <application>
                            <name>Temperature</name>
                        </application>
                    </applications>
                    <preprocessing>
                        <step>
                            <type>MULTIPLIER</type>
                            <parameters>
                                <parameter>0.01</parameter>
                            </parameters>
                        </step>
                    </preprocessing>
                </item>
            </items>
            <macros>
                <macro>
                    <macro>{$MIRCA.INTERVAL}</macro>
                    <value>30s</value>
                    <description>Polling interval of live values</description>
                </macro>
                <macro>
                    <macro>{$MIRCA.INTERVAL.SLOW}</macro>
                    <value>5m</value>
                    <description>Polling interval of slowly changing values (capacity, cycles, energy counters)</description>
                </macro>
                <macro>
                    <macro>{$MIRCA.NODATA.TIME}</macro>
                    <value>5m</value>
                    <description>No SNMP answer for this long raises a problem</description>
                </macro>
                <macro>
                    <macro>{$MIRCA.BOARD.TEMP.MAX}</macro>
                    <value>60</value>
                    <description>DS18B20 temperature threshold, °C</description>
                </macro>
            </macros>
        </template>
    </templates>
    <triggers>
        <trigger>
            <expression>{MiRCA Device:mirca.ds18b20.nodata({$MIRCA.NODATA.TIME})}=1</expression>
            <name>MiRCA: no SNMP data for {$MIRCA.NODATA.TIME}</name>
            <priority>AVERAGE</priority>
            <description>SNMP is served on the Ethernet port only. Check the cable, the IP address, the community and that SNMP is enabled in the settings.</description>
        </trigger>
        <trigger>
            <expression>{MiRCA Device:mirca.ds18b20.last()}&lt;=-127</expression>
            <name>MiRCA: DS18B20 sensor not connected</name>
            <priority>WARNING</priority>
        </trigger>
        <trigger>
            <expression>{MiRCA Device:mirca.ds18b20.min(5m)}&gt;{$MIRCA.BOARD.TEMP.MAX}</expression>
            <name>MiRCA: board temperature is high (&gt;{$MIRCA.BOARD.TEMP.MAX}°C)</name>
            <priority>AVERAGE</priority>
        </trigger>
        <trigger>
            <expression>{MiRCA Device:mirca.firmware.diff()}=1 and {MiRCA Device:mirca.firmware.strlen()}&gt;0</expression>
            <name>MiRCA: firmware changed to {ITEM.LASTVALUE}</name>
            <priority>INFO</priority>
            <manual_close>YES</manual_close>
        </trigger>
    </triggers>
    <graphs>
        <graph>
            <name>Board temperature</name>
            <graph_items>
                <graph_item>
                    <sortorder>0</sortorder>
                    <color>1A7C11</color>
                    <item>
                        <host>MiRCA Device</host>
                        <key>mirca.ds18b20</key>
                    </item>
                </graph_item>
            </graph_items>
        </graph>
    </graphs>
</zabbix_export>
