SNMPv2c queries with Cacti

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
kenord
Posts: 1
Joined: Mon Mar 31, 2003 9:36 am

SNMPv2c queries with Cacti

Post by kenord »

I have a number of systems that do not respond to SNMP queries from a default Cacti build (which is a great tool by the way). Testing shows that these systems only respond to SNMP v2c queries. Is there a way to get Cacti to generate these, and even better, is there a way to include this as an option for SNMP data gets in the GUI?

Thanks,

Ken
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

This is not conplete solution just some hints. First of all you need to turn off buil-it PHP snmp support because it does not handle v2c queries (in include/config.php replace line 59 with "$config["php_snmp_support"] = false").

The rest of work need to be done in include/snmp_functions.php. There are two snmp related functions here: "cacti_snmp_get" and "cacti_snmp_walk". The first one is actually ready to take version string as a parameter ($force_version variable). The second one should be changed in similar way. Then you need to find all places where these functions are called and add "-v2c" as a last parameter.

- bulek
User avatar
drub
Cacti User
Posts: 59
Joined: Thu Jan 31, 2002 7:00 pm
Location: Las Vegas
Contact:

I did almost the same ads this suggestion

Post by drub »

if you want to still use the faster built in support for non v2c hosts then change that same line to . It almost looks like thats what Rax was trying to do below. its more like line 165 in cacti-0.81

$config["php_snmp_support"] = true && $version != "2").

this way built in support still works for all the other hosts.
if you use v3 then prolly the same answer like:

$config["php_snmp_support"] = true && $version != "2" && $version != "3").
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests