SNMP Graphs Not Displaying

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

Moderators: Developers, Moderators

Post Reply
karlkatzke
Posts: 10
Joined: Sun Apr 03, 2005 4:29 pm
Location: Tigard, OR

SNMP Graphs Not Displaying

Post by karlkatzke »

This is my first time setting up Cacti, so it's quite possible I screwed something up. Feel free to whack me repeatedly with a trout if this is a dumb question.

The purpose here is to monitor the input and output on the various network interfaces on this machine. The machine that Cacti is running on is my gateway/router machine, and it has two subnets ... a public /29 and a private 192.168.0.0/24. I want to see a graph of what's coming from and going to where... mostly because I like pretty graphs. Who doesn't?

I fumbled around for a while and got SNMP working on the server so that it returened appropriate values. Then I went into the Cacti console and, after spending some quality time with the documentation, selected 'New Graph', the three interfaces in "Data Query - SNMP Interface Sadistics", and In/Out Bits with 95th Percentile. I hit Create. I waited for my beautifulness to appear.

I got nothing except for a text link with a magnifying glass next to it. I said, "Ok, there probably isn't any data. I'll let poller run a few times." After poller ran a few times, I went and clicked on graph management and debug, and it gave me the error that no rrd file was there. So I let poller run a few more times. Still no rrd file.

After poking around a little bit, I found that SMTP wasn't working correctly... according to the logs at least. At first, I couldn't get SNMP to work at all. I'd get this in my poller.php log:

Code: Select all

04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] WARNING: Result from SNMP not valid.  Partial Result:
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: snmp_oid, oid: .1.3.6.1.2.1.4.20.1.2, output: U
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 30840
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.4, output: 172411
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.5, output: 19814211
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, output: 32440
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.4, output: 180830
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.5, output: 55386754
04/03/2005 02:20:03 PM - CMDPHP: Poller[0] Time: 0.8570 s, Theads: N/A, Hosts: 1
04/03/2005 02:20:04 PM - SYSTEM STATS: Time: 2.1744 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2
Magically, a few poller cycles later, it started giving me good data. I'm really not sure why; the only thing I did in between then was to run smnpwalk a few times manually and scratch my head.

Code: Select all

04/03/2005 02:30:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 30840
04/03/2005 02:30:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.4, output: 183150
04/03/2005 02:30:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.4, output: 174623
04/03/2005 02:30:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.5, output: 55488347
04/03/2005 02:30:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.5, output: 20349460
04/03/2005 02:30:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, output: 32440
04/03/2005 02:30:03 PM - CMDPHP: Poller[0] Time: 0.8437 s, Theads: N/A, Hosts: 1
04/03/2005 02:30:04 PM - SYSTEM STATS: Time: 2.1762 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2
So now that it was returning good data, where was my .rrd file?

No clue. This is where I'm stuck, ladies and germs. Everything looks right to me. I've got data templates, data sources that point to where the files should be, data queries, and everything else. I don't know what to tell you that would be of value in solving this problem, so I'll just throw myself upon the mercy of the community here... what do you need to know to help me get this thing working?
karlkatzke
Posts: 10
Joined: Sun Apr 03, 2005 4:29 pm
Location: Tigard, OR

Post by karlkatzke »

BTW... I should say that I do have other graphs, including hard drive use, load/memory average, etc. displaying perfectly fine. It's not a global problem with RRD-tool, it's a problem specifically with the snmp data sources writing to rrd files.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Does the user running the poller have permissions to read/write the rra and log directories?

Also make sure that files in the rra directory have the same permissions. If for example, you ran the poller as root, and then it's running as the poller user, that user would not be able to update the files.

Also, make sure that you are running poller.php as your poller and not cmd.php or cactid directly.
[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]
karlkatzke
Posts: 10
Joined: Sun Apr 03, 2005 4:29 pm
Location: Tigard, OR

Post by karlkatzke »

Rony - I've got other graphs that are working just fine, and they're all on the same crontab, which is being run by the cacti user. The problem is only specific to SMNP polling of localhost.
karlkatzke
Posts: 10
Joined: Sun Apr 03, 2005 4:29 pm
Location: Tigard, OR

Post by karlkatzke »

Further localized:

It's only the Traffic graphs that aren't working. All other graphs and statistics collected via snmp are working just fine.
If I view my snmp poller cache, I can view the raw data from the interfaces.
If I view my poller cache, I can see that it should be writing to an rrd file.. I can see the filename. Here's a sample log entry:

Code: Select all

Data Source: Localhost - Traffic - 192.168.0.1/eth2
RRD: /var/www/html/cacti/rra/localhost_traffic_in_14.rrd
Action: 0, OID: .1.3.6.1.2.1.2.2.1.16.4 (Host: 127.0.0.1, Community: public)
It's something between the poller and rrdtool that isn't creating the rrd files.

Heck, there's even the messages in the cacti log that say I should be getting a particular file...

Code: Select all

04/03/2005 07:55:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /v
ar/www/html/cacti/rra/localhost_traffic_in_19.rrd   --step 300   DS:traffic_in:C
OUNTER:600:0:100000000  DS:traffic_out:COUNTER:600:0:100000000  DS:traffic_in:CO
UNTER:600:0:100000000  DS:traffic_out:COUNTER:600:0:100000000  RRA:AVERAGE:0.5:1
:600  RRA:AVERAGE:0.5:6:700  RRA:AVERAGE:0.5:24:775  RRA:AVERAGE:0.5:288:797  RR
A:MAX:0.5:1:600  RRA:MAX:0.5:6:700  RRA:MAX:0.5:24:775  RRA:MAX:0.5:288:797
04/03/2005 07:55:04 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /v
ar/www/html/cacti/rra/localhost_traffic_in_19.rrd --template traffic_in:traffic_
out N:1114378:9003745
but...

Code: Select all

[root@sss-firewall rra]$ pwd
/var/www/html/cacti/rra
[root@sss-firewall rra]$ ls
localhost_hdd_free_16.rrd    localhost_proc_7.rrd
localhost_hdd_free_17.rrd    localhost_snmp_oid_9.rrd
localhost_hdd_free_18.rrd    localhost_users_6.rrd
localhost_load_1min_5.rrd    sssgenweb1_load_1min_20.rrd
localhost_mem_buffers_3.rrd  sssgenweb1_ping_23.rrd
localhost_mem_swap_4.rrd
[root@sss-firewall rra]$
.... you'll note that there's no localhost_traffic_in_19.rrd in there.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

You have the a classic Cacti bug. Check out this following post to fix it:

http://forums.cacti.net/viewtopic.php?t=6773

The rrd isn't being created, because of duplicate DS's.
[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]
karlkatzke
Posts: 10
Joined: Sun Apr 03, 2005 4:29 pm
Location: Tigard, OR

Post by karlkatzke »

Yep, figured it out myself last night at about 2 am. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest