<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
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:<br>
<tt>HOSTNAME=`/bin/hostname`<br>
<br>
if ! echo $HOSTNAME | egrep -q 'app-28|web-12|web-13|db-10' ; then<br>
   exit 0<br>
fi<br>
</tt><br>
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:<br>
<br>
<hostname> <script path> <interval><br>
example:<br>
host1.domain.com /home/hobbit/client/ext/somescript.sh 5m<br>
<br>
The above would instruct the hobbit client on host1.domain.com to run
the somescript.sh every 5 minutes.<br>
<br>
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).<br>
<br>
-Charles<br>
<br>
<br>
Michael Dunne wrote:
<blockquote cite="mid:200708151707.AA93192976@ntms1.accuweather.com"
 type="cite">
  <pre wrap="">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
---
  </pre>
  <blockquote type="cite">
    <pre wrap="">              $0 stop
    </pre>
  </blockquote>
  <pre wrap=""><!---->83c83
<       $HOBBITCLIENTHOME/bin/hobbitlaunch --config=$HOBBITCLIENTHOME/etc/
clientlaunch.cfg --log=$HOBBITCLIENTHOME/logs/clientlaunch.log --pidfile=
$HOBBITCLIENTHOME/logs/clientlaunch.$MACHINEDOTS.pid
---
  </pre>
  <blockquote type="cite">
    <pre wrap="">      $HOBBITCLIENTHOME/bin/hobbitlaunch --config=$HOBBITCLIENTHOME/etc/
    </pre>
  </blockquote>
  <pre wrap=""><!---->$MACHINEDOTS.clientlaunch.cfg --log=$HOBBITCLIENTHOME/logs/
$MACHINEDOTS.clientlaunch.log --pidfile=$HOBBITCLIENTHOME/logs/clientlaunch.
$MACHINEDOTS.pid
102c102
<               $0 --hostname="$MACHINEDOTS" stop
---
  </pre>
  <blockquote type="cite">
    <pre wrap="">              $0 stop
    </pre>
  </blockquote>
  <pre wrap=""><!---->107c107
<       $0 --hostname="$MACHINEDOTS" --os="$BBOSTYPE" start
---
  </pre>
  <blockquote type="cite">
    <pre wrap="">      $0 start
    </pre>
  </blockquote>
  <pre wrap=""><!---->
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
<a class="moz-txt-link-abbreviated" href="mailto:hobbit-unsubscribe@hswn.dk">hobbit-unsubscribe@hswn.dk</a>
  </pre>
</blockquote>
<br>
</body>
</html>