Deactivate data source from command line

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
sini
Cacti User
Posts: 91
Joined: Mon Nov 24, 2003 10:22 am
Location: Hungary

Deactivate data source from command line

Post by sini »

Hi

I would like to avoid updating rrd files for graphs/interfaces which has no longer traffic on it because I`d like to create an archive page to see all these old graphs for a while... but if i don`t switch off the "data source active" value my rra files will be overwritten.
So how can i switch this value off from command line or sql?
If there is some kind of plugin which do the same (archive) let me know.

THX
Sini
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Deactivate data source from command line

Post by gandalf »

You may run a mass-disable from browser: Goto Data Sources, select those which shall be disabled and select the disable option from the action dropdown.
This is IMHO not available from cli, yet
R.
sini
Cacti User
Posts: 91
Joined: Mon Nov 24, 2003 10:22 am
Location: Hungary

Re: Deactivate data source from command line

Post by sini »

I`d like to automate the process so the cli will be better. When will it be part of the cacti cli scripts?
Sini
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Deactivate data source from command line

Post by gandalf »

You may create that code on your own. You may start with one of the existing cli scripts to get an idea how to code the args handling. The code that performs deactivating can be taken from data_sources.php. See the form_actions function to find the essential SQL
R.
sini
Cacti User
Posts: 91
Joined: Mon Nov 24, 2003 10:22 am
Location: Hungary

Re: Deactivate data source from command line

Post by sini »

Yes, I`ve already started, thx for the function tip!
Sini
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest