Graph multiple items with a single polling script

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

Moderators: Developers, Moderators

Post Reply
User avatar
proc
Posts: 4
Joined: Wed Aug 27, 2008 1:35 pm

Graph multiple items with a single polling script

Post by proc »

I have been asked to graph the usage statistics of about 30 different databases. All of the databases reside on the same server, and, because of the database server, the only way to get usage stats out of it is to run a command and parse the output (there is only a certain amount of space within the database server associated to each database).

I put together a small perl script which ssh's to the server, runs the command against the supplied database, parses the output, and spits out the percentage used.

I had no problems graphing the first database. Actually, that is a lie.. I missed one step, the graph template, the first go around, but the how-to was a great help. Anyhow, I got it graphing one of the datbases.

Now, when I went to add the ability to graph the second database, I went to the device, selected "create graphs for this host", selected "Database Usage" from the pull down (I am already graphing "Database Usage" for the first database), clicked "create", filled in the form (database name and host name -- btw, is there a way to pass the host name on to the script automatically based upon the device rather than supplying it?), and submitted it.

The end result was that I had two graphs, but only the latest one was populating. It's as if the second one overwrote the settings for the first one.

Perhaps I am approaching this incorrectly.. maybe I need to create something similar to the "disk usage" data query, but I'm not even sure how to approach that just yet.

Is what I am trying to do even possible? The end result I am looking for it 20 graphs, one for each database, displaying the percentage used.

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

Post by gandalf »

There's a mysql monitoring script in the scripts and templates forum. I recommend that one as a basis for your own task. It is able to connect to a remote mysql database. Then, please find more hints at the first link of my sig
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests