wrong values are graphed

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
acharrier
Posts: 2
Joined: Thu Feb 26, 2009 8:53 am

wrong values are graphed

Post by acharrier »

I am trying to graph data from our APC Air Removal Units.

When I use a MIB browser, I can see the OIDs and that the return the correct value. When I use those OID numbers in the generic SNMP template, nothing appears on the graph and the numeric values wrong and never change over time.

This same method worked for me to graph data from Weather Duck appliance, so wondering why this is failing. Any ideas?

OID data pulled from MIB browser is below.

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.8.1.1
Value: 360
Type: Integer

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.8.1.2
Value: 357
Type: Integer

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.8.1.3
Value: 368
Type: Integer

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.8.1.4
Value: 356
Type: Integer

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.7.1.1
Value: 1886
Type: Integer

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.7.1.2
Value: 1862
Type: Integer

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.7.1.3
Value: 1913
Type: Integer

OID: .1.3.6.1.4.1.318.1.1.14.4.1.1.7.1.4
Value: 1858
Type: Integer
exklusve
Posts: 9
Joined: Wed Mar 11, 2009 1:42 pm

Post by exklusve »

Hey I'm saving a very similar problem as you are (i think).

http://forums.cacti.net/post-158245.html

Have you found anything that has helped your situation?

Thanks!
acharrier
Posts: 2
Joined: Thu Feb 26, 2009 8:53 am

Post by acharrier »

What I've found is that the OID for any one fan cannot be queried but that using the parent OID will return the value for all 4 fans. Do an SNMPWalk against this value .1.3.6.1.4.1.318.1.1.14.4.1.1.8.1 and I think you'll see what I mean.

I've not looped back to this problem recently, so it's really a matter of learning how to graph all 4 values at one time now.
exklusve
Posts: 9
Joined: Wed Mar 11, 2009 1:42 pm

Post by exklusve »

Ok, I've got a really ugly perl script written up to get the fan rpm (and CFM also if you want that) and graph it.

Here is the perl script (If someone can clean it up a bit, that would rock. i'm not the best with perl)

and attached are the Templates.

Code: Select all

#!/usr/bin/perl
unlink '/tmp/fanrpm';
unlink '/tmp/fanrpm1';
open(SN, "snmpwalk -v 1 -c public 172.16.240.201 .1.3.6.1.4.1.318.1.1.14.4.1.1.8 |") || die "failed: $!\n";
open(FD, '>>/tmp/fanrpm');

while(<SN>)
{
chomp;
$value = substr $_, -4;

print FD $value;
}
system "sed 's/ //' /tmp/fanrpm > /tmp/fanrpm1";


close (SN);
close (FD);

open(FD, '/tmp/fanrpm1');
while(<FD>)
{
chomp;
$rpm = $_;
@values = split / /, $rpm;
$i = 0,;
foreach $rpm (@values)
{$i++;
print "Fan$i:$rpm ";
#print "\n";
}
}
close(FD);
Attachments
cacti_data_template_aru_-_fan_rpm.xml
(6.04 KiB) Downloaded 103 times
cacti_graph_template_aru_-_fan_rpm.xml
(19.87 KiB) Downloaded 128 times
Screenshot
Screenshot
graph_image.php.png (32.73 KiB) Viewed 1709 times
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests