n00b Needs Help With New Graph

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

Moderators: Developers, Moderators

Post Reply
BigDaddy71
Posts: 7
Joined: Fri Jan 27, 2006 3:37 pm

n00b Needs Help With New Graph

Post by BigDaddy71 »

I'm a total n00b at Cacti, so perhaps I'm missing something very basic. I followed the instructions in <a href=http://forums.cacti.net/about11288.html>this forum posting</a> and created a test script (in PHP, simply outputting a random number) and I followed all the steps exactly as they were laid out. However, the graph isn't showing anything and it's been at least three collection cycles. I turned debug mode and the RRD tool isn't reporting any errors.

We're running 0.86g on a FreeBSD box. It's currently being used to monitor a number of other things as well, but I need to write PHP scripts that have to remotely speak to a MySQL database to retrieve some info.

Any help in this matter would be greatly appreciated. I just don't know where to look for any potential problems.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Well, this depends on some more things:
1) If you're running the latest cactid 0.8.6g: pay attention to include full paths for all binaries used
2) Please "su" to cactiuser and run the script from cli. Post your findings
3) do you use the script_server? Please post a screenshot for the Data Input Method (I did not cover php scripts/script server in my tutorial)
4) what does the host status show (see Devices)
5) Please goto Settings and switch to DEBUG mode. Run for one polling cycle and post log/cacti.log for that very cycle to see downed host detection results, call of the script and results returned and the like
Reinhard
BigDaddy71
Posts: 7
Joined: Fri Jan 27, 2006 3:37 pm

Post by BigDaddy71 »

lvm wrote:Well, this depends on some more things:
1) If you're running the latest cactid 0.8.6g: pay attention to include full paths for all binaries used
2) Please "su" to cactiuser and run the script from cli. Post your findings
3) do you use the script_server? Please post a screenshot for the Data Input Method (I did not cover php scripts/script server in my tutorial)
4) what does the host status show (see Devices)
5) Please goto Settings and switch to DEBUG mode. Run for one polling cycle and post log/cacti.log for that very cycle to see downed host detection results, call of the script and results returned and the like
Reinhard
Okay...

1) I'm using the full path to the PHP binary
2) I don't have su access on the box to run things as the cacti user, but the script does output expected values to the screen. I did run the script using the script server and it worked just fine.
3) No, I didn't use the script server to set things up because I couldn't find instructions that were clear enough for me on how to set it up. I've attached the screen shot to this posting
4) The host says "up" and availability is 100%
5) turned on debugging, will wait and see what happens. I looked at the poller queue and the request to run the script is in there...
Attachments
Screenshot of data input screen
Screenshot of data input screen
data_input.jpg (74.45 KiB) Viewed 1769 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

When running in DEBUG mode, you should find that script in your cacti.log. Please post a snippet around that. Some lines further, there should be an rrdtool update statement for the corresponding rrd file. Please post that , too
Reinhard
BigDaddy71
Posts: 7
Joined: Fri Jan 27, 2006 3:37 pm

Post by BigDaddy71 »

lvm wrote:When running in DEBUG mode, you should find that script in your cacti.log. Please post a snippet around that. Some lines further, there should be an rrdtool update statement for the corresponding rrd file. Please post that , too
Reinhard
Okay, here's the output in the cacti log:

02/08/2006 11:30:11 AM - CMDPHP: Poller[0] Host[1] DS[36] CMD: /usr/local/bin/php /usr/local/www/data/cacti/scripts/ss_tf_total_posts.php, output: 1139419811
02/08/2006 11:30:11 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/bin/rrdtool update /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd --template posts 1139419801:1139419811

Now, graphs do seem to show up in the Graphs section but there is no data inside them.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) Did you wait a few polling cycles?
2) Are the rrd files actually being updated?
3) Did you specify the proper rrdtool version in Cacti along with a valid font?
BigDaddy71
Posts: 7
Joined: Fri Jan 27, 2006 3:37 pm

Post by BigDaddy71 »

BSOD2600 wrote:1) Did you wait a few polling cycles?
2) Are the rrd files actually being updated?
3) Did you specify the proper rrdtool version in Cacti along with a valid font?
1) Yes, I waited many, many polling cycles
2) Yes, the rrd files are actually being updated. I just checked the date on the rrd file in question
3) what do you mean by "proper rrdtool version in Cacti"? I'm using an existing Cacti configuration that is collecting other data sources and generating reports.

Like I said before, I'm a n00b to this and are finding that documentation on troubleshooting is hard to find.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

BigDaddy71 wrote:3) what do you mean by "proper rrdtool version in Cacti"? I'm using an existing Cacti configuration that is collecting other data sources and generating reports.
There's a Setting for rrdtool version. This changes cacti's behaviour for generating rrdtool commands as this has changed from 1.0.x to 1.2.x to some extend. This is cruical for generating correct Graphs. I'm somewaht astonished about the number coming out of your script, as this is nearly exactly the same number as the timestamp, so please check this.
If this seems to be correct, please check the maximum value set for the data source (visit the Data Template). If maximum is exceeded, no update is done. You may even do a

Code: Select all

rrdtool info /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd | more
to see the values. And please check, whether data is really fed into the rrd by

Code: Select all

rrdtool fetch /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd AVERAGE
If there's only NaNs, there's something wrong with the data/maximum or the like. If there's valid data, there's something wrong with the Graph
Reinhard
BigDaddy71
Posts: 7
Joined: Fri Jan 27, 2006 3:37 pm

Post by BigDaddy71 »

lvm wrote:There's a Setting for rrdtool version. This changes cacti's behaviour for generating rrdtool commands as this has changed from 1.0.x to 1.2.x to some extend. This is cruical for generating correct Graphs. I'm somewaht astonished about the number coming out of your script, as this is nearly exactly the same number as the timestamp, so please check this.
In fact, the test script I wrote *is* spitting out a timestamp. I wanted an easy-to-generate number that would continue to go up. :)
lvm wrote: If this seems to be correct, please check the maximum value set for the data source (visit the Data Template).
I checked that. It was set at 0, now I've moved it up to 99999999999.
lvm wrote:You may even do a

Code: Select all

rrdtool info /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd | more
to see the values. And please check, whether data is really fed into the rrd by

Code: Select all

rrdtool fetch /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd AVERAGE
If there's only NaNs, there's something wrong with the data/maximum or the like. If there's valid data, there's something wrong with the Graph
Reinhard
The first rrdtool command spits out a bunch of information. What exactly would I be looking for here? It looks like the timestamp value is being stored.

The second rrdtool shows all sorts of entries except the last two are NaNs.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

BigDaddy71 wrote:I checked that. It was set at 0, now I've moved it up to 99999999999.
0 is fine as this is interpreted as "no limit". You're change isn't applied to the real rrd file unless you run a "rrdtool tune" manually againt that file. This feature is not yet implemented in cacti.
The first rrdtool command spits out a bunch of information. What exactly would I be looking for here? It looks like the timestamp value is being stored.

The second rrdtool shows all sorts of entries except the last two are NaNs.
This seems to be fine. First 20 lines of info should be enough and last 10 lines of fetch will do either. If there are resonable values, there's a problem with the Graph. But it does matter whether you're going to use COUNTER values or GAUGEs for your "real" scripts...
Reinhard
BigDaddy71
Posts: 7
Joined: Fri Jan 27, 2006 3:37 pm

Post by BigDaddy71 »

lvm wrote:
BigDaddy71 wrote:I checked that. It was set at 0, now I've moved it up to 99999999999.
0 is fine as this is interpreted as "no limit". You're change isn't applied to the real rrd file unless you run a "rrdtool tune" manually againt that file. This feature is not yet implemented in cacti.
The first rrdtool command spits out a bunch of information. What exactly would I be looking for here? It looks like the timestamp value is being stored.

The second rrdtool shows all sorts of entries except the last two are NaNs.
This seems to be fine. First 20 lines of info should be enough and last 10 lines of fetch will do either. If there are resonable values, there's a problem with the Graph. But it does matter whether you're going to use COUNTER values or GAUGEs for your "real" scripts...
Reinhard
Okay, that's good to know that the data is actually being collected. I will take a look at the graph. Or perhaps what I *really* should do is put a more appropriate value into my script instead of a time stamp. I will make those changes and post the results tomorrow.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

But please think about the data source setting concerning GAUGEs and COUNTERs!
Reinhard
BigDaddy71
Posts: 7
Joined: Fri Jan 27, 2006 3:37 pm

Post by BigDaddy71 »

lvm wrote:But please think about the data source setting concerning GAUGEs and COUNTERs!
Reinhard
It's currently set to COUNTER, which is appropriate in this case I would think. Eventually it's supposed to be the count of a number of records in a specific database table.
Post Reply

Who is online

Users browsing this forum: manel and 1 guest