Hello,
Using Xymon 4.3.7, I am trying to install a BB client script onto a Xymon client. However, the script uses some variables which no longer seem to be available in Xymon. It uses the BBHOSTS and MACHINE variables. It also accesses the 'bbaliasname' file, which too no longer exists but seems to be able to be replicated in the hosts.cfg file.
The problem is basically that the client needs to look up its name in the hosts.cfg file. But because that file doesn't exist on the client, the script is going to fail.
Is there any way I can get this to work? One thought is for the client to use the 'config' command to get the hosts,cfg file, but I have just spent time trying to ensure that that sort of thing wasn't possible! (We don't want users accessing any of the server files.) Secondly, of course is how often do we download the file? In theory it should be at every run of the script (every 5 mins) in case it (hosts.cfg) has changed, but that seems excessive.
Thanks,
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
On 15-05-2012 14:08, John Horne wrote:
Using Xymon 4.3.7, I am trying to install a BB client script onto a Xymon client. However, the script uses some variables which no longer seem to be available in Xymon. It uses the BBHOSTS and MACHINE variables.
MACHINE is defined - it is setup by the "runclient.sh" script which is used to start the Xymon client.
BBHOSTS is not set, since that should not be used by a client script - it is only available on the Xymon server. I don't recall if the BB clients required a bb-hosts file to be present on the client side...
The problem is basically that the client needs to look up its name in the hosts.cfg file.
Why the heck would it need to do that ? I mean, surely it knows who itself is.
It would probably be easier if you could post a pointer to the script you're trying to use. It might even be that there are newer/better/xymon-friendlier replacements available ...
Regards, Henrik
Back in the day, Big Brother *did* require a bb-hosts file, and would not start if the client name and server name were not present. IIRC that was how you told the client where to find the server.
Probably this script needs to be changed to use the xymon variables in a more xymon-like fashion.
On Tue, 2012-05-15 at 14:57 +0200, Henrik Størner wrote:
On 15-05-2012 14:08, John Horne wrote:
Using Xymon 4.3.7, I am trying to install a BB client script onto a Xymon client. However, the script uses some variables which no longer seem to be available in Xymon. It uses the BBHOSTS and MACHINE variables.
MACHINE is defined - it is setup by the "runclient.sh" script which is used to start the Xymon client.
Yup, thanks just noticed that. However, I think using the 'CLIENT:' option in hosts.cfg will do what I want (as a way of providing an alias name for a client).
BBHOSTS is not set, since that should not be used by a client script - it is only available on the Xymon server. I don't recall if the BB clients required a bb-hosts file to be present on the client side...
The problem is basically that the client needs to look up its name in the hosts.cfg file.
Why the heck would it need to do that ? I mean, surely it knows who itself is.
Yes, it knows how it is, but doesn't know what options have been provided for the test. E.g use of '!' to reverse the test result. This is only in the hosts.cfg file, and the test may well be reversed on some clients, but not others. However, looking through things we can actually dispense with this since none of the clients now reverse this test. If we need it in the future, then I'll worry about it then.
As a side note, I am using the 'user' channel to send asynchronous events back to the Xymon server (as well as from client scripts). This basically, emulates what the 'TheState' BB addon did. Because the channel is received on the server side, it can, therefore, easily see the hosts.cfg file and any test options and alias names. TheState was something which we used very much (and still do at the moment!), so I am pleased that we seem to be able to do the same with Xymon.
John.
-- John Horne Tel: +44 (0)1752 587287 Plymouth University, UK Fax: +44 (0)1752 587001
participants (3)
-
betsy.schwartz@gmail.com
-
henrik@hswn.dk
-
john.horne@plymouth.ac.uk