Hello
I'm a network admin and I have a little problem on my network with cacti, I have 30 routers 100 switchs and a some servers, I guess that add manually is a bit hard, some one here knows about some shell, perl that could do it automatically, getting snmp packet and inclute on database when they discovery a new host
regards
add host automatically
Moderators: Developers, Moderators
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Search is your friend.
I remember someone posting a add script in the Scripts and Templates forum.
I remember someone posting a add script in the Scripts and Templates forum.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
little impatient? anyway, I added a couple hundred devices to our cacti installation, take a look at the database structure and it isn't hard at all. If you want to go so far as to actually add the graphs and such that is quite a bit more difficult, but just writing a script to add it as a device is fairly easy. (that alone saved the vast majority of time, after they are in the system you just need to go and select the interfaces to graph)
Auto add script
I've tweaked the host adding script so you can just pass it a host file. I have it automatically figure out which host template to use, and assign it to the customer (graphs_tree) I specify. It works well. I'd really like to have it automatically select the graphs I want when I add the host.
I've been looking through all the apis and other cacti scripts, but am not making much progress. I know the exact criteria I want, so it should be possible.
As an example, for a cisco router, I always want CPU, and active interfaces that have a description, or are a vlan.
Any suggestions where I should look?
utility.php looked the most promising, but I'm just not exactly sure whats going on behind the scenes when a graphs is added.
Thanks!
I've been looking through all the apis and other cacti scripts, but am not making much progress. I know the exact criteria I want, so it should be possible.
As an example, for a cisco router, I always want CPU, and active interfaces that have a description, or are a vlan.
Any suggestions where I should look?
utility.php looked the most promising, but I'm just not exactly sure whats going on behind the scenes when a graphs is added.
Thanks!
~ Anselon ~
Who is online
Users browsing this forum: No registered users and 7 guests