Ad Widget

Collapse

Trigger name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zumi_fi
    Junior Member
    • Sep 2018
    • 10

    #1

    Trigger name

    Hello!

    I've stumbled up on a annoying issue that I can't solve.

    I'm monitoring a firewall with over 200 VPN-tunnels.
    The firewall is monitored via SNMP only.

    I've made a trigger that tells if the VPN is "down". The issue is now that the triggers are named for example: VPN 271 down
    The number is the snmpvalue for the item. Every VPN-tunnel has like 5 items: status, name, traffic in/out etc.
    The tunnel items are named like this: 271 - Current status of tunnel
    There is a item that tells the name of the tunnels but how can I get the name to the trigger also.
    I don't want to make triggers for every tunnel or separate macros.

    Has anyone any ideas how to overcome this problem?
    Last edited by zumi_fi; 31-07-2019, 15:59. Reason: Added tags
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Hi, basic example:

    If your discovery rule is something like this:

    discovery[{#IFDESCR},IF-MIB::ifDescr]

    and your item prototype like this:

    Name: Interface {#IFDESCR} operational status
    Type: SNMPv2 agent
    Key: ifOperStatus[{#IFDESCR}]
    SNMP OID: .1.3.6.1.2.1.2.2.1.8.{#SNMPINDEX}
    (ifOperStatus)

    then your trigger can be like this:

    Name: Interface {#IFDESCR} status changed
    Expression: {Template-XXX:ifOperStatus[{#IFDESCR}].diff(0)}=1

    You see the idea: the discovery rule populates the {#IFDESCR} LLD macro, and then you can use it in the item and trigger names, instead of the {#SNMPINDEX} macro.

    Markku

    Comment

    • zumi_fi
      Junior Member
      • Sep 2018
      • 10

      #3
      Thanks Markku for your example.
      The monitoring and discovery has been made already.

      My description might be a bit missleading. In short my question is: is it possible to have 2 different item values in one trigger name.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        If you have more than one item in your trigger expression, I think you can then use the macros {ITEM.VALUE1}, {ITEM.VALUE2}, etc. to refer to the item values in the order of appearance in the trigger expression.

        But, if I understand your case correctly (= you just want to show the interface description in the trigger name, even though that interface description is not part of the trigger expression), you can have more than one OID in the discovery rule, like this:

        discovery[{#IFOPERSTATUS},1.3.6.1.2.1.2.2.1.8,{#IFADMINSTATU S},1.3.6.1.2.1.2.2.1.7,{#IFALIAS},1.3.6.1.2.1.31.1 .1.1.18,{#IFNAME},1.3.6.1.2.1.31.1.1.1.1,{#IFDESCR },1.3.6.1.2.1.2.2.1.2,{#IFTYPE},1.3.6.1.2.1.2.2.1. 3]

        Then you can use all those macros in the trigger names, even though your actual trigger is just evaluating one item (like checking the ifOperStatus). Like this:

        Name: Interface {#IFNAME} status changed to {ITEM.VALUE1}
        Expression: {Template-XXX:net.if.status[ifOperStatus.{#IFNAME}].diff()}=1

        Any closer? :-) (Update: If not, please provide copy-paste of your actual discovery rule, item and trigger so that we get more practical on this.)

        Markku
        Last edited by Markku; 01-08-2019, 08:24.

        Comment

        Working...