Ad Widget

Collapse

Get data from item key for item tag

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MMol
    Junior Member
    • Nov 2021
    • 7

    #1

    Get data from item key for item tag

    Hi all,

    We have a discovery rule which discovers Access Points from a Ruckus Smart Zone. A few of the item prototypes are: Status, Model and Customer.

    Now we want the Customer name to appear in TAGS for the other items like Status. So when we get alerts, we also know from which customer it comes.


    Keys:

    ruckusZDWLANAP[{#SNMPVALUE},status]

    ruckusZDWLANAP[{#SNMPVALUE},customer]




    We tried the following tag but this does not work:

    Customer:{ruckusZDWLANAP[{#SNMPVALUE},customer]}




    Can anyone help out?
  • Answer selected by MMol at 26-11-2021, 19:26.
    vicbc
    Member
    • Nov 2021
    • 39

    Hey MMol, I think I might have a solution for you.

    As you can see here, Tagging supports some macros. I don't believe that the name of the key would work in this case.

    If you use the macro "{ITEM.LASTVALUE<1-9>}" it will return the value of the Nth item included in the trigger, in the moment the trigger was fired.

    Let's say you Ruckus ping went to 0 (down).
    The moment the trigger is fired, it will add the value of the item (ping) to the tag. So it would be like

    Tag:
    value: 0

    Since you want to add the Customer to the tag, you could simply put the Customer item inside the trigger, in a way it will not affect the expression.

    Like:

    Code:
    OST:ruckusZDWLANAP[{#SNMPVALUE},status].last()=0 and HOST:ruckusZDWLANAP[{#SNMPVALUE},customer].diff()=0
    if (status is down) and (customer name didn't change [probably will never, unless you change it manually]) then trigger is fired.

    In this case, you just have to configure you tag like:

    Customer: {ITEM.LASTVALUE2}.

    Let me know if it help you somehow.


    Cheers.






    Comment

    • vicbc
      Member
      • Nov 2021
      • 39

      #2
      Hey MMol, I think I might have a solution for you.

      As you can see here, Tagging supports some macros. I don't believe that the name of the key would work in this case.

      If you use the macro "{ITEM.LASTVALUE<1-9>}" it will return the value of the Nth item included in the trigger, in the moment the trigger was fired.

      Let's say you Ruckus ping went to 0 (down).
      The moment the trigger is fired, it will add the value of the item (ping) to the tag. So it would be like

      Tag:
      value: 0

      Since you want to add the Customer to the tag, you could simply put the Customer item inside the trigger, in a way it will not affect the expression.

      Like:

      Code:
      OST:ruckusZDWLANAP[{#SNMPVALUE},status].last()=0 and HOST:ruckusZDWLANAP[{#SNMPVALUE},customer].diff()=0
      if (status is down) and (customer name didn't change [probably will never, unless you change it manually]) then trigger is fired.

      In this case, you just have to configure you tag like:

      Customer: {ITEM.LASTVALUE2}.

      Let me know if it help you somehow.


      Cheers.






      Comment

      • MMol
        Junior Member
        • Nov 2021
        • 7

        #3
        Originally posted by vicbc
        Hey MMol, I think I might have a solution for you.

        As you can see here, Tagging supports some macros. I don't believe that the name of the key would work in this case.

        If you use the macro "{ITEM.LASTVALUE<1-9>}" it will return the value of the Nth item included in the trigger, in the moment the trigger was fired.

        Let's say you Ruckus ping went to 0 (down).
        The moment the trigger is fired, it will add the value of the item (ping) to the tag. So it would be like

        Tag:
        value: 0

        Since you want to add the Customer to the tag, you could simply put the Customer item inside the trigger, in a way it will not affect the expression.

        Like:

        Code:
        OST:ruckusZDWLANAP[{#SNMPVALUE},status].last()=0 and HOST:ruckusZDWLANAP[{#SNMPVALUE},customer].diff()=0
        if (status is down) and (customer name didn't change [probably will never, unless you change it manually]) then trigger is fired.

        In this case, you just have to configure you tag like:

        Customer: {ITEM.LASTVALUE2}.

        Let me know if it help you somehow.


        Cheers.





        This was the solution indeed. Thank you very much, learned a lot from this

        Comment

        Working...