View Full Version : SNMP Builder for Zabbix
giapnguyen
24-12-2009, 05:23
I'm working on a snmp builder tool to browse, convert and insert snmp oid into a template. It still some minor bugs. I will post it soon. Here some of screenshots and features.
2379
Support snmp table
2380
giapnguyen
25-12-2009, 14:46
Here you are
http://yangho.byethost22.com/wiki/doku.php?id=blog:snmp_builder
Features:
MIB Browser: you can select default MIB files or your own device MIBs to get OID tree. Click on the tree to retrieve value and information about a OID. Click to select the OID as Zabbix's item.
OID Table support: it assume that a OID whose name's end with string 'Table' is a OID Table. OID Table will retrieve with all it's indexes. Click on the cell to select the index as Zabbix's item. If my above assumption is wrong, you can use the checkbox “view as table” to switch between table and normal view.
Column selection: On OID Table, click on a header will select a whole column as Zabbix's items. It's useful if you create SNMP template for a 48 ports switch.
Auto convert: I implement a simple convert from SNMP Type to Zabbix's item.
If u got any bugs, please post here.
giapnguyen,
Great work! It's one of most awaiting features I've wished to see. But I have small problem: can't browse MIB tree. After selecting MIB from drop-down list I have the following in the left sub-window.
giapnguyen
25-12-2009, 18:19
Hi Firm
Yeah, my code heavily rely on snmp OS commands. I work on Ubuntu 9.10 and still not sure the output is same in other *nix. So please tell what OS, you install zabbix and try to run from OS prompt
snmptranslate -Ts -M <your MIBS_ALL_PATH> -m SNMPv2-MIB
Give me the output, and I will know why it don't render the oid tree
ericgearhart
26-12-2009, 04:38
I just want to add that from your screenshots this looks awesome... easy SNMP integration was the one thing I was really missing from Cacti.
I will give it a shot on my install of Zabbix (version 1.8, on CentOS 5.4) and post back if I have problems
giapnguyen,
CentOS 5.3 x86. The output is attached.
I'm having the following problems:
* Undefined index: templateid[/home/zabbix/public_html_svn/snmp_builder.php:125]
* Undefined index: oids[/home/zabbix/public_html_svn/snmp_builder.php:126]
* Undefined index: viewtype[/home/zabbix/public_html_svn/snmp_builder.php:127]
If I change the template, nothing happens...
If I change the MIB I have the following errors:
* Undefined index: oids[/home/zabbix/public_html_svn/snmp_builder.php:126]
* Undefined index: viewtype[/home/zabbix/public_html_svn/snmp_builder.php:127]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
Zabbix Server v1.8 (revision 8565)
Zabbix Frontend SVN revision 8917
Ubuntu 8.04.3 LTS
Tested with Firefox and Chrome
Hummm, in Zabbix 1.8 (revision 8565) frontend this problem does not occur...
giapnguyen
30-12-2009, 10:11
giapnguyen,
CentOS 5.3 x86. The output is attached.
Your output is fine. It's same with mine. I narrow down your problem to (1) snmptranslate not in search directory of apache's user, so it can't lauch the command; (2) there is a permission problem prevent snmptranslate run from php script (maybe because of selinux, apparmor, php.ini ...)
I glad to use php's snmp api to avoid OS-dependent problems but unfortunately it don't have sufficient features. I will install a CentOS 5.3 to check it.
You can try create a test.php in zabbix web dir contains:
<?php
exec("snmptranslate -Ts -M /usr/share/snmp/mibs -m SNMPv2-MIB 2>&1", $results);
print_r($results);
?>
Browse the test.php to see what happen when run snmptranslate from web.
giapnguyen
30-12-2009, 10:19
I'm having the following problems:
* Undefined index: templateid[/home/zabbix/public_html_svn/snmp_builder.php:125]
* Undefined index: oids[/home/zabbix/public_html_svn/snmp_builder.php:126]
* Undefined index: viewtype[/home/zabbix/public_html_svn/snmp_builder.php:127]
If I change the template, nothing happens...
If I change the MIB I have the following errors:
* Undefined index: oids[/home/zabbix/public_html_svn/snmp_builder.php:126]
* Undefined index: viewtype[/home/zabbix/public_html_svn/snmp_builder.php:127]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
* Undefined index: items[/home/zabbix/public_html_svn/snmp_builder.php:576]
Zabbix Server v1.8 (revision 8565)
Zabbix Frontend SVN revision 8917
Ubuntu 8.04.3 LTS
Tested with Firefox and Chrome
LOL, it is because I use index without check it existed or not - it's my bad but php accept it. Maybe in this version (debug purpose), developer increase error report level (E_NOTICE), than the warning showed.
giapnguyen,
It works now. The problem was in PHP safe_mode=On that has prevented execution of all programs except from the directory set by safe_mode_exec_dir. After turning safe_mode=Off it works as should.
ericgearhart
30-12-2009, 19:59
Just to help folks out, I was getting this error in /var/log/http/error_log:
PHP Fatal error: Call to undefined function json_encode() in /var/www/html/snmp_builder.php on line 421
Installing php's json fixed that:
yum -y install php-pecl-json so that at least I get the same page as the previous person posting to this thread who was having problems with CentOS
I'm on CentOS 5.4, and the php json pecl extension wasn't installed it looks like
ericgearhart
30-12-2009, 20:18
I was able to test this today, and it works! I pointed snmpbuilder at a Cisco 2960G switch here at work and added a few interface items... as you can see at the bottom I also get the "Undefined index" errors but it seems to work OK nevertheless. I'm on CentOS 5.4.
The screenshot speaks for itself:
giapnguyen
31-12-2009, 02:34
Just to help folks out, I was getting this error in /var/log/http/error_log:
PHP Fatal error: Call to undefined function json_encode() in /var/www/html/snmp_builder.php on line 421
Installing php's json fixed that:
yum -y install php-pecl-json so that at least I get the same page as the previous person posting to this thread who was having problems with CentOS
I'm on CentOS 5.4, and the php json pecl extension wasn't installed it looks like
:confused: I think zabbix already use json to draw map. Whatever php-json is required.
ericgearhart
31-12-2009, 04:23
:confused: I think zabbix already use json to draw map. Whatever php-json is required.
Well maps were working before I installed php-json... I hadn't done a lot with maps(I'm still playing with items and triggers) but I hadn't noticed that the default "Local Network" map wasn't working
jroberson
31-12-2009, 16:58
Wow, that looks incredible! Just another reason for me to get off my lazy butt and upgrade to 1.8. :o
Great Job and Much Appreciated! :)
laakness
31-12-2009, 18:34
This is probably the coolest thing since canned beer :p
Installed and had it working in about 15 minutes.
laakness
03-01-2010, 19:44
Not sure if it's possible but I have a suggestion/feature request for this.
Can you lock the Column Title row in the Table View so that when you are scrolling around the list you know what you are clicking on easier?
ericgearhart
03-01-2010, 19:50
After playing with this over the past week it's become increasingly apparent that Zabix really, really needs a way to associate an SNMP ifAlias with an interface.... Cacti does this brilliantly already and it would be a much welcomed addition to Zabbix
ericgearhart
03-01-2010, 19:54
There's already a feature request open for this too on the bug tracker... appropriately enough its id is ZBXNEXT-1 (https://support.zabbix.com/browse/ZBXNEXT-1) :)
giapnguyen
04-01-2010, 04:52
Not sure if it's possible but I have a suggestion/feature request for this.
Can you lock the Column Title row in the Table View so that when you are scrolling around the list you know what you are clicking on easier?
It's quite possible. I'll move title's row and index column into other fixed tables, only contain is scrollable. It's next version.
I have some issues with tables being converted to items. It's logging some snmptranslate syntax errors. I noticed if I change the get_oid_content function to include the MIB name with the oid name it gets further but not much. Have you run into this with some of your MIBs? If so, did you fix it, if not, could you point me the right direction?
Here is what doesn't work (added some echo statements to a tmp logfile):
snmptranslate -Td -OS -M /var/www/html/zabbix/snmp_builder/mibs:/usr/share/snmp/mibs -m ALL ltmPoolStatServerPktsIn
This does:
snmptranslate -Td -OS -M /var/www/html/zabbix/snmp_builder/mibs:/usr/share/snmp/mibs -m ALL F5-BIGIP-LOCAL-MIB::ltmPoolStatServerPktsIn
I was able to test this today, and it works! I pointed snmpbuilder at a Cisco 2960G switch here at work and added a few interface items... as you can see at the bottom I also get the "Undefined index" errors but it seems to work OK nevertheless. I'm on CentOS 5.4.
The screenshot speaks for itself:
I get the same errors on latest Zabbix 1.9 (trunk) rev.9324 and CentOS 5.4. Seems they are not related to Zabbix. Has anybody solution to it?
It would be great if Zabbix would have their own Template builder or something like that for transforming SNMP MIB files to Templates...
There's already a feature request open for this too on the bug tracker... appropriately enough its id is ZBXNEXT-1 (https://support.zabbix.com/browse/ZBXNEXT-1) :)
it is more flexible approach
http://www.zabbix.com/forum/showthread.php?t=15400
https://support.zabbix.com/browse/ZBXNEXT-10
giapnguyen
18-01-2010, 01:51
I get the same errors on latest Zabbix 1.9 (trunk) rev.9324 and CentOS 5.4. Seems they are not related to Zabbix. Has anybody solution to it?
It would be great if Zabbix would have their own Template builder or something like that for transforming SNMP MIB files to Templates...
It not a big issue. You can decrease notify level in php.ini. I kind of busy - moving office so next version is delay.
:( I agree that it could be great if Zabbix integrate the tool for better maintain.
giapnguyen
18-01-2010, 01:52
I have some issues with tables being converted to items. It's logging some snmptranslate syntax errors. I noticed if I change the get_oid_content function to include the MIB name with the oid name it gets further but not much. Have you run into this with some of your MIBs? If so, did you fix it, if not, could you point me the right direction?
Here is what doesn't work (added some echo statements to a tmp logfile):
snmptranslate -Td -OS -M /var/www/html/zabbix/snmp_builder/mibs:/usr/share/snmp/mibs -m ALL ltmPoolStatServerPktsIn
This does:
snmptranslate -Td -OS -M /var/www/html/zabbix/snmp_builder/mibs:/usr/share/snmp/mibs -m ALL F5-BIGIP-LOCAL-MIB::ltmPoolStatServerPktsIn
The second is right one, could you send your MIBs for me. I can check it for you.
Here is one of them. The issue is with the tables. It will pick up the values from the device but it will not convert them to a zabbix item. Its getting hung up on the index value for each of the table items.
giapnguyen
19-01-2010, 03:39
Here is one of them. The issue is with the tables. It will pick up the values from the device but it will not convert them to a zabbix item. Its getting hung up on the index value for each of the table items.
Hi danrog, I don't F5 devices so I can't debug the bug. I think the bug made involve with indexes. SNMP Builder should solve OID automatically (via get_oid_value function), you don't need add MIB manually in get_oid_from_name function. It is because selected oids may belong to related MIBs not current one.
I don't know why your snmptranslate commands missing MIB and Index values. Could you post the screenshot of your table?
My tableview with correct generated oids.
2468
How did you get that debug statement up???? Much more elegant then mine :-)
I'm not able to get oids from MIB files, all the time I get nothing.
Is there some package need to be installed or all mibs I'm using are wrong?!
At first look it seemed to be a pretty easy way to create snmp template, now it seems like a nightmare. :mad:
That's a shame that Zabbix team doesn't develop tool for Zabbix integration with SNMP. :(
I got some logs out of apache error log, maybe it could help:
No log handling enabled - turning on stderr logging
Cannot find module (SNMPv2-SMI): At line 8 in /usr/share/snmp/mibs/SYMANTEC-EMAIL-SECURITY.mib
Cannot find module (SNMPv2-TC): At line 10 in /usr/share/snmp/mibs/SYMANTEC-EMAIL-SECURITY.mib
Did not find 'enterprises' in module #-1 (/usr/share/snmp/mibs/SYMANTEC-EMAIL-SECURITY.mib)
Did not find 'DisplayString' in module #-1 (/usr/share/snmp/mibs/SYMANTEC-EMAIL-SECURITY.mib)
Unlinked OID in SYMANTEC-EMAIL-SECURITY: symantec ::= { enterprises 393 }
Undefined identifier: enterprises near line 30 of /usr/share/snmp/mibs/SYMANTEC-EMAIL-SECURITY.mib
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: queuedMessages ::= { instanceEntry 8 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: queueSize ::= { instanceEntry 7 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: messageRate ::= { instanceEntry 6 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: deferredMessages ::= { instanceEntry 5 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: dataRate ::= { instanceEntry 4 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: connections ::= { instanceEntry 3 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: instanceDescr ::= { instanceEntry 2 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: instanceIndex ::= { instanceEntry 1 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: cpuInternalTemperature ::= { app8240 5 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: internalAmbientTemperature ::= { app8240 4 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: systemPciFan ::= { app8240 3 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: systemMemoryFan ::= { app8240 2 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: systemBlowerFan ::= { app8240 1 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: fanRedundancy ::= { app8260 2 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: powerSupplyRedundancy ::= { app8260 1 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: symantec ::= { enterprises 393 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: instanceTable ::= { mta 1 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: mta ::= { mailSecurityAppliance 2 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: hardware ::= { mailSecurityAppliance 1 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: app8260 ::= { hardware 2 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: app8240 ::= { hardware 1 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: mailSecurityAppliance ::= { sms 2 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: instanceEntry ::= { instanceTable 1 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: products ::= { symantec 200 }
Cannot adopt OID in SYMANTEC-EMAIL-SECURITY: sms ::= { products 130 }
ericgearhart
20-01-2010, 17:32
At first look it seemed to be a pretty easy way to create snmp template, now it seems like a nightmare. :mad:
You're using a "weird" MIB, that looks like it might be broken.... do you have some other SNMP device you can point snmpbuilder at just to make sure it works, such as your Linux server?
I've had success with snmpbuilder when I have pointed it at Cisco and HP devices...
I have the same issue with HP switches and MIB downloaded form HP site.
However it does get data from HP switches via SNMP when using default Zabbix HP template, so SNMP by itself works.
For those with string based indexes inside a table (which is most likely causing problems for you), you need to quote the index before its passed to snmpget. Fortunately, this is an easy fix. To do this, modify the following in the snmp_builder.php (I should add, I didn't test the regex all that much but it should figure out integer based indexes vs. strings):
function get_oid_value($community, $server_ip, $oid, $idx)
{
if (preg_match('/^[0-9]+$/', $idx ,$match)) {
$results = exec("snmpget -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx");
} else {
$results = exec("snmpget -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.\\\"".$idx."\\\"");
}
nelsonab
01-02-2010, 02:23
I decided to download and try with 1.8.1 today and while it didn't work so well, I like the direction you are headed. Your plugin has A LOT of potential to totally kick ass.
If you can try and host it somewhere where you have a source code management system such as subversion or git. It's nice when you can look at the SCM and know how old the revision you are getting is. Also that would allow you to have some other people help you make it kick even more ass.
Keep it up! You've got a real gem on your hands. I too hope you can work with the Zabbix team to eventually see it integrated into trunk, or at lease developed to the point where it's a simple drop in plugin for Zabbix. I think developing it to the point of a dropin plugin is the better option for you though. (Aly... hint hint, needed functionality and documentation....)
siriusshiu-2010
01-02-2010, 04:15
Hi all,
I had following the above installation, then I get the following result.
Many thanks for help.
pkhooper
02-02-2010, 02:17
I agree completely, great product and if you put the code in SCM, I will contribute to the code and documentation.
Patrick.
I decided to download and try with 1.8.1 today and while it didn't work so well, I like the direction you are headed. Your plugin has A LOT of potential to totally kick ass.
If you can try and host it somewhere where you have a source code management system such as subversion or git. It's nice when you can look at the SCM and know how old the revision you are getting is. Also that would allow you to have some other people help you make it kick even more ass.
Keep it up! You've got a real gem on your hands. I too hope you can work with the Zabbix team to eventually see it integrated into trunk, or at lease developed to the point where it's a simple drop in plugin for Zabbix. I think developing it to the point of a dropin plugin is the better option for you though. (Aly... hint hint, needed functionality and documentation....)
giapnguyen
02-02-2010, 02:53
I decided to download and try with 1.8.1 today and while it didn't work so well, I like the direction you are headed. Your plugin has A LOT of potential to totally kick ass.
If you can try and host it somewhere where you have a source code management system such as subversion or git. It's nice when you can look at the SCM and know how old the revision you are getting is. Also that would allow you to have some other people help you make it kick even more ass.
Keep it up! You've got a real gem on your hands. I too hope you can work with the Zabbix team to eventually see it integrated into trunk, or at lease developed to the point where it's a simple drop in plugin for Zabbix. I think developing it to the point of a dropin plugin is the better option for you though. (Aly... hint hint, needed functionality and documentation....)
Thank nelsonab, and sorry you guys for in-active for a long time. I even not upgrade 1.8.1 yet :mad:. I will fixed all problems at end of the week.
The reason, i not upload the tool into sub7 or git; is my code deeply bind with zabbix code. Every small change may broke the tool (like 1.8.1). So I hope zabbix guys will adopt the code into the project.
Thank danrog for fix my code. Weird index value not expected (by me).
Let check my new tool snmptrap. http://yangho.byethost22.com/wiki/doku.php?id=blog:enhanced_snmptrap. It will be integrated next snmpbuilder. It will be full snmp-support for zabbix :cool:
nelsonab
02-02-2010, 03:10
Thank nelsonab, and sorry you guys for in-active for a long time. I even not upgrade 1.8.1 yet :mad:. I will fixed all problems at end of the week.
As the owner of a Zabbix related project, trust me life happens and there will be times you cannot commit as much as you would like. I know Richlv has probably wanted to slap me a few times when I haven't been able to work on Zabcon as much as I have wanted over the last few months.
However.... If you have your project in SCM, then you are more likely to get some people to help your project who can work on bug fixes or implement new features you have been discussing with everyone in your development group. Divide and conquer!
The reason, i not upload the tool into sub7 or git; is my code deeply bind with zabbix code. Every small change may broke the tool (like 1.8.1). So I hope zabbix guys will adopt the code into the project.
I cannot speak on behalf of the Zabbix team and cannot say definatively what they will do, however I think trying to keep your project independent for as long as possible would be in your best interest. This may seem counter intuitive but hear me out. If the Zabbix team integrates your project into trunk you will no longer be able to make bug fixes as easilly or add new features because you will not have commit access to the source. Sure you can check it out of SCM but if you want to make a change you have to post it to the forum or send someone an email. The Zabbix developers are human, and humans forget to do things or get overwhelmed with deadlines an so forth. (Though I think Richlv is a cyborg... but that's for another thread... Just kiddin Richlv ;))
If you keep your project independent you also have the ability of having a group of people work with you as mentioned above. Now it is possible you may be able to work out a deal with the Zabbix team where they will take the most recent stable snapshot of your code and integrate it with each production release, that I could easily see happening, and you get the best of both worlds!
I wrote something like this a few months ago for work but couldn't release it due to licensing issues. Still, I'm glade to see something like this out there that anyone can use.
-Paul
giapnguyen
08-02-2010, 09:05
Hi all,
I had following the above installation, then I get the following result.
Many thanks for help.
Hey you must select your MIB, than it will load oid tree. No Mib selected, nothing to show. And for lookup and select oid as item, you must fill your device ip + community too.
giapnguyen
08-02-2010, 09:09
I make a quick fix for zabbix 1.8.1. Now I named snmpbuilder following zabbix version which it work for.
Change log:
Fix undefined index warnings.
Include danrog's fix for non-numeric indexes.
From 1.8.1, zabbix not accept specified chars in key name. So I must replace them with underscore.
http://yangho.byethost22.com/wiki/doku.php?id=blog:snmp_builder
Most of problem is background snmp commands. So you guys must make sure snmpget, snmptranslate work in your system. Some MIBs required other related MIBs to work. If you see same error:
.Cannot find module (CISCO-SMI): At line 22 in /home/zabbix/public_html/snmp_builder/mibs/OLD-CISCO-TS-MIB mib Cannot find module (CISCO-SMI): At line 22 in /home/zabbix/public_html/snmp_builder/mibs/OLD-CISCO-TS-MIB.mib
It means you must download CISCO-SMI mib for snmp command working fine.
I should have replied sooner. The string issue, wasn't the only problem I found. Some other tables in my MIB use 64 bit counters (on top of string based indexes). I haven't dug to much into it, but I do see the snmp_builder.js is not looking at 64bit counters.
Giapnguyen, is there an easy fix for that? Also, I still see an issue with string based indexes
{"error":"Oid is null F5-BIGIP-LOCAL-MIB::ltmVirtualServStatCsMinConnDur.\"www.blah.com\""}
nelsonab
09-02-2010, 05:38
I had to make the following fix to make snmp_builder work for me with some of the vendor MIBs I've been importing. The problem is that the snmp_builder needs to interrogate every MIB file to find it's proper MIB name. The filename does not always equate to the MIB name. I have tested this work properly against the MIB files from Juniper for their Netscreens, which use differing MIB names and filenames.
The change begins at line 315 and essentially a drop in replacement for the whole foreach command.
foreach(glob($path."/*.mib") as $filename){
if (preg_match('/^'.preg_quote($path,'/').'\/(.+)\.mib$/',$filename,$matches)){
$result=exec("cat ".$filename."| grep -i 'DEFINITIONS.*::=.*BEGIN'|awk '{print $1}'");
$cmbMibs->addItem($result,$result);
}
}
I know this is not the most "php" way of doing things, but quick and dirty scripting is what I'm good at. :-) Also I don't know if it's possible to have multiple DEFINITIONS statements within an MIB file. If this is the case this patch will fail.
nelsonab
09-02-2010, 05:56
Giapnguyen, you rock... this is the coolest hack/patch I've seen yet for Zabbix. I just made my netscreen tempates with very little hassle. Productivity and monitoring capability just saw an improvement. :-)
laakness
09-02-2010, 21:19
nelsonab - what file are those changes for?
nelsonab
10-02-2010, 00:15
the main one... snmp_builder.php
giapnguyen
11-02-2010, 02:46
I should have replied sooner. The string issue, wasn't the only problem I found. Some other tables in my MIB use 64 bit counters (on top of string based indexes). I haven't dug to much into it, but I do see the snmp_builder.js is not looking at 64bit counters.
Giapnguyen, is there an easy fix for that? Also, I still see an issue with string based indexes
{"error":"Oid is null F5-BIGIP-LOCAL-MIB::ltmVirtualServStatCsMinConnDur.\"www.blah.com\""}
Hi danrog, your problem not 64bit counters. It is get_oid_from_name function
function get_oid_from_name($name)
{
$oid = exec("snmptranslate -M ".MIBS_ALL_PATH." -m ALL -On $name");
if (preg_match('/[0123456789\.]+/', $oid))
return $oid;
else
return null;
}
Because snmptranslate not return oid from F5-BIGIP-LOCAL-MIB::ltmVirtualServStatCsMinConnDur.\"www.blah.com\"" so it report oid is null (I'll change error message later). So you should try the command "snmptranslate -M ".MIBS_ALL_PATH." -m ALL -On $name" from command prompt to see what problem.
giapnguyen
11-02-2010, 02:55
Giapnguyen, you rock... this is the coolest hack/patch I've seen yet for Zabbix. I just made my netscreen tempates with very little hassle. Productivity and monitoring capability just saw an improvement. :-)
Glad to see you like it. Thank your patch too, don't worry about shell script stuffs. Snmpbuilder not use everytime so performance is not big issue.
My idea that you look around SNMP items from your devices, if you like monitor something than select them. I don't like to use general templates which contain a lot of things I don't need.
I also have a ton of ideas to improve my zabbix system, hope have time to develop all of them :)
giapnguyen
12-02-2010, 03:37
I should have replied sooner. The string issue, wasn't the only problem I found. Some other tables in my MIB use 64 bit counters (on top of string based indexes). I haven't dug to much into it, but I do see the snmp_builder.js is not looking at 64bit counters.
Giapnguyen, is there an easy fix for that? Also, I still see an issue with string based indexes
{"error":"Oid is null F5-BIGIP-LOCAL-MIB::ltmVirtualServStatCsMinConnDur.\"www.blah.com\""}
Ok i know your problem now. Your item is dynamic snmp index so can't lookup oid from MIB files. I have an idea for support dymamic snmp index: I will make index column of snmp table selectable (first column). You can select any column to use as dynamic index. Then when you click a cell, it will generate a dynamic snmp index item base on value of first column in your case it is www.blah.com
nelsonab
12-02-2010, 11:54
giapnguyen, are you going to put this plugin into your own SCM system like subversion or git? I know myself and many others would really like this as it would enable us to know much more easily when there is an update.
giapnguyen
14-02-2010, 07:05
giapnguyen, are you going to put this plugin into your own SCM system like subversion or git? I know myself and many others would really like this as it would enable us to know much more easily when there is an update.
I just create a github account. I will upload the project later.
nelsonab
14-02-2010, 14:37
I just create a github account. I will upload the project later.
AWESOME!
(These characters have no meaning but are here to satisfy phpbb)
I've got a Google Code repo already made for the Zabbix tools I've made (right now, just a script to monitor Asterisk).
What if we combined your plugin, my scripts, and whomever else would like into a single project that contained a few modules that were worked on by the community?
Wow! This addon just looks awesome. I can't wait to try it this week and provide some feedback.
Wow! This addon just looks awesome. I can't wait to try it this week and provide some feedback.
Ok, here comes some feedback. Does this work with hosts behind remote zabbix proxies? I ask because all of the switches I have monitored are behind remote zabbix proxies. When I put in the IP of the host in question I see the following in /var/log/apache/error.log
Undefined OBJECT-GROUP (hpicfSyslogPriorityDestinationIndex): At line 779 in /usr/share/snmp/mibs/hpicfSyslog.mib
Undefined OBJECT-GROUP (hpicfBasicSnmpNotifyLogFilterTable): At line 1470 in /usr/share/snmp/mibs/hpicfBasic.mib
Timeout: No Response from 192.168.5.2.
Timeout: No Response from 192.168.5.2.
Timeout: No Response from 192.168.5.2.
192.168.5.2 is an HP Procurve switch at a remote site and certainly not reachable directly from the Zabbix server.
Does this render this addon useless for me?
Regards,
nelsonab
17-02-2010, 16:37
Right now it only works from the server which runs the Zabbix frontend. Given the use case you presented it's not likely to help you too much directly, however there are workarounds to make it work!
Here's one idea, ssh from the Zabbix GUI server to a box on the remote network and setup a tunnel to the snmp port across the link. Then in the SNMP builder use the localhost (127.0.0.1) as your IP for the switch. For each different switch you need to run this on you will need to tear down and setup the tunnel.
Right now it only works from the server which runs the Zabbix frontend. Given the use case you presented it's not likely to help you too much directly, however there are workarounds to make it work!
Here's one idea, ssh from the Zabbix GUI server to a box on the remote network and setup a tunnel to the snmp port across the link. Then in the SNMP builder use the localhost (127.0.0.1) as your IP for the switch. For each different switch you need to run this on you will need to tear down and setup the tunnel.
That's a great idea. For testing purposes I went ahead and set up some port forwarding on the firewall of one site and forwarded in SNMP to one of the HP Procurve 5406 switches. I don't see the connection errors in apache's error.log like before but I'm still seeing the following for every HP Procurve mib I try and select...
http://ooz.net/~elvar/stor/capture.png
Any suggestions?
And here are the HP Procurve mibs if you want to test them in SNMP Builder...
http://www.hp.com/rnd/software/MIBs.htm
I have the same issue with HP switches and MIB downloaded form HP site.
However it does get data from HP switches via SNMP when using default Zabbix HP template, so SNMP by itself works.
Just noticed you are another user having issues with the HP mibs. I can't get it to work with any of the HP mibs either. Have you had any luck yet?
Look promising but does not work for me. Runs very slow. The reason is in the apache error.log, same MIB problems. And I cannot get proposed items by clicking item on the oid view.
I have downloaded 100% of Cisco MIBs but still get errors.
Just noticed you are another user having issues with the HP mibs. I can't get it to work with any of the HP mibs either. Have you had any luck yet?
hp mibs are quite buggy. try using them with snmpget or walk, and fix any issues they report - maybe that helps.
hp mibs are quite buggy. try using them with snmpget or walk, and fix any issues they report - maybe that helps.
Here is a txt file of the output from running 'snmpwalk -v 2c HOST -c public > hp_procurve_5412-snmpwalk.txt'
http://ooz.net/~elvar/stor/hp_procurve_5412-snmpwalk.txt
Based on this, does that give you any info as to how to make snmp_builder work correctly?
nelsonab
18-02-2010, 21:56
Here is a txt file of the output from running 'snmpwalk -v 2c HOST -c public > hp_procurve_5412-snmpwalk.txt'
http://ooz.net/~elvar/stor/hp_procurve_5412-snmpwalk.txt (http://ooz.net/%7Eelvar/stor/hp_procurve_5412-snmpwalk.txt)
Based on this, does that give you any info as to how to make snmp_builder work correctly?
It looks like it's just using the standard SNMP MIB's. Did you copy the HP mibs to the directory net-snmp traverses for mibs? I also found the mibs could not be in a sub directory.
Another option is to call the mib explicitly using the -m option (i think). That will force the loading of that module for the traverse. The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.
It looks like it's just using the standard SNMP MIB's. Did you copy the HP mibs to the directory net-snmp traverses for mibs? I also found the mibs could not be in a sub directory.
Another option is to call the mib explicitly using the -m option (i think). That will force the loading of that module for the traverse. The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.
Yes, all the HP mibs are in the /usr/share/snmp/mibs dir and not in subdirs. I have not tried specifying the mibs myself though. I'll try and give that a whirl.
Thanks for the replies!
It looks like it's just using the standard SNMP MIB's. Did you copy the HP mibs to the directory net-snmp traverses for mibs? I also found the mibs could not be in a sub directory.
Another option is to call the mib explicitly using the -m option (i think). That will force the loading of that module for the traverse. The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.
Does http://ooz.net/~elvar/stor/HP_ProCurve_MIBs_Loading_Order.html provide anything useful for getting snmp_builder to work with the HP mibs? This addon would make life so much easier for me if it worked with HP mibs considering that's about all I need to work with right now snmp wise :)
giapnguyen
19-02-2010, 08:01
Does http://ooz.net/~elvar/stor/HP_ProCurve_MIBs_Loading_Order.html provide anything useful for getting snmp_builder to work with the HP mibs? This addon would make life so much easier for me if it worked with HP mibs considering that's about all I need to work with right now snmp wise :)
snmpbuilder work with MIB files to translate SNMP Oid Name into SNMP Oid number. Zabbix work with oid number so it not a problem if your Mibs absent.
smpbuilder is nothing but a series of snmp commands. So if snmp commands fails, it fails too.
So far, most problem is Mib files and Mib directories.
First you must make sure edit first line of snmpbuilder to correct your system setting.
define('MIBS_ALL_PATH', '/home/zabbix/public_html/snmp_builder/mibs:/usr/share/snmp/mibs');
In my ubutu, default mib path is /usr/share/snmp/mibs but in other system, it's different. Without default mib path, snmptranslate can not lookup predefined snmp values. In my TODOs, I'll try to detect the default path to solve this problem.
Second, a MIB may depends on other MIBs so missing included one snmptranslate will fail to work.
A simple test, you must try in command prompt:
snmptranslate -Ts -M <your mibs_all_path> -m <your mib>
If it can list the tree of your mib, it work in my tool.
giapnguyen
19-02-2010, 08:04
Hey guys, my github's here: http://github.com/giapnguyen/snmpbuilder
I checked HP mibs, it's ok but we need nelsonab's patch because in hp mib file, module name not same with file name
The module name is not always the filename, you may need to look in the mib file. I'm sorry but I don't recall the string that's used to define the name.
for vendor mibs, it rarely is. module name usually is first uncommented string, followed by "DEFINITIONS ::= BEGIN", for example :
UPS-MIB DEFINITIONS ::= BEGIN
I try Cisco ITP MIB, and it seems that snmp_builder.php incorrectly handles indices?
No log handling enabled - turning on stderr logging
cgspLinkReason: Unknown Object Identifier (Sub-id not found: (top) -> cgspLinkReason)
cgspLinkReason."TSF-INSTANCE.TO-TSS-ITP.0": Unknown Object Identifier (Index out of range: "TSF-INSTANCE.TO-TSS-ITP.0 (cgspInstNetwork))
USAGE: snmptranslate [OPTIONS] OID [OID]...
TSF-INSTANCE.TO-TSS-ITP.0 is oid eccoded into "[len byte].[string in bytes].[len byte2].[string2 in bytes].0"
I can see the OID view table, and when I click an entry (cgspLinkReason) for above index, I get the error and nothing shows on item-list.
Hey guys, my github's here: http://github.com/giapnguyen/snmpbuilder
I checked HP mibs, it's ok but we need nelsonab's patch because in hp mib file, module name not same with file name
I will attempt to patch using Nelsonab's code, wish me luck. :)
giapnguyen
19-02-2010, 11:25
I try Cisco ITP MIB, and it seems that snmp_builder.php incorrectly handles indices?
No log handling enabled - turning on stderr logging
cgspLinkReason: Unknown Object Identifier (Sub-id not found: (top) -> cgspLinkReason)
cgspLinkReason."TSF-INSTANCE.TO-TSS-ITP.0": Unknown Object Identifier (Index out of range: "TSF-INSTANCE.TO-TSS-ITP.0 (cgspInstNetwork))
USAGE: snmptranslate [OPTIONS] OID [OID]...
TSF-INSTANCE.TO-TSS-ITP.0 is oid eccoded into "[len byte].[string in bytes].[len byte2].[string2 in bytes].0"
I can see the OID view table, and when I click an entry (cgspLinkReason) for above index, I get the error and nothing shows on item-list.
I'm still work on weird index value. Get new snmp_builder.php from github http://github.com/giapnguyen/snmpbuilder to see it fix your problem. If not please attach your mib.
New snmp_builder.php will fix the module name problem. (I don't use Nelsonab code because it parse whole mib file. My code stop when it find module name - it suppose that 1 module in 1 file??? correct me if i'm wrong). HP mib work on my zabbix now
It also fix danrog patch for index.
I'm still work on weird index value. Get new snmp_builder.php from github http://github.com/giapnguyen/snmpbuilder to see it fix your problem. If not please attach your mib.
It does not seem to resolve - here is MIB information from snmp_builder Information tab.
http://tools.cisco.com/Support/SNMP/do/BrowseMIB.do?local=en&step=2&submitClicked=true&mibName=CISCO-ITP-GSP-MIB#dependencies
CISCO-ITP-GSP-MIB::cgspLinkTable
cgspLinkTable OBJECT-TYPE
-- FROM CISCO-ITP-GSP-MIB
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION "A table of links for each Signalling
I've attached the image (server & community masked) - when I click first row of cgspLinkState (turns yellow) I just get snmptranslate -error to apache's error.log.
Is there any way to capture the command line sent to snmptranslate?
I'm still work on weird index value. Get new snmp_builder.php from github http://github.com/giapnguyen/snmpbuilder to see it fix your problem. If not please attach your mib.
New snmp_builder.php will fix the module name problem. (I don't use Nelsonab code because it parse whole mib file. My code stop when it find module name - it suppose that 1 module in 1 file??? correct me if i'm wrong). HP mib work on my zabbix now
It also fix danrog patch for index.
This fixes my problem with being able to load the HP mibs but I'm not able to actually pull any data with any of the HP mibs. I also tried loading up Fortinet mibs for Fortigate firewalls and I'm not able to get any data using those either. When you tried the HP mibs, did you actually test them on any HP devices by chance? For example, if I load up the HP-MEMPROC-MIB I get nothing returned for anything HP specific. Not sure if I'm doing something wrong but I've tried every possible option under the HP specific sections.
Thanks for your continued work on this addon, I appreciate it! :)
This fixes my problem with being able to load the HP mibs but I'm not able to actually pull any data with any of the HP mibs. I also tried loading up Fortinet mibs for Fortigate firewalls and I'm not able to get any data using those either. When you tried the HP mibs, did you actually test them on any HP devices by chance? For example, if I load up the HP-MEMPROC-MIB I get nothing returned for anything HP specific. Not sure if I'm doing something wrong but I've tried every possible option under the HP specific sections.
Thanks for your continued work on this addon, I appreciate it! :)
Interestingly enough I was able to get the Fortigate mibs to return data after I changed the community string from '40G^te' to 'public'. Is there issues with those characters from the first community string? If so, is there a way for you to modify your code to support those characters?
Regards,
giapnguyen
21-02-2010, 10:22
Interestingly enough I was able to get the Fortigate mibs to return data after I changed the community string from '40G^te' to 'public'. Is there issues with those characters from the first community string? If so, is there a way for you to modify your code to support those characters?
Regards,
escape parameters before build shell command will help.
I added a little debugging to snmp_builder.php and also added -LE 2 (do not log message below certain priority level")
I inserted debug to all snmpcommands (snmpget & snmptranslate)
file_put_contents('/tmp/snmpbuilder.log', "<!-- $cmd -->\n", FILE_APPEND);
and from log lines I can now see the commands. I think the problem causing command is
<!-- snmpget -LE 2 -v 2c -c public -M /var/www/zabbix/snmp_builder/mibs:/usr/share/snmp/mibs -m ALL 127.0.0.1 cgspLinkState.""TSF-INSTANCE"."TO-TSS-ITP".0" -->
It returns when ran on command line without "-LE 2"
cgspLinkState.TSF-INSTANCE.TO-TSS-ITP.0: Unknown Object Identifier (Index out of range: TSF-INSTANCE (cgspInstNetwork))
Well there is such an item on SNMP tree as it was displayed by SNMP_BUILDER on oid view/tree.
If I may suggest for SNMP_BUILDER it would be much easier to have table indexes (oidtree etc) in numerical OID-format. Those will not lie and have conversion problems. For user value text you can convert them to human readable, but maintain all internally with numeric. Also add Zabbix items with numbers.
As there might be missmatch on mib-files, and with mib files you need extra cpu for extra conversion.
giapnguyen
24-02-2010, 07:37
I added a little debugging to snmp_builder.php and also added -LE 2 (do not log message below certain priority level")
I inserted debug to all snmpcommands (snmpget & snmptranslate)
file_put_contents('/tmp/snmpbuilder.log', "<!-- $cmd -->\n", FILE_APPEND);
and from log lines I can now see the commands. I think the problem causing command is
<!-- snmpget -LE 2 -v 2c -c public -M /var/www/zabbix/snmp_builder/mibs:/usr/share/snmp/mibs -m ALL 127.0.0.1 cgspLinkState.""TSF-INSTANCE"."TO-TSS-ITP".0" -->
It returns when ran on command line without "-LE 2"
cgspLinkState.TSF-INSTANCE.TO-TSS-ITP.0: Unknown Object Identifier (Index out of range: TSF-INSTANCE (cgspInstNetwork))
Well there is such an item on SNMP tree as it was displayed by SNMP_BUILDER on oid view/tree.
If I may suggest for SNMP_BUILDER it would be much easier to have table indexes (oidtree etc) in numerical OID-format. Those will not lie and have conversion problems. For user value text you can convert them to human readable, but maintain all internally with numeric. Also add Zabbix items with numbers.
As there might be missmatch on mib-files, and with mib files you need extra cpu for extra conversion.
I really understand the problem, index value with double quote will broke shell command. Could you try to escape the command to fix it (in sell command)?
But main problem is snmptable (from NET-SNMP) may have issue that get weird index values and it out of my scope. I'm considering write my own snmptable.
:confused:
If net-snmp snmptable is a 'failure', could following code help from
http://php.net/manual/en/function.snmprealwalk.php
<?php
$a = snmptable("10.1.1.1", "public", ".1.3.6.1.2.1.4.21") or die("error");
print_r($a);
$a = snmptable("10.1.1.1", "public", ".1.3.6.1.2.1.2.2") or die("error");
print_r($a);
function snmptable($host, $community, $oid) {
// TODO: get original state and restore at bottom
snmp_set_oid_numeric_print(TRUE);
snmp_set_quick_print(TRUE);
snmp_set_enum_print(TRUE);
$retval = array();
$raw = snmprealwalk($host, $community, $oid) or die("snmptable: unable to walk OID $oid");
$prefix_length = 0;
foreach ($raw as $key => $value) {
if ($prefix_length == 0) {
// don't just use $oid's length since it may be non-numeric
$prefix_elements = count(explode('.',$oid));
$tmp = '.' . strtok($key, '.');
while ($prefix_elements > 1) {
$tmp .= '.' . strtok('.');
$prefix_elements--;
}
$tmp .= '.';
$prefix_length = strlen($tmp);
}
$key = substr($key, $prefix_length);
$index = explode('.', $key, 2);
isset($retval[$index[1]]) or $retval[$index[1]] = array();
isset($firstrow) or $firstrow = $index[1];
$retval[$index[1]][$index[0]] = $value;
}
// check for holes in the table and fill them in
foreach ($retval[$firstrow] as $key => $tmp) {
foreach($retval as $check => $tmp2) {
if (! isset($retval[$check][$key])) {
$retval[$check][$key] = '';
}
}
}
return($retval);
}
?>
Above code should use snmp v2 function (snmp2_real_walk) - I think it should he achieved with a simple fix..
I really understand the problem, index value with double quote will broke shell command. Could you try to escape the command to fix it (in sell command)?
Hooray, with quoting it works..
snmpget -On -v 2c -c public -M /var/www/zabbix/snmp_builder/mibs:/usr/share/snmp/mibs -m ALL 127.0.0.1 cgspLinkState.\"TSF-INSTANCE\".\"TO-TSS-ITP\".0
.1.3.6.1.4.1.9.9.336.1.6.1.1.3.12.84.83.70.45.73.7 8.83.84.65.78.67.69.10.84.79.45.84.83.83.45.73.84. 80.0 = INTEGER: available(1)
But note, the original command had double double quotes, with those above fails.
Original index was: ""TSF-IN ... ITP".0"
Here is a quick fix for my case. But does it break something else?
// idx is number or string thank danrog
if (preg_match('/^[0-9]+$/', $idx)) {
$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx";
} else {
#$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.\"".$idx."\"";
$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx";
}
$cmd = preg_replace('/"/','\\\\"',$cmd);
file_put_contents('/tmp/snmpbuilder.log', "<!-- $cmd -->\n", FILE_APPEND);
echo "<!-- $cmd -->\n";
$results = exec($cmd);
- I removed the double quotes in original non-numeric-oid snmpget
- Replaced all found double quotes with escaped ones
- Some debugging (file & generated html-code)
giapnguyen
25-02-2010, 06:58
Here is a quick fix for my case. But does it break something else?
// idx is number or string thank danrog
if (preg_match('/^[0-9]+$/', $idx)) {
$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx";
} else {
#$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.\"".$idx."\"";
$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx";
}
$cmd = preg_replace('/"/','\\\\"',$cmd);
file_put_contents('/tmp/snmpbuilder.log', "<!-- $cmd -->\n", FILE_APPEND);
echo "<!-- $cmd -->\n";
$results = exec($cmd);
- I removed the double quotes in original non-numeric-oid snmpget
- Replaced all found double quotes with escaped ones
- Some debugging (file & generated html-code)
That's great, but snmptable definitely have an issue to give correct snmp values. I look forward your code to integrate new version. In fact, snmptable is a series of snmpwalk, I think.
That's great, but snmptable definitely have an issue to give correct snmp values. I look forward your code to integrate new version. In fact, snmptable is a series of snmpwalk, I think.
snmptable uses snmp getnext or getbulk requests, at least according to manpage (so essentially it uses the same mechanism as snmpwalk).
if you have problems with snmptable, i'd suggest taking them to net-snmp developers and working with fixing problems upstream instead of reinventing the wheel :)
giapnguyen
25-02-2010, 07:23
snmptable uses snmp getnext or getbulk requests, at least according to manpage (so essentially it uses the same mechanism as snmpwalk).
if you have problems with snmptable, i'd suggest taking them to net-snmp developers and working with fixing problems upstream instead of reinventing the wheel :)
That's reason, i'm considering report net-snmp issue or write new one. Indexes is one of issue, snmptable try to convert all dot-type indexes into string but in some cases, it give mean-less strings (non printable characters).
That's reason, i'm considering report net-snmp issue or write new one. Indexes is one of issue, snmptable try to convert all dot-type indexes into string but in some cases, it give mean-less strings (non printable characters).
sorry for being ignorant here - i haven't followed whole thread - but doesn't "-On" help any ?
Here is a quick fix for my case. But does it break something else?
// idx is number or string thank danrog
if (preg_match('/^[0-9]+$/', $idx)) {
$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx";
} else {
#$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.\"".$idx."\"";
$cmd = "snmpget -LE 2 -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx";
}
$cmd = preg_replace('/"/','\\\\"',$cmd);
file_put_contents('/tmp/snmpbuilder.log', "<!-- $cmd -->\n", FILE_APPEND);
echo "<!-- $cmd -->\n";
$results = exec($cmd);
- I removed the double quotes in original non-numeric-oid snmpget
- Replaced all found double quotes with escaped ones
- Some debugging (file & generated html-code)
I ran into this too and if I remember correctly, this wasn't enough to fix it completely (at least for me). I didn't post any of my other attempts to fix this as nothing has worked thus far. snmptranslate is translating the string based OID just fine, however, I still cannot add it to the template (\ and " issues I think). Also, I was using the php function addslashes($var) in another part of snmp_builder due to my other problems I just didn't add that to my original post.
Well I finally got energy to fix the rest of snmp_builder as I needed to add some devices to monitoring. The fix was quite similar to previous fix, escape " characters for command line
So you need similar fix to "get_oid_from_name", I attached the full method. But you can easily just add the $name=preg_replace...
function get_oid_from_name($name)
{
$name = preg_replace('/"/','\\\\"',$name);
file_put_contents('/tmp/snmpbuilder.log', "<!-- snmptranslate -LE 1 -M -m ALL -On $name -->\n", FILE_APPEND);
echo "<!-- snmptranslate -LE 1 -M -m ALL -On $name -->\n";
$oid = exec("snmptranslate -LE 1 -M ".MIBS_ALL_PATH." -m ALL -On $name");
if (preg_match('/[0123456789\.]+/', $oid))
return $oid;
else
return null;
}
Now I am able to save keys to Zabbix items. And snmp_builder.php works at least in my case. I have not used it to add router interfaces, but I guess those should work as I've just added escape characters to shell commands
" => \\" (but PHP requires " => \\\\")
Has anybody got a clue why i get this error:
Cannot find module (SNMPv2-SMI): At line 8 in /usr/share/snmp/mibs/SYMANTEC-EMAIL-SECURITY.mib
Has anybody got a clue why i get this error:
Cannot find module (SNMPv2-SMI): At line 8 in /usr/share/snmp/mibs/SYMANTEC-EMAIL-SECURITY.mib
Sure. Symantec MIB depends on SNMPv2-SMI MIB. And SNMPv2-SMI mib is not found on path. Search it from the net, and save it somewhere in SNMP MIB PATH. For example the ones you have stored in snmp_builder.php.
Example paths are:
../snmp_builder/mibs/
/usr/share/snmp/mibs/
I downloaded SNMPv2-SMI.mib from internet
But still there is an error:
Attempt to define a root oid (iso): At line 9 in /usr/share/snmp/mibs/SNMPv2-SMI.mib
I downloaded SNMPv2-SMI.mib from internet
But still there is an error:
It seems that your SNMP mib tries to define new root. So the SNMPv2 MIB probably is not correct one? Are you using net-snmp, try mibs from there.
--
MIBs are are a tree structure. SNMPv2-SMI.mib has it own dependencies. So you need to download all MIBs. And some other MIB probably defines root OID, so your installed MIB cannot do it.
This addon works great, thank you for making this.
I request only one feature if possible; a toggle for SNMP v2c or v1 queries. There are many devices that currently still use v1 as default/standard, NetApp filers being one.
Thanks and keep up the great work.
jscleveland
09-04-2010, 20:53
.iso.org.dod.internet.private.enterprises.trango.t bw.m5830sap.su.suInfoTable.suInfoEntry.suRSSIFromS U.0: Unknown Object Identifier (Index out of range: 0 (suID))
It seems like the '0' on the end of the OID is the problem because walking the OID without the '0' works fine:
snmpwalk -Os -c <mystring> -v 1 <myIP> 1.3.6.1.4.1.5454.1.20.3.6.1.16
enterprises.5454.1.20.3.6.1.16.7 = INTEGER: -70
enterprises.5454.1.20.3.6.1.16.11 = INTEGER: -73
enterprises.5454.1.20.3.6.1.16.21 = INTEGER: -72
enterprises.5454.1.20.3.6.1.16.24 = INTEGER: 0
Any idea why the '0' gets appended?
How to download the files?
Hi, this might be a very very stupid question but how can I easily download snmpbuilder? In the text on your page it says unzip snmp_builder.zip. Where is the zip?
"Download Source" button at the right-top :D
LOL :)
Thanks a lot. Was looking for it but couldn't find it. :)
Hi All!
Zabbix 1.8.2 + freebsd 8.0
SNMP Builder show MIBs tree, but don't show mib tables.
In httpd-error.log:
Must have exactly one table name
USAGE: snmptable [OPTIONS] AGENT TABLE-OID
Version: 5.4.2.1
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
-h, --help display this help message
................................................[all keys for snmptable command]
Must have exactly one table name
USAGE: snmptable [OPTIONS] AGENT TABLE-OID
Version: 5.4.2.1
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
In what there can be a problem? Please help!
Great tool! That should be integrated into the core.
Just trying it out because i want to monitor a BlackBerry server.
Added the BB MIB to the mibs directory and started browsing around. But whenever i click on a value (like the "routerBaseStatsPropertydevicesConnected" you see on the screen shot) i always get a "Wrong Type (should be INTEGER): NULL"
Executed snmpwalk from my Zabbix box and i get the correct value:
snmpwalk -v2c -c xxxx 172.30.3.4 .1.3.6.1.4.1.3530.6.7.35.20.5.1.4
SNMPv2-SMI::enterprises.3530.6.7.35.20.5.1.4.1.14 = INTEGER: 0
Don't know if the MIB itself is wrong ore something within snmp_builder.
Or is it becuase snmp_builder tries to access:
.1.3.6.1.4.1.3530.6.7.35.20.5.1.4.0
but the value is here:
.1.3.6.1.4.1.3530.6.7.35.20.5.1.4.14
Thanks
Urs
Hy
I tried to install snmp_builder, but got a following error..If I change label in menu.inc.php to existing label (for example S_LOCALES) it works well...
The system zabbix 1.8.2.. Any idea?
thanks
zoltan
asterroid
05-05-2010, 11:29
Hi, great stuff.
But I have a problem... I install it and when I click "SNMP Builder" of 'Administration Menu', in /var/log/httpd/error_log shows:
"PHP Fatal error: Class 'CWidget' not found in /var/www/html/snmp_builder.php on line 293, referer: http://zabbix.xxx.com/snmp_builder.php?sid=0267e50311f5d4ab."
Where is CWidget class? What's it?:confused:
Thanks you for all.
Any chance we'll see a version of this released soon which works with 1.8.2? I really like this addon.
Thanks!
Hi All!
Zabbix 1.8.2 + freebsd 8.0
SNMP Builder show MIBs tree, but don't show mib tables.
In httpd-error.log:
Must have exactly one table name
USAGE: snmptable [OPTIONS] AGENT TABLE-OID
Version: 5.4.2.1
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
-h, --help display this help message
................................................[all keys for snmptable command]
Must have exactly one table name
USAGE: snmptable [OPTIONS] AGENT TABLE-OID
Version: 5.4.2.1
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
OPTIONS:
In what there can be a problem? Please help!
I had a similar problem. It was connected with the fact that the script snmp_builder.php option to snmptable were listed in the wrong sequence. Verified in:
> snmptable -v 2c -c public -M /usr/local/share/snmp/mibs/ -m CISCO-RTTMON-MIB 172.17.10.1 rttMonCtrlOperTable -Ci -CH -Cf \",\"
Must have exactly one table name
USAGE: snmptable [OPTIONS] AGENT TABLE-OID
Version: 5.4.2.1
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net
, but:
> snmptable -v 2c -c public -M /usr/local/share/snmp/mibs/ -m CISCO-RTTMON-MIB -Ci -CH -Cf \",\" 172.17.10.1 rttMonCtrlOperTable
1","0:0:01:53.85","","0:0:00:00.00","10816","true","false","false","32442","2147483647 seconds","active","false
2","0:0:01:53.87","","0:0:00:00.00","10816","false","false","false","100710","2147483647 seconds","active","false
3","0:0:01:53.89","","0:0:00:00.00","10816","false","false","false","32143","2147483647 seconds","active","false
4","0:0:01:53.91","","0:0:00:00.00","10592","false","false","false","60158","2147483647 seconds","active","false
So I changed the line:
exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid -Ci -Ch -Cf \",\"", $results); like so:
exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -Ci -Ch -Cf \",\" -m ALL $server_ip $oid ", $results);, and:
exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid -Ci -CH -Cf \",\"", $results); like so:
exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -Ci -CH -Cf \",\" -m ALL $server_ip $oid ", $results); in file snmp_builder.php (lines 489 and 492). I hope this helps and you
PS Sorry for my English - it's all google translate
I hope this helps and you
PS Sorry for my English - it's all google translate
Great Thanks!!
It helps me!
giapnguyen
14-05-2010, 07:34
Any chance we'll see a version of this released soon which works with 1.8.2? I really like this addon.
Thanks!
Unfortunately, I've switched my job and don't touch zabbix server any more :(. But I will try to revise 1.8.2 to help you guys soon.
I hope someone adopt the project for me. It really helpful. Some useful features I suggest
- Enter a oid to create zabbix item; sometimes you know an oid and don't want to navigate a tree to add new one. SNMPBuild help to convert oid into item automatically.
- Search oid by description, oid name so on
- Goto mass update after submit items.
asterroid
16-05-2010, 11:19
Hi!
What CWidget hidden secret?
[QUOTE=giapnguyen;64585]Unfortunately, I've switched my job and don't touch zabbix server any more :(. But I will try to revise 1.8.2 to help you guys soon.
I hope someone adopt the project for me. It really helpful.
Sure is helpful, and depressing that it won't receive the attention it's due after such a promising start. Zabbix, if you want to jump out way ahead of the other wannabe-Zabbixes (and match what WhatsUp, Openview, etc can already do with SNMP) - take SNMP seriously, adopt this and make it part of Zabbix!
thx for your hard work, giapnguyen!
Wonderer
25-06-2010, 16:51
Any chance we'll see a version of this released soon which works with 1.8.2? I really like this addon.
To make it work on the latest 1.8.3 (and probably 1.8.2) do following changes:
in the file snmp_builder.php
change
$page['scripts'] = array('../snmp_builder/Tree.js','../snmp_builder/snmp_builder.js','../snmp_builder/DynTable.js','scriptaculou
s.js?load=effects,dragdrop');
to the
$page['scripts'] = array('Tree.js','snmp_builder.js','DynTable.js','e ffects.js','dragdrop.js');
in the file jsLoader.php
change
'class.curl.js' => '',
'class.rpc.js' => '',
'class.pmaster.js' => ''
);
to the
'class.curl.js' => '',
'class.rpc.js' => '',
'class.pmaster.js' => '',
'Tree.js' => '../snmp_builder/',
'snmp_builder.js' => '../snmp_builder/',
'DynTable.js' => '../snmp_builder/'
);
Also, to allow using of the different SNMP port instead of default 161 one in the Server: text box
file snmp_builder.php
change
if (!preg_match('/^[0-9,\.]+$/i', $_REQUEST['server_ip']))
to the
if (!preg_match('/^[:0-9,\.]+$/i', $_REQUEST['server_ip']))
Than you can use addresses like 192.168.1.1:8161
Hello!
I want to create zabbix-template for the switch ZyXEL GS-3012F. I installed the module "SNMP builder". When I select the mib from the list-MIB, I have an error:
.- (is a reserved word): At line 481 in /usr/local/www/zabbix/snmp_builder/mibs/380LR1C0 mib - (is a reserved word): At line 481 in /usr/local/www/zabbix/snmp_builder/mibs/380LR1C0.mib
I don't understand this error. Dashes is inline comments.
/usr/local/www/zabbix/snmp_builder/mibs/380LR1C0.mib:
471: ---------------------------------------------------------------------
472: --
473: -- dot1x Setup
474: --
475: -- for AAA Service
476: -- 1. rename radius8021xSetup as dot1xSetup
477: -- 2. remove radiusLoginPrecedence (AAA Service: authentication login)
478: -- 3. remove radiusAnd8021xServer (AAA Service: radius server setup)
479: -- 4. DO NOT change oid for backward compatible
480: --
481: ---------------------------------------------------------------------
482: -- dot1xSetup
483: dot1xSetup OBJECT IDENTIFIER ::= { gs3012f 7 }
I attached my MIB-file for ZyXEL GS-3012F.
Version Zabbix: 1.8.2
Verison net-snmp: 5.5
OS: FreeBSD 8.0
Help me please! :)
Wonderer
05-07-2010, 15:34
This is the pure net-snmp error, and is not related with the SNMP Builder.
Anyway I have fixed all errors (at least I hope so).
Please check the attached file.
Also do not forget that this MIB also requires the following other MIBs to work :
Cannot find module (P-BRIDGE-MIB): At line 19 in /usr/share/snmp/mibs/ZYXEL-GS3012F-MIB.txt
Cannot find module (Q-BRIDGE-MIB): At line 21 in /usr/share/snmp/mibs/ZYXEL-GS3012F-MIB.txt
Cannot find module (BRIDGE-MIB): At line 23 in /usr/share/snmp/mibs/ZYXEL-GS3012F-MIB.txt
Cannot find module (DISMAN-PING-MIB): At line 31 in /usr/share/snmp/mibs/ZYXEL-GS3012F-MIB.txt
Cannot find module (BRIDGE-MIB): At line 42 in /usr/share/snmp/mibs/ZYXEL-GS3012F-MIB.txt
HunterSeeker
12-08-2010, 20:05
I'd love to be able to use something like this. I attempted the above-mentioned fix but I don't believe I have a jsLoader.php file on my zabbix 1.8.2. Presently SNMPBuilder shows up, no errors occur, at least none that I can see from the web GUI. Input of information results in no output though, the tables remain blank.
please someone get this working for 1.8.2 :(
its working - http://www.zabbix.com/forum/showpost.php?p=66660&postcount=108
its working - http://www.zabbix.com/forum/showpost.php?p=66660&postcount=108
Thanks! I'll work on that this weekend :)
Does it works on newer builds like 1.8.3?
Does it works on newer builds like 1.8.3?
yes the fix is actually for 1.8.3 but they suggest that it will work on 1.8.2 too.. So it you're good to go, i'll test on 1.8.2 this weekend and inform.
a.vaskin
16-08-2010, 12:39
Hi all! Please help me to search mibs for hp printers (CLJ 2600n, CLJ 3525, LJ3030, Lj3300). I trayed rfc-1759, clj4500, but data recieved not correctly.
nelsonab
16-08-2010, 13:24
Hi all! Please help me to search mibs for hp printers (CLJ 2600n, CLJ 3525, LJ3030, Lj3300). I trayed rfc-1759, clj4500, but data recieved not correctly.
A.vaskin, start a new thread, please do not hijack this one. Also I would suggest including more information about what you have tried and what you are trying to accomplish, maybe someone will have some ideas for you then.
HunterSeeker
16-08-2010, 17:49
Hi everyone!
Good job fixing this on 1.8.2! I got most everything working. I hope this add-on gets picked up by Zabbix, it's the one thing other products have over it.
Anyway, I have a BladeCenter in my environment which I am trying to monitor using SNMP, I've added the proper MIBS to the directory. It seems though, that something has gone wrong. Whenever I try to get info out of the BladeCenter, I only get blank tables. Apache is spitting out the following error:
Timeout: No Response from x.x.x.x
Timeout: No Response from x.x.x.x
This does not happen when I do an snmpwalk manually, for example:
snmpwalk -v 1 -m BLADE-MIB -Os -c community x.x.x.x mmTemp
results in the expected:
mmTemp.0 = STRING: "36.00 Centigrade"
HunterSeeker
18-08-2010, 00:26
For anyone who might have the problem I did in the future, I've figured it out! It turns out SNMP Builder uses SNMP v2c by default. We use v1 in my environment. Adjusting snmp_builder.php to use v1 allowed the BladeCenter to respond. It's kind of a niche issue but hopefully someone finds this solution useful.
Hi Guys
I have made the suggested changes to both ;files, but I'm now receiving the error 'TafelTree is undefined'
I've checked the changes a few times and they are correct. I will admit I understand nothing about what is actually going on in this code :o but could someone point me in the right direction?
I'm guessing there is a field 'TafelTree' that the code is seeing, but does not know what to do with it because I've left it out somewhere...
Ok, so I managed to solve this. For some reason I had to put it in this order.
DynTable.js
snmp_builder.js
Tree.js
I'm trying to get this working... I'm trying to apply the patch for 1.8.2 but I don't see a jsLoader.php ...
Where can I find it? I'm also getting this error.
Cannot find module (SNMPv2-SMI): At line 149 in /usr/local/share/zabbix/snmp_builder/mibs/powernet401.mib
Any help appreciated.
nm, i think i figured it out.
nm, i think i figured it out.
I figured out why I was getting that error... Cleared it up.. but I can't get SNMP Builder to load the .MIB files...
If I select one everything shows up blank... I don't have jsLoader.php --- any help appreciated :(
Web site is down, where can I get latest version of this tool?
you can download it at: http://github.com/giapnguyen/snmpbuilder
Thank you! Hope it works on 1.8.3. :)
I figured out why I was getting that error... Cleared it up.. but I can't get SNMP Builder to load the .MIB files...
If I select one everything shows up blank... I don't have jsLoader.php --- any help appreciated :(
Hi,
we are running zabbix 1.8.2 on CentOs. I had several problems to get it working:
1. correct path to JS files:
$page['scripts'] = array('../snmp_builder/Tree.js','../snmp_builder/snmp_builder.js','../snmp_builder/DynTable.js','scriptaculous/effects.js','scriptaculous/dragdrop.js');
Please use Firefox and Firebug to verify that JS files are loading correctly
2. I found in /var/log/http/zabbix-error_log
PHP Fatal error: Call to undefined function json_encode() in /var/www/html/zabbix/snmp_builder.php
So I had to
yum -y install php-pecl-json
don't forget to restart httpd
3. The a part of the tree showed up but I had an error with snmptranslate which was installed but could not be executed, so I had to change all exex paths to
/usr/local/bin/snmptranslate
Thank you! Hope it works on 1.8.3. :)
Check this thread, there are some changes to JS for 1.8.3
Check this thread, there are some changes to JS for 1.8.3
I have zabbix 1.8.3. If you select any MIB is issued a blank screen. It seems in this version of SNMP Builder does not work :(
The fix for this is a few posts back.
scatmanoleg
07-10-2010, 09:59
Hi,
we are running zabbix 1.8.2 on CentOs. I had several problems to get it working:
1. correct path to JS files:
$page['scripts'] = array('../snmp_builder/Tree.js','../snmp_builder/snmp_builder.js','../snmp_builder/DynTable.js','scriptaculous/effects.js','scriptaculous/dragdrop.js');
Please use Firefox and Firebug to verify that JS files are loading correctly
2. I found in /var/log/http/zabbix-error_log
PHP Fatal error: Call to undefined function json_encode() in /var/www/html/zabbix/snmp_builder.php
So I had to
yum -y install php-pecl-json
don't forget to restart httpd
3. The a part of the tree showed up but I had an error with snmptranslate which was installed but could not be executed, so I had to change all exex paths to
/usr/local/bin/snmptranslate
we are running zabbix 1.8.3 on OpenSUSE (Zabbix Appliance on VMWare)
we do this, but MIB tree is empty.
on /var/log/apache2/error_log - no errors
3350
I confirm, I have the same.
/var/log/httpd-error.log no errors.
FreeBSD 8.1-RELEASE, Zabbix 1.8.3.
TranceMaker
15-10-2010, 09:53
deleted X_x
TranceMaker
15-10-2010, 12:02
Hello!
i have error
.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?
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?? :confused:
subba5678
21-10-2010, 12:40
hey,
i downloaded the snmp bulider . Can you please help me how to install it
Thanks,
Subbu
zabbixuser85
25-10-2010, 13:24
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 ?
http://img819.imageshack.us/img819/2925/snmpbuilder.jpg (http://img819.imageshack.us/i/snmpbuilder.jpg/)
Uploaded with ImageShack.us (http://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
Hi,
In order to have a working SNMP builder with 1.8.4rc1 PHP frontend, I have made following patches:
# 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');
and
# 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
zabbixuser85
27-10-2010, 10:26
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
greenogre
27-10-2010, 14:38
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"
Hi,
In order to make "Save" in "Item List" work, I had to make one more patch:
# 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
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?? :confused:
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
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
mpalau.z3
12-11-2010, 11:31
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:
3453
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!!!
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/monitor/snmp/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
zabb_neil
22-12-2010, 10:16
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?
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.php?ver=1.8.4&lang=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.php?ver=1.8.4&lang=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.php?ver=1.8.4&lang=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/ietab@ip.cn/components/nsIeTabWatchFactory.js:244
and after this its shows this message again:Script: http://10.80.145.50/zabbix/jsLoader.php?ver=1.8.4&lang=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.
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
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.php?p=66660&postcount=108
That should work by now (if you have other problems, check the thread or http://www.zabbix.com/wiki/howto/monitor/snmp/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
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.php?ver=1.8.4&lang=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.php?ver=1.8.4&lang=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.php?ver=1.8.4&lang=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/ietab@ip.cn/components/nsIeTabWatchFactory.js:244
and after this its shows this message again:Script: http://10.80.145.50/zabbix/jsLoader.php?ver=1.8.4&lang=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.
k, found out this comes because the size of the file, is it anyway that i can speed up the buffer of the script or remove the warnings i get ?
Here you have a prepared version for 1.8.3, just remove the xml extension.
It fixes the loading of JS (as mentioned in this thread).
Is not working for me, but should work in other systems.
And, could you post which web server, php version, json version and agent version are you using and if snmp_builder works for you?
I want to contrast with my system so I can discard options.
@giapnguyen
Could it be that your modified DynTable has some glitches?
Couldn't get it to work, but it seems to be gathering data as expected.
hi all,
i had following the above installation, then i get the following result.
Many thanks for help.
你好啊,你在哪里?我珠海
hi all,
i had following the above installation, then i get the following result.
Many thanks for help.
你好啊,你在哪里?我珠海
nima0102
23-01-2011, 11:29
Hi
I intend install snmpbuilder on zabbix-1.8.3.Is there any reported issue in patching on this version??
for this version, DO I have to patch other files in zabbix source?
Thanks in advance
Hi
I intend install snmpbuilder on zabbix-1.8.3.Is there any reported issue in patching on this version??
for this version, DO I have to patch other files in zabbix source?
Thanks in advance
AFAIK, you only need to deploy the provided files for snmp_builder, modify the snmp_builder.php to fix paths, change jsLoader.php to include needed libraries and add the link to snmp_builder.
nima0102
26-01-2011, 09:52
Thanks for your attention
I have the same problem.
3453
Thanks in advance
I'm trying to get this working on 1.8.4... I've got php-pecl-json installed
but I get a blank page (no oid table) when I input an IP and select the MIB. I can browser the device fine with snmpwalk. No errors that I can spy in httpd/error_log or access_log.
luisdavim
06-02-2011, 20:15
I've modified the version from https://github.com/giapnguyen/snmpbuilder to add a dropbox for one to select the snmp version to use.
I'm trying to get this working on 1.8.4... I've got php-pecl-json installed
but I get a blank page (no oid table) when I input an IP and select the MIB. I can browser the device fine with snmpwalk. No errors that I can spy in httpd/error_log or access_log.
I'v got the same error. Zabbix 1.8.3
http://habreffect.ru/files/151/7f0827ae2/screen.png
Output of
<?php
exec("snmptranslate -Ts -M /var/www/localhost/htdocs/snmp_builder/mibs -m ALL 2>&1", $results);
print_r($results);
?>
is going without errors...
luisdavim
18-02-2011, 11:12
check the apache error logs...
nginx, not Apache, it's clear. Nothink in error log...
I've got working snmpbuilder on 1.8.4, just added the following variables to $availableJScripts array in jsLoader.php:
'Tree.js' => '../snmp_builder/',
'snmp_builder.js' => '../snmp_builder/',
'DynTable.js' => '../snmp_builder/'
and changed $page['scripts'] variable in snmp_builder.php to the following:
$page['scripts'] = array('Tree.js','snmp_builder.js','DynTable.js','e ffects.js','dragdrop.js');
But now I have another issue - I can't to save snmp-variables as items - nothing happens then "save" button is pressed.
hi all,
thank you for this wonderful product.
i'm using snmpbuilder on zabbix 1.8.1, everything works well but save and clear list buttons.
i've already tried the fix for zabbix 1.8.4rc1 but it doesn't work.
how can i solve?
thank you
...
i've installed zabbix 1.8.4 on another server and i've the same issue with the save button even if i try to use the fix of the wiki.
hi,
same on here - installation no problem. but blank page.
sorry!
it was my mistake! :-(
i clicked cells in the first column(oid/name), but it was not correct!
Clicking other cell everithing works fine.
Sometimes items can not be added because the snmpget returns the same OID for them.
For example:
http://www.zabbix.com/forum/attachment.php?attachmentid=3826&stc=1&d=1299676639
This changes allows tix them.
In snmp_builder.php function get_oid_value:
1. Add -Os parameter:
// idx is number or string thank danrog
if (preg_match('/^[0-9]+$/', $idx)) {
$cmd = "snmpget -Os -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.$idx";
} else {
$cmd = "snmpget -Os -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid.\"".$idx."\"";
}
2. Add $MIB variable
$MIB = $_REQUEST["mib"];
3. Change $row variable:
//exampe: IP-MIB::ipOutRequests.0 = Counter32: 12303729
if (preg_match('/^(\S+) = (\S+): (.+)$/i', $results, $matches)) // full information
{
//$row = array($matches[1], $matches[2], $matches[3]);
// change to:
$row = array("$MIB::$oid.$idx", $matches[2], $matches[3]);
}
else if (preg_match('/^(\S+) = (\S+):$/i', $results, $matches)) //no value
{
//$row = array($matches[1], $matches[2],'');
// change to:
$row = array("$MIB::$oid.$idx", $matches[2],'');
}
else if (preg_match('/^(\S+) = (.+)$/i', $results, $matches)) //no type
{
//$row = array($matches[1], '',$matches[2]);
// change to:
$row = array("$MIB::$oid.$idx", '',$matches[2]);
}
After changes:
http://www.zabbix.com/forum/attachment.php?attachmentid=3827&stc=1&d=1299676639
How can I install the SNMP builder on debian through the command line?
sergitux
14-03-2011, 11:09
Greetings everyone I am new here.
I just put the snmp builder (great job). I wonder if someone gives the error:
Can not find module (SNMPv2-SMI): At line 21 in / usr / share / snmp / mibs / txt-MIB READYNAS Can not find module (SNMPv2-SMI): At line 21 in / usr / share / snmp / mibs / READYNAS -MIB.txt
It happens all the MIBS and I get when I select one of them.
Sorry for my english.
greenogre
14-03-2011, 21:17
Hi,
I have SNMP-BUILDER with all the patches up to DeDA's patch above with Zabbix 1.8.4. OS is CentOS 5.5, PHP 5.1.6.
Snmp-builder works well (mostly) in reading and selecting the OIDs to build a template. Clicking the "save" button results in a series of errors returned on the web UI, one for each item to be saved:
"No host with hostid=[xx]"
This "hostid" is not even similar to the template's "hostid" in the database (10239) but xx equals the index number of the template selected from the drop-down list on the snmp-builder page. No errors posted to httpd or Zabbix logs.
From the page source html at the browser:
"<input type="hidden" name="form_refresh" id="form_refresh" value="1" />Template: <select id="templateid" name="templateid" class="select" size="1">//....snip....//<option value="86" title="Template_Cisco_CCME">Template_Cisco_CCME</option> //....snip//
I have tried to track the "templateid" var through the scripts but I'm afraid my php skills are very weak. :-(
If any one could point me in the right direction to troubleshoot further or share a similar experience, it would be appreciated.
regards,
Drew
where can i download this?! install-guide?
get it into the official zabbix-code?
Hi there,
I've tried snmp_builder, it's so great to browse MIB inside Zabbix (1.8.4), a real pleasure ^^
But I've got issues when I want to save to template, I have this message :
- Without DeDa modification:
"No host with hostid=[xx]" (Like greenogre)
- With DeDa modification (I've probably missmatch the patching part but I think I've exactly followed instructions : / ) :
{"error":"Oid is null NETASQ-VPNSA-MIB::.iso.org.dod.internet.mgmt.mib-2.system.sysDescr.0"}
Any ideas please ?
Shad0w :
You can download it and follow instructions here : https://github.com/giapnguyen/snmpbuilder
This is not a final version, editing files for trying to get it to work is a part of the game, I prefer to inform you.
hannibal20
23-03-2011, 12:52
regarding the "No host with hostid=[xx]" problem look at:
http://www.zabbix.com/wiki/howto/monitor/snmp/snmp_builder
The patch in the paragraph:
In order to make “Save” in “Item List” work
made it work for me.
Thank you, it works great !
Hi!
Help me please. I've installed snmp_builder, red "http://www.zabbix.com/wiki/howto/monitor/snmp/snmp_builder", but still it doesn't work. My "oid tree" doesn't show any information. Could you help me please?
3934
I'm sorry for my bad English. I'm really need in your assistance.Please.
3936
[root@orion /]# uname -a
FreeBSD orion.vtt.net 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
[root@orion /]# php -v
PHP 5.2.17 with Suhosin-Patch 0.9.7 (cli) (built: Mar 23 2011 15:09:37)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
[root@orion /]#
net-snmp-5.5_4
Hello everyone,
i have a question about the snmp_builder. I installed it as described and now i can't see a OID Tree or something else.
http://img833.imageshack.us/img833/2466/snmpbuilder1.jpg (http://img833.imageshack.us/i/snmpbuilder1.jpg/)
I dont know where the error is, because i dont get one.
System Data:
Debian 6.0.1
Zabbix 1.8.5
PHP5
Net-SNMP 5.4.3
I hope you can help me or point me any error i do.
Thanks and Regards
imo
PS: Sry for my bad english :)
Check patch on zabbix documentation side, or read whole thread..
some pages before there ara link..
regards,
zoltan
captaincarisma
04-05-2011, 14:01
when I click on save get this message
http://img7.imageshack.us/img7/8316/schermata2te.png
captaincarisma
10-05-2011, 11:07
when I click on save get this message
http://img7.imageshack.us/img7/8316/schermata2te.png
help me please!!!
gospodin.horoshiy
12-05-2011, 20:02
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/monitor/snmp/snmp_builder
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:
captaincarisma
23-05-2011, 12:44
Try this patch^
http://www.zabbix.com/wiki/howto/monitor/snmp/snmp_builder
In which file should I apply the patch?
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?
I worked around the issue by replacing the commas in a few places with the string "@@":
exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid -Ci -Ch -Cf \"@@\"", $results
);
$headers = explode("@@",$results[0]);
unset($results);
exec("snmptable -v 2c -c $community -M ".MIBS_ALL_PATH." -m ALL $server_ip $oid -Ci -CH -Cf \"@@\"", $results
);
foreach ($results as $line)
{
$row = explode("@@",$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!
Carianha
27-05-2011, 22:31
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
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 :)
marcel666
02-06-2011, 22:11
Same problem that ZabbSer has.
I´m using the 1.8.5
Someone can help?
Thanx
Just tried it on my 1.8.4 appliance and it only shows a black screen on the left.
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).
efrain02
07-06-2011, 23:31
Well it seems that we need to wait a little bit for updates
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 $oid_tree_container->addStyle("overflow: auto; background-color: rgb(255, 255, 255); height: 500px; width: 500px;");
anthonysomerset
09-06-2011, 10:50
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' => '',
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 $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...
HELP me !
http://img857.imageshack.us/img857/2199/zabbixhelp.jpg (http://imageshack.us/photo/my-images/857/zabbixhelp.jpg/)
Uploaded with ImageShack.us (http://imageshack.us)
efrain02
27-06-2011, 19:55
Thank you so much!!! now working 100% on zabbix 1.8.4 with the source of Carianha and the changes of PhilipH and anthonysomerset.
:D Thank you ;)
angel_of_devil
12-09-2011, 08:46
Can I install on Zabbix 1.8.7 ? Have anyone tried to use?
Yes, it's working fine with patch instructions for Zabbix 1.8.4 .
Where can I get a latest release of the snmp builder?
Starshiy
24-10-2011, 14:07
Where can I get a latest release of the snmp builder?
http://github.com/giapnguyen/snmpbuilder
Starshiy
24-10-2011, 14:11
Hi all!
Sorry my bad English, i'm from Russia.. ))
I have a problem with SNMP Builder - it doesn't build the OID tree of MIB files,
in httpd-error.log I see "snmptranslate: not found" but I can use snmptranslate from shell of my server.
What can I do ?
azady_part
24-10-2011, 15:57
hi guys I have a problem ... when I want to save Items in template I get a error in query the error is :
Error in query [INSERT INTO auditlog (auditid,userid,clock,ip,action,resourcetype,resou rceid,resourcename) values (768,1,1319464223,'10.0.2.1',0,15,22266,'RFC1213-MIB::sysObjectID.0')] [Duplicate entry '768' for key 'PRIMARY']
it seems auditid is duplicated I try to save in any template but it's not work...
what can I do ?
Thanks in advance
Is this plugin still working on 1.8.8? I haven't found any documentation about zabbix 1.8.8 + snmpbuilder
Is this plugin still working on 1.8.8? I haven't found any documentation about zabbix 1.8.8 + snmpbuilder
Yes, it's work.
Yes, it's work.
Thanks in advance Kostil. I was a bit confused regarding the installation method. Somebody uses the original github code, other went for a fork. Could you advice me how to go ahead?
I'll put here all the information avalaible to me right now:
Wiki Page on SNMB Builder
http://www.zabbix.com/wiki/howto/monitor/snmp/snmp_builder
Original GitHub from wiki (1.8.1 confirmed)
https://github.com/giapnguyen/snmpbuilder
Slighty modified code (1.8.1 confirmed)
https://github.com/dfishel/snmpbuilder
Up to date (1.8.4 confirmed)
https://github.com/Carianha/snmpbuilder
I collected it from few versions (Carianha,dfishel,giapnguyen) and add few lines from myself :) I could send it to you by email.
I collected it from few versions (Carianha,dfishel,giapnguyen) and add few lines from myself :) I could send it to you by email.
You would be very kind, i can send a pm with my mail.
In alternative you could attach it to the forum if allowed, i think a lot could be interested in the thing.
Thanks in advance btw!
Here are my files
snmpbuilder-zabbix1.8.8.tar.gz (http://narod.ru/disk/31989704001/snmpbuilder-zabbix1.8.8.tar.gz.html)
I collected it from few versions (Carianha,dfishel,giapnguyen) and add few lines from myself :) I could send it to you by email.
Please send to my email Dr.zlo007@i.ua.
Hi folks,
I am a newest on zabbix and snmp_builder.
Please, anyone can help me to install the module??
I've tried install but the tree show blank area, how I can fix this?
I think I has any step wrong during the instalation... Exist any easy way to instalation as "HOW TO" or a shell script?:confused:
Regards.
Hi,
Just tried to install snmp_builder in zabbix 1.8.4 but does't load anything in the tree field.
I think I had done every steps from zabbix wiki and several suggestion in the form but still no luck. My test.php works when querying snmptranslate.
Anybody could help?
Thanks.
Hi everyone!
I've tried SNMP Builder with Zabbix 1.8.5 and I've experienced a problem - I cannot save item list to a template. I've tried to modify code in snmp_builder.php according to some previous posts, but still I have a problem. When I look for errors in firefox error console I see a message: itemlist.data.toJSON is not a function. Can anybody help me?
Thanx in advance.
I've solved the problem. The reasonwas that my javascript didn't support toJSON method. So, I had to replace it with JSON.stringify. I have replaced the string json = itemlist.data.toJSON(); in snmp_builder.js with json = JSON.stringify(itemlist.data, null); and everything is working!
Maybe this post can be useful for you.
zabbixflic
12-01-2012, 11:54
Hi everybody,
same issue as apfrida.
Zabbix 1.8.10 but does't load anything in the tree field.
Does it work on 1.8.10 again ?
I have done all steps and suggestion and test.php works fine.
Anybody could help or tell me which Zabbix version to install in order
to have this wonderful (best of!) tool working ?
I didn't know "how" to catch log or debug info about what snmp_builder has done or where it stucks
I need it a lot
Thank you very much in advance. :o
Federico
Hi everybody,
same issue as apfrida.
Zabbix 1.8.10 but does't load anything in the tree field.
Federico
Do you see any error messages in the bottom of the page? For example "Cannot find module...." or anything else
zabbixflic
12-01-2012, 13:05
Do you see any error messages in the bottom of the page? For example "Cannot find module...." or anything else
Hi ksy,
not, unfortunately not.
I solved mib dependency and now I see nothing :(
Thnx
Hi ksy,
not, unfortunately not.
I solved mib dependency and now I see nothing :(
Thnx
Hi, zabbixfli. You can check for errors using firefox or chrome error console. There you can see errors concerning javascript or php. Check it while choosing MIB and provide me output plz. I've solved a similar problem that way.
zabbixflic
12-01-2012, 13:44
Hi, zabbixfli. You can check for errors using firefox or chrome error console. There you can see errors concerning javascript or php. Check it while choosing MIB and provide me output plz. I've solved a similar problem that way.
Ok ksy, let's start.
Of course, first of all, thank you !
Now :
Uncaught ReferenceError: DynTable is not defined -> error from Chrome console
points to row 23 :
var oidview = new DynTable('oidview',{'headers' : ['Oid/Name','Type','Value']});
It's better I tell you I am using custom snmpbuilder-zabbix1.8.8.tar.gz
by kostil, at last.
Second, in order to go on with no feedback (I did not know someone is looking forum :) ) I was trying to import mib using net-snmp
by this guide
http://www.net-snmp.org/wiki/index.php/TUT:Using_and_loading_MIBS
and I found that at this step
snmptranslate -m +CISCO-RHINO-MIB -IR -On ciscoLS1010ChassisFanLed
I get this error :
No log handling enabled - turning on stderr logging
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/netsnmp/IP-MIB.my)
Did not find 'zeroDotZero' in module SNMPv2-SMI (/usr/share/mibs/netsnmp/EVENT-MIB.my)
MIB search path: /root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (DISMAN-SCHEDULE-MIB): At line 10 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 10 in (none)
Cannot find module (IPV6-TCP-MIB): At line 10 in (none)
Cannot find module (IPV6-UDP-MIB): At line 10 in (none)
Cannot find module (SNMPv2-TM): At line 10 in (none)
.1.3.6.1.4.1.9.5.11.1.1.12
Basically I know Zabbix depends on net-snmp for snmp operation.
Hoping can help you !
Thnx
Ok ksy, let's start.
Of course, first of all, thank you !
Now :
Uncaught ReferenceError: DynTable is not defined -> error from Chrome console
points to row 23 :
var oidview = new DynTable('oidview',{'headers' : ['Oid/Name','Type','Value']});
Thnx
Have you made any changes in snmp_builder.php? I mean replace
page['scripts'] = array('../snmp_builder/Tree.js','../snmp_builder/snmp_builder.js','../snmp_builder/DynTable.js','scriptaculous.js?load=effects,dragdr op');
with
$page['scripts'] = array('Tree.js','snmp_builder.js','DynTable.js','e ffects.js','dragdrop.js');
and to add to jsLoader.php:
$availableJScripts = array(
'Tree.js' => '../snmp_builder/',
'snmp_builder.js' => '../snmp_builder/',
'DynTable.js' => '../snmp_builder/',
'common.js' => '',
'menu.js' => '',
'prototype.js' => '',
It's described here: http://www.zabbix.com/wiki/howto/monitor/snmp/snmp_builder
zabbixflic
12-01-2012, 15:46
Have you made any changes in snmp_builder.php? I mean replace
page['scripts'] = array('../snmp_builder/Tree.js','../snmp_builder/snmp_builder.js','../snmp_builder/DynTable.js','scriptaculous.js?load=effects,dragdr op');
with
$page['scripts'] = array('Tree.js','snmp_builder.js','DynTable.js','e ffects.js','dragdrop.js');
and to add to jsLoader.php:
$availableJScripts = array(
'Tree.js' => '../snmp_builder/',
'snmp_builder.js' => '../snmp_builder/',
'DynTable.js' => '../snmp_builder/',
'common.js' => '',
'menu.js' => '',
'prototype.js' => '',
It's described here: http://www.zabbix.com/wiki/howto/monitor/snmp/snmp_builder
Great !!!
So the second one was missing ! you are much clever than me :cool:
I saw too many times those files and I loose something...
Now, it seems to work but :
1) is it normal almost a minute to get query result once I clicked on OID ? (maybe I don't know)
2) can I speed up process in some way ? (eg leaving only mibs I need (Cisco MIBs are a lot
and I need only Call Managers related)
3) Is there a common sense to save an entire list of record (I mean table resulted OID) ?
I am trying to make some tests and I will fine tune based on your feed, pls don't leave me again :D
Federico
Great !!!
So the second one was missing ! you are much clever than me :cool:
I saw too many times those files and I loose something...
Now, it seems to work but :
1) is it normal almost a minute to get query result once I clicked on OID ? (maybe I don't know)
2) can I speed up process in some way ? (eg leaving only mibs I need (Cisco MIBs are a lot
and I need only Call Managers related)
3) Is there a common sense to save an entire list of record (I mean table resulted OID) ?
I am trying to make some tests and I will fine tune based on your feed, pls don't leave me again :D
Federico
I'm very pleased to know that everything worked for you. I'll try to give some suggestions on your questions:
1) I also have to wait some time to get a result;
2) I don't think that you can speed up this process as it takes some time to send queries to a device and get a reply then.
3) Personally I don't save entire list, I just choose the items I want (interface traffic and performance as usual).
I have tested SNMP Builder and I'm very satisfied with it. Now I'm trying to find a solution to use OIDs with interface descriptions or aliases to see them on graphs. Maybe you can provide any ideas.
Ksenia.
zabbixflic
13-01-2012, 08:23
I'm very pleased to know that everything worked for you. I'll try to give some suggestions on your questions:
1) I also have to wait some time to get a result;
2) I don't think that you can speed up this process as it takes some time to send queries to a device and get a reply then.
3) Personally I don't save entire list, I just choose the items I want (interface traffic and performance as usual).
I have tested SNMP Builder and I'm very satisfied with it. Now I'm trying to find a solution to use OIDs with interface descriptions or aliases to see them on graphs. Maybe you can provide any ideas.
Ksenia.
Hi Ksenia, I am very satisfied too, I think it's a powerful tool, and it would be better if it was integrated into Zabbix itself (I know there is a new feature request going in that direction).
About your question, I will try to check it out.
Now I am looking to integrate also a script that retrieves data by Cucm Cisco Call Manager (what kind of equipment do you monitor using Zabbix ?) using
AXL language.
Many thanks again.
Stay tuned and have a good day
Federico
Hi Ksenia, I am very satisfied too, I think it's a powerful tool, and it would be better if it was integrated into Zabbix itself (I know there is a new feature request going in that direction).
About your question, I will try to check it out.
Now I am looking to integrate also a script that retrieves data by Cucm Cisco Call Manager (what kind of equipment do you monitor using Zabbix ?) using
AXL language.
Many thanks again.
Stay tuned and have a good day
Federico
I've just started adding devices to Zabbix. We monitor Cisco and ZTE routers and switches as well as Linux and Windows servers but we don't have Cisco Call Manager. And btw what kind of information would you like to retrieve?
I never dealed with AXl, but I have some ideas about a script in perl which would automatically add graphs. I think I'll try to do it in the near future.
zabbixflic
13-01-2012, 09:25
I've just started adding devices to Zabbix. We monitor Cisco and ZTE routers and switches as well as Linux and Windows servers but we don't have Cisco Call Manager. And btw what kind of information would you like to retrieve?
I never dealed with AXl, but I have some ideas about a script in perl which would automatically add graphs. I think I'll try to do it in the near future.
Concurrent active calls for example or media-resource activity and so on :)
Have you any ideas about insert many items in an application without make it one by one ? I am working with zabbix db but I don't think it's a good idea..
Thnx
zabbixflic
13-01-2012, 13:28
Hi ksy,
just a question : which is the "best" method to handle snmp traps arriving from different devices ?
I read this one :
http://www.zabbix.com/wiki/howto/monitor/snmp/a_simple_snmp_trap_handler
after I see
http://www.zabbix.com/wiki/howto/monitor/snmp/snmptraphandler
but I read bad comments so I was going down to bottom but now I am a little confused..
Coming back to previous argument I found this post :
http://www.zabbix.com/forum/showthread.php?t=15726
it could be useful to query Cucm but I must understand how to solve
soap dependency completely :(
Thnx !
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
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..
lndgoncalves
23-01-2012, 20:37
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]
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.
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
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.
Change directory to your web root or where your Zabbix frontend files leave. For me it is /usr/share/zabbix.
Apply patch by issuing command zcat snmpbuilder.diff.gz |patch -p1
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.
SNMP Builder For Zabbix 2.0
Put images to /usr/share/zabbix/js/jquery/themes/mib/
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.
rubendob
20-04-2012, 20:35
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/monitor/snmp/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
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.
rubendob
21-04-2012, 13:13
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 :/
rubendob
23-04-2012, 09:35
Hi all,
Installation Instructions
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.
Change directory to your web root or where your Zabbix frontend files leave. For me it is /usr/share/zabbix.
Apply patch by issuing command zcat snmpbuilder.diff.gz |patch -p1
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
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.
rubendob
23-04-2012, 09:46
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
# 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
Hi Sire
this is what is happening when I follow the steps
# 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
'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.
rubendob
23-04-2012, 11:08
Hi Sire and other people
this is the bottom of the include/locales/en_gb.inc.php after make the changes you suggested
// 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
# 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
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:
# 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
# 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
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.
rubendob
23-04-2012, 11:41
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.
I think something goes wrong with my installation :confused: I choose IF-MIB, I enter ip addreess and the community string but nothing happens, OID tree, always blank.
:confused:
I think something goes wrong with my installation :confused: I choose IF-MIB, I enter ip addreess and the community string but nothing happens, OID tree, always blank.
:confused:
Are there any errors in the web server error log file? This may also be a problem with JavaScript. I tested SNMP Builder in Firefox 3.
rubendob
23-04-2012, 11:48
Actually yes I can see following
[Mon Apr 23 11:16:32 2012] [error] [client 79.158.55.68] PHP Fatal error: Call to undefined function json_encode() in /var/www/html/zabbix/snmp_builder.php on line 679, referer: http://188.65.88.34/zabbix/snmp_builder.php
Our environment is
CentOS 6.2
PHP 5.3.3 (cli) (built: Feb 2 2012 23:47:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
and about php compilation i can see json is enabled as shared :confused:
[root@zabbix zabbix]# php -i|grep json --colour
Configure Command => './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-sqlite3=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-tidy=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-recode=shared,/usr'
Php issue? Is a problem of our php installation?
rubendob,
You may try to replace json_encode($x) with $json = new CJSON();
$y = $json->encode($x);
And the same with decode if needed.
If this doesn't help, investigate your PHP issue.
rubendob
23-04-2012, 16:00
Hi guys
well, I have been finding what's going on with my php installation and finally I have managed to fix it. I really don't know why this behaviour, in any case, this is what I did to fix
# yumdownloader php-common
# rpm -Uvh --force php-common*.rpm
# service httpd reload
# rm php-common*.rpm
I found this solution in stackoverflow.com, so now I can see something in my OID Tree! :D
I don't know yet if this is working, I am going to test with some snmp device.
I will inform about my progress.
Thanks Sire and you other people :)
rubendob
24-04-2012, 17:19
... that Sire's snmp-build works perfectly :) I am able to query snmp devices. Thanks to Sire for their help to my newbie questions.
You rocks guys ;)
First of all, this is a great feature to have. Only it isn't working for me.
Maybe it's the new zabbix version (I'm using 1.8.12).
Configuration:
Solaris 10 with Oracle backend
PHP compiled with net-smnp and all other requirements.
I used version 1.8.1 of the SMNP Builder from https://github.com/giapnguyen/snmpbuilder
Output from the test.php (from the 1st page) and smnptranslate attached.
The error is that there isn't a tree. I also tested on the appliance, this isn't working either.
No errors in the apache error_log.
I hope someone can help me/update the script for the new zabbix release.
rubendob
09-05-2012, 12:29
HI snevas
I can't help you because I am not a snmp and zabbix expert but I can tell you my experience. I have the latest Zabbix Server running into CentOS 6 vps and running with Snmp-Builder version of Sire. He helped me a lot and finally I was able to make it. I had a issue with php-common rpm that I commented in this forum few days ago.
Read this thread completely and you'll discover lot of info.
Best regards
Thanks rubendob,
The sire-version works (2nd version with manual en-gb fix) but I can't export the OID's and data in the mibs. We have a custom mib and each item in the tree gives this error:
No Such Object available on this agent at this OID
Also see the the attached screenshot.
I only thing I want is that the OID in the mibs translated to names and triggers.
Hi snevas,
Host field is for address of your SNMP-enabled device, for which you want to make a template from a MIB. Is it really 127.0.0.1 as on a screen shot you provided?