I did wonder about trying to avoid hard-coding the services but am not skilled enough in Hobbit to know where to do it.
I tried doing what you suggested but I can't persuade the client to read the data from the server.
I have the following on the server in the client-local.cfg file: [nms4.lon.oss.colt.net] svc:/network/ssh:default|svc:/site/tftpd:default
And this is in the bb-hosts file: 10.44.85.209 nms4.lon.oss.colt.net # ssh
Yet after restarting both server and client I only get this in the ~hobbit/client/tmp/logfetch.nms4.lon.oss.colt.net.cfg: log:/var/adm/messages:10240 log:/var/log/syslog:10240
Any pointers?
|\/|artin
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: 19 February 2008 13:06 To: hobbit at hswn.dk Subject: Re: [hobbit] Solaris 10 SMF monitor [was RE: Ext script to monitor Solaris 10 services]
On Tue, Feb 19, 2008 at 12:36:28PM -0000, Ward, Martin wrote:
So, having scripted around a couple of issues with sh(1) I have written the following. You are welcome to comment on it or suggest improvements.
Find below bb-smf.sh
#!/bin/sh
A Hobbit script to examine specific Solaris 10 services.
Author: Martin Ward 19 Feb 2008.
Version: 1.0 - Initial version.
SVCS is a list of services to examine the status of. Each
name must be # enough to make it unique in the svcs list. Separate each service with # a | so that we can use ${EGREP} to search for them. SVCS='svc:/network/ssh:default|svc:/site/tftpd:default'
One obvious improvement would be to grab this setting from the Hobbit "client-local.cfg" configuration. The host-specific client-local setting is stored by the Hobbit client in ~hobbit/client/tmp/logfetch.HOSTNAME.cfg, so assuming you put a line like svc:/network/ssh:default|svc:/site/tftpd:default in client-local.cfg (on the Hobbit server), you could grab it using SVCS=
grep '^svc:' $BBTMP/logfetch.$MACHINEDOTS.cfginstead of hardcoding it into the script.(Untested, but it should be rather trivial).
Regards, Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
The message is intended for the named addressee only and may not be disclosed to or used by anyone else, nor may it be copied in any way.
The contents of this message and its attachments are confidential and may also be subject to legal privilege. If you are not the named addressee and/or have received this message in error, please advise us by e-mailing security at colt.net and delete the message and any attachments without retaining any copies.
Internet communications are not secure and COLT does not accept responsibility for this message, its contents nor responsibility for any viruses.
No contracts can be created or varied on behalf of COLT Telecommunications, its subsidiaries or affiliates ("COLT") and any other party by email Communications unless expressly agreed in writing with such other party.
Please note that incoming emails will be automatically scanned to eliminate potential viruses and unsolicited promotional emails. For more information refer to www.colt.net or contact us on +44(0)20 7390 3900.