[hobbit] Modem monitoring

Smith, Jim JMSmith at stvincenthealth.com
Tue Jun 13 21:20:16 CEST 2006


Henrik,

You got me on the right track.  Here is what I have done to get this to
work like I wanted:

My external test "modemtest.sh" contains:
#!/bin/sh
BBLOCATION=modem bbtest-net --dns=ip

My hobbitlaunch.cfg has this added:
[modemtests]
        ENVFILE /home/hobbit/server/etc/hobbitserver.cfg
        NEEDS hobbitd
        CMD $BBHOME/ext/modemtest.sh
        LOGFILE $BBSERVERLOGS/modemtest.log
        INTERVAL 15m

I added BBLOCATION="standard" and added the -test-untagged option to
bbnet.

I added a new service to bb-services:
[faxmodem]
   send "AT\r\n"
   expect "OK"
   options telnet

My bb-hosts file contains lines like this for the modems:
192.168.9.222    labfax1 # NET:modem faxmodem:3001 noconn

So far it seems to be working pretty well.  I started out with --debug
in my external test to see what was actually happening.  That was a big
help!

I'll probably keep messing around with this for a while to make sure it
is really doing what it appears to be doing.

Next I want to get the bbretest-net.sh working.  I'll try to figure that
part out on my own.  <grin>

Thanks a bunch!  This is great!

Jim Smith




-----Original Message-----
From: Henrik Stoerner [mailto:henrik at hswn.dk] 
Sent: Monday, June 12, 2006 11:39 PM
To: hobbit at hswn.dk
Subject: Re: [hobbit] Modem monitoring

On Mon, Jun 12, 2006 at 05:42:56PM -0500, Smith, Jim wrote:
> It works!  However, I only want it to test once or twice an hour.  If
I
> can figure that part out, I'll be in good shape!

You can use the "NET:..." definition in the bb-hosts file to split
up your network tests into two groups: Those that are for the modems,
and all the others. First setup your modem tests as a separate group
of tests:

* Change the entries in your bb-hosts file for these modems and
  add "NET:modem"
* Create a script ~hobbit/server/ext/modemtest with:
    #!/bin/sh
    BBLOCATION=modem bbtest-net --ping --check-response
  Remember to make it executable (chmod 755 ...)
* Add a new section to the ~hobbit/server/etc/hobbitlaunch.cfg
  file to run this script once an hour:
    [modemtests]
	ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
	NEEDS hobbitd
	CMD $BBHOME/ext/modemtest
	LOGFILE $BBSERVERLOGS/modemtest.log
	INTERVAL 1h

This runs your modem tests once an hour. Now, you also want to NOT
run them together with the standard network tests. To do that:

* Change ~hobbit/server/etc/hobbitserver.cfg and add 
    BBLOCATION="standard"
  This makes the BBLOCATION setting be "standard" by default.
* Change the CMD line in the [bbnet] section in hobbitlaunch.cfg
  and add the --test-untagged option:
    [bbnet]
	ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
	NEEDS hobbitd
	CMD bbtest-net --report --ping --checkresponse --test-untagged
	LOGFILE $BBSERVERLOGS/bb-network.log
	INTERVAL 5m
  The --test-untagged option means that there is an implicit
  "NET:standard" definition on all entries in the bb-hosts file,
  which do not have an explicit NET:... definition.


Regards,
Henrik


To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk


NOTICE: This email contains confidential or proprietary information which may be legally privileged. It is intended only for the named recipient(s). If an addressing error has misdirected the email, please notify the author by replying to this message. If you are not the named recipient, you are not authorized to use, disclose, distribute, copy, print or rely on this email, and should immediately delete it from your computer system.




More information about the Xymon mailing list