Ad Widget

Collapse

SNMP Builder for Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TranceMaker
    Member
    • Nov 2008
    • 31

    #136
    Hello!
    i have error
    Code:
    .Attempt to define a root oid (iso): At line 9 in /usr/local/www/apache22/data/zabbix/snmp_builder/mibs/SNMPv2-SMI mib Attempt to define a root oid (iso): At line 9 in /usr/local/www/apache22/data/zabbix/snmp_builder/mibs/SNMPv2-SMI.mib
    i am download SNMPv2-SMI but any way i see this error
    what the problem?

    Comment

    • Sparky
      Member
      • Jun 2010
      • 54

      #137
      What does the OID View - Click to view as table check box do? I don't notice any difference having it checked when viewing table data, and I don't see any difference having it checked when adding items to check??

      Comment

      • subba5678
        Senior Member
        • May 2010
        • 132

        #138
        hey,
        i downloaded the snmp bulider . Can you please help me how to install it

        Thanks,
        Subbu

        Comment

        • zabbixuser85
          Junior Member
          • Sep 2010
          • 13

          #139
          Hi everyone,

          my problem with SnmpBuilder is twofold. First, the little icons that build the snmp tree are not loading properly. (See the picture below)

          Second, I don't think the loaded Mib tree is actually working properly since I keep getting a 0 value for all nodes in the MIBs and for some an outright error message (depicted in the image).

          Also, I keep getting an error in the apache2 error log file:
          [Mon Oct 25 13:15:37 2010] [error] [client 192.168.168.51] File does not exist: /usr/share/zabbix/snmp_builder, referer: http://192.168.168.6/zabbix/snmp_builder.php

          Would you guys know what's causing the problem ?




          Uploaded with ImageShack.us


          what is more, the server error log show a lot of errors like:

          1288:20101026:090256.746 Expression [{13727}>150000] for item [22612][<HOSTa>:ipInDelivers] cannot be evaluated: unable to get function value: lastvalue IS NULL for function [13727][<HOSTa>:ipInDelivers.delta(0)]
          1288:20101026:090256.746 Expression [{12548}>0] for item [22613][<HOSTa>:ipInDiscards] cannot be evaluated: unable to get function value: lastvalue IS NULL for function [12548][<HOSTa>:ipInDiscards.delta(0)]
          1288:20101026:090256.747 Expression [{13731}>0] for item [22613][<HOSTa>:ipInDiscards] cannot be evaluated: unable to get function value: lastvalue IS NULL for function [13731][<HOSTa>:ipInDiscards.delta(0)]
          1288:20101026:090256.748 Expression [{12549}>150000] for item [22614][<HOSTa>:ipInForwDatagrams] cannot be evaluated: unable to get function value: lastvalue IS NULL for function [12549][<HOSTa>:ipInForwDatagrams.delta(0)]

          1274:20101026:090235.146 Item [<HOSTb>:ifOutOctets.10015] error: Timeout while connecting to [<IPaddress of HOSTb>:161]
          1274:20101026:090235.211 SNMP Host [<HOSTb>]: another network error, wait for 15 seconds
          Last edited by zabbixuser85; 26-10-2010, 09:48.

          Comment

          • alixen
            Senior Member
            • Apr 2006
            • 474

            #140
            SNMP Builder with Zabbix 1.8.4rc1

            Hi,

            In order to have a working SNMP builder with 1.8.4rc1 PHP frontend, I have made following patches:
            Code:
            # diff -u snmp_builder.php.org snmp_builder.php
            --- snmp_builder.php.org	2010-10-26 14:27:58.000000000 +0200
            +++ snmp_builder.php	2010-10-26 14:28:17.000000000 +0200
            @@ -33,7 +33,7 @@
             
             $page["title"] = "SNMP Builder";
             $page['file'] = 'snmp_builder.php';
            -$page['scripts'] = array('../snmp_builder/Tree.js','../snmp_builder/snmp_builder.js','../snmp_builder/DynTable.js','scriptaculous.js?load=effects,dragdrop');
            +$page['scripts'] = array('Tree.js','snmp_builder.js','DynTable.js','effects.js','dragdrop.js');
             $page['hist_arg'] = array();
             $page['type'] = detect_page_type();
             include_once('include/page_header.php');
            and

            Code:
            # diff -u jsLoader.php.org jsLoader.php
            --- jsLoader.php.org	2010-10-26 14:20:11.000000000 +0200
            +++ jsLoader.php	2010-10-26 14:22:06.000000000 +0200
            @@ -13,6 +13,9 @@
             
             // available scriptas 'scriptFileName' => 'path relative to js/'
             $availableJScripts = array(
            +	'Tree.js' => '../snmp_builder/',
            +	'snmp_builder.js' => '../snmp_builder/',
            +	'DynTable.js' => '../snmp_builder/',
             	'common.js' => '',
             	'menu.js' => '',
             	'prototype.js' => '',
            Hope this helps
            Alixen
            http://www.alixen.fr/zabbix.html

            Comment

            • zabbixuser85
              Junior Member
              • Sep 2010
              • 13

              #141
              Thanks Alixen;

              My understanding is, I was supposed to replace a chunk of code in snmpbuilder.php After the proposed readjustments the beginning of my snmpbuilder file looks like this:


              <?php

              define('MIBS_ALL_PATH', '/home/zabbix/public_html/snmp_builder/mibs:/usr/share/snmp/mibs');

              require_once('include/config.inc.php');

              require_once('include/js.inc.php');
              require_once('include/html.inc.php');
              require_once('include/items.inc.php')

              $page["title"] = "SNMP Builder";
              $page['file'] = 'snmp_builder.php';
              -$page['scripts'] = array('../js/Tree.js','../js/snmp_builder.js','../js/DynTable.js','scriptaculous.js?load=effects,dragdr op');
              +$page['scripts'] = array('Tree.js','snmp_builder.js','DynTable.js','e ffects.js','dragdrop.js');
              $page['hist_arg'] = array();
              $page['type'] = detect_page_type();
              include_once('include/page_header.php');


              // available scriptas 'scriptFileName' => 'path relative to js/'
              $availableJScripts = array(
              + 'Tree.js' => '../snmp_builder/',
              + 'snmp_builder.js' => '../snmp_builder/',
              + 'DynTable.js' => '../snmp_builder/',
              'common.js' => '',
              'menu.js' => '',
              'prototype.js' => '',
              ?>
              <?php

              #... output omitted ;-)

              Is that correct or I am getting something wrong?


              BTW: I am on 1.8.1
              Last edited by zabbixuser85; 27-10-2010, 10:49.

              Comment

              • greenogre
                Junior Member
                Zabbix Certified Specialist
                • Oct 2010
                • 3

                #142
                Hi Zabbixuser85,

                from your code list, you have to remove the line that starts with "-" and remove the "+ " from the beginning of the lines that have been added.
                Also, remove the space in "e ffects.js".
                (This code works with 1.8.3)

                - means "remove this line"
                + means "add this line"

                Comment

                • alixen
                  Senior Member
                  • Apr 2006
                  • 474

                  #143
                  Patch for SNMP Builder on Zabbix 1.8.4rc1

                  Hi,

                  In order to make "Save" in "Item List" work, I had to make one more patch:
                  Code:
                  # diff -u snmp_builder.php.org snmp_builder.php
                  --- 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;
                  Otherwise, item list cannot be saved in template.

                  With this patch and those I have already published, SNMP Builder is fully functional on 1.8.4rc1.

                  Regards,
                  Alixen
                  http://www.alixen.fr/zabbix.html

                  Comment

                  • Sparky
                    Member
                    • Jun 2010
                    • 54

                    #144
                    Originally posted by Sparky
                    What does the OID View - Click to view as table check box do? I don't notice any difference having it checked when viewing table data, and I don't see any difference having it checked when adding items to check??
                    Sorry guys, still looking for an explanation to this? I don't see what the difference is between having it ticked and not having it ticked

                    Comment

                    • fmrapid
                      Member
                      • Aug 2010
                      • 43

                      #145
                      SNMP Builder with patches

                      Would it be too much to ask for someone to put up a new version of SNMP Builder with all the patches applied. Either update the github code that giapnguyenput up a while back, and/or put it on the wiki.

                      This thread is nice and all, but there is nowhere to get the patched version. I am sure tons of people are interested in using it and developping it further.

                      Good karma on the person that puts up the new code on github or sourceforge or the wiki.

                      fmrapid

                      Comment

                      • mpalau.z3
                        Junior Member
                        • Nov 2010
                        • 1

                        #146
                        Error uploading MIB files

                        Hi,

                        I'm trying snmp_builder tool. I've followed the steps on README file. I can see SNMP Builder in Administration menu, and I can see SNMP Builder main page, but I can't upload MIB files. This is what I see on SNMP Builder page:

                        Click image for larger version

Name:	snmp_builder.jpg
Views:	1
Size:	35.4 KB
ID:	309234

                        I have corrected path to JS files. I have no errors on http error log. I tried this:

                        # diff -u snmp_builder.php.org snmp_builder.php
                        --- snmp_builder.php.org 2010-10-26 14:27:58.000000000 +0200
                        +++ snmp_builder.php 2010-10-26 14:28:17.000000000 +0200
                        @@ -33,7 +33,7 @@

                        $page["title"] = "SNMP Builder";
                        $page['file'] = 'snmp_builder.php';
                        -$page['scripts'] = array('../snmp_builder/Tree.js','../snmp_builder/snmp_builder.js','../snmp_builder/DynTable.js','scriptaculous.js?load=effects,dragdr op');
                        +$page['scripts'] = array('Tree.js','snmp_builder.js','DynTable.js','e ffects.js','dragdrop.js');
                        $page['hist_arg'] = array();
                        $page['type'] = detect_page_type();
                        include_once('include/page_header.php');




                        # diff -u jsLoader.php.org jsLoader.php
                        --- jsLoader.php.org 2010-10-26 14:20:11.000000000 +0200
                        +++ jsLoader.php 2010-10-26 14:22:06.000000000 +0200
                        @@ -13,6 +13,9 @@

                        // available scriptas 'scriptFileName' => 'path relative to js/'
                        $availableJScripts = array(
                        + 'Tree.js' => '../snmp_builder/',
                        + 'snmp_builder.js' => '../snmp_builder/',
                        + 'DynTable.js' => '../snmp_builder/',
                        'common.js' => '',
                        'menu.js' => '',
                        'prototype.js' => '',


                        Does anyone know the problem??? When I try to load a mib, the frontend returns me two errors that I don't know how to fix: 'DynTable' is undefined, and 'expexting }'.

                        Thanks!!!

                        Comment

                        • fmrapid
                          Member
                          • Aug 2010
                          • 43

                          #147
                          SNMP Builder now on the Wiki

                          SNMP Builder is now part of the wiki.

                          - All patches and fixes were extracted from this forum thread
                          - Links to source code, installation, how to, debugging and suggested improvements are listed
                          - Link back to this forum thread for getting help and reviewing new patches.

                          As I posted before, good karma on the person who goes to the wiki and merges all the patches and creates a fork on git hub to host the snmp builder improvements. (unless you can modify the origina github source that giapnguyen posted?)

                          Good karma on the Zabbix team if they integrate the script in the official code base. At this point no one has stepped up to become the primary maintainer for snmp builder.

                          Go to the wiki under: / How-To / Monitoring / SNMP / SNMP Builder
                          Link to: http://www.zabbix.com/wiki/howto/mon...p/snmp_builder

                          Additionnal note: Existing template are available not just in the expanded Templates section, but the main list is available when clicking on Templates directly and scrolling down.
                          Link to: http://www.zabbix.com/wiki/templates/start

                          Cheers fmrapid

                          Comment

                          • zabb_neil
                            Junior Member
                            • Dec 2010
                            • 3

                            #148
                            snmp_builder.php with all patches

                            Hi everyone,
                            I am new to zabbix and i want to add snmp host to it. can anybody give me snmp_builder.php with all patches installed?

                            Comment

                            • Nerfux
                              Junior Member
                              • Jan 2011
                              • 19

                              #149
                              overkill mib or wrong config?

                              I have just finished the snmpbuilder config, and now when i try to open a mib file to our APC InRow mib file, my browser stops answaring and give me a message that a script has stop answaring, and i get this error message;

                              Script: http://10.80.145.50/zabbix/jsLoader....ng=en_gb&files[]=Tree.js&files[]=snmp_builder.js&files[]=DynTable.js&files[]=effects.js&files[]=dragdrop.js:5312

                              then i press continue instead of stop the script, now i get this message:
                              Script: http://10.80.145.50/zabbix/jsLoader....ng=en_gb&files[]=Tree.js&files[]=snmp_builder.js&files[]=DynTable.js&files[]=effects.js&files[]=dragdrop.js:5283

                              and again i click continue;
                              Skript: http://10.80.145.50/zabbix/jsLoader....ng=en_gb&files[]=Tree.js&files[]=snmp_builder.js&files[]=DynTable.js&files[]=effects.js&files[]=dragdrop.js:4075

                              and then comes up with this message: Script: file:///C:/Users/eip.NO/AppData/Roaming/Mozilla/Firefox/Profiles/igzlzjb9.default/extensions/[email protected]/components/nsIeTabWatchFactory.js:244

                              and after this its shows this message again:Script: http://10.80.145.50/zabbix/jsLoader....ng=en_gb&files[]=Tree.js&files[]=snmp_builder.js&files[]=DynTable.js&files[]=effects.js&files[]=dragdrop.js:4075

                              anyone that have the same problem?
                              is it something in my config file that is wrong?
                              looking at the mib file Im trying to open its 2 Mb, so is it maybe a timeout ?

                              Im using zabbix server 1.8.4 stabel vers.

                              Comment

                              • acalvo
                                Member
                                • Oct 2010
                                • 30

                                #150
                                Originally posted by fmrapid
                                Would it be too much to ask for someone to put up a new version of SNMP Builder with all the patches applied. Either update the github code that giapnguyenput up a while back, and/or put it on the wiki.

                                This thread is nice and all, but there is nowhere to get the patched version. I am sure tons of people are interested in using it and developping it further.

                                Good karma on the person that puts up the new code on github or sourceforge or the wiki.

                                fmrapid
                                Originally posted by zabb_neil
                                Hi everyone,
                                I am new to zabbix and i want to add snmp host to it. can anybody give me snmp_builder.php with all patches installed?
                                It's not so hard.
                                I assume you're using 1.8.3 or newer, so http://www.zabbix.com/forum/showpost...&postcount=108

                                That should work by now (if you have other problems, check the thread or http://www.zabbix.com/wiki/howto/mon...p/snmp_builder)

                                However, as others said, it seems to be a bug with some systems.
                                Using gentoo along with zabbix 1.8.3 makes snmp_builder not to work, it gives an empty page after selecting a MIB (which are populated with the MIBs in the system defined paths).

                                I'm trying to narrow down the issue, but as not being a PHP dev, it's hard to debug.

                                I've tested snmptranslate making a test.php with a snmptranslate code example, and it worked (snmpwalk also works because I do have some SNMP hosts being monitored).

                                Moreover, I know MIBs are being loaded (just output the $results variable before pushing it into the oid tree variable).

                                Also, the information dialog that I've seen on some images posted by others users is missing.
                                So maybe it is related to way it is shown (not the way it is populated).

                                Bad side is that even querying a SNMP capable server gives nothing on the screen.

                                Anyone has a clue? Or any information to debug the code (I've tried FireBug but it just shows what I should be, not what was doing the code).

                                Thanks.

                                PS: really a good job, it matches one of my requirements for zabbix - items being (pseudo-)dynamic populated.
                                Maybe I'll try to make something similar but querying a zabbix agent? Does it make sense?

                                Regards,
                                Andreas

                                Comment

                                Working...