SNMP v2

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

Moderators: Developers, Moderators

Post Reply
Guest

Post by Guest »

Does cacti use SNMPv2? I seem to be having a problem with 32bit versus 64bit counters...

My graph drops off after 116mbits+.
Guest

Post by Guest »

That's a function of the PHP support for SNMP. If you're interested in v2 and higher support, consider the Perl modules at

http://www.switch.ch/misc/leinen/snmp/perl/

They're quite nice and don't require any of the UCD SNMP software to work. Example scripts are included.
Guest

Post by Guest »

Assuming I have this, what's the quick way to get it to work with cacti?? Just a quick overview would be fine, thanks.
Guest

Post by Guest »

The trick here is to get the data results of whatever you want into .RRD format. Where Cacti really excels is in the simplicity of graphing and presenting RRDTOOL data sources - any .RRD files will work, so you don't necessarily need the data collected within Cacti. Many data "collectors" for RRDTOOL have been created already, especially in the SNMP arena.

If you want to make it easy and have an arsenal of RRDTOOL data collectors, download MRTG from http://www.mrtg.org . It is sort of the precursor to RRDTOOL, but the recent versions of the software allow you save your data results in .RRD format. Just tell MRTG to save the files in the /cacti/rra directory and to add the files as data sources in Cacti, read the Jan 17th post on RRDTOOL data here on the Raxnet board.

Nic
Guest

Post by Guest »

Ok, I did a quick and dirty hack to get this to work if you have SNMPv2 support installed with snmpget...

Here's the diff output:

83c83
< $snmp_octet_name = "ifHCInOctets";
---
> $snmp_octet_name = "ifInOctets";
85c85
< $snmp_octet_name = "ifHCOutOctets";
---
> $snmp_octet_name = "ifOutOctets";
95c95
< $snmp_output_octets = `$path_snmpget -v 2c $snmp_ip $snmp_community ifMIB.ifMIBObjects.ifXTable.ifXEntry.$snmp_octet_name.$snmp_interface_number`;
---
> $snmp_output_octets = `$path_snmpget $snmp_ip $snmp_community interfaces.ifTable.ifEntry.$snmp_octet_name.$snmp_interface_number`;
100c100
< }
---
> }
DrMosh
Posts: 14
Joined: Mon Jan 28, 2002 7:00 pm
Contact:

Post by DrMosh »

Ok, I finally registered, anyways... that diff above was the modifications to:

cmd_snmp_interface.php
DrMosh
Posts: 14
Joined: Mon Jan 28, 2002 7:00 pm
Contact:

Post by DrMosh »

One more thing, if you make those mods, you will break compatibility with SNMP v1... I tried to code some intelligence into the script but it wouldn't work... so in that case, you would need two copies of cacti running... one with the v2 mods and one without...
rix
Posts: 1
Joined: Sun Jan 27, 2002 7:00 pm
Location: Estonia

Post by rix »

Hi!

I have another simple patch, it can be found at http://www.ewn.ee/cacti-snmp2.diff
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests