Ad Widget

Collapse

Include SNMP log entry in Zabbix Alert title

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stevencnz
    Junior Member
    • Feb 2017
    • 15

    #1

    Include SNMP log entry in Zabbix Alert title

    We're currently using SNMPTT and trapping, among other techniques, to monitor our network.

    I've got a trap item configured to watch out for the follow line in the snmptt.log file:
    snmptrap["The following feature has exceeded its allowed licensed usage: .*"]
    Now the full line, in the snmptt.log file might read

    "The following feature has exceeded its allowed licensed usage: logical-system."

    I've configured a trigger to alert us if we get such a trap. But is there a way I can get the actual log entry to appear in the name of the alert?

    Specifically I would want the "logical-system" part to be included in the name, since this is a variable part that the engineer on call would need to know about.

    Normally I would adjust the snmptt file and make the log entry to include something that we've discovered through polling (so that I can match against it after LLD), but the MIB for the device in question doesn't allow me to do this.

    Is there a variable like "License exceeded {SNMPTT.ENTRY}" or similar that I can use as the name of the trigger? (I've just made-up that variable name, but hopefully that gets the idea across)

    Thanks in advance. Happy to clarify if this isn't clear enough.

  • DmitryL
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2016
    • 278

    #2
    Add {ITEM.LASTVALUE} to action.
    Depending on the size of line might be a better idea to use it in body rather then in subject.

    Comment

    • stevencnz
      Junior Member
      • Feb 2017
      • 15

      #3
      Originally posted by Dmitryb
      Add {ITEM.LASTVALUE} to action.
      Depending on the size of line might be a better idea to use it in body rather then in subject.

      Sorry I dont understand. I use {ITEM.LASTVALUE} in the title of the trigger? Or somewhere in the action that (in our case) sends an email or sms alert?

      How would Zabbix know which ITEM I'm referring to if the only reference to the trap item is as an argument within the tiggers problem expression?

      Comment

      • DmitryL
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2016
        • 278

        #4
        In the Action Subject/Body.
        Trigger is linked to item - Trigger generates event - Event is evaluated by actions.

        Comment

        • stevencnz
          Junior Member
          • Feb 2017
          • 15

          #5
          Originally posted by Dmitryb
          In the Action Subject/Body.
          Trigger is linked to item - Trigger generates event - Event is evaluated by actions.

          Hi Dmitryb,

          Apologies for the delay is responding.

          If I add {ITEM.LASTVALUE} to the action, will it include the line from the snmptt.log file that corresponds to the trigger?

          I can't see how the action will know which of various expressions I might use in a trigger (be it in the title or problem expression) is the one that corresponds to a log entry that I want it to show...

          Comment

          Working...