Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon May 29, 2017 8:25 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: remove_device.php & remove_graph.php CLI scripts
PostPosted: Thu Feb 16, 2012 2:21 pm 
Offline

Joined: Fri Jan 04, 2008 11:45 am
Posts: 45
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:
File comment: Remove a device, its graphs, and its data sources in one shot.
remove_device.php.zip [1.9 KiB]
Downloaded 565 times
Top
 Profile  
 
 Post subject: Re: remove_device.php & remove_graph.php CLI scripts
PostPosted: Sun Sep 25, 2016 6:44 am 
Offline

Joined: Sun Sep 25, 2016 6:40 am
Posts: 1
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 74 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group