directory directive
list Isaac W Traxler
WHile looking in the lib/stackio.c, I saw "directory" as a directive just like "include". So, in the client/etc directory I created a directory called clientlaunch.d and added the line "directory clientlaunch.d" to my clientlaunch.cfg file. I then created 3 files (mysql.cfg, raid.cfg, and postfix.cfg) in the clientlaunch.d directory. Upon restart, all seems to work. I have not dfound this in the doc. Am I blind? In this a new feature that has not made it to the documentation yet? My goal was to find an easy way to add/remove external scripts on a client without manually editing the clientlaunch.cfg. This appears to be the perfect answer. NOw I can simply add the code to the ext directory and the conf ot the clientlaunch.d directory and it all just works (I suspect I need to touch clientlaunch.cfg) so that it gets reprocessed to pick up new plugins or to forget about deleted ones. Regardless -- If I understand this functionality correctly -- it looks like just what I need. -- Isaac Traxler AIX,Linux Admin Louisiana State University user-4dfb0dbf036e@xymon.invalid High Performance Computing XXX-XXX-XXXX LONI AIX Clusters AIX, Linux Support
list Rob McBroom
▸
On Sep 7, 2010, at 3:36 PM, Isaac W Traxler wrote:
My goal was to find an easy way to add/remove external scripts on a client without manually editing the clientlaunch.cfg. This appears to be the perfect answer.
Yes, I would love to have this. Can anyone say whether or not this safe to use or if it's still a work in progress? And in what version did it appear? Thanks. -- Rob McBroom <http://www.skurfer.com/>;
list Isaac W Traxler
It is in the source for 4.2.3 and the 4.3.0beta. I am a long time Big Brother user that recently moved to xymon -- so I cannot tell you how long this has been around.
▸
--
Isaac Traxler AIX,Linux Admin
Louisiana State University user-4dfb0dbf036e@xymon.invalid
High Performance Computing XXX-XXX-XXXX
LONI AIX Clusters
AIX, Linux Support
▸
On Wed, 8 Sep 2010, Rob McBroom wrote:
Date: Wed, 8 Sep 2010 09:20:42 -0400 From: Rob McBroom <user-371ba9bb5b75@xymon.invalid> Reply-To: xymon at xymon.com To: xymon at xymon.com Subject: Re: [xymon] directory directive On Sep 7, 2010, at 3:36 PM, Isaac W Traxler wrote:My goal was to find an easy way to add/remove external scripts on a client without manually editing the clientlaunch.cfg. This appears to be the perfect answer.Yes, I would love to have this. Can anyone say whether or not this safe to use or if it's still a work in progress? And in what version did it appear? Thanks. -- Rob McBroom <http://www.skurfer.com/>;
list Daniel McDonald
On 9/8/10 1:45 PM, "Isaac W Traxler" <user-4dfb0dbf036e@xymon.invalid> wrote:
[support for including all files from a directory] is in the source for 4.2.3 and the 4.3.0beta.
I think it's been longer than that. I recall a conversation between Henrik and Buchan some years ago... Due to the magic of Google...: http://www.xymon.com/archive/2006/08/msg00139.html So, that feature has been around for about 4 years.... I also recall filing a bug because the globbing had some problems in an earlier version.
▸
I am a long time Big Brother user that recently moved to xymon -- so I cannot tell you how long this has been around. On Wed, 8 Sep 2010, Rob McBroom wrote:Date: Wed, 8 Sep 2010 09:20:42 -0400 From: Rob McBroom <user-371ba9bb5b75@xymon.invalid> Reply-To: xymon at xymon.com To: xymon at xymon.com Subject: Re: [xymon] directory directive On Sep 7, 2010, at 3:36 PM, Isaac W Traxler wrote:My goal was to find an easy way to add/remove external scripts on a client without manually editing the clientlaunch.cfg. This appears to be the perfect answer.Yes, I would love to have this. Can anyone say whether or not this safe to use or if it's still a work in progress? And in what version did it appear?
--
Daniel J McDonald, CCIE # 2495, CISSP # 78281
list Henrik Størner
▸
In <user-8666f8804e20@xymon.invalid> Rob McBroom <user-371ba9bb5b75@xymon.invalid> writes:
On Sep 7, 2010, at 3:36 PM, Isaac W Traxler wrote:
My goal was to find an easy way to add/remove external scripts on a = client without manually editing the clientlaunch.cfg. This appears to be = the perfect answer.
Yes, I would love to have this.
Can anyone say whether or not this safe to use or if it's still a work = in progress? And in what version did it appear?
The "include" and "directory" facility is quite stable - directory
inclusion was added back in 2006, according to my logs. It's probably
not very well documented that this works in all configuration files.
Including hobbitlaunch.cfg / clientlaunch.cfg . If anyone feel like
sending updates for the man-pages, they would be very welcome.
I hadn't thought of it myself, actually.
Regards,
Henrik
list Stef Coene
▸
On Thursday 23 September 2010, Henrik "Størner" wrote:
In <user-8666f8804e20@xymon.invalid> Rob McBroom
<user-371ba9bb5b75@xymon.invalid> writes:
On Sep 7, 2010, at 3:36 PM, Isaac W Traxler wrote:My goal was to find an easy way to add/remove external scripts on a =client without manually editing the clientlaunch.cfg. This appears to be = the perfect answer. Yes, I would love to have this. Can anyone say whether or not this safe to use or if it's still a work = in progress? And in what version did it appear?The "include" and "directory" facility is quite stable - directory inclusion was added back in 2006, according to my logs. It's probably not very well documented that this works in all configuration files. Including hobbitlaunch.cfg / clientlaunch.cfg . If anyone feel like sending updates for the man-pages, they would be very welcome.
Related to this, I would prefer an automatic system: 'if hobbitgraph exists and is a directory, include it in config file hobbitgraph.cfg'. Stef PS: Henrik, good to hear from you, it's some ago that you posted something...
list Henrik Størner
▸
In <user-5bc0f196f990@xymon.invalid> Stef Coene <user-dbffe946c0f4@xymon.invalid> writes:
On Thursday 23 September 2010, Henrik "St=F8rner" wrote:The "include" and "directory" facility is quite stable - directory inclusion was added back in 2006, according to my logs. It's probably not very well documented that this works in all configuration files. Including hobbitlaunch.cfg / clientlaunch.cfg . If anyone feel like sending updates for the man-pages, they would be very welcome.
Related to this, I would prefer an automatic system: 'if hobbitgraph exists and is a directory, include it in config file hobbitgraph.cfg'.
I believe you can do that already, although it will probably result in some complaints being logged to the logfiles :-)
PS: Henrik, good to hear from you, it's some ago that you posted something.
Thanks ... I'm getting up to speed again. Some stuff going into the code repository also. Regards, Henrik
list Japheth Cleaver
▸
-----Original Message----- From: Henrik Størner [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Thursday, September 23, 2010 8:29 AM To: xymon at xymon.com Subject: Re: [xymon] directory directive In <user-5bc0f196f990@xymon.invalid> Stef Coene <user-dbffe946c0f4@xymon.invalid> writes:On Thursday 23 September 2010, Henrik "St=F8rner" wrote:Related to this, I would prefer an automatic system: 'if hobbitgraph exists and is a directory, include it in config file hobbitgraph.cfg'.I believe you can do that already, although it will probably result in some complaints being logged to the logfiles :-)
Mandrake has broken out their hobbitgraph file for some time, apparently, without any ill-effects. The perl one-liner below is what I use to split the distro .cfg files apart during an RPM install... (rpmbuild macros have been replaced with real paths):
install -d /etc/xymon/graph.d
pushd /etc/xymon/graph.d/
perl -e "\$/='';while (<>) { \$_ .= <> while not (m#\n\[([\w+._-]+)\]#s || eof);open (FILE,'>',\$1); print FILE \$_; };" ../hobbitgraph.cfg
popd
echo "#
# The hobbitgraph.cfg file is read by the grapher module.
# It controls which of the Xymon data streams to graph using RRD and
# their respective RRD configuration options.
#
directory graph.d/" > /etc/xymon/hobbitgraph.cfg
Remember that the directory directive will parse the files it sees in alphabetical order.
The same logic, of course, works for clientlaunch and hobbitlaunch files. Hope this helps!
-jc