Monitors

From etbemon
Jump to: navigation, search

How to Write a Monitor Script

A monitor script will take some command-line parameters specifying what to test, it will return 1 if there is a failure or 0 if everything is OK.

The first line of output is the "summary" that will be shown when you run "monshow" and further lines will be the details.

When things go OK the "summary" line should briefly report any useful information, such as an indication of when the test might fail in future. So a test for certificate expiry should report the next time a certificate will expire even when it's far enough in the future to not be an error. A test for disk space should report the amount of free space even when that's OK.

A monitor script that tests network things should be in the mon.d directory. A script that does local tests (which doesn't mean network tests to localhost) should be in mon-local.d. SE Linux and other security systems will give different permissions to scripts in mon-local.d.

Local Tests

Filesystems and Storage

btrfs.monitor - BTRFS filesystems

softraid.monitor - Linux Software RAID

zfs.monitor - ZFS filesystems

freespace.monitor - free space

Others

linux-temp.monitor - Linux system Temperature

loadavg.monitor - Unix load average

ps.monitor - Unix processes


Remote Tests

I've added stub links for all the monitor scripts currently included. Some of them may not be suitable going forward, EG I really doubt that we need 2 ping tests, 3 smtp tests, and 2 imap tests. Also some of them probably should be in the local section (maybe dialin). Finally some of them may be unsupportable, if a test doesn't appear to work, I can't test it, and I can't find someone to take ownership of it then I will consider removing it.

Core Network Tests

fping.monitor

traceroute.monitor

dns.monitor

dns-query.monitor

ntpdate.monitor

ping.monitor

up_rtt.monitor

tcp.monitor

telnet.monitor

trace.monitor

Mail Servers

imap.monitor

imapnew.monitor

pop3.monitor

smtp.monitor

smtpswaks.monitor

smtp3.monitor

Monitoring Mon

mon.monitor

seq.monitor

Other Tests

asyncreboot.monitor

cpqhealth.monitor

dialin.monitor

file_change.monitor

foundry-chassis.monitor

ftp.monitor

hpnp.monitor

http.monitor

http_tppnp.monitor

ldap.monitor

local-syslog.monitor

lpd.monitor

msql-mysql.monitor

na_quota.monitor

netappfree.monitor

nntp.monitor

phttp.monitor

process.monitor

radius.monitor

rd.monitor

reboot.monitor

remote.monitor

rpc.monitor

silkworm.monitor

snmpdiskspace.monitor

snmpvar.monitor

sslcert.monitor

xedia-ipsec-tunnel.monitor