Ad Widget

Collapse

Zabbix SNMP Trap Forwarding

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dibypaul
    Junior Member
    • Sep 2016
    • 6

    #1

    Zabbix SNMP Trap Forwarding

    I basically need to forward critical alerts to the NBI from Zabbix server. How do I achieve this?
    Is there any simple way to achieve this?
    Pardon my oversight if any, I am a begginner in zabbix.
    I was able to install and configure zabbix to receive SNMP traps, I am currently using SNMPTT integrated with SNMP perl trapper. Now I need to configure zabbix in a way that it forwards all the selfmonitoring data to the external EMS (Element management system). Also how do I use the Linux System related MIBs to monitor?

    There can be two option
    1. either send all the self monitoring data to the NBI in a time interval or
    2. only send alarms to the NBI when a certain threshold is reached. (For example, Disk utilization is more than 80%)

    Any help on this is appreciated.
  • dibypaul
    Junior Member
    • Sep 2016
    • 6

    #2
    Any way out?

    Is there any way out?

    Comment

    • dibypaul
      Junior Member
      • Sep 2016
      • 6

      #3
      A thought

      Sending SNMP traps to upstream systems is not well documented but can also be done by configuring a Notifications mechanism when Zabbix detects an event.
      a. Configure a new media type (Adminstration, Media types tab). Media types are one of the following (E-mail, SMS, Jabber, Ez Texting & Custom alertscripts). Custom script media type can define a script which will invoke the 3rd party snmptrap binary which is included in the net-snmp-utils package. The script you write needs to be placed on the zabbix server in: /usr/lib/zabbix/alertscripts
      b. Step 2 requires linking the media type with an Action delivery mechanism (Configuration, Action). You can configure what actions to report to each media type and what condition will trigger sending a message. The Actions allows sending both a Trigger message and a Recovery/Clear message. The default message provides the following fields but I believe we could tailor these to match our current MCAS SNMP events as well.

      Trigger: {TRIGGER.NAME}
      Trigger status: {TRIGGER.STATUS}
      Trigger severity: {TRIGGER.SEVERITY}
      Trigger URL: {TRIGGER.URL}

      Item values:

      1. {ITEM.NAME1} ({HOST.NAME1}:


      But here my question is how do I create a custom script in order to send out snmptraps for these triggers? Is it possible to define a general operation which will be applicable for all the triggers? (I created multiple triggers and defined an action also a custom script to the media type.)



      How do I send something like the following for each triggers through my custom script?

      snmptrap -v 1 -c public 10.10.0.1 '.1.3.6.1.6.3.1.1.5.4' '0.0.0.0' 6 33 '55' .1.3.6.1.6.3.1.1.5.4 s "eth0"


      Any Help on this will be appreciated.

      Comment

      • dibypaul
        Junior Member
        • Sep 2016
        • 6

        #4


        Anybody who could provide some help.

        Comment

        • ramasik
          Junior Member
          • Feb 2012
          • 19

          #5
          Did anybody resolved the request?

          Comment

          • prasad_SL
            Member
            • May 2018
            • 35

            #6
            Hi,

            have you install snmp on the box ?
            Ex: apt-get install snmp

            After that you may able to send snmptraps from your script.

            First extract the information from above mentioned Item values.
            Ex:
            Trigger: {TRIGGER.NAME}
            Trigger status: {TRIGGER.STATUS}
            Trigger severity: {TRIGGER.SEVERITY}
            Trigger URL: {TRIGGER.URL}

            Then, put those extracted values in the snmp command.
            Or you can read snmptraplog to extract entire snmptrap.

            Ex: call in action script
            firesnmp.sh[10.10.10.10, 0.0.0.0]

            firesnmp.sh

            #!/bin/bash

            snmptrap -v 1 -c public $1 '.1.3.6.1.6.3.1.1.5.4' '$2' 6 33 '55' .1.3.6.1.6.3.1.1.5.4 s "eth0"

            Comment

            • icol
              Member
              • Aug 2014
              • 31

              #7
              You can also use the zabbix api. I have created a python script which polls with trigger.get. But you can use any language you like

              Comment

              • ramasik
                Junior Member
                • Feb 2012
                • 19

                #8
                Originally posted by icol
                You can also use the zabbix api. I have created a python script which polls with trigger.get. But you can use any language you like
                but in this case Sender will be Zabbix Server, not the original host which have some issue.

                Comment

                • icol
                  Member
                  • Aug 2014
                  • 31

                  #9
                  No, that is not correct because the when you send a rest request you will get a list of trigers and the respectiv host of each trigger

                  Comment

                  Working...