[hobbit] NFS and shared clientlaunch.cfg files
Charles Jones
jonescr at cisco.com
Thu Aug 16 00:20:58 CEST 2007
I encountered this exact problem, with monitoring a few hundred servers
that had a common NFS filesystem. For the most part, Hobbit handles this
gracefully as it uses unique names for logfiles and such. I ran into
problems though when I wanted an extra script to run, but just on
certain hosts. I ended up just having the ext script check the hostname
and exit gracefully if it was not the host it should run on:
HOSTNAME=`/bin/hostname`
if ! echo $HOSTNAME | egrep -q 'app-28|web-12|web-13|db-10' ; then
exit 0
fi
What I would really like to see (and I posted this on the list before),
is a server-side configuration of what scripts or even commands to run
on the remote hosts. I doubt this will be implemented though, because
too many people view it as a security risk. What I proposed was a
config file with a format something like:
<hostname> <script path> <interval>
example:
host1.domain.com /home/hobbit/client/ext/somescript.sh 5m
The above would instruct the hobbit client on host1.domain.com to run
the somescript.sh every 5 minutes.
Another way to do it is just use cron and run the script via bbcmd, but
I dont like things that run with hobbit to be able to run when Hobbit is
not running (if I have the client down for some reason, the cron would
still kickoff unless I also disabled it).
-Charles
Michael Dunne wrote:
> Greetings fellow Hobbit-ers,
>
> I was recently tasked with monitoring 100+ solaris systems. Feeling undaunted I reached into
> my trusty IT toolbox and pulled out one of my favorite tools, Hobbit. What I encountered is
> as followed.
>
> The systems utilize NFS mounted directories. I installed the client files into /usr/local/
> hobbit/client and voila! they were available to all of my systems. The issue that I encountered
> was that I wished to run different external scripts per client, but with a "shared" clientlaunch
> file I could not see how to do this. (This is where I cringe as I suspect that my solution is
> rather naive) What I would up doing is modifying the runclient.sh file as reflected below:
>
>
> ~/client hobbit$ diff runclient.sh runclient.ren
> 79c79
> < $0 --hostname="$MACHINEDOTS" stop
> ---
>
>> $0 stop
>>
> 83c83
> < $HOBBITCLIENTHOME/bin/hobbitlaunch --config=$HOBBITCLIENTHOME/etc/
> clientlaunch.cfg --log=$HOBBITCLIENTHOME/logs/clientlaunch.log --pidfile=
> $HOBBITCLIENTHOME/logs/clientlaunch.$MACHINEDOTS.pid
> ---
>
>> $HOBBITCLIENTHOME/bin/hobbitlaunch --config=$HOBBITCLIENTHOME/etc/
>>
> $MACHINEDOTS.clientlaunch.cfg --log=$HOBBITCLIENTHOME/logs/
> $MACHINEDOTS.clientlaunch.log --pidfile=$HOBBITCLIENTHOME/logs/clientlaunch.
> $MACHINEDOTS.pid
> 102c102
> < $0 --hostname="$MACHINEDOTS" stop
> ---
>
>> $0 stop
>>
> 107c107
> < $0 --hostname="$MACHINEDOTS" --os="$BBOSTYPE" start
> ---
>
>> $0 start
>>
>
> My questions are as followed.
>
> Has anyone encountered this specific issue before, and if so how did you address it?
> Does my, admittedly inelegant, solution pose any issues in relation to long term use?
>
> I searched the list and was unable to find anything specific to my issue.
>
>
> Thanks in advance for reading this missive.
>
>
> Best regards,
>
> Mike
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20070815/f7da9624/attachment.html>
More information about the Xymon
mailing list