Ad Widget

Collapse

Notification with additional data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ziomekdjpl
    Junior Member
    • Dec 2014
    • 12

    #1

    Notification with additional data

    Hey

    im using zabbix to monitoring switches and routers. I get notofication when Link is down. In notification i have this data:

    Location:
    Host name:
    IP Address:
    Port number:
    Status od port:

    I want to add some extra data, namely description of PORT.
    Description of port is getting by SNMP agent from switch.

    can someone help me?

    thanks a lot
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    To answer you correctly, we need some additional information.
    - List of Items and Keys for one interface (ifAlias, ifDesc, ifStatus, etc)
    - text of notification template
    - text of notification message which you WOULD LIKE to have.
    Sincerely yours,
    Aleksey

    Comment

    • ziomekdjpl
      Junior Member
      • Dec 2014
      • 12

      #3
      Originally posted by aib
      To answer you correctly, we need some additional information.
      - List of Items and Keys for one interface (ifAlias, ifDesc, ifStatus, etc)
      - text of notification template
      - text of notification message which you WOULD LIKE to have.
      1. I would like to add ifAlias to notification as below.

      2. Subject:{TRIGGER.NAME}: {STATUS}

      Host: {HOSTNAME}
      IP: {IPADDRESS}
      Location: {PROFILE.LOCATION}


      {TRIGGER.NAME}: {STATUS}

      3.
      Subject:{TRIGGER.NAME}: {STATUS}

      Host: {HOSTNAME}
      IP: {IPADDRESS}
      Location: {PROFILE.LOCATION}
      Description port: ifAlias.#

      {TRIGGER.NAME}: {STATUS}

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        My default message looks slightly different:
        Code:
        Host name:    {HOST.NAME}
        Trigger:          {TRIGGER.NAME}
        Trigger status:   {TRIGGER.STATUS}
        Trigger severity: {TRIGGER.SEVERITY}
        
        1. {ITEM.NAME1} ({HOST.NAME1}:{ITEM.KEY1}): {ITEM.VALUE1}
        2. {ITEM.NAME2} ({HOST.NAME2}:{ITEM.KEY2}): {ITEM.VALUE2}
        3. {ITEM.NAME3} ({HOST.NAME3}:{ITEM.KEY3}): {ITEM.VALUE3}
        
        Original event ID: {EVENT.ID}
        You can see, that three field can be collected from Trigger (ITEM.VALUE1, 2, and 3)
        So, if you change your trigger a little bit by adding ifAlias in the trigger expression, you can pass ifValue information in notification message.

        For example,
        Trigger expression:
        Code:
        ({hostname:ifOperStatus[{#SNMPVALUE}].diff(0)}=1) or ({hostname:ifAlias[{#SNMPVALUE}].last(0)}="")
        That trigger will fire up when:
        - status of interface changed
        - alias of interface is empty (or compare with any non-existence string)

        Then, in Notification message you will have
        - {ITEM.VALUE1} = 1 (from first part of trigger expression)
        - {ITEM.VALUE2} = real alias of your interface (from second part of trigger expression)
        Sincerely yours,
        Aleksey

        Comment

        • ziomekdjpl
          Junior Member
          • Dec 2014
          • 12

          #5
          thanks for yor suggestion but i want something another. this trigger have only this option:

          {Huawei S57:ifOperStatus[Eth-Trunk2].last(0)}#1

          I want to know what is description/alias of this port when i get an email.

          Now i have this:

          Dane urzadzenia:
          Host: {HOSTNAME}
          IP: {IPADDRESS}
          Location: {PROFILE.LOCATION}

          {TRIGGER.NAME}: {STATUS}

          And it is ok, i want extra info with description/alias port:
          Alias of interface Eth-Trunk2

          it is possible do it without edit trigger expression?

          Comment

          Working...