Xymon Mailing List Archive search

rrd2mysql gateway

5 messages in this thread

list Stef Coene · Mon, 24 Nov 2008 14:20:43 +0100 ·
Hi,

I really need to get the rrd counters in a mysql database.  I was able to hack hobbitd/do_rrd.c: on each update a perl script is executed with the parameters updparams[1], hostname, updparams[3] and updparams[4].  This is not working because for every update, the perl script is executed and this fills up the memory of my server.

I also tried to replace the perl script with a shell script that puts all the data in a named pipe.  But this blocks the hobbit rrd module.

So, can anyone help with more C knowledge then I have?
I was thinking about a non-blocking named pipe in hobbitd/do_rrd.c.  Or maybe an extra communication channel like hobbit uses internal.
The best solution would be adding mysql support to hobbit. but I also need to do some conversion of the data and I prefer to do this in perl.

Thanx in advance,


Stef
list Galen Johnson · Mon, 24 Nov 2008 08:25:27 -0500 ·
Why do it through Xymon at all?  You know where the rrds are.  Why not use the perl rrd modules that come with rrd and access the rrds directly?

=G=
quoted from Stef Coene

-----Original Message-----
From: Stef Coene [mailto:user-dbffe946c0f4@xymon.invalid] Sent: Monday, November 24, 2008 8:21 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] rrd2mysql gateway

Hi,

I really need to get the rrd counters in a mysql database.  I was able to hack hobbitd/do_rrd.c: on each update a perl script is executed with the parameters updparams[1], hostname, updparams[3] and updparams[4].  This is not working because for every update, the perl script is executed and this fills up the memory of my server.

I also tried to replace the perl script with a shell script that puts all the data in a named pipe.  But this blocks the hobbit rrd module.

So, can anyone help with more C knowledge then I have?
I was thinking about a non-blocking named pipe in hobbitd/do_rrd.c.  Or maybe an extra communication channel like hobbit uses internal.
The best solution would be adding mysql support to hobbit. but I also need to do some conversion of the data and I prefer to do this in perl.

Thanx in advance,


Stef
list Stef Coene · Mon, 24 Nov 2008 15:02:45 +0100 ·
quoted from Galen Johnson
On Monday 24 November 2008, Galen Johnson wrote:
Why do it through Xymon at all?  You know where the rrds are.  Why not use
the perl rrd modules that come with rrd and access the rrds directly?
I use Xymon for monitoring and the graphs are nice to have.
My collague created long time ago some script that runs on AIX and Windows that stores counters in an oracle database.  He then used an excell spreadsheet to pull out the numbers and create graphs.  This setup is changed so it uses a mysql database.  He is also writing a web-based report tool in perl but he insist in using mysql and some java tools to create graphs.

So, we have 2 sets of script for trending and graphing.

If I can store all (or some) rrd counters in mysql, I can start merging the monitoring scripts.


Stef
list Galen Johnson · Mon, 24 Nov 2008 11:31:53 -0500 ·
Just so it's clear...are you trying to replace the rrd datastore with mysql (a la Nagios)?  Or just have it dump to a mysql database as well?
quoted from Stef Coene

=G=

-----Original Message-----
From: Stef Coene [mailto:user-dbffe946c0f4@xymon.invalid] Sent: Monday, November 24, 2008 9:03 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] rrd2mysql gateway

On Monday 24 November 2008, Galen Johnson wrote:
Why do it through Xymon at all?  You know where the rrds are.  Why not use
the perl rrd modules that come with rrd and access the rrds directly?
I use Xymon for monitoring and the graphs are nice to have.
My collague created long time ago some script that runs on AIX and Windows that stores counters in an oracle database.  He then used an excell spreadsheet to pull out the numbers and create graphs.  This setup is changed so it uses a mysql database.  He is also writing a web-based report tool in perl but he insist in using mysql and some java tools to create graphs.

So, we have 2 sets of script for trending and graphing.

If I can store all (or some) rrd counters in mysql, I can start merging the monitoring scripts.


Stef
list Stef Coene · Mon, 24 Nov 2008 19:02:29 +0100 ·
quoted from Galen Johnson
On Monday 24 November 2008, Galen Johnson wrote:
Just so it's clear...are you trying to replace the rrd datastore with mysql
(a la Nagios)?  Or just have it dump to a mysql database as well?
Dump it to mysql as well.

Actually, I want to get rid of the mysql for creating graphs, but that means I 
also have to get rid of my collague and that's not see easy....


Stef