Help in migrating cacti from old box to new box

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

Moderators: Developers, Moderators

Post Reply
mail3dexter
Posts: 10
Joined: Fri Aug 28, 2015 7:01 am

Help in migrating cacti from old box to new box

Post by mail3dexter »

I have problems migrating cacti from old box to new box

I had followed this doc to migrate :

Code: Select all

http://www.cacti.net/downloads/docs/html/upgrade.html
Few details:
old cacti version : 0.8.8b
new cacti version : 0.8.8g
old / new RRDTool version 1.4.7
Old OS : CentOS 6.7 x86_64
New OS : CentOS 6.7 x86_64

I had followed these steps:
1. backup old mysql data
2. download and extract new cacti in httpd folder /var/www/html/
3. update new cacti config file in include/config.php
4. rsync -av --chown=apache:apache cacti_old/rra/* cacti/rra/
5. rsync -av --chown=apache:apache cacti_old/resource/* cacti/resource/
6: chmod -R 755 /var/www/html/cacti/rra
7: chmod -R 755 /var/www/html/cacti/log
8. restore old database to cacti db on new box
9. restarted httpd deamon
10. run manually poller /usr/bin/php /var/www/html/cacti/poller.php
11. resolved dependencies in custom scripts
12. added cron entry
*/5 * * * * apache /usr/bin/php /var/www/html/cacti/poller.php > /dev/null 2>&1

SELinux and IPTables are disabled

I am able to view old data perfectly however new data is not getting populated.

When I saw RRDTool info, i think it is not writing data.

cacti poller log doesnt shows any errors.

Cacti Poller Log :
Old:
03/07/2016 04:46:00 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
03/07/2016 04:46:00 PM - SYSTEM STATS: Time:58.0844 Method:cmd.php Processes:5 Threads:N/A Hosts:181 HostsPerProcess:37 DataSources:11224 RRDsProcessed:5393
New:
03/07/2016 04:42:48 PM - POLLER: Poller[0] Maximum runtime of 58 seconds exceeded. Exiting.
03/07/2016 04:42:48 PM - SYSTEM STATS: Time:58.0466 Method:cmd.php Processes:8 Threads:N/A Hosts:181 HostsPerProcess:23 DataSources:11232 RRDsProcessed:2472
RRDTool Info :
Old :

Code: Select all

http://pastebin.com/raw/FKtnLZmf
New :

Code: Select all

http://pastebin.com/raw/5Sppd6Hb
RRD Graph :
Old box :

Code: Select all

http://prntscr.com/ac95ox
New Box :

Code: Select all

http://prntscr.com/ac95i4
Since this is a new box, it is not yet whitelisted on all devices for SNMP access however I have whitelisted this box on 2-3 devices for testing and is not working. Localhost data is also not getting populated.

I am okay if there is gap in between data because of old and new cacti poller in cron being shut
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Help in migrating cacti from old box to new box

Post by phalek »

You should try switching to spine. Your box is just not capable to handle the updates/load with cmd.php and stops after 60 secs, failing to gather/update all rrd files.
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
mail3dexter
Posts: 10
Joined: Fri Aug 28, 2015 7:01 am

Re: Help in migrating cacti from old box to new box

Post by mail3dexter »

But the new box is more powerful than the old box.

How come old box is processing all graphs and new one is not ?
mail3dexter
Posts: 10
Joined: Fri Aug 28, 2015 7:01 am

Re: Help in migrating cacti from old box to new box

Post by mail3dexter »

mail3dexter wrote:But the new box is more powerful than the old box.

How come old box is processing all graphs and new one is not ?
1 more thing.. Atleast I should be able to see the data which was successfully polled before poller giving up?
I dont even see that in graphs..
mail3dexter
Posts: 10
Joined: Fri Aug 28, 2015 7:01 am

Re: Help in migrating cacti from old box to new box

Post by mail3dexter »

Found a script which was causing slowness. Removed it for timebeing..

Now pollers are able to complete in time but still none of the graphs are being updated since migration.
[root@cacti rra]# tailf /var/www/html/cacti/log/cacti.log | grep "SYSTEM\|Maximum runtime"
03/07/2016 11:14:20 PM - SYSTEM STATS: Time:19.1576 Method:cmd.php Processes:4 Threads:N/A Hosts:138 HostsPerProcess:35 DataSources:4837 RRDsProcessed:2468
03/07/2016 11:14:20 PM - SYSTEM THOLD STATS: Time:0.0008 Tholds:0 TotalHosts:137 DownHosts:14 NewDownHosts:0
03/07/2016 11:15:20 PM - SYSTEM STATS: Time:18.6849 Method:cmd.php Processes:4 Threads:N/A Hosts:138 HostsPerProcess:35 DataSources:4837 RRDsProcessed:2465
03/07/2016 11:15:20 PM - SYSTEM THOLD STATS: Time:0.0008 Tholds:0 TotalHosts:137 DownHosts:14 NewDownHosts:0
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Help in migrating cacti from old box to new box

Post by phalek »

Try increasing the logging to debug and check for any errors especially for rrd updates.

Maybe look for the permissions of the rra dir itself and check the log and log directory for proper permissions.
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
mail3dexter
Posts: 10
Joined: Fri Aug 28, 2015 7:01 am

Re: Help in migrating cacti from old box to new box

Post by mail3dexter »

I am in between manually running cacti poller in debug mode with flag -d but that is not showing any error/permission issues.

I have verified that the RRD's are getting updated.

How?
if I issue command rrdtool lastupdate <filename> then it shows the last update value with time stamp which is current time in epoch.

Also, if I watch the modified date/time of that RRD file, it gets updated every poller time in my case it is 1 min.

Last night, I did install spine and tried to switch to spine but I guess spine is not even processing anything. I think the RPM of spine which I used is not proper.

Code: Select all

ftp://ftp.momo-i.org/pub/rpms/el/6/x86_64/cacti-spine-0.8.8g-1.el6.x86_64.rpm
Hence I switched back to cmd.php and went to sleep.

Today morning, when I saw the graphs, they were getting udpated but since there was a lot of gap between my graphs, I again did a rsync from old box to new box which again caused issues. :(
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Help in migrating cacti from old box to new box

Post by phalek »

Maybe just a simple timezone issue ?

Did you set it in your php.ini file ?
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
mail3dexter
Posts: 10
Joined: Fri Aug 28, 2015 7:01 am

Re: Help in migrating cacti from old box to new box

Post by mail3dexter »

Yes, timezone is set in php.ini
mail3dexter
Posts: 10
Joined: Fri Aug 28, 2015 7:01 am

Re: Help in migrating cacti from old box to new box

Post by mail3dexter »

Anyways, please mark this resolved. I have setup a new cacti instance and have setup from scratch. Will use both cacti for time being.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests