Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata


Simple check for script that outputs goot/bad.html on XYMon-Server:

I then created a localhost with an descriptive name for an http check.

127.0.0.1 API-TEST # http://127.0.0.1/good.html

Simple but it works!

Sudo Check :

Thank you big time to IT-ECKERT for pointing this out, if you have trouble with a custom script, you may need to grant xymon passwordless sudo access to executable like so:

Find Path to Executable:

xymon@host:/bin$ pwrstatd
-bash: /usr/sbin/pwrstatd: Permission denied

Grant XYMon PWDless SUDO Access to Command:

sudo visudo && sudo service sudo restart 
xymon  ALL=(ALL)       NOPASSWD: /usr/sbin/pwrstatd 

AKA /path/to/executable, there IS a space between ": /"

Or

xymon   ALL=(ALL) NOPASSWD:ALL

TEST :
http://unix.stackexchange.com/questions/301421/cant-grant-user-xymon-passwordless-sudo/301422#301422

su -s /bin/sh xymon 
sudo /usr/sbin/prwstat 

Hide Column: (Doesn't stop test if it goes RED, you'll get an E-Mail)

I personally like having procs/ports columns, even if I don’t define checks, I can quickly view my open ports and running procs, but if you don’t define file checks you just get a useless column, so I have this on all my hosts pretty much.

1.2.3.4 host #  NOCOLUMNS:files (If you want more  NOCOLUMNS:files,ports,procs etc etc.)

Test Failing E-Mail Alerts :
http://unix.stackexchange.com/questions/297209/ssmtp-can-send-e-mail-via-cli-but-programs-fail-to-send-notifications

/usr/lib/xymon/server/bin/xymond_alert --test testsite.com http
Mail alert with command '/var/mail/root "Xymon [12345] testsite.com:http CRITICAL (RED)" accountusername@businessdomain.com'

Does this work on the CLI?

Check SSL Certs :

1.2.3.4 HOST # apache=https://www.domain.com/server-status?auto TRENDS:*,apache:apache|apache1|apache2|apache3

E-Mail for all hosts when red more then 30 min, repeat every hour and a recovery notice e-mail:

sudo nano /etc/xymon/alerts.cfg
HOST=%^.*
MAIL freesoftwareservers@gmail.com DURATION=<30m REPEAT=1h COLOR=red RECOVERED=1

Configure IGNORE host/service time inside Wild Card host statement

http://xymon.sourceforge.net/xymon/help/xymon-alerts.html

IGNORE HOST=server.domain.com SERVICE=cpu TIME={*/4}:2359:0001

Explation of TIME, I found lacking in the help page....

TIME:(# Representing Day of Week, 4 = Thursday, * = Everyday):Timestamp 2359 = 11:59PM 0001 = 12:01AM

Ubuntu Default XYMONHOME:

$XYMONHOME=/usr/lib/xymon/client

CentOS Default XYMONHOME:

$XYMONHOME=/usr/share/xymon-client/ext


Run Custom Script Manually to update/test :

From XYMon-Server : (This uses Ubuntu XYMon-Home Default)

/usr/lib/xymon/client/bin/xymoncmd /usr/lib/xymon/client/ext/myscript.sh {-d = debug}

Drop Test/Column :
From XYMon-Server : (This uses Ubuntu XYMon-Home Default)

/usr/lib/xymon/server/bin/xymon 127.0.0.1 "drop [HOSTNAME] [COLUMNNAME]"

Delay Red (in hosts.cfg)

delayred=STATUSCOLUMN:DELAY[,STATUSCOLUMN:DELAY...]
delayred=disk:10,cpu:30, a red disk-status will not appear on the Xymon webpages until it has been red for at least 10 minutes. 

 

 

  • No labels