Re-poll all devices from CLI

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Hinzel
Posts: 16
Joined: Thu Feb 18, 2010 6:01 pm

Re-poll all devices from CLI

Post by Hinzel »

Hey,

I wrote a quick and dirty little PHP script that you can run from the shell which will re-poll every device in cacti. This is beneficial for our setup as we have a lot of access layer switches where the port descriptions frequently change, and having to manually re-poll each device causes a lot of stale/outdated descriptions.

Using a combination of this and autom8, after creating in the device we never have to manually create any graphs.

I have this cron'd to run twice a day, at noon and midnight.

-Matt
Attachments
re-poll.php.txt
(753 Bytes) Downloaded 202 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Voting for accepting your script on 088.
Do you grant copyright to The Cacti Group for it?
R.
Hinzel
Posts: 16
Joined: Thu Feb 18, 2010 6:01 pm

Post by Hinzel »

gandalf wrote:Voting for accepting your script on 088.
Do you grant copyright to The Cacti Group for it?
R.
Absolutely, feel free to modify/distribute as you see fit.

Nice work on autom8 by the way :)
Hinzel
Posts: 16
Joined: Thu Feb 18, 2010 6:01 pm

Post by Hinzel »

Added a couple things.

Original script only ran with a data query id of 1, script now accepts the parameter "--id=$param_num" so you can re-poll any data query you would like.
Attachments
re-poll.php.txt
(2.27 KiB) Downloaded 205 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests