Move the main poller to be one of the remote pollers
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Move the main poller to be one of the remote pollers
We have a situation where our Main Poller is in a datacenter that is being decommissioned. Is there a preferred way to move the 'main' poller to be one of the already existing remote pollers? Or is there another suggestion?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Move the main poller to be one of the remote pollers
The main characteristics of the main poller is that is it always poller_id=1 in config.php. So, that's the big part. From my perspective. I'm thinking this might work:
1) Move all devices to the remote poller
2) Perform a full sync just in case.
3) Shutdown the main poller
4) Shutdown Cactid on the remote poller or cron if you are using it.
5) Delete the main remote poller from the poller table:
DELETE FROM poller WHERE id = remote_poller_id;
DELETE FROM poller_time WHERE id = remote_poller_id;
6) Update config.php on the new Mail poller and change $poller_id = 1;
7) For every table that has the 'remote_poller_id' change to poller_id = 1. Examples:
UPDATE automation_networks SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE automation_processes SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE host SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE poller_command SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE poller_item SET poller_id = 1 WHERE poller_id = remote_poller_id;
8) Restart cactid or cron.
That should do it.
1) Move all devices to the remote poller
2) Perform a full sync just in case.
3) Shutdown the main poller
4) Shutdown Cactid on the remote poller or cron if you are using it.
5) Delete the main remote poller from the poller table:
DELETE FROM poller WHERE id = remote_poller_id;
DELETE FROM poller_time WHERE id = remote_poller_id;
6) Update config.php on the new Mail poller and change $poller_id = 1;
7) For every table that has the 'remote_poller_id' change to poller_id = 1. Examples:
UPDATE automation_networks SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE automation_processes SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE host SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE poller_command SET poller_id = 1 WHERE poller_id = remote_poller_id;
UPDATE poller_item SET poller_id = 1 WHERE poller_id = remote_poller_id;
8) Restart cactid or cron.
That should do it.
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?
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?
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Move the main poller to be one of the remote pollers
This is great, I will use these steps when the time comes, What about the RRD files?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Move the main poller to be one of the remote pollers
It's as simple as this:
Code: Select all
scp -rp rra new-server:/var/www/html
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?
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?
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Move the main poller to be one of the remote pollers
I wanted to clarify one of the steps. On #1 you indicate to move all devices to the remote poller (assume the target 'new' main). Do you mean all devices that are associated with the (original) main poller, or literally all devices regardless of what poller they are associated with?
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Move the main poller to be one of the remote pollers
Depends on how many. If just a few hundred you can simply use the drop-down and switch pollers.
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?
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?
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Move the main poller to be one of the remote pollers
probably around 400 total devices across all pollers
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Move the main poller to be one of the remote pollers
Question is how many are moving?
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?
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?
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Move the main poller to be one of the remote pollers
most of them are vacated off the main poller now. only 20 or so still need to be moved off
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Move the main poller to be one of the remote pollers
A better and easier option would be to move all the devices from the remote site to the main site, then dump the main site, restore that database dump on the new primary poller. Make sure all remotes can talk in both directions to the new main, update the hostname information for poller id 1, then sync the rrds.
That seems easier.
That seems easier.
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?
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?
-
- Cacti User
- Posts: 92
- Joined: Wed Feb 27, 2013 10:57 am
- Location: Portland, OR
- Contact:
Re: Move the main poller to be one of the remote pollers
ok, I'll take a look at that. Thanks for helping clarify
Who is online
Users browsing this forum: No registered users and 1 guest