Here is what I did, it may be a bit convoluted
This script in EXT
#############################
#!/bin/bash
export {http,https,ftp}_proxy="myproxyurlhere"
myproxy=`env | grep -i proxy`
echo "proxy settings are $myproxy"
HOSTTAG=URLTEST # What we put in hosts.cfg to trigger this test
COLUMN=$HOSTTAG # Name of the column, often same as tag in hosts.cfg
XYMONHOME=/opt/BB/bbsw/server
XYMON=/opt/BB/bbsw/server/bin/xymon
XYMSRV=10.111.9.5
SED=/bin/sed
$XYMONHOME/bin/xymongrep $HOSTTAG | while read L
do
set $L # To get one line of output from xymongrep
HOSTIP="$1"
MACHINEDOTS="$2"
MACHINE=`echo $2 | $SED -e's/\./,/g'`
echo "$MACHINE will do $HOSTTAG"
urlfile="/opt/BB/bbsw/server/ext/URL/$MACHINE.bb-checkweb"
URL=`cat $urlfile`
UP="HTTP/1.1 200 OK"
UP2="HTTP/1.1 200 Connection established"
status="$(curl -Is $URL | head -1)"
status=$(echo $status|tr -d '\r')
if [[ "$status" == "$UP" || "$status" == "$UP2" ]] ;
then
COLOR=green
MSG="$URL returned $status, so is up"
$XYMON $XYMSRV "status $MACHINE.$COLUMN $COLOR `date`
${MSG}
"
echo "$URL is up"
else
COLOR=red
MSG="$URL returned $status, so is down"
$XYMON $XYMSRV "status $MACHINE.$COLUMN $COLOR `date`
${MSG}
"
echo "$URL is down"
fi
done
########################
In EXT/URL
I have a bunch of txt files, with the name of the host as it appears in xymon hosts file, and each contains the url I wish to check. A bit more work could make this better
In hosts.cfg, I have the tag URLTEST after the host to tell it to test a url
In tasks.cfg, I have
[checkurl]
ENVFILE $XYMONHOME/etc/xymonserver.cfg
NEEDS xymond
CMD $BBHOME/ext/URLtest.sh
LOGFILE $XYMONSERVERLOGS/checkurl.log
INTERVAL 5m
Now I am certain that this is a very long way for a shortcut, but it definitely works for me
David
-----Original Message-----
From: Xymon <xymon-bounces at xymon.com> On Behalf Of xymon-request at xymon.com
Sent: 17 July 2021 11:00
To: xymon at xymon.com
Subject: Xymon Digest, Vol 126, Issue 12
Send Xymon mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.xymon.com%2Fmailman%2Flistinfo%2Fxymon&data=user-45581213ad23@xymon.invalid%7C916ad43bd7124f2c578c08d94909a881%7Cca2953361aa64486b2b2cf7669625305%7C0%7C0%7C637621128094733109%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hK61QyCAiiqLFm6m5xJ90Yk85KL6TTma7JfbctROpX8%3D&reserved=0
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific than "Re: Contents of Xymon digest..."
Today's Topics:
1. Removing Columns and http monitoring 401 error (Cory Fiala)
2. Re: Removing Columns and http monitoring 401 error
(Christoph Zechner)
Message: 1
Date: Fri, 16 Jul 2021 15:15:59 +0000
From: Cory Fiala <user-2605380f2059@xymon.invalid>
To: "'xymon at xymon.com'" <xymon at xymon.com>
Subject: [Xymon] Removing Columns and http monitoring 401 error
Message-ID: <user-801cab93873c@xymon.invalid>
Content-Type: text/plain; charset="us-ascii"
Hello all,
I somehow created 2 new columns in the dashboard while I was trying to fix a http monitor. I've removed my changes and the columns still show up. How do you remove them from the dashboard?
My second issue is I'm wanting to monitor a URL and am only wanting to know if its alive. Since it requires authentication I'm getting HTTP status 401 error. How can I only monitor if it's up or down? Here is the last thing I've tried:
xxx.xxx.xxx.xxx fs1 # httpstatus=http;https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fworkfolders.somesite.k12.or.us%2F&data=user-45581213ad23@xymon.invalid%7C916ad43bd7124f2c578c08d94909a881%7Cca2953361aa64486b2b2cf7669625305%7C0%7C0%7C637621128094743068%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=udJy43fiSFax0ZlqR5zUVaC4n5n38HX2f3kCLFroTL0%3D&reserved=0;200
Thanks!
Cory