Alternative DB to RRD
list Gautier Begin
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 | user-083785ae1711@xymon.invalid | 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
list Henrik Størner
▸
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
list Gautier Begin
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 | user-083785ae1711@xymon.invalid | 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 <user-ce4a2c883f75@xymon.invalid>
To:
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
list Henrik Størner
▸
On Thu, 10 Mar 2011 10:49:16 +0100, Gautier Begin <user-083785ae1711@xymon.invalid> 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
list Henrik Størner
Den 10-03-2011 16:11, Gautier Begin skrev:
My version of XYMON should have a bug. It won't work ! and my script is in 777 and the path is the good one.
Try using the 2-line shell script I posted and let it run for 10-15 minutes. Then take the output file and feed it as input to your script and see what happens.
I tried this on the www.xymon.comdemo-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
Regards,
Henrik
list Gautier Begin
It seems as the order of options is important in the cfg file. => could you provide me your configuration
▸
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 | user-083785ae1711@xymon.invalid | 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 <user-ce4a2c883f75@xymon.invalid>
To:
"xymon at xymon.com" <xymon at xymon.com>
Date:
10/03/2011 17:43
▸
Subject:
Re: [Xymon] Alternative DB to RRD
Den 10-03-2011 16:11, Gautier Begin skrev:My version of XYMON should have a bug. It won't work ! and my script is in 777 and the path is the good one.
Try using the 2-line shell script I posted and let it run for 10-15 minutes. Then take the output file and feed it as input to your script and see what happens.
I tried this on the www.xymon.comdemo-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
Regards, Henrik