ZABBIX Forums  
  #231  
Old 13-04-2012, 09:41
sire sire is offline
Senior Member
 
Join Date: Jul 2010
Location: Moscow
Posts: 189
Default 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
File Type: gz zabbix-1.8.12-snmpbuilder.patch.gz (45.7 KB, 295 views)
File Type: gz zabbix-2.0.0-snmpbuilder.patch.gz (54.3 KB, 689 views)
__________________
Regards,
Sergey Sireskin

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

Last edited by sire; 17-04-2012 at 13:30.
Reply With Quote
  #232  
Old 20-04-2012, 20:35
rubendob rubendob is offline
Junior Member
 
Join Date: Apr 2012
Posts: 23
Question 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

https://github.com/giapnguyen/snmpbuilder

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
Reply With Quote
  #233  
Old 21-04-2012, 10:48
sire sire is offline
Senior Member
 
Join Date: Jul 2010
Location: Moscow
Posts: 189
Default

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 Sireskin

Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74
Reply With Quote
  #234  
Old 21-04-2012, 13:13
rubendob rubendob is offline
Junior Member
 
Join Date: Apr 2012
Posts: 23
Default 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 :/
Reply With Quote
  #235  
Old 23-04-2012, 09:35
rubendob rubendob is offline
Junior Member
 
Join Date: Apr 2012
Posts: 23
Default Don't know how to install

Quote:
Originally Posted by sire View Post
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
Reply With Quote
  #236  
Old 23-04-2012, 09:36
sire sire is offline
Senior Member
 
Join Date: Jul 2010
Location: Moscow
Posts: 189
Default

Quote:
Originally Posted by rubendob View Post
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 Sireskin

Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74
Reply With Quote
  #237  
Old 23-04-2012, 09:46
rubendob rubendob is offline
Junior Member
 
Join Date: Apr 2012
Posts: 23
Default error?

Quote:
Originally Posted by sire View Post
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 at 09:55.
Reply With Quote
  #238  
Old 23-04-2012, 10:03
sire sire is offline
Senior Member
 
Join Date: Jul 2010
Location: Moscow
Posts: 189
Default

Quote:
Originally Posted by rubendob View Post
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 Sireskin

Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74
Reply With Quote
  #239  
Old 23-04-2012, 11:08
rubendob rubendob is offline
Junior Member
 
Join Date: Apr 2012
Posts: 23
Default 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

Quote:
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
Reply With Quote
  #240  
Old 23-04-2012, 11:37
sire sire is offline
Senior Member
 
Join Date: Jul 2010
Location: Moscow
Posts: 189
Default

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 Sireskin

Monitored hosts: 2646 / Active items: 23604 / Server performance: 765.74
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:14.