Hello,
I have heard that we could store measurements not only in RRD files but also in standard DataBase (mySQL for expl) using a task through xymon channel.
Where can I find such dev ?
Cordialement, Regards,Mit freundlichen Grüßen,
Gautier BEGIN
Admin and Tools Team CSC - Luxembourg
Global Outsourcing Service | p:+352 24 834 276 | m:+352 621 229 172 | gbegin at csc.com | www.csc.com
CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Computer Sciences SAS • Registered Office: Immeuble Le Balzac, 10 Place des Vosges, 92072 Paris La Défense Cedex, France • Registered in France: RCS Nanterre B 315 268 664
Den 09-03-2011 18:16, Gautier Begin skrev:
I have heard that we could store measurements not only in RRD files but also in standard DataBase (mySQL for expl) using a task through xymon channel.
Where can I find such dev ?
Depends on what you want to accomplish.
If you just want to store the "raw" status messages in an SQL database, then Japheth Cleaver wrote a very simple perl script for doing that. See http://lists.xymon.com/archive/2009-March/023782.html
If you want to pick up the individual data values that Xymon passes into the RRD files, then it gets more complicated. There is a "hook" into the xymond_rrd module that feeds all of the RRD data into another program; you launch this by running xymond_rrd with the "--processor=/path/to/script" option. The script must then be able to handle data in the form of one line per update, each line contains the RRD template (names of the datasets), the data values (colon-separated), the hostname, and the elements of the RRD filename. This isn't something that has been used much, so I really don't know what the impact would be of running this to store all data in an SQL database. Depends on the amount of data you are going to handle, obviously.
But I'm not aware of any such script being available, so you would have to code it yourself.
Regards, Henrik
Henrik,
I just tried but I got this error in the rrd-data.log: 2011-03-10 10:31:44 External processor '/project/hobbit0/bin/SQL_feed.pl' started 2011-03-10 10:31:44 exec() failed for child command /project/hobbit0/bin/SQL_feed.pl: Bad address 2011-03-10 10:32:02 Peer at 0.0.0.0:0 failed: Broken pipe 2011-03-10 10:32:02 Peer not up, flushing message queue 2011-03-10 10:32:02 Peer not up, flushing message queue 2011-03-10 10:32:02 Peer not up, flushing message queue 2011-03-10 10:32:32 Flushed 1 stale messages for 0.0.0.0:0 2011-03-10 10:36:28 Peer not up, flushing message queue
Here is my hobbitlaunch.cfg (XYMON version 4.3.0.0-beta2) [rrddata] ENVFILE /project/hobbit0/refer/xymon-4.3.0b2/server/etc/hobbitserver.cfg NEEDS hobbitd CMD hobbitd_channel --channel=data --log=$BBSERVERLOGS/rrd-data.log hobbitd_rrd --no-cache --extra-tests=zonestat,multicpu
--extra-script=/project/hobbit0/refer/xymon-4.3.0b2/server/ext/rrd_data.pl --rrddir=$BBVAR/rrd --processor=/project/hobbit0/bin/SQL_feed.pl
Cordialement, Regards,Mit freundlichen Grüßen,
Gautier BEGIN
Admin and Tools Team CSC - Luxembourg
Global Outsourcing Service | p:+352 24 834 276 | m:+352 621 229 172 | gbegin at csc.com | www.csc.com
CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Computer Sciences SAS • Registered Office: Immeuble Le Balzac, 10 Place des Vosges, 92072 Paris La Défense Cedex, France • Registered in France: RCS Nanterre B 315 268 664
From: Henrik Størner <henrik at hswn.dk> To: xymon at xymon.com Date: 09/03/2011 22:16 Subject: Re: [Xymon] Alternative DB to RRD
Den 09-03-2011 18:16, Gautier Begin skrev:
I have heard that we could store measurements not only in RRD files but also in standard DataBase (mySQL for expl) using a task through xymon channel.
Where can I find such dev ?
Depends on what you want to accomplish.
If you just want to store the "raw" status messages in an SQL database, then Japheth Cleaver wrote a very simple perl script for doing that. See http://lists.xymon.com/archive/2009-March/023782.html
If you want to pick up the individual data values that Xymon passes into the RRD files, then it gets more complicated. There is a "hook" into the xymond_rrd module that feeds all of the RRD data into another program; you launch this by running xymond_rrd with the "--processor=/path/to/script" option. The script must then be able to handle data in the form of one line per update, each line contains the RRD template (names of the datasets), the data values (colon-separated), the hostname, and the elements of the RRD filename. This isn't something that has been used much, so I really don't know what the impact would be of running this to store all data in an SQL database. Depends on the amount of data you are going to handle, obviously.
But I'm not aware of any such script being available, so you would have to code it yourself.
Regards, Henrik
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On Thu, 10 Mar 2011 10:49:16 +0100, Gautier Begin <gbegin at csc.com> wrote:
Henrik,
I just tried but I got this error in the rrd-data.log: 2011-03-10 10:31:44 External processor '/project/hobbit0/bin/SQL_feed.pl' started 2011-03-10 10:31:44 exec() failed for child command /project/hobbit0/bin/SQL_feed.pl: Bad address
"exec failed" means it couldn't start your SQL_feed.pl utility. Check that it has execute-permissions set. The "Bad address" part of the error message is the error reported by the operating system as result of the exec() function call.
I tried this on the www.xymon.com demo-site using this miniature shell script:
#!/bin/sh exec /bin/cat >>/var/tmp/rrdfeed.txt
and it seems to work ok. Here's some sample data:
la 1299755931:63 renoir.hswn.dk la la 1299755931:145 renoir.hswn.dk procs la 1299755931:0 renoir.hswn.dk users la 1299755931:0 renoir.hswn.dk clock pct:used 1299755931:26:2329324 renoir.hswn.dk disk ,root pct:used 1299755931:1:356 renoir.hswn.dk disk ,dev pct:used 1299755931:0:0 renoir.hswn.dk disk ,dev,shm pct:used 1299755931:1:340 renoir.hswn.dk disk ,var,run pct:used 1299755931:0:0 renoir.hswn.dk disk ,var,lock pct:used 1299755931:0:0 renoir.hswn.dk disk ,lib,init,rw pct:used 1299755931:3:985776 renoir.hswn.dk disk ,var pct:used 1299755931:5:45575540 renoir.hswn.dk disk ,var,lib,mythtv pct:used 1299755931:60:1160476788 renoir.hswn.dk disk ,var,lib,mythtv,videos realmempct 1299755931:36 renoir.hswn.dk memory real realmempct 1299755931:1 renoir.hswn.dk memory swap realmempct 1299755931:14 renoir.hswn.dk memory actual runtime 1299755941:0.05 jorn.hswn.dk xymongen
Regards, Henrik
participants (2)
-
gbegin@csc.com
-
henrik@hswn.dk