[solved] problem with SNMP - Generic OID Template

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
gdegani
Posts: 4
Joined: Tue May 31, 2005 2:20 am
Location: Padova - Italy

[solved] problem with SNMP - Generic OID Template

Post by gdegani »

I've installed Cacti 2 weeks ago on a pc with Gentoo Linux and it works very fine with the standard mesure ( CPU, Mem etc... ).
The version is net-analyzer/cacti-0.8.6d.

Now I would like to graph the free memory of a tomcat server.
To accomplish this job I've created a simple jsp to get the row data, a shell script to call the jsp and I've configured the snmp daemon to call the script with a specified OID.
All the component are on the same server.

This is the output of snmpwalk:

Code: Select all

gcarlo@HOSTNAME gcarlo $ snmpwalk -v 1 -c COMMUNITY localhost .1.3.6.1.4.1.2021.255.101.3
UCD-SNMP-MIB::ucdavis.255.101.3 = STRING: "229217216"
Where "229217216" is the value that I would like to graph.

Then I followed the tutorial "Graph a Single SNMP OID" from the Cacti's manual, I have the graph, but it is empty :-(

Can someone help me?

Thanks in advance

Giancarlo
Last edited by gdegani on Tue May 31, 2005 8:56 am, edited 1 time in total.
john le lardon
Cacti User
Posts: 52
Joined: Fri May 06, 2005 7:39 am
Location: france
Contact:

Post by john le lardon »

do you specify comunity and version on in device page ?
gdegani
Posts: 4
Joined: Tue May 31, 2005 2:20 am
Location: Padova - Italy

Post by gdegani »

john le lardon wrote:do you specify comunity and version on in device page ?
Yes.
For the same host I'm monitoring Memory Usage, CPU Usage, Load Average and Processes and both are working fine.

The data source debug say:

Code: Select all

/usr/bin/rrdtool create \
/var/www/localhost/htdocs/cacti/rra/weipda072015_snmp_oid_59.rrd \
--step 300  \
DS:snmp_oid:GAUGE:600:0:266469376 \
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 \
and this are the data source properties.

Ciao
Attachments
data source
data source
cacti1.png (12.54 KiB) Viewed 6609 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Can you query that OID from the cacti server on that host? What does it return?
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
gdegani
Posts: 4
Joined: Tue May 31, 2005 2:20 am
Location: Padova - Italy

Post by gdegani »

At the moment everything is on the same host.
If I try to read the OID with snmpwalk I receive:

Code: Select all

gcarlo@weipda072-015 gcarlo $ snmpwalk -v 1 -c infocam localhost .1.3.6.1.4.1.2021.255.101.3
UCD-SNMP-MIB::ucdavis.255.101.3 = STRING: "149893728"
gcarlo@weipda072-015 gcarlo $ snmpwalk -v 1 -c infocam localhost .1.3.6.1.4.1.2021.255.101
UCD-SNMP-MIB::ucdavis.255.101.1 = ""
UCD-SNMP-MIB::ucdavis.255.101.2 = ""
UCD-SNMP-MIB::ucdavis.255.101.3 = STRING: "149838928"
UCD-SNMP-MIB::ucdavis.255.101.4 = STRING: "266469376"
UCD-SNMP-MIB::ucdavis.255.101.5 = ""

User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

I'm blind... Sorry, missed that in first post...

A string value? Um...... I have to think about that one, I don't recall if it will strip the ".
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
gdegani
Posts: 4
Joined: Tue May 31, 2005 2:20 am
Location: Padova - Italy

Post by gdegani »

Honestly, I don't know why :oops: , but after a lot of test I decide to retry making a new graph from scratch, and... it works :-)

thanks to all

Giancarlo
morrowd
Posts: 9
Joined: Wed Feb 16, 2005 11:49 am
Location: London, Ontario, Canada

Somewhat off-topic

Post by morrowd »

Hi, after reading this post, I have a question which is somewhat off topic, but I would hope that you might lend a hand.

This post seems to be dealing with SNMP support in Apache's Tomcat product. I cannot find any reference to SNMP support on their website. How are you doing this? Is it a third party product?
duckhead
Cacti User
Posts: 59
Joined: Wed Oct 20, 2004 7:41 pm

Post by duckhead »

It's querying SNMP values on a server (hardware) that is running Tomcat's server (software). That's not to say that Tomcat can't support SNMP, but that's not what's happening here.
morrowd
Posts: 9
Joined: Wed Feb 16, 2005 11:49 am
Location: London, Ontario, Canada

Post by morrowd »

Thanks for confirming. I have seen commercial tools for monitoring Tomcat stats......but was hoping someone had found an alternative.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests