Ad Widget

Collapse

Add SNMP Items from ADD/Edit HOST

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Chuwbacca
    Junior Member
    • Feb 2009
    • 7

    #1

    Add SNMP Items from ADD/Edit HOST

    Hi all... I made some modifications of zabbix 1.6.2 for automatically and fast adding some basic SNMP monitoring (device info, interfaces type, speed, etc), without using templates and with some ports autodetection...
    Please, post bugs and futures requests here.

    To add SNMP-items to host just modify or add host (new checkbox near IPMI settings).

    You must apply patches at web-server and copy "addsnmp.inc.php" to include dir.

    Changelog:
    v.0.02
    Added selection of snmp community before add.
    Added snmp version selection (v1 or v2).

    v.0.01
    Initial release.
    Attached Files
    9
    Yes, please develop more!
    100.00%
    9
    No, dont need this function...
    0.00%
    0

    The poll is expired.

    Last edited by Chuwbacca; 05-03-2009, 10:24.
  • Chuwbacca
    Junior Member
    • Feb 2009
    • 7

    #2
    ifType

    You can get ifType descriptions from here. And then add value mapping...

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 565

      #3
      Yes Please!

      Excellent idea. I've been hacking around with a perl script that creates XML templates, but this is a much more sensible way of doing it.

      Comment

      • marcis
        Junior Member
        Zabbix Certified Specialist
        • Jul 2007
        • 17

        #4
        Good, good. This is a thing which is pulling the host adding process in right direction. It's a bit wrong to create 48 templates with 8 items just to add support for monitoring for some switch. And then... at some point you must make some changes... and loop trough 48 templates (theoretically doing it manualy ).

        Comment

        • jroberson
          Senior Member
          • May 2008
          • 124

          #5
          I love the idea and it would be nice for future versions of Zabbix (1.6.3+ or at least 1.8). I did have some problems using it though.

          I patched all the php files, changed permissions (just in case), replaced my originals, and copied the "addsnmp.inc.php" into the include directory. When I first tried to add a new host using the new SNMP check box I just got an empty page after I hit "SAVE". The standard Zabbix header was still there and I tried to go back to the host configuration to see if it added it, but it didn't show. I then went back to Monitoring->Dashboard and my System Status area would never load. I had to revert back to the 1.6.2 original files and even restarted Zabbix_server and Apache to make sure it was clear.

          I tried it again just to be sure that I didn't miss something and even manually went through the files to make sure that they were patched, but it did the same thing. I have a vanilla 1.6.2 setup that I did compile SNMP into it and am currently monitoring some SMNP hosts. Any suggestions? Bug perhaps?

          Thanks for any help.

          Comment

          • tekknokrat
            Senior Member
            • Sep 2008
            • 140

            #6
            Hi Chuwbacca,

            I like this way of adding basic metrics from snmp hosts in zabbix.
            I gave your patches a try and stumbled the problem that functions
            are not defined in addsnmp.inc.php:

            snmp_set_oid_numeric_print(1) and snmprealwalk are not defined but only called on line 137 and 138.

            Further Errors (after comment out of these functions):
            # Undefined variable: desc_ifdescr[/usr/share/zabbix/include/addsnmp.inc.php:141]
            # array_keys() [<a href='function.array-keys'>function.array-keys</a>]: The first argument should be an array[/usr/share/zabbix/include/addsnmp.inc.php:141]
            # Invalid argument supplied for foreach()[/usr/share/zabbix/include/addsnmp.inc.php:143]
            # Undefined variable: desc_ifdescr[/usr/share/zabbix/include/addsnmp.inc.php:150]
            # Invalid argument supplied for foreach()[/usr/share/zabbix/include/addsnmp.inc.php:150]
            Last edited by tekknokrat; 15-03-2009, 16:54.

            Comment

            Working...