add host automatically

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

Moderators: Developers, Moderators

Post Reply
mac_senna
Posts: 4
Joined: Tue Dec 13, 2005 2:03 pm

add host automatically

Post by mac_senna »

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
mac_senna
Posts: 4
Joined: Tue Dec 13, 2005 2:03 pm

Post by mac_senna »

if some one here knows, could u send to me?

albertofsantos@gmail.com


ty again
mac_senna
Posts: 4
Joined: Tue Dec 13, 2005 2:03 pm

Post by mac_senna »

????
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Search is your friend.

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]
mac_senna
Posts: 4
Joined: Tue Dec 13, 2005 2:03 pm

Post by mac_senna »

ty
rkramer
Cacti User
Posts: 54
Joined: Fri Jun 03, 2005 12:25 pm

Post by rkramer »

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)
anselon
Posts: 10
Joined: Fri Dec 02, 2005 1:03 pm
Contact:

Auto add script

Post by anselon »

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!
~ Anselon ~
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests