Hello, just wondering if there is a way that we can delete data sources and graphs via cli in the same way that they can be created? We run an ISP that requires operational staff to monitor up to 100 data sources (customer subinterface traffic) for a period of time and then delete the graphs/data sources to avoid filling up the 1 minute poller we've deployed. It would be great if we could programmically remove graphs/data sources after a week via a cron process etc.
Alternatively could this be achieved with some plugin development?
Regards, Richard M
CLI commands to delete graphs and data sources.
Moderators: Developers, Moderators
remove_graph and remove_device are in SVN (I wouldn't use them for production - that's not true, I would use them for production, I wouldn't _recommend_ them for production)
They should either work, or only require minor tweaking to work with 087
They should either work, or only require minor tweaking to work with 087
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
SVN suggestion
Thanks for that. I'll certainly try the development version and will provide some feedback if necessary.
remove_graph.php errors
Tried the SVN version of remove_graph.php and had a couple of errors as shown below. The graphs and data sources seem to be deleted ok however?
[root@210 cli]# php remove_graph.php --graph-id=12 --force
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 157
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 158
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 159
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 160
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 161
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 163
PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 167
PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 167
Removing graph and all resources for graph id 12. Success - removed graph-id: (12)
[root@210 cli]# php remove_graph.php --graph-id=12 --force
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 157
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 158
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 159
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 160
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 161
PHP Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 163
PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 167
PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/cacti/include/global_settings.php:1196) in /var/www/cacti/include/global.php on line 167
Removing graph and all resources for graph id 12. Success - removed graph-id: (12)
Who is online
Users browsing this forum: No registered users and 4 guests