Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.61k stars 399 forks source link

The cacti polar has not run yet #2422

Closed ndhami23 closed 5 years ago

ndhami23 commented 5 years ago

Hi, I've done a fresh install of cacti 1.2.1 in Centos7. And after installing the cacti I am not able to plot the graph and it shows "The cacti poller has not run yet" and upon checking the logs I'm getting below error. Can someone please suggest what can be the issue and how can I resolve it. I believe the directory permissions are ok however there are no rrd files in rra directory.

ls -l /var/www/html/cacti/ drwxrwxrwx 2 cactiuser cactiuser 22 Jan 20 11:01 rra

[root@localhost ~]# less /etc/cron.d/cacti

/5 * nginx php /usr/share/nginx/html/cacti/poller.php &>/dev/null

/5 * cactiuser php /usr/share/nginx/html/cacti/poller.php &>/dev/null

ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_proc_1.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_load_1min_2.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_mem_buffers_4.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_load_1min_2.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_users_3.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_proc_1.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_load_1min_2.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_mem_buffers_4.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_users_3.rrd': No such file or directory ERROR: opening '/var/www/html/cacti/rra/local_linux_machine_proc_1.rrd': No such file or directory

image

netniV commented 5 years ago

This would suggest that you have different paths setup in your database compared to what is actually on the file system (based on your cron lines). Check the MySQL database’s settings table to see if all the paths are defined correctly.

netniV commented 5 years ago

Additionally use the Troubleshooting -> Data Sources to diagnose any further issues.

Berserk04 commented 5 years ago

hello! I apologize for my knowledge of the language. I do not show graphics. on the graph the error shows "the cacti poller has not run yet"

netniV commented 5 years ago

Follow the advise above.

cigamit commented 5 years ago

Please take this issue up on the forums. Not trying to be difficult, but this is a location for bug reports, not online training.

cigamit commented 5 years ago

There are literally hundreds of video on YouTube in multiple languages that show how to install and operate Cacti.

ndhami23 commented 5 years ago

HI Ciagmit,

Sorry for the late reply. I was actually out of town and couldn't update the post regularly. My issue related to cacti poller has been resolved after I corrected the paths in cacti cronjob file however I am still not getting the graph on web UI even for a local host itself. The SNMP walk on a local server is ok.

Cron entry:

/5 * root /usr/bin/php -q /var/www/html/cacti/poller.php --force >> /var/www/html/cacti/poller-error.log 2>&1

Output of poller-error.log is: ERROR: unknown option '--skip-past-updates' ERROR: unknown option '--skip-past-updates' ERROR: unknown option '--skip-past-updates' ERROR: unknown option '--skip-past-updates' ERROR: unknown option '--skip-past-updates' ERROR: unknown option '--skip-past-updates' ERROR: unknown option '--skip-past-updates' 2019/02/21 12:25:02 - SYSTEM STATS: Time:1.2298 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:9 RRDsProcessed:7

I edited /lib/rrd.php:

                            if (cacti_version_compare(get_rrdtool_version(),'1.5','>=')) {
                                    $update_options='--skip-past-updates';
                            } else {
                                    $update_options='';
                            }

To: if (cacti_version_compare(get_rrdtool_version(),'1.5','>=')) { $update_options='’; } else { $update_options=''; }

The following cron entry finally worked:

/5 * root /usr/bin/php -q /var/www/html/cacti/poller.php --force >> /var/www/html/cacti/poller-error.log 2>&1

Output of poller-error.log is: OK u:0.00 s:0.00 r:0.00 OK u:0.00 s:0.00 r:0.00 OK u:0.00 s:0.00 r:0.00 OK u:0.00 s:0.00 r:0.00 OK u:0.00 s:0.00 r:0.00 OK u:0.00 s:0.00 r:0.00 OK u:0.00 s:0.00 r:0.00 2019/02/21 16:20:03 - SYSTEM STATS: Time:1.2241 Method:spine Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:9 RRDsProcessed:7

The cron entry is updating the file modified time, but the file size is not changing and graph is not being plotted.

-rw-r--r-- 1 root root 189024 Feb 21 16:15 ktm-tr-1_traffic_in_13.rrd -rw-r--r-- 1 root root 189024 Feb 21 16:15 ktm-tr-1_traffic_in_14.rrd -rw-r--r-- 1 root root 282440 Feb 21 16:15 local_linux_machine_load_1min_2.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:15 local_linux_machine_mem_buffers_4.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:15 local_linux_machine_mem_swap_5.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:15 local_linux_machine_proc_1.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:15 local_linux_machine_users_3.rrd

-rw-r--r-- 1 root root 189024 Feb 21 16:20 ktm-tr-1_traffic_in_13.rrd -rw-r--r-- 1 root root 189024 Feb 21 16:20 ktm-tr-1_traffic_in_14.rrd -rw-r--r-- 1 root root 282440 Feb 21 16:20 local_linux_machine_load_1min_2.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:20 local_linux_machine_mem_buffers_4.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:20 local_linux_machine_mem_swap_5.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:20 local_linux_machine_proc_1.rrd -rw-r--r-- 1 root root 95608 Feb 21 16:20 local_linux_machine_users_3.rrd

I checked the tcpdump, I can see snmp request is going and is being replied. But data is not updated on file. Can you please suggest what wrong I am doing here and how can I fix it.

netniV commented 5 years ago

Your change isn't right. v1.5 introduced that option so it would mean that you have rrdtool v1.4 but set it to 1.5 in the settings.

ndhami23 commented 5 years ago

thx I changed the rrd settings and now real-time graphs are plotting however graph is still not plotting.

image image