Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Until now, everything I did in Cacti went just fine. Cacti is making graphs so there is nothing wrong with the installation in general.
However, I keep getting NAN's in wat is supposed to be a simple COUNTER graph that I am creating from scratch.
I want to graph my Gas, Water and Energy usage in Cacti. I created a data source and a data template. Both seem to be oke but ones I start making graphs...NAN's all the time
rrdtool fetch rfxmeter1_gas_121.rrd AVERAGE
1236168900: nan nan nan
1236169200: nan nan nan
1236169500: nan nan nan
1236169800: nan nan nan
1236170100: nan nan nan
1236170400: nan nan nan
1236170700: nan nan nan
1236171000: nan nan nan
.......now what? Please help.
Last edited by proohu01 on Sat Mar 14, 2009 7:26 am, edited 2 times in total.
I created a second device (rfxcom2) and changed the data source type to gauge for this host (The rest of the settings are unchanged). After a couple of minutes, a succesful graph is created for that host. (See images below) However, gauge is not correct and I realy need it as a counter.
The rrdtool update debug output for both devices seem oke to me....
- I installed a new VM with a different OS (Fedora 10)
- Installed a new (fresh, empty) version of Cacti 0.8.7d
- Installed Spine 0.8.7c
- Impoted my own RFXcom host template with all dependancies
- Added just one host (rfxcom)
.......NAN's !!
Could it be a bugg in the "counter" routine?
Would it help if I post the entire DEBUG log for this single device ?? (single pol)
03/12/2009 09:10:03 AM - SYSTEM STATS: Time:1.3487 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:3 RRDsProcessed:3
03/12/2009 09:10:03 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/htdocs/cacti/rra/rfxcom_counter_power_15.rrd --template gas 1236845402:1.80
03/12/2009 09:10:03 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/htdocs/cacti/rra/rfxcom_counter_power_16.rrd --template gas:water:power 1236845402:1.80:15.92:299.36
03/12/2009 09:10:03 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /srv/www/htdocs/cacti/rra/rfxcom_counter_power_14.rrd --template gas 1236845402:1.80
03/12/2009 09:10:03 AM - POLLER: Poller[0] Parsed MULTI output field 'gas:1.80' [map gas->gas]
03/12/2009 09:10:03 AM - POLLER: Poller[0] Parsed MULTI output field 'power:299.36' [map power->power]
03/12/2009 09:10:03 AM - POLLER: Poller[0] Parsed MULTI output field 'water:15.92' [map water->water]
03/12/2009 09:10:03 AM - POLLER: Poller[0] Parsed MULTI output field 'gas:1.80' [map gas->gas]
03/12/2009 09:10:03 AM - POLLER: Poller[0] Parsed MULTI output field 'gas:1.80' [map gas->gas]
03/12/2009 09:10:02 AM - SPINE: Poller[0] Time: 0.5077 s, Threads: 1, Hosts: 2
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: MYSQL Free & Close Completed
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Allocated Variable Memory Freed
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: PHP Script Server Pipes Closed
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Thread Cleanup Complete
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] DS[14] SCRIPT: php /srv/www/htdocs/cacti/scripts/xpl_rfxcom/xpl-rfxcom-sql-query.php 00f0 01f1 02f2, output: gas:1.80
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] DEBUG: The POPEN returned the following File Descriptor 9
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] DS[16] SCRIPT: php /srv/www/htdocs/cacti/scripts/xpl_rfxcom/xpl-rfxcom-sql-query.php 00f0 01f1 02f2, output: gas:1.80 water:15.92 power:299.36
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] DEBUG: The POPEN returned the following File Descriptor 9
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] DS[15] SCRIPT: php /srv/www/htdocs/cacti/scripts/xpl_rfxcom/xpl-rfxcom-sql-query.php 00f0 01f1 02f2, output: gas:1.80
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] DEBUG: The POPEN returned the following File Descriptor 9
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] RECACHE: Processing 1 items in the auto reindex cache for '192.168.123.21'
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[4] SNMP Result: Host responded to SNMP
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[0] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Initial Value of Active Threads is 0
03/12/2009 09:10:02 AM - SPINE: Poller[0] SPINE: Initializing PHP Script Server(s)
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: SNMP Library Version is 5.4.2.1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: SNMP Header Version is 5.4.2.1
03/12/2009 09:10:02 AM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: MySQL is Thread Safe!
03/12/2009 09:10:02 AM - SPINE: Poller[0] Version 0.8.7c starting
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 10
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The PHP Script Server is Not Required
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: StartHost='4', EndHost='4', TotalPHPScripts='0'
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The number of php script servers to run is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The script timeout is 25
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The number of concurrent processes is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The polling interval is 300 seconds
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The threads variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The log_pstats variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The log_pwarn variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The log_perror variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_timeout variable is 400
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_retries variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_method variable is 2
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_failure_count variable is 2
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_recovery_count variable is 3
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The availability_method variable is 2
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The path_php variable is /usr/bin/php
03/12/2009 09:10:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/spinetest/spine, ARGS: 4 4]
03/12/2009 09:10:02 AM - SPINE: Poller[0] Time: 0.0713 s, Threads: 1, Hosts: 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: MYSQL Free & Close Completed
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Allocated Variable Memory Freed
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: PHP Script Server Pipes Closed
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Thread Cleanup Complete
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 0
03/12/2009 09:10:02 AM - SPINE: Poller[0] Host[0] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: In Poller, About to Start Polling of Host
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Value of Active Threads is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Valid Thread to be Created
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: Initial Value of Active Threads is 0
03/12/2009 09:10:02 AM - SPINE: Poller[0] SPINE: Initializing PHP Script Server(s)
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: SNMP Library Version is 5.4.2.1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: SNMP Header Version is 5.4.2.1
03/12/2009 09:10:02 AM - SPINE: Poller[0] SPINE: Initializing Net-SNMP API
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: MySQL is Thread Safe!
03/12/2009 09:10:02 AM - SPINE: Poller[0] Version 0.8.7c starting
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 10
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The PHP Script Server is Not Required
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: StartHost='0', EndHost='0', TotalPHPScripts='0'
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The number of php script servers to run is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The script timeout is 25
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The number of concurrent processes is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The polling interval is 300 seconds
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The threads variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The log_pstats variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The log_pwarn variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The log_perror variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_timeout variable is 400
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_retries variable is 1
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_method variable is 2
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_failure_count variable is 2
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The ping_recovery_count variable is 3
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The availability_method variable is 2
03/12/2009 09:10:02 AM - SPINE: Poller[0] DEBUG: The path_php variable is /usr/bin/php
03/12/2009 09:10:02 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/spinetest/spine, ARGS: 0 0]
03/12/2009 09:10:02 AM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '294', Max Runtime '298', Poller Runs: '1'
Please apply the patches from the web site. Also, make sure the Max in the data template is not 0, or too low. Then, if the RRDfiles are being created and the max is too low, then you will either need to tune your RRDfiles, or delete them and allow them to be created again using the revised template.
TheWitness
True understanding begins only when we realize how little we truly understand...
- Applied all (4) patches
- Changed max from 10000 to 1000000 even though the value will probably never be higher than 1000.
- Removed device including .rrd files
- Recreated device. Waited at least 30 minutes. (new .rrd files get created oke)
-
Ok, if there are no warnings in the log, and you have the entry in the poller cache, then you need to dump the RRDfile and see if there are entries there. If the RRD is all empty, then there is a problem and I'm a bit clueless at this point.
TheWitness
True understanding begins only when we realize how little we truly understand...
/usr/bin/rrdtool update /srv/www/htdocs/cacti/rra/rfxcom_counter_rfxmeter_20.rrd --template rfxmeter 1236927940:541,2
ERROR: /srv/www/htdocs/cacti/rra/rfxcom_counter_rfxmeter_20.rrd: not a simple integer: '541,2'
It seems that the RRDTOOL doesn't accept integer when using COUNTER. It is too bad that this error doesn't show up in the Cacti log .
I must oppoligize, as I did read step 5 of the "Debug NaN's in your graphs" document, and I did see the update entries in the log, but I failed to execute them in the shell myself. It would have saved time.
Solution: Instead of using a CDEF to multiply by 100, I now do the multiplying in the data imput script. Works just fine for me!!