Ad Widget

Collapse

SNMP Builder for Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dougbee
    Member
    • Apr 2011
    • 68

    #226
    Originally posted by da_oli
    Hi all,

    i tried the snmp builder on zabbix 1.8.8 on debian 6

    i applied all the patches described in wiki
    at the first time, it was possible to read out something from the device, but i wasn't able to add it as a item.

    i added some new mibs, like snmpv2 and tried it again, but now there is no result and the window with oid/name remains empty

    i also waited for about 5 minutes, but there is still nothing to see.

    does anybody have an idea?

    greets

    oliver
    Can you look at the page source, to see if the text is actually present but not getting rendered? I ran into this yesterday, it was because I had a typo (missing comma separator) in the jsLoader.php file..

    Comment

    • lndgoncalves
      Junior Member
      • Apr 2010
      • 29

      #227
      Zabbix 1.9.5

      error zabbix 1.9.5

      Non-static method CTemplate::get() should not be called statically [snmp_builder.php:563]
      Undefined index: host [snmp_builder.php:565]
      Undefined index: host [snmp_builder.php:565]
      Undefined index: host [snmp_builder.php:565]

      Comment

      • sire
        Senior Member
        • Jul 2010
        • 210

        #228
        Originally posted by lndgoncalves
        error zabbix 1.9.5

        Non-static method CTemplate::get() should not be called statically [snmp_builder.php:563]
        Undefined index: host [snmp_builder.php:565]
        Undefined index: host [snmp_builder.php:565]
        Undefined index: host [snmp_builder.php:565]
        Zabbix 2.0 and its 1.9 pre-releases differ quite a lot from 1.8, thus snmp_builder.php will not work on 1.9 and newer versions without changing its code. However this is a solvable task.
        Regards,
        Sergey Syreskin

        Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

        Temporary out of Zabbix business

        Comment

        • sire
          Senior Member
          • Jul 2010
          • 210

          #229
          A SNMP Builder update

          Hi all,

          I have slightly updated SNMP Builder code.

          New features:
          • Zabbix 1.8.x internationalization support;
          • Changed some interface labels;
          • OID tree and Information screen elements are a bit wider now;
          • Changed OID selection color to something blueish;
          • "Clear" button clears OID selections;
          • Selectable SNMP version: 1 or 2c;
          • SNMP host port can be specified in host address field as 192.168.1.1:8161;
          • SNMP host's port is saved in items being created;
          • Support of new SNMP data types: INTEGER32, Unsigned32, Counter64;
          • Automatic selection of units and delta mode for if(In|Out)Octets and if(HCIn|HCOut)Octets OIDs;
          • Polling interval, keep history and keep trends item parameters can be specified by user;
          • Create graphs for numeric OIDs.


          Installation Instructions
          1. You need a clean Zabbix installation with no previous versions of SNMP Builder installed. Otherwise you should either uninstall old SNMP Builder or change my patch file.
          2. Change directory to your web root or where your Zabbix frontend files leave. For me it is /usr/share/zabbix.
          3. Apply patch by issuing command zcat snmpbuilder.diff.gz |patch -p1
          4. Untar SNMP Builder image files from snmpbuilder_imgs.tar.gz to /usr/share/zabbix/snmp_builder/imgs or where your Zabbix frontend leaves.


          Thanks go to:
          • GiapNguyen for SNMP Builder
          • Alixen, jhgrc and others for their patches


          This patch is created for Zabbix 1.8.12rc1, but should probably work with Zabbix 1.8.11 and even 1.8.10.
          Bug reports and suggestions are welcome.
          Attached Files
          Last edited by sire; 09-04-2012, 09:12.
          Regards,
          Sergey Syreskin

          Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

          Temporary out of Zabbix business

          Comment

          • sire
            Senior Member
            • Jul 2010
            • 210

            #230
            SNMP Builder For Zabbix 2.0

            SNMP Builder For Zabbix 2.0

            Put images to /usr/share/zabbix/js/jquery/themes/mib/
            Attached Files
            Last edited by sire; 23-05-2012, 10:26.
            Regards,
            Sergey Syreskin

            Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

            Temporary out of Zabbix business

            Comment

            • sire
              Senior Member
              • Jul 2010
              • 210

              #231
              SNMP Builder updated

              Updated versions of my patches.

              Added MIB file upload. In order to make it work, chown /usr/share/snmp/mibs (or wherever your MIBs are located) to the user id of your web server (usually it is apache, httpd, www-data). Also correct $mibs_dir in snmp_builder.php if needed.
              If uploads fail, set upload_tmp_dir = /tmp variable in php.ini.

              P.S. Do my patches work for you, are there any bugs/suggestions? I need your feedback.
              Attached Files
              Last edited by sire; 17-04-2012, 13:30.
              Regards,
              Sergey Syreskin

              Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

              Temporary out of Zabbix business

              Comment

              • rubendob
                Member
                • Apr 2012
                • 36

                #232
                Help guys

                Hello community


                I have a recently created Zabbix installation, 1.8.11, I want to know if is possible to run Snmp-Builder with these version. Actually ,I'am a little bit confused, I'm trying to install Snmp-Builder, downloading the code from



                But then there is the explanations of the wiki here

                http://www.zabbix.com/wiki/howto/mon...p/snmp_builder

                So I really don't know what to do, Also I read comments in these post of people (amazing) who develop its own patches and there is more than one Oo

                Can somebody give some guide about what to do exactly? I start from new Zabbix 1.8.11

                Any help will be awesome!

                Thanks

                Comment

                • sire
                  Senior Member
                  • Jul 2010
                  • 210

                  #233
                  rubendob,

                  The version on github is outdated, it was modified 2 years ago. And it will not work on Zabbix 1.8.11 without modifications.
                  Regards,
                  Sergey Syreskin

                  Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

                  Temporary out of Zabbix business

                  Comment

                  • rubendob
                    Member
                    • Apr 2012
                    • 36

                    #234
                    Snmp-builder

                    Hi Sire

                    ok, then I have to:

                    -1)Deploy snmp-builder from github
                    - 2) Do the hacks (because code is old)

                    question

                    what hacks exactly? There are some explanations in github web and some other differents in Wiki so:

                    what modifications I have to do or what hacks/patches I have to install in order to run withou issues snmp-builder?

                    Thanks!

                    PS:excuse me guys but it is my first approachs to snmp-builder :/

                    Comment

                    • rubendob
                      Member
                      • Apr 2012
                      • 36

                      #235
                      Don't know how to install

                      Originally posted by sire
                      Hi all,


                      Installation Instructions
                      1. You need a clean Zabbix installation with no previous versions of SNMP Builder installed. Otherwise you should either uninstall old SNMP Builder or change my patch file.
                      2. Change directory to your web root or where your Zabbix frontend files leave. For me it is /usr/share/zabbix.
                      3. Apply patch by issuing command zcat snmpbuilder.diff.gz |patch -p1
                      4. Untar SNMP Builder image files from snmpbuilder_imgs.tar.gz to /usr/share/zabbix/snmp_builder/imgs or where your Zabbix frontend leaves.


                      This patch is created for Zabbix 1.8.12rc1, but should probably work with Zabbix 1.8.11 and even 1.8.10.
                      Bug reports and suggestions are welcome.
                      I have read some pages of thread and I have found you have version of snmp-builder compatible with 1.8.11, however,

                      - Does I have to download original snmp-builder code from the autor?
                      - And then patch it with your code?

                      Sorry for lot of questions.

                      thanks

                      Comment

                      • sire
                        Senior Member
                        • Jul 2010
                        • 210

                        #236
                        Originally posted by rubendob
                        I have read some pages of thread and I have found you have version of snmp-builder compatible with 1.8.11, however,

                        - Does I have to download original snmp-builder code from the autor?
                        - And then patch it with your code?
                        No need to to download original code. You need just clean Zabbix install to apply my patches.
                        Regards,
                        Sergey Syreskin

                        Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

                        Temporary out of Zabbix business

                        Comment

                        • rubendob
                          Member
                          • Apr 2012
                          • 36

                          #237
                          error?

                          Originally posted by sire
                          No need to to download original code. You need just clean Zabbix install to apply my patches.
                          Hi Sire

                          this is what is happening when I follow the steps


                          Code:
                          # cd /var/www/html/zabbbix
                          # zcat snmpbuilder.diff.gz |patch -p1
                          
                          patching file include/locales/en_gb.inc.php
                          Hunk #1 FAILED at 2499.
                          1 out of 1 hunk FAILED -- saving rejects to file include/locales/en_gb.inc.php.rej
                          patching file include/locales/ru_ru.inc.php
                          Reversed (or previously applied) patch detected!  Assume -R? [n]
                          How can I fix it?

                          EDIT: just to comment, version of Zabbix is latest stable, 1.8.11. If now I click on Administration>Snmp Builder this is what can i see of the bottom of the page

                          Use of undefined constant S_MIB - assumed 'S_MIB' [snmp_builder.php:451]
                          Use of undefined constant S_SNMP_VERSION - assumed 'S_SNMP_VERSION' [snmp_builder.php:470]
                          Use of undefined constant S_COMMUNITY - assumed 'S_COMMUNITY' [snmp_builder.php:474]
                          Use of undefined constant S_SNMP_BUILDER - assumed 'S_SNMP_BUILDER' [snmp_builder.php:476]
                          Use of undefined constant S_OID_TREE - assumed 'S_OID_TREE' [snmp_builder.php:496]
                          Use of undefined constant S_OID_DATA - assumed 'S_OID_DATA' [snmp_builder.php:526]
                          Use of undefined constant S_CLICK_TO_FORCE_VIEW_AS_TABLE - assumed 'S_CLICK_TO_FORCE_VIEW_AS_TABLE'

                          Thanks
                          Last edited by rubendob; 23-04-2012, 09:55.

                          Comment

                          • sire
                            Senior Member
                            • Jul 2010
                            • 210

                            #238
                            Originally posted by rubendob
                            Hi Sire

                            this is what is happening when I follow the steps


                            Code:
                            # cd /var/www/html/zabbbix
                            # zcat snmpbuilder.diff.gz |patch -p1
                            
                            patching file include/locales/en_gb.inc.php
                            Hunk #1 FAILED at 2499.
                            1 out of 1 hunk FAILED -- saving rejects to file include/locales/en_gb.inc.php.rej
                            patching file include/locales/ru_ru.inc.php
                            Reversed (or previously applied) patch detected!  Assume -R? [n]
                            How can I fix it?
                            You have to manually apply a piece of patch concerning include/locales/en_gb.inc.php file. Open this file in a text editor, scroll to the bottom of the file. Put the translation strings before the line with a closing bracket and a semicolon ");". Translation strings are at the beginning of my patch and look like
                            PHP Code:
                            'S_SNMP_BUILDER' => 'SNMP Builder'
                            Remove plus "+" signs at the beginning of each line.

                            You may possibly need to ungzip my patch before you open it in an editor. Use gzip -d snmpbuilder.diff.gz command to do this.
                            Regards,
                            Sergey Syreskin

                            Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

                            Temporary out of Zabbix business

                            Comment

                            • rubendob
                              Member
                              • Apr 2012
                              • 36

                              #239
                              Still in the fight

                              Hi Sire and other people

                              this is the bottom of the include/locales/en_gb.inc.php after make the changes you suggested

                              Code:
                              // class.citemkey.php
                                      'S_KEY_CANNOT_BE_EMPTY' => 'Key cannot be empty.',
                                      'S_NO_KEY_ID_PROVIDED' => 'No key id provided.',
                                      'S_NO_ITEM_KEY_PROVIDED' => 'Invalid item key format.',
                                      'S_INCORRECT_SIMPLE_CHECK_PARAMETER' => 'Incorrect simple check parameter.',
                                      'S_INCORRECT_SYNTAX_NEAR' => 'Incorrect syntax near \'%1$s\'',
                                      'S_INCORRECT_USAGE_OF_BRACKET_SYMBOLS' => 'Incorrect usage of bracket symbols. \'%s\' found after final bracket.',
                                      'S_INVALID_KEY_FORMAT' => 'Invalid item key format.',
                                      'S_SNMP_BUILDER' => 'SNMP Builder',
                                      'S_NO_HOST_ADDR' => 'No host address provided',
                                      'S_INVALID_HOST_ADDR' => 'Invalid host address',
                                      'S_OID_LIST_IS_NULL' => 'OID list is null',
                                      'S_OID_IS_NULL' => 'OID is null',
                                      'S_INVALID_TYPE' => 'Invalid type',
                                      'S_OID_TREE' => 'OID Tree',
                                      'S_OID_DATA' => 'OID Data',
                                      'S_CLICK_TO_FORCE_VIEW_AS_TABLE' => 'Force view as table',
                                      'S_OID_NAME' => 'OID/Name',
                                      'S_DELTA' => 'Delta',
                                      'S_MIB' => 'MIB',
                                      'S_OID' => 'OID',
                                      'S_SNMP_VERSION' => 'SNMP Version',
                                      'S_COMMUNITY' => 'Community',
                                      'S_GRAPH_PARAMETERS' => 'Graph Parameters',
                                      'S_CANNOT_CREATE_GRAPH_FOR_NON_NUMERIC_ITEM' => 'Cannot create graph for non-numeric item',
                              );
                              ?>
                              then I run

                              Code:
                              # zcat snmpbuilder.diff.gz |patch -p1
                              Code:
                              patching file include/locales/en_gb.inc.php
                              Hunk #1 FAILED at 2499.
                              1 out of 1 hunk FAILED -- saving rejects to file include/locales/en_gb.inc.php.rej
                              patching file include/locales/ru_ru.inc.php
                              patching file include/menu.inc.php
                              Hunk #1 succeeded at 174 with fuzz 2 (offset -41 lines).
                              patching file jsLoader.php
                              patching file snmp_builder/DynTable.js
                              patching file snmp_builder/snmp_builder.js
                              patching file snmp_builder/Tree.js
                              patching file snmp_builder.php
                              These are the files inside snmp_builder:

                              Code:
                              # ls -ls snmp_builder
                              total 188
                                8 -rw-r--r-- 1 root root   4497 Apr 23 10:27 DynTable.js
                               12 -rw-r--r-- 1 root root  10188 Apr 23 10:27 snmp_builder.js
                              168 -rw-r--r-- 1 root root 171825 Apr 23 10:27 Tree.js
                              Then, there is also another file of your installation

                              Untar SNMP Builder image files from snmpbuilder_imgs.tar.gz to /usr/share/zabbix/snmp_builder/imgs or where your Zabbix frontend leaves
                              so I have downloaded and uncompress .tar.gz inside snmp_builder folder

                              Code:
                              # ls -ls  snmp_builder
                              total 192
                                8 -rw-r--r-- 1 zabbix zabbix   4497 Apr 23 10:27 DynTable.js
                                4 drwxr-xr-x 3 zabbix zabbix   4096 Apr 23 10:41 imgs
                               12 -rw-r--r-- 1 zabbix zabbix  10188 Apr 23 10:27 snmp_builder.js
                              168 -rw-r--r-- 1 zabbix zabbix 171825 Apr 23 10:27 Tree.js
                              Now I dont' see any errors on snmp-builder page inside Zabbix Administration but... OID tree is completely blank.

                              How can I check now? I have some ip of snmp device to check.

                              Thanks

                              Comment

                              • sire
                                Senior Member
                                • Jul 2010
                                • 210

                                #240
                                rubendob,

                                Choose a MIB first, for example, IF-MIB, then enter the IP address and Community string of your SNMP device. That should be enough for the start.
                                Regards,
                                Sergey Syreskin

                                Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74

                                Temporary out of Zabbix business

                                Comment

                                Working...