Ad Widget

Collapse

I suggest that zabbix should use snmpget.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fableman
    Member
    • Oct 2007
    • 78

    #1

    I suggest that zabbix should use snmpget.

    Sometimes zabbix handels snmp for the stuff I want to monitor, but lots of other times I get Error doing snmp_open() towards some items in my network.

    Then Iam forced to use my own script that uses snmpget to get the values I need.

    If Zabbix have these problems to inplement SNMP v1,2,3 and fully support them then why not use the snmpget for zabbix ? (snmpget is from net-snmp-utils)

    when some invented a perfect wheel I don't really see the point to make the wheel my self.
  • fableman
    Member
    • Oct 2007
    • 78

    #2
    here is the script I use to have a solid SNMP function.

    my script for snmp , if you want to use it.

    1. install snmpget. CentOs / RedHat: yum install net-snmp-utils

    2. location and name of script: /etc/zabbix/externalscripts/snmpget

    Script follow here:

    #!/bin/sh
    # snmp for zabbix (HÃ¥kan Franzen / Fableman)
    #
    #example: /etc/zabbix/externalscripts/snmpget 192.168.110.52 public 1 enterprises.16174.1.1.3.3.1.4.0

    # snmp ip community snmpversion(1, 2c, 3) MIB

    tal=`snmpget -O vq $1 -c $2 -v$3 $4`
    if [ -z $tal ]
    then exit
    else
    echo $tal
    fi

    # end of script

    then

    3. chmod u+x /etc/zabbix/externalscripts/snmpget

    4. chown zabbix:root /etc/zabbix/externalscripts/snmpget


    5. Then create a new Item as follow in zabbix

    Type: external check
    Key: snmpget[192.168.110.52 public 1 enterprises.16174.1.1.3.3.1.4.0]
    Type of information: Integer (or what every ya need)

    Save and your done.

    Comment

    • Tenzer
      Senior Member
      • Nov 2007
      • 316

      #3
      I have no issue with using the build-in SNMP functionality. We use it for checking switches, routers and APC power feeds.

      Comment

      • fableman
        Member
        • Oct 2007
        • 78

        #4
        Originally posted by Tenzer
        I have no issue with using the build-in SNMP functionality. We use it for checking switches, routers and APC power feeds.
        works for my switches aswell but not for other stuff like temperature probes and other things.

        Comment

        • NOB
          Senior Member
          Zabbix Certified Specialist
          • Mar 2007
          • 469

          #5
          Originally posted by fableman

          ... text partly removed ...

          If Zabbix have these problems to inplement SNMP v1,2,3 and fully support them then why not use the snmpget for zabbix ? (snmpget is from net-snmp-utils)

          when some invented a perfect wheel I don't really see the point to make the wheel my self.
          First of all, ZABBIX is using the Net-SNMP library and I like it.
          This is MUCH faster than calling snmpget for every SNMP poll !
          That's what brought Nagios down to its knees in the past.
          If you would use an external snmpget for every poll, a process would have been
          created every time, the complete list of SNMP-MIBs are read into
          memory and then, finally, the SNMP poll would be done.
          So the overhead in using a commandline snmpget is a performance
          killer !

          Second, we didn't experience any problems with SNMP v1 and v2c
          polls up to now.
          We use it to monitor the status of HP Insight Agents (v1) and
          some HTTP-Proxy and Antivirus Appliances (v2c).
          No experience with v3, yet, though.

          With other tools, like the commandline snmpget sometimes
          you get an error like you mentioned. But most of the time this seems to be
          related to the fact, that nobody is listening on port 161 on the SNMP-Agent
          system you are trying to poll.

          Regards

          Norbert.

          Comment

          • fableman
            Member
            • Oct 2007
            • 78

            #6
            I fully understand the performance problems to use snmpget from bash scripting in full scale.

            But if you allready using the API / code why is there a difference then?

            Comment

            Working...