I picked 'Unix - Processes' script for debugging.
I turned on DEBUG mode, and then:
1. Check Cacti Log File
shows a lot of stuff
shows nothing
shows nothing
Seems OK to me
2. Check Basic Data Gathering
Code: Select all
$ cd /var/www/cacti/scripts
$ perl unix_processes.pl
92$ perl unix_processes.pl
92$ perl unix_processes.pl
92$
Script returns '92'. Seems OK to me
3. Check Cacti's Poller
I can see proller typing crontab -l.
When launched manually, poller shows:
Code: Select all
$ /var/udash/u/uS.02/go/cacti_poller.sh
06/03/2009 01:23:46 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/cacti/cmd.php 0 1]
06/03/2009 01:23:47 PM - POLLER: Poller[0] Parsed MULTI output field '1min:0.00' [map 1min->load_1min]
06/03/2009 01:23:47 PM - POLLER: Poller[0] Parsed MULTI output field '5min:0.01' [map 5min->load_5min]
06/03/2009 01:23:47 PM - POLLER: Poller[0] Parsed MULTI output field '10min:0.00' [map 10min->load_15min]
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1244028226:13068
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1244028226:244072
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1244028226:0.00:0.01:0.00
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_users_6.rrd --template users 1244028226:3
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_proc_7.rrd --template proc 1244028226:94
06/03/2009 01:23:47 PM - SYSTEM STATS: Time:1.0592 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
OK u:0.00 s:0.01 r:0.04
OK u:0.00 s:0.01 r:0.04
OK u:0.00 s:0.01 r:0.04
OK u:0.00 s:0.01 r:0.04
OK u:0.00 s:0.01 r:0.06
Seems OK to me
4. Check MySQL Update
I type:
I can see there a lot of inserts, so I pick one:
Code: Select all
06/03/2009 01:23:47 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id, rrd_name, time, output) values (7, 'proc', '2009-06-03 13:23:46', '94')"
I insert it using MySQL console:
Code: Select all
mysql> insert into poller_output (local_data_id, rrd_name, time, output) values (7, 'proc', '2009-06-03 13:23:46', '94');
Query OK, 1 row affected (0.00 sec)
Seems OK to me
5. Check RRD File Update
Code: Select all
$ tail -n 1000 log/cacti.log | grep rrdtool.update
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1244028226:13068
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1244028226:244072
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1244028226:0.00:0.01:0.00
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_users_6.rrd --template users 1244028226:3
06/03/2009 01:23:47 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_proc_7.rrd --template proc 1244028226:94
06/03/2009 01:38:00 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1244029079:6424
06/03/2009 01:38:00 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1244029079:244072
06/03/2009 01:38:00 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1244029079:0.00:0.00:0.00
06/03/2009 01:38:00 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_users_6.rrd --template users 1244029079:4
06/03/2009 01:38:00 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/www/cacti/rra/localhost_proc_7.rrd --template proc 1244028226:94
Shows exactly one update statement for each file. Seems OK to me.
6. Check RRD File Ownership
Code: Select all
$ ls -l
total 336
-rw-rw-r-- 1 udash udash 141640 Jun 3 13:38 localhost_load_1min_5.rrd
-rw-rw-r-- 1 udash udash 47992 Jun 3 13:38 localhost_mem_buffers_3.rrd
-rw-rw-r-- 1 udash udash 47992 Jun 3 13:38 localhost_mem_swap_4.rrd
-rw-rw-r-- 1 udash udash 47992 Jun 3 13:38 localhost_proc_7.rrd
-rw-rw-r-- 1 udash udash 47992 Jun 3 13:38 localhost_users_6.rrd
This is the same user as the one who runs Cacti poller. Seems OK to me.
7. Check RRD File Numbers
Code: Select all
$ rrdtool info localhost_proc_7.rrd | grep ds
ds[proc].type = "GAUGE"
ds[proc].minimal_heartbeat = 600
ds[proc].min = 0.0000000000e+00
ds[proc].max = 1.0000000000e+03
ds[proc].last_ds = "100"
ds[proc].value = NaN
ds[proc].unknown_sec = 179
ds[proc].min and .max seem OK
But...
Code: Select all
$ rrdtool fetch localhost_proc_7.rrd AVERAGE
1244025000: nan
1244025300: nan
1244025600: nan
1244025900: nan
1244026200: nan
1244026500: nan
1244026800: nan
1244027100: nan
1244027400: nan
1244027700: nan
1244028000: nan
1244028300: nan
1244028600: nan
1244028900: nan
1244029200: nan
1244029500: nan
1244029800: nan
1244030100: nan
1244030400: nan
1244030700: nan
1244031000: nan
1244031300: nan
1244031600: nan
1244031900: nan
1244032200: nan
1244032500: nan
... and so on
Proc value 92 returned earlier is certainly between 0.0000000000e+00 and 1.0000000000e+03.
I don't know what to do at this point