[hobbit] defining ext scripts from server - feature request
John Glowacki
johng at idttechnology.com
Thu Sep 28 20:48:15 CEST 2006
Charles Jones wrote:
> I have an environment where I have many many machines that all have a
> common filesystem (for the most part). So far Hobbit has been wonderful
> in that is gracefully handles having a shared hobbit client home
> directory, by the clients writing their logfiles with the hostname as
> part of the filename, etc.
>
> One problem I am having though, is ext tests. If I create an ext test
> for one machine, it ends up running on them all. It would be nice if we
> could define from the hobbit server, which ext tests were to be run. For
> example, in the hobbitclients.cfg, if you could do something like:
>
> HOST=somehost
> PROC "/some/proc/specific/to/this/host"
> DISK /web 95 98
> *EXT $HOBBITCLIENTHOME/ext/some_ext.sh INTERVAL 5m*
>
> This would be really handy because then only the client you defined
> would run that ext script.
>
> In the meantime, I am getting around this by doing this at the top of my
> ext scripts:
>
> HOSTNAME=`/bin/hostname`
> if [ 'myhost' != $HOSTNAME ]; then #Only run on myhost
> exit 0
> fi
>
> This makes the script gracefully exit on the clients that I do not want
> to run it.
>
> -Charles
>
I was thinking of doing something like that. One idea was to piggy back
the ext enable/disable config data in local-client.cfg since it gets
updated automatically on the clients. I decided against that. So I am
thinking of creating my own ext.cfg file and push it out with scp. Then
use a wrapper script to lookup what ext scripts to run as configured in
ext.cfg file.
The other idea I started doing in the test systems is if something is
configured on the system, run the script to report on it. For example if
veritas is used, automatically run the ext script for that else don't
run the ext script.
John
More information about the Xymon
mailing list