Help: Cacti stop graphing

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

Moderators: Developers, Moderators

Post Reply
billnight
Posts: 10
Joined: Wed May 10, 2006 12:11 pm

Help: Cacti stop graphing

Post by billnight »

Hello,
We have cacti running on a linux box for sometime now. Just found out it stop graphing a few days ago. I don't think anyone changed any setting. I looked up the "config.php" and it show correct user, database, password word information. I tried following:
1. Clear Poller cache
2. Reboot linux box
Now I still cannot see graph and found following errer in cacti log:
05/17/2006 10:04:09 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 10:03:10 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 10:02:10 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 10:02:06 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 10:01:09 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 10:00:10 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 10:00:10 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 10:00:02 AM - SYSTEM STATS: Time:292.5485 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources: RRDsProcessed:0
05/17/2006 10:00:02 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
05/17/2006 09:59:10 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 09:58:09 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 09:57:10 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 09:56:10 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 09:55:09 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 09:55:09 AM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
05/17/2006 09:55:03 AM - SYSTEM STATS: Time:292.5458 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources: RRDsProcessed:0
05/17/2006 09:55:03 AM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You surely verified, that mysqld is up and running? Please try to connect from cli as a test
Reinhard
billnight
Posts: 10
Joined: Wed May 10, 2006 12:11 pm

no graph

Post by billnight »

I restarted mysql service and I got two new message in the log. Still not graph.
I clicked on System Utility\Puller Cache and SNMP Cache, nothing there.

Please advise. Thanks.

05/17/2006 02:40:03 PM - SYSTEM STATS: Time:293.5792 Method:cmd.php Processes:1 Threads:N/A Hosts:1 HostsPerProcess:1 DataSources: RRDsProcessed:0
05/17/2006 02:40:03 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
05/17/2006 02:37:10 PM - CMDPHP: Poller[0] ERROR: Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please open a shell and run the following command:

mysql cacti
> show tables;

If you get what you should get, you may have an issue where you don't have enough connections. That would be odd. But you should get an informative message none the least. Post your response.

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?
billnight
Posts: 10
Joined: Wed May 10, 2006 12:11 pm

Show tables;

Post by billnight »

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2934 to server version: 4.1.12

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


mysql> show tables;
+------------------------------+
| Tables_in_cacti |
+------------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| mac_track_device_types |
| mac_track_devices |
| mac_track_ips |
| mac_track_ports |
| mac_track_processes |
| mac_track_scan_dates |
| mac_track_scanning_functions |
| mac_track_sites |
| mac_track_temp_ports |
| plugin_discover_hosts |
| plugin_discover_os |
| plugin_update_info |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| thold |
| thold_data |
| thold_template |
| tholdset |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+------------------------------+
64 rows in set (0.00 sec)

mysql>
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

So the cacti user interface works? Ok, what happens when you do the following:

1) Turn logging to DEBUG
2) Open a command shell
3) cd to the <cacti_web_root>
4) run the following command "php <cacti_web_root>/cmd.php"

Post the output.

Thanks,

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?
billnight
Posts: 10
Joined: Wed May 10, 2006 12:11 pm

output

Post by billnight »

I set the poller logging level to Debug, saved it, and issue the following command :
[root@graph html]# php ./www/html/cmd.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

05/17/2006 05:33:45 PM - CMDPHP: Poller[0] PHP Script Server Started Properly
05/17/2006 05:33:45 PM - CMDPHP: Poller[0] Host[1] SNMP: Host responded to SNMP
05/17/2006 05:33:45 PM - CMDPHP: Poller[0] Host[1] RECACHE: Processing 1 items in the auto reindex cache for '127.0.0.1'.
05/17/2006 05:33:46 PM - CMDPHP: Poller[0] Host[1] DS[3] CMD: /usr/bin/perl /var/www/html/scripts/linux_memory.pl MemFree:, output: 233836
05/17/2006 05:33:46 PM - CMDPHP: Poller[0] Host[1] DS[4] CMD: /usr/bin/perl /var/www/html/scripts/linux_memory.pl SwapFree:, output: 352904
05/17/2006 05:33:46 PM - CMDPHP: Poller[0] Host[1] DS[5] CMD: /usr/bin/perl /var/www/html/scripts/loadavg_multi.pl, output: 1min:7.28 5min:6.91 10min:6.03
05/17/2006 05:33:46 PM - CMDPHP: Poller[0] Host[1] DS[6] CMD: /usr/bin/perl /var/www/html/scripts/unix_users.pl, output: 1
05/17/2006 05:33:46 PM - CMDPHP: Poller[0] Host[1] DS[7] CMD: /usr/bin/perl /var/www/html/scripts/unix_processes.pl, output: 75
05/17/2006 05:33:46 PM - CMDPHP: Poller[0] Host[1] DS[8] SERVER: /var/www/html/scripts/ss_poller.php ss_poller, output: Time:28.1255 Method:cactid Processes:1 Threads:30 Hosts:244 HostsPerProcess:244 DataSources:6656 RRDsProcessed:2368
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Don't do the "." ok. Do it this way now:

php -q /var/www/html/cacti/cmd.php

Or what ever is correct.

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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I am guessing that maybe php can't find the php_mysql.so file. Edit your PHP.INI file and make sure the extension's path is correct.

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?
billnight
Posts: 10
Joined: Wed May 10, 2006 12:11 pm

Post by billnight »

thanks for reply. here is what happening now after I enter
php cmd.php

............
05/17/2006 05:37:04 PM - CMDPHP: Poller[0] Host[5] DS[129] SNMP: v2: 154.54.90.252, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.32, output: 1711914836
05/17/2006 05:37:05 PM - CMDPHP: Poller[0] Host[5] DS[130] SNMP: v2: 154.54.90.252, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.33, output: 319479176
05/17/2006 05:37:05 PM - CMDPHP: Poller[0] Host[5] DS[130] SNMP: v2: 154.54.90.252, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.33, output: 201287741
05/17/2006 05:37:05 PM - CMDPHP: Poller[0] Host[5] DS[131] SNMP: v2: 154.54.90.252, dsname: 5min_cpu, oid: .1.3.6.1.4.1.9.2.1.58.0, output: 0
05/17/2006 05:37:05 PM - CMDPHP: Poller[0] Host[5] DS[132] SNMP: v2: 154.54.90.252, dsname: errors_in, oid: .1.3.6.1.2.1.2.2.1.14.1, output: 0
05/17/2006 05:37:06 PM - CMDPHP: Poller[0] Host[5] DS[132] SNMP: v2: 154.54.90.252, dsname: discards_in, oid: .1.3.6.1.2.1.2.2.1.13.1, output: 0
05/17/2006 05:37:07 PM - CMDPHP: Poller[0] Host[5] DS[132] SNMP: v2: 154.54.90.252, dsname: discards_out, oid: .1.3.6.1.2.1.2.2.1.19.1, output: 39
05/17/2006 05:37:07 PM - CMDPHP: Poller[0] Host[5] DS[132] SNMP: v2: 154.54.90.252, dsname: errors_out, oid: .1.3.6.1.2.1.2.2.1.20.1, output: 0
05/17/2006 05:37:07 PM - CMDPHP: Poller[0] Host[5] DS[133] SNMP: v2: 154.54.90.252, dsname: errors_in, oid: .1.3.6.1.2.1.2.2.1.14.21, output: 0
05/17/2006 05:37:07 PM - CMDPHP: Poller[0] Host[5] DS[133] SNMP: v2: 154.54.90.252, dsname: discards_in, oid: .1.3.6.1.2.1.2.2.1.13.21, output: 0
05/17/2006 05:37:07 PM - CMDPHP: Poller[0] Host[5] DS[133] SNMP: v2: 154.54.90.252, dsname: discards_out, oid: .1.3.6.1.2.1.2.2.1.19.21, output: 0
05/17/2006 05:37:08 PM - CMDPHP: Poller[0] Host[5] DS[133] SNMP: v2: 154.54.90.252, dsname: errors_out, oid: .1.3.6.1.2.1.2.2.1.20.21, output: 0
05/17/2006 05:37:08 PM - CMDPHP: Poller[0] Host[5] DS[134] SNMP: v2: 154.54.90.252, dsname: errors_in, oid: .1.3.6.1.2.1.2.2.1.14.22, output: 11
05/17/2006 05:37:08 PM - CMDPHP: Poller[0] Host[5] DS[134] SNMP: v2: 154.54.90.252, dsname: discards_in, oid: .1.3.6.1.2.1.2.2.1.13.22, output: 0
05/17/2006 05:37:08 PM - CMDPHP: Poller[0] Host[5] DS[134] SNMP: v2: 154.54.90.252, dsname: discards_out, oid: .1.3.6.1.2.1.2.2.1.19.22, output: 0
05/17/2006 05:37:08 PM - CMDPHP: Poller[0] Host[5] DS[134] SNMP: v2: 154.54.90.252, dsname: errors_out, oid: .1.3.6.1.2.1.2.2.1.20.22, output: 0
05/17/2006 05:37:09 PM - CMDPHP: Poller[0] Host[5] DS[135] SNMP: v2: 154.54.90.252, dsname: errors_in, oid: .1.3.6.1.2.1.2.2.1.14.23, output: 0
05/17/2006 05:37:09 PM - CMDPHP: Poller[0] Host[5] DS[135] SNMP: v2: 154.54.90.252, dsname: discards_in, oid: .1.3.6.1.2.1.2.2.1.13.23, output: 0
05/17/2006 05:37:09 PM - CMDPHP: Poller[0] Host[5] DS[135] SNMP: v2: 154.54.90.252, dsname: discards_out, oid: .1.3.6.1.2.1.2.2.1.19.23, output: 0
05/17/2006 05:37:09 PM - CMDPHP: Poller[0] Host[5] DS[135] SNMP: v2: 154.54.90.252, dsname: errors_out, oid: .1.3.6.1.2.1.2.2.1.20.23, output: 0
05/17/2006 05:37:10 PM - CMDPHP: Poller[0] Host[5] DS[136] SNMP: v2: 154.54.90.252, dsname: errors_in, oid: .1.3.6.1.2.1.2.2.1.14.24, output: 386
05/17/2006 05:37:10 PM - CMDPHP: Poller[0] Host[5] DS[136] SNMP: v2: 154.54.90.252, dsname: discards_in, oid: .1.3.6.1.2.1.2.2.1.13.24, output: 0
05/17/2006 05:37:10 PM - CMDPHP: Poller[0] Host[5] DS[136] SNMP: v2: 154.54.90.252, dsname: discards_out, oid: .1.3.6.1.2.1.2.2.1.19.24, output: 1084263
.
.
.

the output is still rolling
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

So, this is a cron/environment issue with your cron user. Now that I have pointed you in the correct direction, you got it?

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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Bill,

please paste what you put into the crontab to your next post.

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?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Also, post your php.ini file.

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 2 guests