can CANT make a 2-random number script source graph...really
Moderators: Developers, Moderators
can CANT make a 2-random number script source graph...really
hi,
i've taken the example in the docs to output one random number, and made it output 2 random numbers and graph it.
the problem is that it doesnt work. i've tried, but i must suck or something - because i cant get it to work.
i've looked at the debug output of poller, and it says that it's doing the right thing:
09/02/2005 11:45:40 AM - CMDPHP: Poller[0] Host[1] CMD: /home/cacti/bin/random3.pl, output: random1:6 random2:1
so i know the script is getting executed.
my data input method is setup right:
Name Field Order Friendly Name Update RRA
random1 0 (Not In Use) random1_friendly Selected Delete
random2 0 (Not In Use) random2_friendly Selected Delete
and i think my data source is right - i've got random1 and random2 as data source items...
hm, so how do i diagnose this problem? everything else seems to work okay (the default graphs on a new cacti install, and the single random number from the docs.)
the rrd.log is empty as usual (why?)
and the cacti.log says everything is okay.
anyone have good diagnostic ideas? and why is this problem so hard to diagnose?
i've taken the example in the docs to output one random number, and made it output 2 random numbers and graph it.
the problem is that it doesnt work. i've tried, but i must suck or something - because i cant get it to work.
i've looked at the debug output of poller, and it says that it's doing the right thing:
09/02/2005 11:45:40 AM - CMDPHP: Poller[0] Host[1] CMD: /home/cacti/bin/random3.pl, output: random1:6 random2:1
so i know the script is getting executed.
my data input method is setup right:
Name Field Order Friendly Name Update RRA
random1 0 (Not In Use) random1_friendly Selected Delete
random2 0 (Not In Use) random2_friendly Selected Delete
and i think my data source is right - i've got random1 and random2 as data source items...
hm, so how do i diagnose this problem? everything else seems to work okay (the default graphs on a new cacti install, and the single random number from the docs.)
the rrd.log is empty as usual (why?)
and the cacti.log says everything is okay.
anyone have good diagnostic ideas? and why is this problem so hard to diagnose?
Last edited by prefetch on Fri Sep 02, 2005 6:14 pm, edited 1 time in total.
okay this kind of sucks.
so i put a bunch of cact_log() messages in lib/poller.php and started to figure some things out.
geesh - trying to get this to work w/o snmp and template graphs is a freaking nightmare.
anyway, if anyone has any other suggestions on diagnostic tools (besides cacti_log()) then i'd love to hear about them.
i think cacti could be a very useful, powerful tool, and i appreciate the work that's gone into it - but in my own special way, i'm trying to help improve it by ranting.
so i put a bunch of cact_log() messages in lib/poller.php and started to figure some things out.
geesh - trying to get this to work w/o snmp and template graphs is a freaking nightmare.
anyway, if anyone has any other suggestions on diagnostic tools (besides cacti_log()) then i'd love to hear about them.
i think cacti could be a very useful, powerful tool, and i appreciate the work that's gone into it - but in my own special way, i'm trying to help improve it by ranting.
check this out:
i run this:
rrdtool fetch localhost_out1_11.rrd AVERAGE
and here is what it spits out:
1125684600: nan nan
1125684900: nan nan
1125685200: nan nan
1125685500: nan nan
1125685800: 4.0000000000e+00 9.0000000000e+00
1125686100: nan nan
1125686400: nan nan
1125686700: nan nan
1125687000: nan nan
and sure enough, i only have 2 points in my whole freaking graph. wtf??
poller.php is in cron, and running fine - all the other graphs update just fine. this SUCKS. can anyone tell me why something like this would happen?
here is out cacti_log() output that i inserted that tells me that it is being written to rrd:
09/02/2005 12:45:02 PM - CMDPHP: Poller[0] OUT: updating /usr/share/cacti/site/rra/localhost_out1_11.rrd with 1125686701:2:9
and it outputs this, along with all the other graphs every 5 minutes - except nothing seems to show up in the rrd file.
ideas?
i run this:
rrdtool fetch localhost_out1_11.rrd AVERAGE
and here is what it spits out:
1125684600: nan nan
1125684900: nan nan
1125685200: nan nan
1125685500: nan nan
1125685800: 4.0000000000e+00 9.0000000000e+00
1125686100: nan nan
1125686400: nan nan
1125686700: nan nan
1125687000: nan nan
and sure enough, i only have 2 points in my whole freaking graph. wtf??
poller.php is in cron, and running fine - all the other graphs update just fine. this SUCKS. can anyone tell me why something like this would happen?
here is out cacti_log() output that i inserted that tells me that it is being written to rrd:
09/02/2005 12:45:02 PM - CMDPHP: Poller[0] OUT: updating /usr/share/cacti/site/rra/localhost_out1_11.rrd with 1125686701:2:9
and it outputs this, along with all the other graphs every 5 minutes - except nothing seems to show up in the rrd file.
ideas?
it's me again. this is SUH-weet.
so i did an rrdtool dump on my .rrd file and yep, only one set of data points ever got created.
and it looks like there is no error message when..
i manually updated it using rrdtool update from the command line, and it sort of worked (i could see some change in the .rrd file) but it seems kind of hit & miss.
could rrdtool be broken? what do you think is going on here...?
using version 1.0.49
so i did an rrdtool dump on my .rrd file and yep, only one set of data points ever got created.
and it looks like there is no error message when..
i manually updated it using rrdtool update from the command line, and it sort of worked (i could see some change in the .rrd file) but it seems kind of hit & miss.
could rrdtool be broken? what do you think is going on here...?
using version 1.0.49
reinhard - thanks for the tip, but i already did that. i did it again just to check, and no error messages are produced.lvm wrote:prefetch,
please run cacti in DEBUG mode for some polling cycles. Then grep out the rrdtool update statements for your failing data source. su to cacti user, and run update from cli. Look for error messages.
hth
Reinhard
so i found a good post here that suggested changing the out/error file redirection in cront to look like this:
*/5 * * * * www-data /usr/share/cacti/site/poller.php 1>/tmp/poller.out 2>/tmp/poller.err
which is freaking brilliant - i found the problem right away - it was a permission problem with that particular .rrd file.
hey, cacti people - you should really make the out/err messages go somewhere besides /dev/null (which is the default.) i mean HOLY CRAP people this was a PITA to diagnose.
well, i appreciate the help reinhard - i'm just irritated at cacti. it seems like a very nice system and all, but sometime developers screw up and make it really hard to diagnose problems.lvm wrote:prefetch,
you won't believe it, but it's just that what I'm doing since some months, keeping just the last ERR output. But simply forgot to ask you to do that.
Reinhard
if any cacti devs are reading this, i strongly suggest that you default the cronjob to append stderr/out to a poller.debug file or something. sending output info to /dev/null seems plain stupid to me.
but thanks for working on cacti - it seems like a nice system - just a wee bit too frustrating to get up and going on.
Who is online
Users browsing this forum: No registered users and 5 guests