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. :-)
Ad Widget
Collapse
SNMP Builder for Zabbix
Collapse
X
-
RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
-
the main one... snmp_builder.phpRHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
Comment
-
Hi danrog, your problem not 64bit counters. It is get_oid_from_name functionI 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
Code:{"error":"Oid is null F5-BIGIP-LOCAL-MIB::ltmVirtualServStatCsMinConnDur.\"www.blah.com\""}
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.PHP Code: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;
}
Comment
-
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
Last edited by giapnguyen; 11-02-2010, 03:57.Comment
-
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.comI 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
Code:{"error":"Oid is null F5-BIGIP-LOCAL-MIB::ltmVirtualServStatCsMinConnDur.\"www.blah.com\""}Last edited by giapnguyen; 12-02-2010, 04:42.Comment
-
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.RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
Comment
-
I just create a github account. I will upload the project later.Comment
-
RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
Comment
-
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?Comment
-
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,Comment
-
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.RHCE, author of zbxapi
Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM
Comment
-
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...
Any suggestions?Comment
-
And here are the HP Procurve mibs if you want to test them in SNMP Builder...
Comment
Comment