Ad Widget

Collapse

Passing macro from one LLD Discovery to Another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thelettere
    Junior Member
    • Jan 2015
    • 2

    #1

    Passing macro from one LLD Discovery to Another

    Hello,

    Using Zabbix 2.4.4 and attempting to monitor QLogic 5602 FibreChannel switch.

    The QLogic switch inserts the WWN of the switch into the OIDs to be monitored.

    I have a LLD Discovery Rule that uses the advsnmp.discovery script to return the WWN portion of the OID based on a filter.

    However, I need to use this WWN value for additional Interfaces and Sensor discovery rules. Is there a way to pass the value from one Discovery rule to other Discovery rules?

    Existing Discovery rule below.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <zabbix_export>
        <version>2.0</version>
        <date>2015-03-09T20:19:21Z</date>
        <groups>
            <group>
                <name>Templates-SNMP</name>
            </group>
        </groups>
        <templates>
            <template>
                <template>Template SNMP QLogic FC</template>
                <name>Template SNMP QLogic FC</name>
                <description/>
                <groups>
                    <group>
                        <name>Templates-SNMP</name>
                    </group>
                </groups>
                <applications/>
                <items/>
                <discovery_rules>
                    <discovery_rule>
                        <name>connUnit</name>
                        <type>10</type>
                        <snmp_community/>
                        <snmp_oid/>
                        <key>advsnmp.discovery[{HOST.CONN},&quot;-v2c -c{$SNMP_COMMUNITY}&quot;,.1.3.6.1.3.94.1.6.1.12,1.8]</key>
                        <delay>60</delay>
                        <status>0</status>
                        <allowed_hosts/>
                        <snmpv3_contextname/>
                        <snmpv3_securityname/>
                        <snmpv3_securitylevel>0</snmpv3_securitylevel>
                        <snmpv3_authprotocol>0</snmpv3_authprotocol>
                        <snmpv3_authpassphrase/>
                        <snmpv3_privprotocol>0</snmpv3_privprotocol>
                        <snmpv3_privpassphrase/>
                        <delay_flex/>
                        <params/>
                        <ipmi_sensor/>
                        <authtype>0</authtype>
                        <username/>
                        <password/>
                        <publickey/>
                        <privatekey/>
                        <port/>
                        <filter>
                            <evaltype>1</evaltype>
                            <formula/>
                            <conditions>
                                <condition>
                                    <macro>{#ADVSNMPVALUE}</macro>
                                    <value>3</value>
                                    <operator>8</operator>
                                    <formulaid>A</formulaid>
                                </condition>
                            </conditions>
                        </filter>
                        <lifetime>30</lifetime>
                        <description>Browse connUnit table for row that contains connUnitProxyMaster = yes to grab OID portion representing WWN necessary for remaining OIDs
    
    #ADVSNMPINDEX1 = OID WWN</description>
                        <item_prototypes>
                            <item_prototype>
                            </item_prototype>
                        </item_prototypes>
                        <trigger_prototypes/>
                        <graph_prototypes/>
                        <host_prototypes/>
                    </discovery_rule>
                </discovery_rules>
                <macros/>
                <templates>
                    <template>
                        <name>Template SNMP Generic</name>
                    </template>
                </templates>
                <screens/>
            </template>
        </templates>
    </zabbix_export>
Working...