remove_device.php & remove_graph.php CLI scripts

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

ptaylor874
Posts: 45
Joined: Fri Jan 04, 2008 11:45 am

Re: remove_device.php & remove_graph.php CLI scripts

Post by ptaylor874 »

Using the originally posted version of the remove_device.php script has the side-effect of leaving orphaned graphs and data sources (as mentioned by TheWitness).

I've altered the remove_device.php script to remove the graphs and data sources for the host being removed. I didn't go quite as far as TheWitness suggested, however. No regex support, etc. Just pass it a host ID and it will delete the host, the graphs, and the data sources.
Attachments
remove_device.php.zip
Remove a device, its graphs, and its data sources in one shot.
(1.9 KiB) Downloaded 739 times
richarda
Posts: 1
Joined: Sun Sep 25, 2016 6:40 am

Re: remove_device.php & remove_graph.php CLI scripts

Post by richarda »

I've updated this script adding support for removing all data sources and graphs, and also for removing a device via hostname.

Could we get it into the main repo?
Attachments
remove_device.php.zip
(2.11 KiB) Downloaded 251 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests