Xymon Mailing List Archive search

client-local.cfg

14 messages in this thread

list David Masterson Damaster · Thu, 19 Feb 2009 21:30:42 -0800 ·
I can't quite figure it out from the documentation.  Are the sections in
the client-local.cfg file cumulative?  That is, if I have a redhat
server named "servA", do both the "[redhat]" and "[servA]" sections
apply?  Or is it just the first section in the cfg file that matches
that applies?
 
David Masterson
list Dominique Frise · Fri, 20 Feb 2009 07:36:49 +0100 ·
quoted from David Masterson Damaster
David Masterson (damaster) wrote:
I can't quite figure it out from the documentation.  Are the sections in 
the client-local.cfg file cumulative?  That is, if I have a redhat 
server named "servA", do both the "[redhat]" and "[servA]" sections 
apply?  Or is it just the first section in the cfg file that matches 
that applies?
[servA] will apply.

[redhat] will apply for all others redhat hosts without [hostname] section.

Extract of man client-local.cfg(5):

FILE FORMAT
      The file is divided into  sections,  delimited  by  "[name]"
      lines.   A  section  name  can be either an operating system
      identifier - linux, solaris, hp-ux, aix,  freebsd,  openbsd,
      netbsd,  darwin - or a hostname. When deciding which section
      to send to a client, Hobbit will first look  for  a  section
      named  after  the  hostname of the client; if such a section
      does not exist, it will look for  a  section  named  by  the
      operating system of the client. So you can configure special
      configurations for individual hosts, and have a default con-
      figuration for all other hosts of a certain type.

      Apart from the section delimiter, the file format  is  free-
      form,  or rather it is defined by the tools that make use of
      the configuration.


Dominique
list dOCtoR MADneSs · Sun, 02 Jan 2011 14:12:01 +0100 ·
Hi

I'm running xymon client and server 4.3.0 beta3 on a server called toto, a linux host.
In ~xymon/server/etc/client-local.cfg I created a section as follow :
[toto]
file:`find /test -name tata`

On client side, in ~xymon/client/tmp/logfetch.toto.cfg, there is nothing like I configured in the client-local.cfg. It seems the server transfered the [linux] section, not the [toto] one. I tried to remove the logfetch.toto.cfg file, restarted both client and server with no effect. How could I correct this ?

Regards and best wishes !
list Rob McBroom · Mon, 3 Jan 2011 10:22:29 -0500 ·
quoted from dOCtoR MADneSs
On Jan 2, 2011, at 8:12 AM, dOCtoR MADneSs wrote:
On client side, in ~xymon/client/tmp/logfetch.toto.cfg, there is nothing like I configured in the client-local.cfg. It seems the server transfered the [linux] section, not the [toto] one. I tried to remove the logfetch.toto.cfg file, restarted both client and server with no effect. How could I correct this ?
My first guess is that the client is sending its FQDN to the server, so it doesn't match the rule you defined by hostname. However, if the client is creating files with name like `logfetch.toto.cfg` then it sounds like the name is correct, so I'm not sure what else it could be.

-- 
Rob McBroom
<http://www.skurfer.com/>;
list dOCtoR MADneSs · Tue, 04 Jan 2011 20:44:29 +0100 ·
no one have an idea about this major problem ?
quoted from dOCtoR MADneSs
----- Message d'origine -----
On Jan 2, 2011, at 8:12 AM, dOCtoR MADneSs wrote:
On client side, in ~xymon/client/tmp/logfetch.toto.cfg, there is
nothing like I configured in the client-local.cfg. It seems the server
transfered the [linux] section, not the [toto] one. I tried to remove
the logfetch.toto.cfg file, restarted both client and server with no
effect. How could I correct this ?
My first guess is that the client is sending its FQDN to the server, so
it doesn't match the rule you defined by hostname. However, if the
client is creating files with name like `logfetch.toto.cfg` then it
sounds like the name is correct, so I'm not sure what else it could be.

-- 
Rob McBroom
<http://www.skurfer.com/>;

list Greg Hubbard · Tue, 4 Jan 2011 15:43:56 -0600 ·
I think it quits on the first match, which you may have proved.  There is no
hierarchy.  You might put [toto] up above [linux] and see what happens.

GLH
quoted from dOCtoR MADneSs

On Sun, Jan 2, 2011 at 7:12 AM, dOCtoR MADneSs <user-d54077869176@xymon.invalid>wrote:
Hi

I'm running xymon client and server 4.3.0 beta3 on a server called toto, a
linux host.
In ~xymon/server/etc/client-local.cfg I created a section as follow :
[toto]
file:`find /test -name tata`

On client side, in ~xymon/client/tmp/logfetch.toto.cfg, there is nothing
like I configured in the client-local.cfg. It seems the server transfered
the [linux] section, not the [toto] one. I tried to remove the
logfetch.toto.cfg file, restarted both client and server with no effect. How
could I correct this ?

Regards and best wishes !

-- 

Disclaimer:  1) all opinions are my own, 2) I may be completely wrong, 3) my
advice is worth at least as much as what you are paying for it, or your
money cheerfully refunded.
list dOCtoR MADneSs · Wed, 05 Jan 2011 00:19:42 +0100 ·
it was all my fault. i got a second server with an error in client-local.cfg that sent the wrong datas to my toto host. thank you for your support.
quoted from Greg Hubbard

----- Message d'origine -----
I think it quits on the first match, which you may have proved.   There
is no hierarchy.   You might put [toto] up above [linux] and see what
happens.

GLH

On Sun, Jan 2, 2011 at 7:12 AM, dOCtoR MADneSs
<user-d54077869176@xymon.invalid>wrote:
Hi
I'm running xymon client and server 4.3.0 beta3 on a server called
toto, a linux host.
In ~xymon/server/etc/client-local.cfg I created a section as follow :
[toto]
file:`find /test -name tata`
On client side, in ~xymon/client/tmp/logfetch.toto.cfg, there is
nothing like I configured in the client-local.cfg. It seems the server
transfered the [linux] section, not the [toto] one. I tried to remove
the logfetch.toto.cfg file, restarted both client and server with no
effect. How could I correct this ?
Regards and best wishes !
-- 
Disclaimer:   1) all opinions are my own, 2) I may be completely wrong,
3) my advice is worth at least as much as what you are paying for it, or
your money cheerfully refunded.
list Galen Johnson · Mon, 27 Jan 2014 14:32:00 +0000 ·
Hey,

I have a couple of questions regarding the client-local.cfg file.

1) can it handle reg-ex for hostnames like other cfg files?  For example,
 [%(myhost1|myhost2).*]

2) According to the man page for client-local.cfg, "When clients connect to the Xymon server to send in their client data, they will receive part of this file back from the Xymon server." What if you are using xymonfetch?  Would I need to create a local client-local.cfg file within the .../xymon/client/etc folder?

thx

=G=
list Mike Burger · Mon, 27 Jan 2014 10:35:51 -0500 (EST) ·
quoted from Galen Johnson
Hey,

I have a couple of questions regarding the client-local.cfg file.

1) can it handle reg-ex for hostnames like other cfg files?  For example,
 [%(myhost1|myhost2).*]

2) According to the man page for client-local.cfg, "When clients connect
to the Xymon server to send in their client data, they will receive part
of this file back from the Xymon server." What if you are using
xymonfetch?  Would I need to create a local client-local.cfg file within
the .../xymon/client/etc folder?
1) Already ran through this (even asked on this list)...no...no regexp for
the hosts in client-local.cfg.

2) Use the client-local.cfg file on the server in $XYMONHOME/etc (or, if
you installed via rpm, /etc/xymon. I do have a couple of systems where I'm
using xymonfetch, and it's pulling data, including log info and such,
without any issues.

-- 
Mike Burger
http://www.bubbanfriends.org

"It's always suicide-mission this, save-the-planet that. No one ever just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1
list Galen Johnson · Mon, 27 Jan 2014 15:57:38 +0000 ·
1) Well...poo!  That's unfortunate as we have several dozen of similarly named servers we need to run some specific file checks on and it's going to be a bit annoying to have to add each one individually.

2) I'm concerned about having to use a command to find certain files..."If you want to check multiple files using a wildcard, you must use a command to generate the filenames. Putting wildcards directly into the file: entry will not work."  Which would imply that if I want to check for a files using a wild card, I would need to have a line in client-local.cfg like:

file:`ls /path/to/<pattern>`

=G=
quoted from Mike Burger

From: Mike Burger <user-cc5c6e80f4c5@xymon.invalid>
Sent: Monday, January 27, 2014 10:35 AM
To: Galen Johnson
Cc: xymon at xymon.com
Subject: Re: [Xymon] client-local.cfg
Hey,

I have a couple of questions regarding the client-local.cfg file.

1) can it handle reg-ex for hostnames like other cfg files?  For example,
 [%(myhost1|myhost2).*]

2) According to the man page for client-local.cfg, "When clients connect
to the Xymon server to send in their client data, they will receive part
of this file back from the Xymon server." What if you are using
xymonfetch?  Would I need to create a local client-local.cfg file within
the .../xymon/client/etc folder?
1) Already ran through this (even asked on this list)...no...no regexp for
the hosts in client-local.cfg.

2) Use the client-local.cfg file on the server in $XYMONHOME/etc (or, if
you installed via rpm, /etc/xymon. I do have a couple of systems where I'm
using xymonfetch, and it's pulling data, including log info and such,
without any issues.

--
Mike Burger
http://www.bubbanfriends.org

"It's always suicide-mission this, save-the-planet that. No one ever just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1
list Ralph Mitchell · Mon, 27 Jan 2014 12:00:14 -0500 ·
I too wish the wildcard would work in client-local.cfg, or maybe the
"include" directive.  I'm adding about 2000 systems this year..

Ralph Mitchell
quoted from Galen Johnson
On Jan 27, 2014 11:13 AM, "Galen Johnson" <user-87f955643e3d@xymon.invalid> wrote:
1) Well...poo!  That's unfortunate as we have several dozen of similarly
named servers we need to run some specific file checks on and it's going to
be a bit annoying to have to add each one individually.

2) I'm concerned about having to use a command to find certain files..."If
you want to check multiple files using a wildcard, you must use a command
to generate the filenames. Putting wildcards directly into the file: entry
will not work."  Which would imply that if I want to check for a files
using a wild card, I would need to have a line in client-local.cfg like:

file:`ls /path/to/<pattern>`

=G=

From: Mike Burger <user-cc5c6e80f4c5@xymon.invalid>
Sent: Monday, January 27, 2014 10:35 AM
To: Galen Johnson
Cc: xymon at xymon.com
Subject: Re: [Xymon] client-local.cfg
Hey,

I have a couple of questions regarding the client-local.cfg file.

1) can it handle reg-ex for hostnames like other cfg files?  For example,
 [%(myhost1|myhost2).*]

2) According to the man page for client-local.cfg, "When clients connect
to the Xymon server to send in their client data, they will receive part
of this file back from the Xymon server." What if you are using
xymonfetch?  Would I need to create a local client-local.cfg file within
the .../xymon/client/etc folder?
1) Already ran through this (even asked on this list)...no...no regexp for
the hosts in client-local.cfg.

2) Use the client-local.cfg file on the server in $XYMONHOME/etc (or, if
you installed via rpm, /etc/xymon. I do have a couple of systems where I'm
using xymonfetch, and it's pulling data, including log info and such,
without any issues.

--
Mike Burger
http://www.bubbanfriends.org

"It's always suicide-mission this, save-the-planet that. No one ever just
stops by to say 'hi' anymore." --Colonel Jack O'Neill, SG1

list Jeremy Laidman · Tue, 28 Jan 2014 15:02:43 +1100 ·
quoted from Galen Johnson
On 28 January 2014 02:57, Galen Johnson <user-87f955643e3d@xymon.invalid> wrote:
1) Well...poo!  That's unfortunate as we have several dozen of similarly
named servers we need to run some specific file checks on and it's going to
be a bit annoying to have to add each one individually.
You could make this easier by having an include file.  Then just include
the file for each host:

[server1.example.com]
include standard-client.cfg
[server2.example.com]
include standard-client.cfg

Not as good as regexp or wildcard hostname matching, but slightly better.

Another option is to auto-generate your client-local.cfg file from a macro
configuration file - dare I say in M4 format?  This is often how sendmail
configurations are managed.  After each change, you type "make" and it
rebuilds the configuration file.
quoted from Ralph Mitchell

2) I'm concerned about having to use a command to find certain files..."If
you want to check multiple files using a wildcard, you must use a command
to generate the filenames. Putting wildcards directly into the file: entry
will not work."  Which would imply that if I want to check for a files
using a wild card, I would need to have a line in client-local.cfg like:

file:`ls /path/to/<pattern>`
Correct.  This works, and is awesomely extensible.  What's your concern?

J
list Henrik Størner · Tue, 28 Jan 2014 10:25:18 +0100 ·
quoted from Galen Johnson
Den 2014-01-27 16:57, Galen Johnson skrev:
I have a couple of questions regarding the client-local.cfg file.

1) can it handle reg-ex for hostnames like other cfg files?  For example,
 [%(myhost1|myhost2).*]
1) Already ran through this (even asked on this list)...no...no regexp for
the hosts in client-local.cfg.
Well...poo!
Let's see if we can make this poo smell a bit nicer in 4.3.16 ... there's some new host matching code in xymond now, so re-using this for client-local.cfg settings ought to be possible.


Regards,
Henrik

PS: Agree that this is long overdue, the current code really is an ugly hack.
list Galen Johnson · Tue, 28 Jan 2014 14:00:01 +0000 ·
1) even with the include, you have to define each host entry.

2) No more concerns.  My concern was around using xymonfetch and that the server sent some info for the files.  Mike (and experimentation) has removed those concerns.

=G=
quoted from Jeremy Laidman

From: Jeremy Laidman <user-71895fb2e44c@xymon.invalid>
Sent: Monday, January 27, 2014 11:02 PM
To: Galen Johnson
Cc: Mike Burger; xymon at xymon.com
Subject: Re: [Xymon] client-local.cfg

On 28 January 2014 02:57, Galen Johnson <user-87f955643e3d@xymon.invalid<mailto:user-87f955643e3d@xymon.invalid>> wrote:
1) Well...poo!  That's unfortunate as we have several dozen of similarly named servers we need to run some specific file checks on and it's going to be a bit annoying to have to add each one individually.

You could make this easier by having an include file.  Then just include the file for each host:

[server1.example.com<http://server1.example.com>;]
include standard-client.cfg
[server2.example.com<http://server2.example.com>;]
quoted from Jeremy Laidman
include standard-client.cfg

Not as good as regexp or wildcard hostname matching, but slightly better.

Another option is to auto-generate your client-local.cfg file from a macro configuration file - dare I say in M4 format?  This is often how sendmail configurations are managed.  After each change, you type "make" and it rebuilds the configuration file.

2) I'm concerned about having to use a command to find certain files..."If you want to check multiple files using a wildcard, you must use a command to generate the filenames. Putting wildcards directly into the file: entry will not work."  Which would imply that if I want to check for a files using a wild card, I would need to have a line in client-local.cfg like:

file:`ls /path/to/<pattern>`

Correct.  This works, and is awesomely extensible.  What's your concern?

J