Need some direction

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

Moderators: Developers, Moderators

Post Reply
HyTeK
Posts: 11
Joined: Sat Dec 03, 2005 11:01 am

Need some direction

Post by HyTeK »

Need some direction on where to t/s next.

RHEL: 3
PHP: 4.4.0
MySQL: 4.0.26
RRDTool: 1.2.11
Cacti: 0.8.6g
Apache: 2.0.46

The only poller that will actually work is cmd.php. When I try to use the cacti poller, it will not do anything. The below is the output of 1 update of the poller.php using the cmd poller and 1 instance of seeing if the graphs work. There are no errors, except that I don't see any graphs at all.

Code: Select all

 12/03/2005 11:38:37 AM - WEBLOG: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool graph - --imgformat=PNG --start=1133545116 --end=1133631516 --title="Localhost - Processes" --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 COMMENT:"From 2005/12/02 11:38:36 To 2005/12/03 11:38:36\c" COMMENT:" \n" --vertical-label="processes" DEF:a="/var/www/html/smonitor/rra/localhost_proc_7.rrd":proc:AVERAGE AREA:a#F51D30:"Running Processes" GPRINT:a:LAST:"Current\:%8.0lf" GPRINT:a:AVERAGE:"Average\:%8.0lf" GPRINT:a:MAX:"Maximum\:%8.0lf"
12/03/2005 11:38:37 AM - WEBLOG: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool graph - --imgformat=PNG --start=1133545116 --end=1133631516 --title="Localhost - Logged in Users" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 COMMENT:"From 2005/12/02 11:38:36 To 2005/12/03 11:38:36\c" COMMENT:" \n" --vertical-label="users" DEF:a="/var/www/html/smonitor/rra/localhost_users_6.rrd":users:AVERAGE AREA:a#4668E4:"Users" GPRINT:a:LAST:"Current\:%8.0lf" GPRINT:a:AVERAGE:"Average\:%8.0lf" GPRINT:a:MAX:"Maximum\:%8.0lf"
12/03/2005 11:38:37 AM - WEBLOG: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool graph - --imgformat=PNG --start=1133545116 --end=1133631516 --title="Localhost - Memory Usage" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 COMMENT:"From 2005/12/02 11:38:36 To 2005/12/03 11:38:36\c" COMMENT:" \n" --vertical-label="kilobytes" DEF:a="/var/www/html/smonitor/rra/localhost_mem_buffers_3.rrd":mem_buffers:AVERAGE DEF:b="/var/www/html/smonitor/rra/localhost_mem_swap_4.rrd":mem_swap:AVERAGE AREA:a#FF4105:"Free" GPRINT:a:LAST:"Current\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\:%8.2lf %s" GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" STACK:b#FFC73B:"Swap" GPRINT:b:LAST:"Current\:%8.2lf %s" GPRINT:b:AVERAGE:"Average\:%8.2lf %s" GPRINT:b:MAX:"Maximum\:%8.2lf %s"
12/03/2005 11:38:37 AM - WEBLOG: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool graph - --imgformat=PNG --start=1133545116 --end=1133631516 --title="Localhost - Load Average" --rigid --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --units-exponent=0 COMMENT:"From 2005/12/02 11:38:36 To 2005/12/03 11:38:36\c" COMMENT:" \n" --vertical-label="processes in the run queue" DEF:a="/var/www/html/smonitor/rra/localhost_load_1min_5.rrd":load_1min:AVERAGE DEF:b="/var/www/html/smonitor/rra/localhost_load_1min_5.rrd":load_5min:AVERAGE DEF:c="/var/www/html/smonitor/rra/localhost_load_1min_5.rrd":load_15min:AVERAGE CDEF:cdefg=TIME,1133631217,GT,a,a,UN,0,a,IF,IF,TIME,1133631217,GT,b,b,UN,0,b,IF,IF,TIME,1133631217,GT,c,c,UN,0,c,IF,IF,+,+ AREA:a#EACC00:"1 Minute Average" GPRINT:a:LAST:" Current\:%8.2lf\n" STACK:b#EA8F00:"5 Minute Average" GPRINT:b:LAST:" Current\:%8.2lf\n" STACK:c#FF0000:"15 Minute Average" GPRINT:c:LAST:"Current\:%8.2lf\n" LINE1:cdefg#000000:""
12/03/2005 11:38:26 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/html/smonitor/poller_export.php]
12/03/2005 11:38:26 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/html/smonitor/poller_commands.php]
12/03/2005 11:38:26 AM - SYSTEM STATS: Time:1.0295 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
12/03/2005 11:38:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/smonitor/rra/localhost_proc_7.rrd --template proc 1133631505:145
12/03/2005 11:38:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/smonitor/rra/localhost_users_6.rrd --template users 1133631505:1
12/03/2005 11:38:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/smonitor/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min 1133631505:0.31:0.17:0.13
12/03/2005 11:38:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/smonitor/rra/localhost_mem_swap_4.rrd --template mem_swap 1133631505:1946208
12/03/2005 11:38:26 AM - POLLER: Poller[0] CACTI2RRD: /usr/local/rrdtool/bin/rrdtool update /var/www/html/smonitor/rra/localhost_mem_buffers_3.rrd --template mem_buffers 1133631505:61056
12/03/2005 11:38:26 AM - POLLER: Poller[0] Parsed MULTI output field '10min:0.13' [map 10min->load_15min]
12/03/2005 11:38:26 AM - POLLER: Poller[0] Parsed MULTI output field '5min:0.17' [map 5min->load_5min]
12/03/2005 11:38:26 AM - POLLER: Poller[0] Parsed MULTI output field '1min:0.31' [map 1min->load_1min]
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Time: 0.2535 s, Theads: N/A, Hosts: 1
12/03/2005 11:38:25 AM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Host[1] DS[7] CMD: perl /var/www/html/smonitor/scripts/unix_processes.pl, output: 145
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Host[1] DS[6] CMD: perl /var/www/html/smonitor/scripts/unix_users.pl, output: 1
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Host[1] DS[5] CMD: perl /var/www/html/smonitor/scripts/loadavg_multi.pl, output: 1min:0.31 5min:0.17 10min:0.13
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Host[1] DS[4] CMD: perl /var/www/html/smonitor/scripts/linux_memory.pl SwapFree:, output: 1946208
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Host[1] DS[3] CMD: perl /var/www/html/smonitor/scripts/linux_memory.pl MemFree:, output: 61056
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Host[1] No host availability check possible for '127.0.0.1'.
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] Host[1] SNMP: Device does not require SNMP
12/03/2005 11:38:25 AM - CMDPHP: Poller[0] PHP Script Server Started Properly
12/03/2005 11:38:25 AM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
12/03/2005 11:38:25 AM - PHPSVR: Poller[0] DEBUG: FILENM: /var/www/html/smonitor/script_server.php
12/03/2005 11:38:25 AM - PHPSVR: Poller[0] DEBUG: DIRNAM: /var/www/html/smonitor
12/03/2005 11:38:25 AM - PHPSVR: Poller[0] DEBUG: GETCWD: /var/www/html/smonitor
12/03/2005 11:38:25 AM - PHPSVR: Poller[0] DEBUG: SERVER: cmd
12/03/2005 11:38:25 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /var/www/html/smonitor/cmd.php 0 1]
Right now I have it setup as a cronjob, and I have to use root as the user. I have tried to setup the cactiuser as everyone says in the how-to's, but everytime I set the cron to cactiuser, then chown the rra/ and /log to cactisuer, the cron will not run, and when I try to view the cacti log file, it gives me a ton of permission errors.

Code: Select all

Warning: touch(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /var/www/html/smonitor/log/cacti.log owned by uid 655 in /var/www/html/smonitor/utilities.php on line 117

Warning: file(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /var/www/html/smonitor/log/cacti.log owned by uid 655 in /var/www/html/smonitor/utilities.php on line 118

Warning: file(/var/www/html/smonitor/log/cacti.log): failed to open stream: Success in /var/www/html/smonitor/utilities.php on line 118

Warning: array_reverse(): The argument should be an array in /var/www/html/smonitor/utilities.php on line 121

Warning: Invalid argument supplied for foreach() in /var/www/html/smonitor/utilities.php on line 126



Now if I try to use the cacti poller, (force update of poller.php)

I get this
12/03/2005 11:44:36 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/cactid, ARGS: 0 1]
Waiting on 1/1 pollers.
and it will scroll with "Waiting on 1/1 pollers." forever and never finish.

and here is the log from cacti poller

Code: Select all

 12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 10
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The PHP Script Server is Not Required
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: StartHost='0', EndHost='1', TotalPHPScripts='0'
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The script timeout is 25
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The number of concurrent processes is 1
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The polling interval is the system default
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The threads variable is 1
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The log_pstats variable is 0
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The log_pwarn variable is 0
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The log_perror variable is 1
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The ping_timeout variable is 400
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The ping_retries variable is 1
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The ping_method variable is 2
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The ping_failure_count variable is 2
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The ping_recovery_count variable is 3
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The availability_method variable is 2
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The path_php variable is /usr/bin/php
12/03/2005 11:45:00 AM - CACTID: Poller[0] DEBUG: The log_destination variable is 1
12/03/2005 11:45:00 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/cactid, ARGS: 0 1]
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The Maximum SNMP OID Get Size is 10
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The PHP Script Server is Not Required
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: StartHost='0', EndHost='1', TotalPHPScripts='0'
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The script timeout is 25
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The number of concurrent processes is 1
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The polling interval is the system default
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The threads variable is 1
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The log_pstats variable is 0
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The log_pwarn variable is 0
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The log_perror variable is 1
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The ping_timeout variable is 400
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The ping_retries variable is 1
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The ping_method variable is 2
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The ping_failure_count variable is 2
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The ping_recovery_count variable is 3
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The availability_method variable is 2
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The path_php variable is /usr/bin/php
12/03/2005 11:44:36 AM - CACTID: Poller[0] DEBUG: The log_destination variable is 1
12/03/2005 11:44:36 AM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/cactid, ARGS: 0 1]
Hope this is enough information, let me know if I am doing something wrong or if someone can see something not right.

Cheers
HyTeK
Posts: 11
Joined: Sat Dec 03, 2005 11:01 am

Post by HyTeK »

This is what I get for the output of the images

The image “http://xx.xx.xx.xx/smonitor/graph_image ... 1133632912” cannot be displayed, because it contains errors.
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Post by elnino »

Try turning off Safe Mode on PHP
HyTeK
Posts: 11
Joined: Sat Dec 03, 2005 11:01 am

Post by HyTeK »

I just double checked to ensure that safe mode was off, and it is.


As of right now, I have the cronjob setup with root as user, I am using the cmd.php poller, and right now in the cacti.log, every 5 minutes, all of the values appear to be updating their respective files in rra/.

I have run php poller.php and I get no errors, and so far I don't get any errors anywhere.

The only part of cacti I am confused about is the snmp options. I have the paths to snmpget and snmpwalk set, but that is about all I can find about that. cacti is installed on the local machine, but not sure if snmp would be causing my graphs to not show up at all. (in either graphs or graph management)

When I view the page source, I can see that there is suppose to be an image there, but when viewing the actual page, there is no image. just the buttons to zoom in on it and the text associated with that graph (Localhost - Memory Usage ect....)

let me know if you have any other ideas.

i have been trying a few things that I have seen on the forums...but nothing changes this one thing. no images show up at all.

and that last thing to add....if try to look at just the generated image via url (http://xx.xx.xxx.xx/smonitor/graph_imag ... 1133644425)
that is when I get the

Code: Select all

The image “http://xx.xx.xxx.xx/smonitor/graph_image.php?local_graph_id=3&rra_id=0&view_type=tree&graph_start=1070486025&graph_end=1133644425” cannot be displayed, because it contains errors.
looking at just the image url works because I have tried it on other cacti installations. So for some reason my images are getting errors. Any thoughts on this?
HyTeK
Posts: 11
Joined: Sat Dec 03, 2005 11:01 am

Post by HyTeK »

Well to add, when using IE, the only thing that is generated for the image is a number 0. So instead of generating an image, it gives me a 0.

(viewing the source in firefox shows 0 also, and gives you the image error)

So why would cacti be giving me a 0 for graphs/images?
HyTeK
Posts: 11
Joined: Sat Dec 03, 2005 11:01 am

Post by HyTeK »

I just went through ALL of my system logs, and this is the only thing that came up, in my error_log file, every time I try to generate graphs I get this in the log

Code: Select all

sh: line 1: /rrdtool: No such file or directory
sh: line 1: /rrdtool: No such file or directory
sh: line 1: /rrdtool: No such file or directory
sh: line 1: /rrdtool: No such file or directory
sh: line 1: /rrdtool: No such file or directory
and that is it. any idea why that is? (probably what ever this is, is making my images go blank :-? )
HyTeK
Posts: 11
Joined: Sat Dec 03, 2005 11:01 am

Post by HyTeK »

wow. happen to find this from 2003.
Ok i found the solution.
i did a link !
Code:
ln -s /usr/local/rrdtool-1.0.45/bin/rrdtool /rrdtool


strange
Nabil
and now the graph images show up.

now I get nan for all the data.

on to a new problem to resolve lol :roll:


SCRATCH THAT. it works now.

figures....all I had to do was create a LINK

so for those that are not getting images, (and everything else works) try making the link.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did you check your Settings for the binary Paths?
Reinhard
HyTeK
Posts: 11
Joined: Sat Dec 03, 2005 11:01 am

Post by HyTeK »

well, I edited my post above, and everything works now. The only thing I had to do was make the link as shown above.

Right now everything is working fine now. (except for the traffic stats and harddrive stats, can't get them to log data)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests