No Graphs - Possible Issue with crontab

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

No Graphs - Possible Issue with crontab

Post by bladerunner »

I have been trying to get Cacti up and running for the past few days and I am a little confused. I have already read the documentation, but being so new to Linux (running FC14) in general, I am lost.

So, everything is up and running but the graph doesn't display anything. So I have read through the documentation and feel confident that I have screwed something up in crontab.

My first question is which crontab should I alter: I have been root and done "crontab -e" and entered:

Code: Select all

*/5 * * * * [i]username[/i] blah blah...poller.php /dev/null 2>&1
I have also entered this in /etc/crontab/

I also did crontab -e as non-root.

Which crontab is it? Is it necessarily bad that I have my poller.php entry in each crontab?

Also, where I have username, should I use my Fedora account name or the cacti username specified in /include/config.php? Seems silly, but again I am new.

I am using php.cmd. Also my poller log is set to debug, but does not display anything.

I appreciate the help. I hope I have been detailed enough in my description.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: No Graphs - Possible Issue with crontab

Post by gandalf »

Only one crontab, please. System wide crontabs require the id that should be used. When using a user crontab, omit the userid
R.
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

Still no luck. I removed the other crontabs and went with the system wide in /etc/crontab

I should mention that I am following deadwait's xampp/cacti guide. Here is what my crontab entry looks like:

Code: Select all

5 * * * * root /opt/lampp/bin/php /opt/lampp/htdocs/cacti/poller.php > /dev/null 2>&1
I also entered this command to change ownership:

Code: Select all

sudo chown -R 777 /opt/lampp/htdocs/cacti
Still nothing. Is there something else I am missing? I have debug on my poller log, still nothing. I do have rrd files, which I did not before. I checked and these rrd files and they have root ownership.

No custom scripts running. Any ideas?
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

Ok, so I made some progress. I finally figured out what you guys were talking about regarding permissions. I made sure that my cactiuser had permission for the rrd files, poller etc. Apparently it didn't have permissions to where php resided. That has fixed it so I have a debug poller log now. Output below:
  • 02/04/2011 03:15:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers N:259072
    02/04/2011 03:15:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool create /opt/lampp/htdocs/cacti/rra/localhost_traffic_in_8.rrd --step 300 DS:traffic_in:COUNTER:600:0:1000000000 DS:traffic_out:COUNTER:600:0:1000000000 RRA:AVERAGE:0.5:1:600 RRA:AVERAGE:0.5:6:700 RRA:AVERAGE:0.5:24:775 RRA:AVERAGE:0.5:288:797 RRA:MAX:0.5:1:600 RRA:MAX:0.5:6:700 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797
    02/04/2011 03:15:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_traffic_in_8.rrd --template traffic_out:traffic_in N:146910:1344383
    02/04/2011 03:15:03 PM - SYSTEM STATS: Time:1.2731 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:6
    02/04/2011 03:20:02 PM - SYSTEM STATS: Time:1.2259 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:6
    02/04/2011 03:24:51 PM - SYSTEM STATS: Time:1.2267 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:6
Still no graphs. Any ideas? I will keep you posted.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: No Graphs - Possible Issue with crontab

Post by gandalf »

Was the rrd file created, then? Did you again see 2nd link of my sig? Were does the debugging procedure stop?
R.
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

Here is the output of one cycle in the debug log:
02/04/2011 04:40:01 PM - POLLER: Poller[0] NOTE: Poller Int: '300', Cron Int: '300', Time Since Last: '300', Max Runtime '298', Poller Runs: '1'
02/04/2011 04:40:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/lampp/bin/php, ARGS: -q "/opt/lampp/htdocs/cacti/cmd.php" 0 0]
02/04/2011 04:40:01 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /opt/lampp/bin/php, ARGS: -q "/opt/lampp/htdocs/cacti/cmd.php" 1 1]
02/04/2011 04:40:01 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] SNMP: Host responded to SNMP
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] RECACHE: Processing 1 items in the auto reindex cache for '127.0.0.1'.
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] RECACHE DQ[1]: OID .1.3.6.1.2.1.1.3.0
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /opt/lampp/htdocs/cacti/scripts/linux_memory.pl MemFree:, output: 245728
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /opt/lampp/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output: 4468728
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /opt/lampp/htdocs/cacti/scripts/loadavg_multi.pl, output: 1min:1.01 5min:0.86 10min:0.58
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /opt/lampp/htdocs/cacti/scripts/unix_users.pl , output: 2
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /opt/lampp/htdocs/cacti/scripts/unix_processes.pl, output: 190
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] DS[8] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, output: 4364913
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Host[1] DS[8] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, output: 547700
02/04/2011 04:40:02 PM - CMDPHP: Poller[0] Time: 0.3245 s, Theads: N/A, Hosts: 1
02/04/2011 04:40:03 PM - POLLER: Poller[0] Parsed MULTI output field '1min:1.01' [map 1min->load_1min]
02/04/2011 04:40:03 PM - POLLER: Poller[0] Parsed MULTI output field '5min:0.86' [map 5min->load_5min]
02/04/2011 04:40:03 PM - POLLER: Poller[0] Parsed MULTI output field '10min:0.58' [map 10min->load_15min]
02/04/2011 04:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_traffic_in_8.rrd --template traffic_out:traffic_in 1296834002:547700:4364913
02/04/2011 04:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_proc_7.rrd --template proc 1296834002:190
02/04/2011 04:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_users_6.rrd --template users 1296834002:2
02/04/2011 04:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1296834002:1.01:0.86:0.58
02/04/2011 04:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap 1296834002:4468728
02/04/2011 04:40:03 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /opt/lampp/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1296834002:245728
02/04/2011 04:40:03 PM - SYSTEM STATS: Time:1.2258 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:7 RRDsProcessed:6
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

gandalf wrote:Was the rrd file created, then? Did you again see 2nd link of my sig? Were does the debugging procedure stop?
R.
Yes the rrd files are there, they have the proper permissions and match what is in the poller cache.
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

I am going through the debugging guide and I am confused about what is being asked here:
and check the ds[…].min and ds[…].max entries, e.g.

ds[loss].min = 0.0000000000e+00
ds[loss].max = 1.0000000000e+02

In this example, MINIMUM = 0 and MAXIMUM = 100. For a ds.[…].type=GAUGE verify, that e.g. the number returned by the script does not exceed ds[…].MAX (same holds for MINIMUM, respectively).
This is what I found when looking at one particular rrd file:
# rrdtool info localhost_load_1min_5.rrd
filename = "localhost_load_1min_5.rrd"
rrd_version = "0003"
step = 300
last_update = 1296838501
header_size = 3636
ds[load_1min].index = 0
ds[load_1min].type = "GAUGE"
ds[load_1min].minimal_heartbeat = 600
ds[load_1min].min = 0.0000000000e+00
ds[load_1min].max = 5.0000000000e+02
ds[load_1min].last_ds = "0.74"
ds[load_1min].value = 7.4000000000e-01
ds[load_1min].unknown_sec = 0
ds[load_5min].index = 1
ds[load_5min].type = "GAUGE"
ds[load_5min].minimal_heartbeat = 600
ds[load_5min].min = 0.0000000000e+00
ds[load_5min].max = 5.0000000000e+02
ds[load_5min].last_ds = "0.70"
ds[load_5min].value = 7.0000000000e-01
ds[load_5min].unknown_sec = 0
ds[load_15min].index = 2
ds[load_15min].type = "GAUGE"
ds[load_15min].minimal_heartbeat = 600
ds[load_15min].min = 0.0000000000e+00
ds[load_15min].max = 5.0000000000e+02
ds[load_15min].last_ds = "0.74"
ds[load_15min].value = 7.4000000000e-01
ds[load_15min].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].cur_row = 170
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = NaN
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 700
rra[1].cur_row = 85
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = 3.3389666667e+00
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = 3.9728333333e+00
rra[1].cdp_prep[1].unknown_datapoints = 0
rra[1].cdp_prep[2].value = 4.1109000000e+00
rra[1].cdp_prep[2].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 775
rra[2].cur_row = 620
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 9.0682333333e+00
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[2].cdp_prep[1].value = 9.1728666667e+00
rra[2].cdp_prep[1].unknown_datapoints = 0
rra[2].cdp_prep[2].value = 8.9507666667e+00
rra[2].cdp_prep[2].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 797
rra[3].cur_row = 249
rra[3].pdp_per_row = 288
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = 2.9828639750e+01
rra[3].cdp_prep[0].unknown_datapoints = 171
rra[3].cdp_prep[1].value = 2.8763220629e+01
rra[3].cdp_prep[1].unknown_datapoints = 171
rra[3].cdp_prep[2].value = 2.5070123773e+01
rra[3].cdp_prep[2].unknown_datapoints = 171
rra[4].cf = "MAX"
rra[4].rows = 600
rra[4].cur_row = 481
rra[4].pdp_per_row = 1
rra[4].xff = 5.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[4].cdp_prep[1].value = NaN
rra[4].cdp_prep[1].unknown_datapoints = 0
rra[4].cdp_prep[2].value = NaN
rra[4].cdp_prep[2].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 700
rra[5].cur_row = 417
rra[5].pdp_per_row = 6
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = 8.2993333333e-01
rra[5].cdp_prep[0].unknown_datapoints = 0
rra[5].cdp_prep[1].value = 9.5180000000e-01
rra[5].cdp_prep[1].unknown_datapoints = 0
rra[5].cdp_prep[2].value = 8.9996666667e-01
rra[5].cdp_prep[2].unknown_datapoints = 0
rra[6].cf = "MAX"
rra[6].rows = 775
rra[6].cur_row = 254
rra[6].pdp_per_row = 24
rra[6].xff = 5.0000000000e-01
rra[6].cdp_prep[0].value = 1.7360666667e+00
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[6].cdp_prep[1].value = 1.1287000000e+00
rra[6].cdp_prep[1].unknown_datapoints = 0
rra[6].cdp_prep[2].value = 9.0953333333e-01
rra[6].cdp_prep[2].unknown_datapoints = 0
rra[7].cf = "MAX"
rra[7].rows = 797
rra[7].cur_row = 345
rra[7].pdp_per_row = 288
rra[7].xff = 5.0000000000e-01
rra[7].cdp_prep[0].value = 1.7360666667e+00
rra[7].cdp_prep[0].unknown_datapoints = 171
rra[7].cdp_prep[1].value = 1.1592666667e+00
rra[7].cdp_prep[1].unknown_datapoints = 171
rra[7].cdp_prep[2].value = 1.0295333333e+00
rra[7].cdp_prep[2].unknown_datapoints = 171
I noticed that my max values appear to 500. What value should they not exceed and where do I locate that value?
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

Grasping at straws:

Looking in Graph Mgmt. - Turned on Graph debug and got this error:
/usr/bin/rrdtool: /opt/lampp/lib/libxml2.so.2: no version information available (required by /usr/lib/librrd.so.4)
Does that mean anything? I appreciate any help or advice anyone might have.

Also, I feel like I might be tripping up on user names:
Does the username in my crontab have to equal the one in config.php? And by extension does it also have to be the same username that has permissions to all the necessary files/folders?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: No Graphs - Possible Issue with crontab

Post by gandalf »

The XML error shows, that the required xml module is missing. Install e.g. php-xml (module name differ on different distros).
The user name in the crontab denotes the OS user (the one you may log into) that runs the poller.
The user defined in include/config.php denotes the one used for accessing the mysql tables; hence this is a mysql userid. Both are diffenet in principle. But their string representation may be equal
R.
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

How about this in Graph management debug mode:
/usr/bin/rrdtool: symbol lookup error: /usr/lib/libcairo.so.2: undefined symbol: FT_Library_SetLcdFilter
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: No Graphs - Possible Issue with crontab

Post by gandalf »

How did you install that rrdtool, please?
R.
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

sudo apt-get install rrdtool
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: No Graphs - Possible Issue with crontab

Post by gandalf »

strange; libcairo is a prereq for rrdtool, not related to cacti itself. So it seems, that libcairo does not match rrdtool binaries
R.
bladerunner
Posts: 11
Joined: Thu Feb 03, 2011 1:59 pm

Re: No Graphs - Possible Issue with crontab

Post by bladerunner »

First off, thank you Gandalf for your continued help. I really do appreciate it.

Any idea on how to get this fixed?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest