can't create rrd files, can't update graphs

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

Moderators: Developers, Moderators

Post Reply
wade@work
Posts: 15
Joined: Thu Jun 02, 2005 6:25 am

can't create rrd files, can't update graphs

Post by wade@work »

Hello everybody!
Linux slackware 10.0
Apache 1.3.31
PHP 4.3.11
cacti latest

When i try to create graphs from web interface - rra files do not appears in cacti/rra directory. User apache (under wich apache working) has all permissions:

drwxrwxrwx 2 apache apache 176 2005-06-02 17:03 rra/

Then i go to "Graph Management" (web interface) and
RRDTool Says:

ERROR: opening '/chroot/httpd/www/q.ru/alex/cacti/rra/freebsd_server_load_1min_22.rrd': No such file or directory
Then I try to type in console:
/usr/local/bin/rrdtool create \
/chroot/httpd/www/q.ru/alex/cacti/rra/freebsd_server_load_1min_22.rrd \
--step 300 \
DS:load_15min:GAUGE:600:0:500 \
DS:load_5min:GAUGE:600:0:500 \
DS:load_1min:GAUGE:600:0:500 \
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 \
File freebsd_server_load_1min_22.rrd was created. I change permissions to apache group and user. Blank graph created, but after this graph don't want to update.

Help me please and i'm sorry for my english :-D

From Russia.
Last edited by wade@work on Fri Jun 03, 2005 2:19 am, edited 1 time in total.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Well, if you are using a chroot, you need to link or have a copy of RRDtool in the chroot, so the web server can use it.

Also, you need to have the poller scheduled to retrieve that data.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
wade@work
Posts: 15
Joined: Thu Jun 02, 2005 6:25 am

Post by wade@work »

Hello!
Thanks for the answer.

I create symbolic links for /usr/local/bin/rrdtool , /usr/local/bin/rrdupdate , /usr/local/bin/rrdcgi to /chroot/httpd/www/q.ru/alex/cacti/binary/rrdtool ... etc.

But rrd files do not appears. Also i try to simply copy binaries of rrdtools to this directory. No effect.

Then i try to use cactid. When i start him from command line then he is wrote:
# php /chroot/httpd/www/q.ru/alex/cacti/poller.php
06/03/2005 01:14:53 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /chroot/httpd/www/q.ru/alex/cacti/binary/cactid, ARGS: 0 6]
Waiting on 1/1 pollers.
/usr/local/php/bin/rrdtool: not found
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
Waiting on 1/1 pollers.
^C

And so on indefinitely
Help me plase ))
p.s. All things described in this post i do on freebsd 4.8
Thus both the Linux Slackware (first post) and the Freebsd do not create rra files. ((
wade@work
Posts: 15
Joined: Thu Jun 02, 2005 6:25 am

Post by wade@work »

On linux (there are not using chroot) I try to use standard poller.php from command line interface:
php /usr/local/apache/htdocs/cacti/poller.php
06/03/2005 01:57:52 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/local/bin/php, ARGS: -q /usr/local/apache/htdocs/cacti/cmd.php 0 2]
Waiting on 1/1 pollers.
sh: line 1: -O: command not found
06/03/2005 01:57:53 PM - SYSTEM STATS: Time: 1.2456 s, Method: cmd.php, Processes: 1, Threads: N/A, Hosts: 2, Hosts/Process: 2
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Before you go into production with Cactid, is is best to test it out. Set logging to DEBUG. Then, open a shell windows and CD to the cactid binary. Make sure that your cactid.conf is accurate and then run "./cactid". Record any error messages and resolve prior to picking that poller in the Web UI.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
wade@work
Posts: 15
Joined: Thu Jun 02, 2005 6:25 am

Post by wade@work »

This is a result of runnung ¨./cactid¨:
CACTID: Using cactid config file [cactid.conf]
CACTID: DEBUG: The path_php_server variable is /chroot/httpd/www/q.ru/alex/cacti/script_server.php
CACTID: DEBUG: The path_cactilog variable is /chroot/httpd/www/q.ru/alex/cacti/log/cacti.log
CACTID: DEBUG: The log_destination variable is 1
CACTID: DEBUG: The path_php variable is /usr/bin/php
CACTID: DEBUG: The availability_method variable is 2
CACTID: DEBUG: The ping_recovery_count variable is 3
CACTID: DEBUG: The ping_failure_count variable is 2
CACTID: Non Window envrionment, running as root, ICMP Ping available
CACTID: DEBUG: The ping_method variable is 2
CACTID: DEBUG: The ping_retries variable is 1
CACTID: DEBUG: The ping_timeout variable is 400
CACTID: DEBUG: The log_perror variable is 1
CACTID: DEBUG: The log_pwarn variable is 1
CACTID: DEBUG: The log_pstats variable is 1
CACTID: DEBUG: The threads variable is 1
CACTID: CACTID: Version 0.8.6d starting
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: DEBUG: PHP Script Server Routine Started
CACTID: DEBUG: PHP Script Server About to FORK Child Process
CACTID: DEBUG: PHP Script Server Child FORK Success
CACTID: DEBUG: Confirmed PHP Script Server Running
CACTID: DEBUG: Initial Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: Host[2] SNMP Result: Host did not respond to SNMP
CACTID: DEBUG: SQLCMD: update host set status='1',status_event_count='3', status_fail_date='0000-00-00 00:00:00',status_rec_date='0000-00-00 00:00:00',status_last_error='Host did not respond to SNMP',min_time='9.999990',max_time='0.000000',cur_time='0.000000',avg_time='0.000000',total_polls='4',failed_polls='4',availability='0.0000' where id='2'

CACTID: Host[2] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: The Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: Host[3] SNMP Result: Host did not respond to SNMP
CACTID: DEBUG: SQLCMD: update host set status='1',status_event_count='3', status_fail_date='0000-00-00 00:00:00',status_rec_date='0000-00-00 00:00:00',status_last_error='Host did not respond to SNMP',min_time='9.999990',max_time='0.000000',cur_time='0.000000',avg_time='0.000000',total_polls='4',failed_polls='4',availability='0.0000' where id='3'

CACTID: Host[3] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: The Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: Host[6] SNMP Result: Host did not respond to SNMP
CACTID: DEBUG: SQLCMD: update host set status='1',status_event_count='3', status_fail_date='0000-00-00 00:00:00',status_rec_date='0000-00-00 00:00:00',status_last_error='Host did not respond to SNMP',min_time='9.999990',max_time='0.000000',cur_time='0.000000',avg_time='0.000000',total_polls='1',failed_polls='1',availability='0.0000' where id='6'

CACTID: Host[6] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: The Value of Active Threads is 0
CACTID: DEBUG: SQLCMD: replace into settings (name,value) values ('date',NOW())
CACTID: DEBUG: SQLCMD: insert into poller_time (poller_id, start_time, end_time) values (0, NOW(), NOW())
CACTID: DEBUG: Thread Cleanup Complete
CACTID: DEBUG: PHP Script Server Shutdown Started
CACTID: DEBUG: PHP Script Server Pipes Closed
CACTID: DEBUG: Allocated Variable Memory Freed
CACTID: DEBUG: MYSQL Free & Close Completed
CACTID: Execution Time: 6.6941 s, Threads: 1, Hosts: 3
Thanks!
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Be sure that you are running poller.php, it will call cactid. Using cactid by it's self will not update the RRD's, that is poller.php's job.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Looks good, it should work.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests