New BBWin Client from SquidWorks

Posted by & filed under Uncategorized.

Well, I was happy with just editing config files, but the folks over at SquidWorks made it even easier for my non uber-tekkie colleagues to update BBWin configs:

The BBWin GUI was developed due to a need to make updating and setting up a managed system for monitoring easier for techs. As I am a old Linux guy using a text editor to configure the BBWin.cfg file was common place. When I had to teach others to, not only edit but troubleshoot the files when mistakes were made. That became a task in and of its self. BBWin GUI makes easy work of installing the latest BBWin application, setting for the first time or updating and active system. This app even saves you having to open up notepad first as a admin in Windows 2008 servers before editing and saving the BBWin.cfg file.

www.squidworks.net/bbwin-gui/

Xymon 4.3.4 info column bug

Posted by & filed under Server Admin.

I recently deployed a fresh installation of Xymon 4.3.4. There were a few glitches which were easily solved by looking at the xymon logs. With one exception — the info column shows a “Internal Server Error”. Thanks to the Xymon mailing list, I found that there is a known bug in svcstatus.cgi in Xymon 4.3.4. The solution is to edit the source and recompile, or just apply the handy patch below.

Patch the source & recompile as usual:

At this point if I was doing a fresh install, I could simply do a make install, but since I already have Xymon installed and working perfectly, I opted to simply copy over the newly patched svcstatus.cgi:

And done!
Thanks to Lubos & Henrik lists.xymon.com/pipermail/xymon/2011-Aug…

Xymon Addons that caught my eye

Posted by & filed under Server Admin, Uncategorized.

I was browsing Xymonton and found a few addons that I may be able to make use of.

IAX2 – www.xymonton.org/monitors:asterisk-iax2
SIP – www.xymonton.org/monitors:asterisk-sip
Mail Graphs – www.bakarasse.de/pages/en/xymon-monitori…
Windows Update/Reboot Test – www.xymonton.org/monitors:winupd
APC UPS Monitoring & Temperature – developer.sysco.ch/hobbit/
HP Proliant HW RAID Monitoring – code.google.com/p/hphwraid/

Xymon – drop a test or host

Posted by & filed under Server Admin.

Straight from the manpage:

Deleting a test:

For Xymon use the command:

/server/bin/xymon 127.0.0.1 “drop HOSTNAME ftp”

For BigBrother use the command

~/server/bin/bb 127.0.0.1 “drop HOSTNAME ftp”

to permanenly remove all traces of a test. Note that you need the quotes around the “drop HOSTNAME ftp”.

 

For Xymon: Deleting a host

First, remove the host from the /etc/xymon/hosts.conf file. Then use the command

server/bin/xymon 127.0.0.1 “drop HOSTNAME”

to permanently remove all traces of a host. Note that you need the quotes around the “drop HOSTNAME”.

 

For Big Brother: Deleting a host

First, remove the host from the ~/server/etc/bb-hosts file. Then use the command

~/server/bin/bb 127.0.0.1 “drop HOSTNAME”

to permanently remove all traces of a host. Note that you need the quotes around the “drop HOSTNAME”.

 

Updated 03/24/14 w/ Xymon specific syntax.

Xymon script testing/debugging

Posted by & filed under Server Admin.

This is a follow-up to a older post I made about Hobbit/Xymon and testing alerting (natesbox.com/blog/?p=378)

I have needed to write a few Xymon scripts and in order to test them outside of Xymon, but with the Xymon environment variables which most scripts depend on. In order to do this we use the xymoncmd command like so:

This works for a client script, but I wanted the server env vars, so I added one additional option:

Also one note on older compatibility: As of the (slightly outdated) version I am currently running, xymoncmd is just a alias of bbcmd, So this should apply to older hobbit stuff too.

Hobbit / Xymon Host conn flapping due to DNS lookup issues

Posted by & filed under Uncategorized.

I had a few hosts that were intermittently going red for no reason on the conn test (ping). After some effort, I found that adding the –no-ares switch to the [bbnet] CMD section of hobbitlaunch.cfg and then restarting the hobbit server resolved the issue. Services stable and accurate!

manpages.ubuntu.com/manpages/natty/man1/…

–no-ares
Disable the ARES resolver built into bbtest-net. This makes
bbtest-net resolve hostnames using your system resolver
function. You should only use this as a last resort if bbtest-
net cannot resolve the hostnames you use in the normal way (via
DNS or /etc/hosts). One reason for using this would be if you
need to resolve hostnames via NIS/NIS+ (a.k.a. Yellow Pages).
The system resolver function does not provide a mechanism for
controlling timeouts of the hostname lookups, so if your DNS or
NIS server is down, bbtest-net can take a very long time to run.
The –dns-timeout option is effectively disabled when using this
option.

Logging temperature using 1-wire devices

Posted by & filed under Hardware Development.

DigiTemp — Software and 1-wire network info www.digitemp.com/index.shtml
1-Wire USB Adaptor — www.hobby-boards.com/catalog/product_inf…
OWFS — 1-Wire filesystem — owfs.org/index.php?page=thermocouple
1-WIRE Weather Instrument Kit — www.aag.com.mx/aagusa/index1.html

T-Sense RJ-45 Temperature Sensors — www.ibuttonlink.com/sensors.aspx
1-WIRE USP Master Interface — www.ibuttonlink.com/1-wire-interface-mas…
1-Wire Maxim Devices — www.maxim-ic.com/products/1-wire/

EDIT: More 1-wire links:
Guidelines for reliable long 1-wire networks: www.maxim-ic.com/app-notes/index.mvp/id/…
A Hobbyists Guide to 1-wire: www.arunet.co.uk/tkboyd/e1didx.htm
Maxim IC 1-Wire Thermocouples: para.maxim-ic.com/en/search.mvp?fam=temp…
Pers and 1-Wire Temperature Sensors – www.linux-magazine.com/issue/65/Perl_Tem…

Xymon/Hobbit Custom Scripting

Posted by & filed under Uncategorized.

There are a few steps to get custom scripts working.

  • 1. Update hobbitlaunch.cfg with the new script. For my WHOIS checker I used:


    #
    # WHOIS Expiration Checker
    #

    [dnsreg]
    ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg
    CMD /usr/lib/hobbit/server/ext/dnsreg
    LOGFILE $BBSERVERLOGS/dnsreg.log
    INTERVAL 1d

  • 2. Install script, make sure it is executable, etc. This should be placed at the path of CMD in my above snippet. By default it is /server/ext
  • 3. Update bb-hosts with the service name
  • www.balldawg.net/index.php/2009/05/creat…

Configure Xymon Client (BBWin)

Posted by & filed under Server Admin.

I periodically need to configure BBWin clients for our Xymon monitoring system.

Config Steps:
–>Install BBWin Client
–>Copy bbwin/etc/bbwin.cfg from an existing install
–>Set HKLM/Software/BBWin/hostname
–>Start Service

Kick off a test alert with Xymon

Posted by & filed under Server Admin.

If you want to test how your alert configuration handles a specific host, you can run xymond_alert in test mode – you give it a hostname and servicename as input, and it will go through the configuration and tell you which rules match and who gets an alert.

Xymon:

osiris:~ $ cd server/
osiris:~/server $ ./bin/xymoncmd xymond_alert –test osiris.hswn.dk cpu
Matching host:service:page ‘osiris.hswn.dk:cpu:’ against rule line 109:Matched
*** Match with ‘HOST=*’ ***
Matching host:service:page ‘osiris.hswn.dk:cpu:’ against rule line 110:Matched
*** Match with ‘MAIL henrik@sample.com REPEAT=2 RECOVERED COLOR=red’ ***
Mail alert with command ‘mail -s “XYmon [12345] osiris.hswn.dk:cpu is RED” henrik@sample.com

BigBrother is slightly different:
$ bbcmd hobbitd_alert –test ns2.whatever.net conn

Both can optionally be appended with a duration to meet any requirements:

dev@monitor:/usr/lib/hobbit/server/bin$ bbcmd hobbitd_alert --test ns2.whatever.net conn --duration=501
2011-07-08 10:37:05 Using default environment file /usr/lib/hobbit/client/etc/hobbitserver.cfg
00013395 2011-07-08 10:37:05 send_alert ns2.whatever.net:conn state Paging
00013395 2011-07-08 10:37:05 Matching host:service:page 'ns2.whatever.net:conn:' against rule line 26
00013395 2011-07-08 10:37:05 Failed 'HOST=$INTIDEAS' (hostname not in include list)
00013395 2011-07-08 10:37:05 Matching host:service:page 'ns2.whatever.net:conn:' against rule line 39
00013395 2011-07-08 10:37:05 *** Match with 'HOST=*' ***

The hobbitd_alert and xymond_alert (depending on if it is xymon or bb) command calls the module:


Update 07/25/18: The Xymon syntax is a bit off, it should be:

See www.xymon.com/xymon/help/manpages/man8/x… for additional details on the parameters.