[hobbit] bb-nfs-client.sh (script in ext)
Thomas Leavitt
tleavitt at unameits.com
Fri Aug 1 06:05:14 CEST 2008
Note: I am NOT a master programmer. This could probably be done more
elegantly by someone with a client. For instance, the reference to
bbdef.sh can probably be deleted completely, and any remaining
references to filesystem monitoring could also be purged. After three
hours of amateur hacking to get it working, I didn't care about anything
but that the thing reported correctly!
Attached are two files.
1. bb-test-envs.sh, which basically takes the hobbitclient.cfg
environment variables and puts them into a korn shell script that loads
them into your shell environment so that you can test a script on the
command line.
2. a modified version of the bb-nfs-client.sh from deadcat.net - all
I've done is add three variables to the beginning (apparently not
present in the standard Hobbit environment) so that the script would
execute properly, and then rip out EVERYTHING that appears to be related
to monitoring the size of NFS filesystems, since all I care about is
whether they are available or not (script produced red icons when I took
down our NFS appliance for maintenance the other day and the recovered
to green when it went back up, so it appears to work). Not sure why it
insisted on executing that code when the configuration bit in the
original was defaulted to not monitor it, but oh well.
I'd be happy to post these to the Shire at some point. I just don't have
the time to figure that out (working 12-16 hours a day for the past few
days) at this point.
Hope this helps someone else get this working with less grief.
Regards,
Thomas Leavitt
-----Original Message-----
From: michael nemeth [mailto:michael.nemeth at lmco.com]
Sent: Tuesday, July 29, 2008 2:56 AM
To: hobbit at hswn.dk
Subject: Re: [hobbit] bb-nfs-client.sh (script in ext)
If its short enough why not post it here? Or maybe post it to the Shire?
Thomas Leavitt wrote:
>
> For those who might care in the future:
>
> I got bb-nfs-client.sh working on RHEL/CentOS 4/5 (plus a couple of
> Fedora and RH9 boxes) by ripping out everything related to monitoring
> the size of NFS mounted filesystems, which I could care less about...
> there's other code that does exactly that. I also had to add some
> environment variables that were not getting properly set (BBHOME,
> PING. BBOSTYPE), as far as I could tell. All I care about is whether
> the NFS mounts are available and not producing errors.
>
> I'd be happy to share my stripped down version with anyone who cares
> in the future, if so, send me an email a thomleavitt at gmail.com.
>
> Thomas
>
> *From:* Thomas Leavitt [mailto:tleavitt at unameits.com]
> *Sent:* Friday, July 25, 2008 4:49 PM
> *To:* hobbit at hswn.dk
> *Subject:* [hobbit] bb-nfs-client.sh (script in ext)
>
> I'm trying to get this running, so that I can monitor the NFS status
> of various hosts, and I'm getting the same error that everyone else
> (except T.J. Yang on Solaris) seems to be getting... all the servers
are
> reported as being down.
>
> I'm also not seeing the "nfs" column appear in the Hobbit home page,
> and when I click "history" by going directly to the NFS page (which
> indicates that the script is at least executing, although it produces
> no log file output), I get "Cannot open history file" as well.
>
> But, primarily, I'd just like to get this to work properly, first. I
> can probably stumble through the process of debugging the script, but
> if anyone else can clue me in, I'd appreciate it.
>
> Client is running CentOS 4.6, patched and up to date.
>
> This is my clientlaunch.cfg entry:
>
> [bb-nfs]
>
> ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg
>
> CMD $HOBBITCLIENTHOME/ext/bb-nfs-client.sh
>
> LOGFILE $HOBBITCLIENTHOME/logs/bb-nfs-client.log
>
> INTERVAL 5m
>
> I've created a blank "bb-def.sh" and put it in the "etc" directory.
>
> Thanks in advance.
>
> Thomas
>
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb-test-envs.sh
Type: application/octet-stream
Size: 2295 bytes
Desc: bb-test-envs.sh
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20080731/eeeaca1c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bb-nfs-client.sh
Type: application/octet-stream
Size: 6771 bytes
Desc: bb-nfs-client.sh
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20080731/eeeaca1c/attachment-0001.obj>
More information about the Xymon
mailing list