|
|
| Author |
Message |
rcaston Cacti User
Joined: 06 Jan 2004 Posts: 199 Location: US-Dallas, TX
|
Posted: Wed Jun 27, 2007 2:24 pm Post subject: |
|
|
| TheWitness wrote: | Next month. You can add the api function without issue.
Larry |
woot.
i'll finally be able to add thousands of interfaces  |
|
| Back to top |
|
 |
earl26
Joined: 23 Oct 2007 Posts: 2
|
Posted: Tue Oct 23, 2007 9:46 am Post subject: |
|
|
Hello,
we also need to manage hosts and graphs from outside cacti.
is this CLI yet stable?
is there a chance to disable/remove a hosts or graphs over CLI-interface?
regards |
|
| Back to top |
|
 |
rony Developer/Forum Admin
Joined: 17 Nov 2003 Posts: 5453 Location: Wisconsin, USA
|
Posted: Tue Oct 23, 2007 10:06 am Post subject: |
|
|
CLI are only designed for adding.
They will be available in the release of 0.8.7.
Deleting can easily be figured out by looking into the Cacti code. |
|
| Back to top |
|
 |
earl26
Joined: 23 Oct 2007 Posts: 2
|
Posted: Thu Oct 25, 2007 2:21 am Post subject: |
|
|
| thanks a lot for this excellent work. |
|
| Back to top |
|
 |
jcampos
Joined: 10 Oct 2008 Posts: 1
|
Posted: Fri Oct 10, 2008 3:19 pm Post subject: suggestion |
|
|
excellent work.
it's possible that the developers of the "cli" for the next version, add_graphs.php added to the graphics options interfaces that match different values snmp_field and snmp_value, I explain.
Today I can do something like this.
| Code: | php -q /export/home/mordor/cacti/cli/add_graphs.php \
--graph-type=ds \
--graph-template-id=32 \
--host-id=ID-HOST \
--snmp-query-id=1 \
--snmp-query-type-id=21 \
--snmp-field=ifType \
--snmp-value=ethernetCsmacd |
I like to do something like this:
| Code: | php -q /export/home/mordor/cacti/cli/add_graphs.php \
--graph-type=ds \
--graph-template-id=32 \
--host-id=ID-HOST \
--snmp-query-id=1 \
--snmp-query-type-id=21 \
--snmp-field=ifType&ifOperStatus\
--snmp-value=ethernetCsmacd&Up \ |
this because I'm measuring the network has more than 500 teams and many more 15000 interfaces to be measured.
Greetings
forgiveness for my English but I am of chile and not speak the language very much |
|
| Back to top |
|
 |
felimwhiteley
Joined: 10 Dec 2007 Posts: 22
|
Posted: Thu Nov 27, 2008 9:26 am Post subject: |
|
|
Not sure about Deleting being that easy to figure out, there's not plans I take it for a script to handle it then ?
I've got a lot of hosts that change IP, and unfortunately they don't play well with DNS. So a script notifies me of an IP address change. So I tried a bit of SQL (It's hundreds changing allt he time... don't ask!)
Basically changed the host table where the cacti_id was one I was looking for and changed it's hostanme to the new address. Doesn't work. Something else appears to be done when that happens, looking through the PHP code (I'm not a PHP developer alas) looks like a whole raft of SQL updates need to be performed.
Dont' suppose there's a chance of a CLI tool to do that too ? |
|
| Back to top |
|
 |
rony Developer/Forum Admin
Joined: 17 Nov 2003 Posts: 5453 Location: Wisconsin, USA
|
Posted: Fri Nov 28, 2008 3:52 pm Post subject: |
|
|
| Yes, scripts will be added for deleting. |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12275 Location: Muenster, Germany
|
Posted: Mon Dec 01, 2008 7:57 am Post subject: |
|
|
Not before 088, as far as I'm concerned. We will supply a "delete" and an "update" interface for most objects. "list" options will be split off of current "add" scripts for sake of performance and design
Reinhard |
|
| Back to top |
|
 |
felimwhiteley
Joined: 10 Dec 2007 Posts: 22
|
Posted: Mon Dec 01, 2008 8:04 am Post subject: |
|
|
| gandalf wrote: | Not before 088, as far as I'm concerned. We will supply a "delete" and an "update" interface for most objects. "list" options will be split off of current "add" scripts for sake of performance and design
Reinhard |
Presume the delete of a host will allow the ripple down deleting of all graphs and data sources too ? |
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12275 Location: Muenster, Germany
|
Posted: Mon Dec 01, 2008 8:26 am Post subject: |
|
|
This one should already be there. See SVN of 087 branch. You may check it out and try on 087-style cacti. Comments are welcomed
Reinhard |
|
| Back to top |
|
 |
felimwhiteley
Joined: 10 Dec 2007 Posts: 22
|
Posted: Mon Dec 01, 2008 9:24 am Post subject: |
|
|
| gandalf wrote: | This one should already be there. See SVN of 087 branch. You may check it out and try on 087-style cacti. Comments are welcomed
Reinhard |
Hmm not working, but might be my fault if there's sometihng needing tweaking from my Ubuntu Cacti Install (0.8.7b) ?
Warning: include_once(): Failed opening 'CACTI_BASE_PATH/lib/api_device.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/cacti/site/cli/remove_device.php on line 38
Fatal error: Call to undefined function getHosts() in /usr/share/cacti/site/cli/remove_device.php on line 47
Either that or perhaps I can get away with copying some of the api libs form SVN into mine... afriad it might mess it up though. Is the remove feature going to be in 0.8.7c then ? |
|
| Back to top |
|
 |
felimwhiteley
Joined: 10 Dec 2007 Posts: 22
|
Posted: Mon Dec 01, 2008 10:05 am Post subject: |
|
|
| felimwhiteley wrote: | | but might be my fault if there's sometihng needing tweaking from my Ubuntu Cacti Install (0.8.7b) ? |
That would be a yes
Changed CACTI_BASE_PATH to $config["base_path"]
Worked a treat.. cheers gandalf |
|
| Back to top |
|
 |
|