Ad Widget

Collapse

SNMP Builder for Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gospodin.horoshiy
    Senior Member
    • Sep 2008
    • 272

    #181
    Originally posted by captaincarisma
    help me please!!!

    Try this patch^

    --- snmp_builder.php.org 2010-10-26 17:10:31.000000000 +0200
    +++ snmp_builder.php 2010-10-28 17:44:47.000000000 +0200

    @@ -563,7 +566,7 @@
    $template = array();
    foreach (CTemplate::get($options) as $key => $value)
    {
    - array_push($template, array('key' => $key, 'host' => $value['host']));
    + array_push($template, array('key' => $value['hostid'], 'host' => $value['host']));
    }

    return $template;
    http://www.zabbix.com/wiki/howto/mon...p/snmp_builder
    Zbx 2.0.4 on Debian and MYSQL5 on Ubuntu Server 64bit 8.04,
    200+ Win Agents, 50+ Linux Agents, 150+ Network Devices

    Comment

    • vmf
      Junior Member
      • May 2011
      • 3

      #182
      Hello!
      When select the respective MIB and click on one of the OID tree, click for value, not reflecting. When not indicating IP address, it is confirm the OID Tree is working as when i click on one for value, it will display under OID view, missing server IP:
      Attached Files

      Comment

      • captaincarisma
        Junior Member
        • Mar 2011
        • 16

        #183
        Originally posted by gospodin.horoshiy
        In which file should I apply the patch?

        Comment

        • dvb
          Junior Member
          • May 2011
          • 10

          #184
          Commas in SNMP table results causes table to be misaligned.

          First, this module is great. It makes the task of setting up SNMP polls much easier. Much thanks to the author!

          I am running into one troubling issue, though. I am finding that if certain values have commas in them - for example, if ifDescr were "Calix C7 DS1 Line, 4/XXXX/XXXXX SXX-KXX" - the commas are treated as a field delimiter, the values following the comma are pushed out to an extra column and subsequent fields on that row do not line up with their column headings. Of course, with a little detective work and patience, I can usually figure out which cell to click, but not without second guessing myself.

          I've applied the other tweaks (allowing for a colon to facilitate alternative ports, etc.), but I did not see one that addresses this particular problem. Is there something in the code that could be changed to allow for the commas?

          Comment

          • dvb
            Junior Member
            • May 2011
            • 10

            #185
            Fixed. Sort of.

            I worked around the issue by replacing the commas in a few places with the string "@@":

            Code:
                            exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid -Ci -Ch -Cf \"[COLOR="red"]@@[/COLOR]\"", $results
            );
                            $headers = explode("[COLOR="red"]@@[/COLOR]",$results[0]);
                            unset($results);
                            exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid -Ci -CH -Cf \"[COLOR="red"]@@[/COLOR]\"", $results
            );
                            foreach ($results as $line)
                            {
                                    $row = explode("[COLOR="red"]@@[/COLOR]",$line);
                                    array_push($rows, $row);
                            }
            Now I have to hope that I don't encounter any @@'s in my query results. If anyone has any ideas about a more appropriate delimiter, let me know!

            Comment

            • Carianha
              Junior Member
              • May 2011
              • 1

              #186
              snmp_builder atualized

              Atualized version working in zabbix 1.8.4 with all hacks (including the above one) and a new feature : "auto mapping" to easily include in zabbix list of mappings the meaning of item values with type Integer.

              GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

              Comment

              • ZabbSer
                Junior Member
                • May 2011
                • 5

                #187
                Carianha's snmpbuilder *almost* there for me

                Originally posted by Carianha
                Atualized version working in zabbix 1.8.4 with all hacks (including the above one) and a new feature : "auto mapping" to easily include in zabbix list of mappings the meaning of item values with type Integer.

                https://github.com/Carianha/snmpbuilder
                I've installed it in Ubuntu Lucid an Zabbix version 1.8.5. It 'almost' works. I can't see the tree, it won't load for some reason, but this version does more than the other previous versions (at least on the other right-hand sections) posted in this forum. I'm no programmer, but somehow I'll try to go over the code and see how I can get this fixed.

                For the record, on the OID Tree all I see is a black screen -which seems to be the default background color for what I *infered* from the Tree.js (correct me if I'm wrong)-. I've reviewed the whole post in the Wiki and all the fixes were already applied in Carianha's version. If anybody finds the *bug* that might be causing this, please let me know... I'd appreciate a bit less head-breaking code-reading

                Comment

                • marcel666
                  Junior Member
                  • Jul 2009
                  • 6

                  #188
                  Same problem that ZabbSer has.

                  I´m using the 1.8.5
                  Someone can help?

                  Thanx

                  Comment

                  • norms
                    Junior Member
                    • May 2011
                    • 14

                    #189
                    Just tried it on my 1.8.4 appliance and it only shows a black screen on the left.

                    Comment

                    • Derek
                      Junior Member
                      • Jun 2011
                      • 1

                      #190
                      Same here, black screen on left.
                      Fresh 1.8.4 install on Ubuntu.

                      Edited jsloader to hit snmp_builder js files correctly, no go on the oid tree.

                      Confirmed json is working, no go.

                      Can someone please post a view-source from a working SNMP builder? I don't know much about javascript, but it seems like the scripts aren't running at all.

                      I can see the oid div using firebug, but its empty other than its css style (black).
                      Last edited by Derek; 06-06-2011, 19:37.

                      Comment

                      • efrain02
                        Banned
                        • Apr 2011
                        • 81

                        #191
                        Well it seems that we need to wait a little bit for updates

                        Comment

                        • PhilipH
                          Junior Member
                          • Jun 2011
                          • 4

                          #192
                          The solution to the 'black' screen and nothing seeming to work I resolved at line 383 in snmp-builder.php, by changing the rgb values to 255 from 0. This then displayed all hidden black text

                          The line should now look like this
                          PHP Code:
                              $oid_tree_container->addStyle("overflow: auto; background-color: rgb(255, 255, 255); height: 500px; width: 500px;"); 

                          Comment

                          • anthonysomerset
                            Junior Member
                            • Jun 2011
                            • 4

                            #193
                            i have managed to get it working with the following amendment that i found via someone elses fork on github: https://github.com/dfishel/snmpbuilder

                            i am however still using Carianha's code off github with the following amendment

                            * Open jsLoader.php At line 17 ish, insert a peace of code ( just add the lines with the + but don't inclde the +.)

                            $availableJScripts = array(
                            + 'Tree.js' => '../snmp_builder/',
                            + 'snmp_builder.js' => '../snmp_builder/',
                            + 'DynTable.js' => '../snmp_builder/',
                            'common.js' => '',
                            'menu.js' => '',
                            'prototype.js' => '',

                            Comment

                            • ZabbSer
                              Junior Member
                              • May 2011
                              • 5

                              #194
                              Originally posted by PhilipH
                              The solution to the 'black' screen and nothing seeming to work I resolved at line 383 in snmp-builder.php, by changing the rgb values to 255 from 0. This then displayed all hidden black text

                              The line should now look like this
                              PHP Code:
                                  $oid_tree_container->addStyle("overflow: auto; background-color: rgb(255, 255, 255); height: 500px; width: 500px;"); 
                              Philip, you're a GENIUS!! I can't believe it was so easy to fix this. YOu have no idea how many times I read the freakin' code and had overlooked (or maybe just not paying close attention) to this. It was kinda'... uhm..., obvious, perhaps that it was weird the 'black screen of death' to the left now that I think about it...., jeje

                              Anyway Philip. Thank you soooo much! I can confirm that this works on 1.8.5. ...at least so far...

                              Comment

                              • nepher
                                Junior Member
                                • Jun 2011
                                • 3

                                #195
                                HELP me !



                                Uploaded with ImageShack.us

                                Comment

                                Working...