Get SNMP Network Data works, but nothing else does

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
Guest

Get SNMP Network Data works, but nothing else does

Post by Guest »

I have a bit of a strange problem with cacti.

The only data sources that I have been able to make work are the 'SNMP Network Data" types. This is the wizard like data input source that lists all the network adapters of a given device that you point it to. I am able chart this type of data source no problem.

However, when I try to use the "Get SNMP Data" Data input source I am able to retrieve data, but it doesn't want to graph it. I have tested the hostname, community string and OID from the commandline without any problem, so I know these are good. I thought maybe the problem might be the internal php SNMP, so I created my own perl script to do the same thing. But this solution didn't work either, in fact it pointed out the fact that I have the same issue with perl scripts as well. It appears that from within cacti the perl scripts don't want to work, however when run from the command line they do work.

Here are the details of my config: win2k sp2, cacti .67, Active Perl 5.6.1.631, php 4.1.2, and mysql 3.23.49.

Here is some info from within cacti showing the problem:

Data input config:
perl c:\inetpub\wwwroot\cacti/scripts/new_snmpget.pl cgusns20 public .1.3.6.1.4.1.232.11.2.4.1.1.3.0
c:\rrdtool\rrdtool.exe update c:\inetpub\wwwroot\cacti/rra/cgusns20_disk_test.rrd --template 20_disk_test N:8630

Note, that the value of 8630 is the proper value for this OID, this is the total size of the C: drive in this particular system.

Data Source Config output:
c:\rrdtool\rrdtool.exe create \
c:\inetpub\wwwroot\cacti/rra/cgusns20_disk_test.rrd \
--step 300 \
DS:20_disk_test:COUNTER:600:0:100000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \


Graph config:
c:\rrdtool\rrdtool.exe graph - \
--imgformat=PNG \
--start="-86400" \
--title="CGUSNS20 Disk Utilization" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Size (Megabytes)" \
DEF:a="c\:\inetpub\wwwroot\cacti/rra/cgusns20_disk_test.rrd":20_disk_test:AVERAGE \
AREA:a#0000FF:"Total Size (C\: Drive)" \
GPRINT:a:LAST:" Current%8.2lf %s\n" \
LINE2:b#00BD27:"Currently Used (C\: Drive)" \
GPRINT:b:LAST:"Current%8.2lf %s"

Perl script: new_snmpget.pl
#!/usr/bin/perl

$ret = `snmpget -O neEXbqfsStv $ARGV[0] $ARGV[1] $ARGV[2]`;
chomp $ret;
$ret =~ s/$ARGV[2]//;

print $ret;


Here is some output from the rrd.log. I think this is telling me that It pulled the data ok.


'04/25/2002 11:43 PM - CMD: c:\rrdtool\rrdtool.exe update c:\inetpub\wwwroot\cacti/rra/cgusns20_disk_test.rrd --template 20_disk_test N:8630'
'04/25/2002 11:48 PM - CMD: c:\rrdtool\rrdtool.exe update c:\inetpub\wwwroot\cacti/rra/cgusns20_disk_test.rrd --template 20_disk_test N:8630'

I have even run this rrdtool update command from the command prompt and not received an error.

Any ideas as to what I am doing wrong? Thanks for you help.


-ec
Guest

Post by Guest »

Just a thought - do you have the PHP SNMP dll loaded in your PHP.INI file ?
eyechart
Posts: 49
Joined: Thu Apr 25, 2002 11:48 pm

Post by eyechart »

I just checked and I do have the php_snmp.dll loaded in my php.ini.

This makes sense because the snmp stuff works if I use the 'SNMP Interfaces' option. The SNMP interfaces option uses the internal php snmp dll as well. I'm stumped.

Is there a higher level of debugging that I can enable?

Thanks again for the help.

-ec
Guest

Post by Guest »

http://www.raxnet.net/board/viewtopic.p ... &forum=1&2


You'll need to download a unix2win toolset, like Undows

http://sourceforge.net/projects/undows/

use the "Sh.exe" command instead of bash
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests