n00b Needs Help With New Graph
Moderators: Developers, Moderators
-
- Posts: 7
- Joined: Fri Jan 27, 2006 3:37 pm
n00b Needs Help With New Graph
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.
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.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
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
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
-
- Posts: 7
- Joined: Fri Jan 27, 2006 3:37 pm
Okay...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
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
- data_input.jpg (74.45 KiB) Viewed 1772 times
-
- Posts: 7
- Joined: Fri Jan 27, 2006 3:37 pm
Okay, here's the output in the cacti log: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
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.
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?
2) Are the rrd files actually being updated?
3) Did you specify the proper rrdtool version in Cacti along with a valid font?
| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |
-
- Posts: 7
- Joined: Fri Jan 27, 2006 3:37 pm
1) Yes, I waited many, many polling cyclesBSOD2600 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?
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.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
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.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.
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
Code: Select all
rrdtool fetch /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd AVERAGE
Reinhard
-
- Posts: 7
- Joined: Fri Jan 27, 2006 3:37 pm
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: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.
I checked that. It was set at 0, now I've moved it up to 99999999999.lvm wrote: If this seems to be correct, please check the maximum value set for the data source (visit the Data Template).
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.lvm wrote:You may even do ato see the values. And please check, whether data is really fed into the rrd byCode: Select all
rrdtool info /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd | more
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 GraphCode: Select all
rrdtool fetch /usr/local/www/data/cacti/rra/titan_verticalscope_com_posts_36.rrd AVERAGE
Reinhard
The second rrdtool shows all sorts of entries except the last two are NaNs.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
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.BigDaddy71 wrote:I checked that. It was set at 0, now I've moved it up to 99999999999.
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...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.
Reinhard
-
- Posts: 7
- Joined: Fri Jan 27, 2006 3:37 pm
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.lvm wrote: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.BigDaddy71 wrote:I checked that. It was set at 0, now I've moved it up to 99999999999.
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...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.
Reinhard
-
- Posts: 7
- Joined: Fri Jan 27, 2006 3:37 pm
Who is online
Users browsing this forum: No registered users and 1 guest