Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Moderators: Developers, Moderators
Cacti 0.8.8h-1.el7 -nan error Cent OS 7
I have tried installing Cacti multiple times now using the online instructions and only 1 in 4 worked, but the graphing stopped working. Consistently get the webapp up and running but the graphs are broken.
Here is a history of the commands I run on a fully updated Cent OS 7 core VM to install and configure Cacti:
10 yum install -y httpd httpd-devel
11 yum install -y mysql mysql-server
12 yum install -y php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli
13 yum install -y php-snmp
14 yum install -y net-snmp-utils net-snmp-libs
15 yum install -y rrdtool
16 systemctl start httpd.service
17 systemctl start mariadb.service
18 systemctl start snmpd.service
19 systemctl enable httpd.service
20 systemctl enable mariadb.service
21 systemctl enable snmpd.service
23 yum install -y epel-release
24 yum repolist
25 yum install -y cacti
28 mysqladmin -u root password xxx
29 mysql -u root -p
36 rpm -ql cacti | grep cacti.sql
37 mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8h/cacti.sql
38 nano /etc/cacti/db.php
39 firewall-cmd --permanent --zone=public --add-service=http
40 firewall-cmd --reload
41 nano /etc/httpd/conf.d/cacti.conf
42 systemctl restart httpd.service
43 nano /etc/cron.d/cacti
44 ifconfig
For the settings you can't see with this history I followed the instructions specifically from this website:
http://www.tecmint.com/install-cacti-ne ... ora-17-12/
This package seems to be broken out of the box. I ran the "rrdtool fetch...." command, NaN resulted. I also compared the output of "rrd info ..." command and verified that this command doesn't output anything higher than what is defined for MAX, or lower for MIN.
I have to manually create a /var/log/cacti directory, and create a file 'cacti.log' because the packaged doesn't create this. Only a broken symlink is created, and the install screen in the webgui will always show "error path not found" for the log file path. This made diagnostics very difficult. Once I got the logfile path setup the way Cacti expects, I see a lot of 'date.timezone' errors for multiple different php scripts, even though I set the date.timezone variable correctly in php.ini.
Has anyone run into this scenario? Any tips would be appreciated. I find the debugging page http://forums.cacti.net/about15136.html to be vague in places.
Here is a history of the commands I run on a fully updated Cent OS 7 core VM to install and configure Cacti:
10 yum install -y httpd httpd-devel
11 yum install -y mysql mysql-server
12 yum install -y php-mysql php-pear php-common php-gd php-devel php php-mbstring php-cli
13 yum install -y php-snmp
14 yum install -y net-snmp-utils net-snmp-libs
15 yum install -y rrdtool
16 systemctl start httpd.service
17 systemctl start mariadb.service
18 systemctl start snmpd.service
19 systemctl enable httpd.service
20 systemctl enable mariadb.service
21 systemctl enable snmpd.service
23 yum install -y epel-release
24 yum repolist
25 yum install -y cacti
28 mysqladmin -u root password xxx
29 mysql -u root -p
36 rpm -ql cacti | grep cacti.sql
37 mysql -u cacti -p cacti < /usr/share/doc/cacti-0.8.8h/cacti.sql
38 nano /etc/cacti/db.php
39 firewall-cmd --permanent --zone=public --add-service=http
40 firewall-cmd --reload
41 nano /etc/httpd/conf.d/cacti.conf
42 systemctl restart httpd.service
43 nano /etc/cron.d/cacti
44 ifconfig
For the settings you can't see with this history I followed the instructions specifically from this website:
http://www.tecmint.com/install-cacti-ne ... ora-17-12/
This package seems to be broken out of the box. I ran the "rrdtool fetch...." command, NaN resulted. I also compared the output of "rrd info ..." command and verified that this command doesn't output anything higher than what is defined for MAX, or lower for MIN.
I have to manually create a /var/log/cacti directory, and create a file 'cacti.log' because the packaged doesn't create this. Only a broken symlink is created, and the install screen in the webgui will always show "error path not found" for the log file path. This made diagnostics very difficult. Once I got the logfile path setup the way Cacti expects, I see a lot of 'date.timezone' errors for multiple different php scripts, even though I set the date.timezone variable correctly in php.ini.
Has anyone run into this scenario? Any tips would be appreciated. I find the debugging page http://forums.cacti.net/about15136.html to be vague in places.
- Attachments
-
- graphs not graphing.
- cacti error2.JPG (44.38 KiB) Viewed 3705 times
-
- output of 'rrdtool fetch' command
- cacti error.JPG (29.61 KiB) Viewed 3705 times
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Show us the section where you set it. Did you also restart httpd after making the change? You may also try disabling selinux to see if that resolves it temporarily.even though I set the date.timezone variable correctly in php.ini.
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
I have always set SElinux to permissive with "setenforce 0" and also edited /etc/sysconfig/selinux SELINUX=permissive.
- Attachments
-
- where i set the php timezone
- php timezone.JPG (45.29 KiB) Viewed 3702 times
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Update: setting SELinux to permanently permissive and editing the date.timezone value in php.ini (and rebooting) Brought the graphs online. Logfile still broken (fixable) I will let you know how the mURLin plugin fares.
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Ya, just want to verify that you removed the ; in front of that line in php.ini, as that is commenting it out.
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Update 2: removed the colon from date.timezone line in /etc/php.ini. rebooted. Installed and enabled mURLin plugin. Graphs not displaying data.
Here is the history of my commands leading up to the mURLin install and subsequent non-functioning state:
101 gunzip mURLin-0.2.4.tar.gz
103 tar -xvf mURLin-0.2.4.tar -C /usr/share/cacti/plugins
104 cd /usr/share/cacti
106 cd plugins/
108 cd mURLin/
111 chmod 775 -R mURLin/
113 cd mURLin/
116 cd /etc/php.ini
117 nano /etc/php.ini
118 reboot
119 history
It looks like the smooth operation achieved prior to installing and activating the mURLin plugin broke the graphing system again.
Let me know if you have any suggestions, Thanks.
Here is the history of my commands leading up to the mURLin install and subsequent non-functioning state:
101 gunzip mURLin-0.2.4.tar.gz
103 tar -xvf mURLin-0.2.4.tar -C /usr/share/cacti/plugins
104 cd /usr/share/cacti
106 cd plugins/
108 cd mURLin/
111 chmod 775 -R mURLin/
113 cd mURLin/
116 cd /etc/php.ini
117 nano /etc/php.ini
118 reboot
119 history
It looks like the smooth operation achieved prior to installing and activating the mURLin plugin broke the graphing system again.
Let me know if you have any suggestions, Thanks.
- Attachments
-
- after mURLin install.JPG (70.7 KiB) Viewed 3677 times
- phalek
- Developer
- Posts: 2838
- Joined: Thu Jan 31, 2008 6:39 am
- Location: Kressbronn, Germany
- Contact:
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
With PHP 7 installed, you have a pretty good chance that most plugins aren't compatible yet.
Check your php error log for a clue on what it may be. ( see the error_log setting in php.ini to enable it )
Check your php error log for a clue on what it may be. ( see the error_log setting in php.ini to enable it )
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Not using PHP 7. Also I had to change the chronjob to run as root, and put all the contents of the /usr/share/cacti directory to "apache:apache" owner and group.
I left the webapp running overnight, when I left It had only a few splotchy things graphed. I cam back to weird graphing behavior, where it seems like only things an hour old get graphed, no new data.
Is there any way to get cacti graphing correctly without having the chronjob run as root?
I left the webapp running overnight, when I left It had only a few splotchy things graphed. I cam back to weird graphing behavior, where it seems like only things an hour old get graphed, no new data.
Is there any way to get cacti graphing correctly without having the chronjob run as root?
- Attachments
-
- php version
- php version.PNG (6.32 KiB) Viewed 3649 times
-
- graphing only data that is an hour or older
- hour late graphing.PNG (42.67 KiB) Viewed 3649 times
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Usually this happens because your system timezone and configured PHP.ini timezone are different, thus it is showing current time data, but for a different timezone so it appears "behind".
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Update 3: Can confirm that changing system time to match the date.timezone variable in /etc/php.ini fixed the graphing display issue.
There is only a small difference between system time and php time, but they are both set to America/Chicago. See screenshot.
used this command:
timedatectl set-timezone America/Chicago
I will now try to build another Cacti instance from scratch, and install the mURLin plugin, without setting the chronjob to run as root.
Thanks for your help cigamit, I really appreciate it!
There is only a small difference between system time and php time, but they are both set to America/Chicago. See screenshot.
used this command:
timedatectl set-timezone America/Chicago
I will now try to build another Cacti instance from scratch, and install the mURLin plugin, without setting the chronjob to run as root.
Thanks for your help cigamit, I really appreciate it!
- Attachments
-
- minmal graphing lag.PNG (45.58 KiB) Viewed 3625 times
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
Update 4: I reinstalled Cacti as per the commands listed previously in this post. Did not attempt the mURLin plugin yet. The only difference with this new VM is:
Before installing cacti: fully updated selinux disabled, policy kit action applied, set system time to America/Chicago
date.timezone is set appropriately.
chronjob line uncommented.
set /usr/share/cacti/ contents to apache:apache.
repaired broken cacti.log symlink.
Here are the versions of dependencies:
[root@localhost cacti]# rpm -qa | grep cacti
cacti-0.8.8h-1.el7.noarch
[root@localhost cacti]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@localhost cacti]# rpm -qa | grep php
php-process-5.4.16-36.1.el7_2.1.x86_64
php-pear-1.9.4-21.el7.noarch
php-cli-5.4.16-36.1.el7_2.1.x86_64
php-pdo-5.4.16-36.1.el7_2.1.x86_64
php-gd-5.4.16-36.1.el7_2.1.x86_64
php-mysql-5.4.16-36.1.el7_2.1.x86_64
php-mbstring-5.4.16-36.1.el7_2.1.x86_64
php-snmp-5.4.16-36.1.el7_2.1.x86_64
php-common-5.4.16-36.1.el7_2.1.x86_64
php-xml-5.4.16-36.1.el7_2.1.x86_64
php-devel-5.4.16-36.1.el7_2.1.x86_64
php-5.4.16-36.1.el7_2.1.x86_64
[root@localhost cacti]# rpm -qa | grep http
httpd-tools-2.4.6-40.el7.centos.1.x86_64
httpd-2.4.6-40.el7.centos.1.x86_64
httpd-devel-2.4.6-40.el7.centos.1.x86_64
[root@localhost cacti]# rpm -qa | grep net-
net-snmp-libs-5.7.2-24.el7_2.1.x86_64
net-snmp-utils-5.7.2-24.el7_2.1.x86_64
net-snmp-agent-libs-5.7.2-24.el7_2.1.x86_64
net-snmp-5.7.2-24.el7_2.1.x86_64
net-tools-2.0-0.17.20131004git.el7.x86_64
[root@localhost cacti]# rpm -qa | grep rrd
rrdtool-1.4.8-9.el7.x86_64
[root@localhost rra]# date
Thu Jun 30 14:01:09 CDT 2016
It seems like the .rrd files never got created. That could be because I installed it and then uncommented the cronjob line, but otherwise I don't think I made any mistakes.
HELP!
Before installing cacti: fully updated selinux disabled, policy kit action applied, set system time to America/Chicago
date.timezone is set appropriately.
chronjob line uncommented.
set /usr/share/cacti/ contents to apache:apache.
repaired broken cacti.log symlink.
Here are the versions of dependencies:
[root@localhost cacti]# rpm -qa | grep cacti
cacti-0.8.8h-1.el7.noarch
[root@localhost cacti]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@localhost cacti]# rpm -qa | grep php
php-process-5.4.16-36.1.el7_2.1.x86_64
php-pear-1.9.4-21.el7.noarch
php-cli-5.4.16-36.1.el7_2.1.x86_64
php-pdo-5.4.16-36.1.el7_2.1.x86_64
php-gd-5.4.16-36.1.el7_2.1.x86_64
php-mysql-5.4.16-36.1.el7_2.1.x86_64
php-mbstring-5.4.16-36.1.el7_2.1.x86_64
php-snmp-5.4.16-36.1.el7_2.1.x86_64
php-common-5.4.16-36.1.el7_2.1.x86_64
php-xml-5.4.16-36.1.el7_2.1.x86_64
php-devel-5.4.16-36.1.el7_2.1.x86_64
php-5.4.16-36.1.el7_2.1.x86_64
[root@localhost cacti]# rpm -qa | grep http
httpd-tools-2.4.6-40.el7.centos.1.x86_64
httpd-2.4.6-40.el7.centos.1.x86_64
httpd-devel-2.4.6-40.el7.centos.1.x86_64
[root@localhost cacti]# rpm -qa | grep net-
net-snmp-libs-5.7.2-24.el7_2.1.x86_64
net-snmp-utils-5.7.2-24.el7_2.1.x86_64
net-snmp-agent-libs-5.7.2-24.el7_2.1.x86_64
net-snmp-5.7.2-24.el7_2.1.x86_64
net-tools-2.0-0.17.20131004git.el7.x86_64
[root@localhost cacti]# rpm -qa | grep rrd
rrdtool-1.4.8-9.el7.x86_64
[root@localhost rra]# date
Thu Jun 30 14:01:09 CDT 2016
It seems like the .rrd files never got created. That could be because I installed it and then uncommented the cronjob line, but otherwise I don't think I made any mistakes.
HELP!
- Attachments
-
- develcactilog.txt
- cacti log DEVEL
- (836.46 KiB) Downloaded 131 times
-
- httpderrorlog.txt
- httpd error log
- (22.73 KiB) Downloaded 164 times
-
- no data being graphed.
- broken graphs again.PNG (14.7 KiB) Viewed 3620 times
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
SOLUTION
run "chown cacti:apache *.*" in /usr/share/cacti directory.
run "chown cacti:apache *.*" in /usr/share/cacti directory.
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
I have a similar issue on Centos 7 - Graph data is not drawn with just -nan showing instead of data.
I tried the above inc the permissions change on directory structures but still the same here *confused*
I tried the above inc the permissions change on directory structures but still the same here *confused*
Re: Cacti 0.8.8h-1.el7 -nan error Cent OS 7
try changing the chronjob user to 'root' and see if that works.
Who is online
Users browsing this forum: No registered users and 4 guests