A way to add 4000 data sources?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
zero
Posts: 2
Joined: Fri Jan 20, 2006 7:52 am
Location: Dortmund, Germany

A way to add 4000 data sources?

Post by zero »

Hi everybody,
I want to add about four thousand data sources. But I can’t add them manually because it’s too much work… So I want to build a script which adds them automatically. But I don’t know how I can write the sources in the cactidb. So I need an example for a command that adds a data source to a MySQL db! Please help me. I hope it’s doable. Thx!

I use cacti on Linux, perhaps it’s important ;).

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

Post by gandalf »

Do you refer to data source or to host/device which need adding? For hosts, there have been scripts on the Scripts and Template forum. But they are not officially supported and personally, I don't have any experience with them.
A common API will not be available until cacti 0.9 which has not yet be scheduled. Perhpas adding the hosts is the easy task. But I suppose you will want to create graphs for them as well ... :roll:
Reinhard
zero
Posts: 2
Joined: Fri Jan 20, 2006 7:52 am
Location: Dortmund, Germany

Post by zero »

I want to add data sources which have no host ;). Cause is I filled the rrd-files with a script... So I don't have a problem with the hosts only with the data sources

@ IVM
mit der suchfunktion habe ich die scripte für die hosts leider nicht gefunden. Du hast nicht zufällig nen link? Oder weisst noch wie das Thema hiess. Vielleicht finde ich ja darin ne anregung wie es gehen könnte. Grüße nach Münster :D.
Last edited by zero on Thu Jan 26, 2006 6:36 am, edited 1 time in total.
cflorio
Cacti User
Posts: 54
Joined: Fri Feb 11, 2005 3:04 pm

Post by cflorio »

I am also interested in a solution to this problem. I am going to be working on a project that will be bigger than this one, but am waiting on getting some hardware to throw at this problem. In the mean time, knowing how to add these data sources as well as graphs would be very helpful!

Thanks!
Exo7
Cacti User
Posts: 136
Joined: Wed Jul 13, 2005 4:50 pm

Post by Exo7 »

Cacti database scheme is available at
http://www.cacti.net/downloads/docs/sql ... schema.pdf

you can look at add_device.php & add_graph.php posted in the script forum as a starting point.
Be warned : the database scheme in Cacti 0.9 will change.

Another way is to write a Perl LWP agent to interact with the cacti interface instead of the database.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests