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.
remove_device.php & remove_graph.php CLI scripts
Moderators: Developers, Moderators
-
- Posts: 45
- Joined: Fri Jan 04, 2008 11:45 am
Re: remove_device.php & remove_graph.php CLI scripts
- Attachments
-
- remove_device.php.zip
- Remove a device, its graphs, and its data sources in one shot.
- (1.9 KiB) Downloaded 739 times
Re: remove_device.php & remove_graph.php CLI scripts
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?
Could we get it into the main repo?
- Attachments
-
- remove_device.php.zip
- (2.11 KiB) Downloaded 251 times
Who is online
Users browsing this forum: No registered users and 0 guests