Sysmon includes a versatile configuration file format.
Items covered by this document.
Sysmon now allows a significant number of configuration options, and the easier addition of new features. This also allows us to configure sysmon to detect parallel paths and outages on them properly, including ring topology as well as a number of other things. Take the following example:
With this network topology, we can monitor each link properly. Versions prior to 0.90 would either report multiple outages, or not have the ability to report the outages properly.
The above network topology can be represented in the following network configuration file:
1: root=sysmon-host; 2: 3: object sysmon-host { 4: ip "sysmon-host"; 5: type ping; 6: desc "ping-sysmon-host"; 7: dep "router1"; 8: }; 9: 10: object router1 { 11: ip "router1.example.com"; 12: type ping; 13: desc "router1"; 14: }; 15: 16: object router2 { 17: ip "router2.example.com"; 18: type ping; 19: desc "router2"; 20: }; 21: 22: object router3 { 23: ip "router3.example.com"; 24: type ping; 25: desc "router3"; 26: }; 27: 28: object router1-2-link { 29: ip "1.2.3.4"; 30: type ping; 31: desc "link-rtr1-to-rtr2"; 32: dep "router1"; 33: dep "router2"; 34: }; 35: 36: object router2-3 { 37: ip "2.3.4.5"; 38: type ping; 39: desc "link-rtr2-to-rtr3"; 40: dep "router2"; 41: dep "router3"; 42: }; 43: 44: object rtr1-3-link { 45: ip "3.4.5.6"; 46: type ping; 47: desc "rtr1-3-link"; 48: dep "router1"; 49: dep "router3" 50: };
Now, here, we declare an object, and then configure the locally dependent options. All checks require a description, and a check type, including the ip declaration. You can specify either an ip address or a hostname in this field.
When you create an object, you specify a symbolic name. The name router1 could just as easily say "swiss-cheese", it's just used internally to look up the dependencies and create the adjancies table.
2. Global Configuration Options
Once you have declared an object, the following configuration options exist within it:
Ping |
object gateway { ip "129.250.50.61"; type ping; desc "fa-12-0-0.a01.clevoh02.us.ra.nether.net"; contact "$jared-pager"; }; |
pingv6 |
object v6web { ip "www.v6.ntt.net"; type pingv6; desc "www.v6.ntt.net IPv6 Ping"; contact "$jared-pager"; }; |
pop3 |
object pop3-mailserver { ip "198.88.20.7"; type pop3; username "ravi"; password "moocow"; desc "qpopper"; contact "admin@example.com"; }; |
tcp |
object tcp-shoutcast { ip "198.88.20.7"; type tcp; port 8000; desc "shoutcast"; contact "admin@example.com"; }; |
udp |
object udp-named { ip "198.88.20.5"; type udp; port 53; desc "named udp port"; contact "admin@example.com"; }; |
dns |
object dns { ip "10.1.161.2"; type dns; dns-query "example.com"; desc "example.com-dns"; }; |
radius |
object radius-server { ip "198.88.20.7"; type radius; secret "private"; username "jared"; password "noway"; desc "radius server"; contact "admin@example.com"; }; |
nntp |
object nntp-server { ip "oh.news.verio.net"; type nntp; desc "verio-ohio nntp server"; contact "admin@example.com,nntp@example.com"; }; |
smtp |
object smtp-server { ip "198.88.20.7"; type smtp; desc "sendmail"; contact "admin@example.com,postmaster@example.com"; }; |
imap |
object imap-server { ip "198.88.20.7"; type imap; username "jared"; password "noway"; desc "imap server"; contact "admin@example.com,postmaster@example.com"; }; |
x500 |
object imap-server { ip "198.88.20.7"; type x500; desc "x500 server"; contact "admin@example.com"; }; |
www |
object httpd { ip "198.88.20.7"; type www; url "/index.html"; urltext "DOCTYPE HTML PUBLIC"; desc "apache"; contact "admin@example.com,webmaster@example.com"; }; |
sysmon |
object sysmon-server { ip "puck.nether.net"; type sysmon; reverse; desc "nether.net sysmon"; contact "jared@example.com"; }; |
snmp (reboot) |
object c7200-router-reboot { ip "10.2.3.1"; type snmp; snmp-type "reboot"; desc "c7200"; community "public"; contact "jared@foo.example.com"; }; |
snmp (high) |
object cisco-Router-temp { ip "10.0.0.1"; type snmp; snmp-type "high"; oid ".1.3.6.1.4.1.9.9.13.1.3.1.3.1"; desc "TEMP ALERT above 28 deg C"; snmp-high "28"; community "public"; contact "admin@example.com"; dep "cisco-Router-Ping"; }; |
snmp (rate) |
object c7200-rate { ip "10.0.0.1"; type snmp; snmp-type "rate"; oid ".1.3.6.1.2.1.2.2.1.10.18"; desc "c7200 ser2/3:0 input bitrate"; snmp-rate "256000"; snmp-octets; community "public"; contact "user@example.com"; }; |
Port |
object tcp-shoutcast { ip "198.88.20.7"; type tcp; port 8000; desc "shoutcast"; contact "admin@example.com"; }; |
Option | What it does |
%m |
local host name |
%H |
DNS name of host being monitored |
%s |
service |
%p |
port number (numeric) |
%T |
Current Time hh:mm:ss |
%t |
Current Time mm dd hh:mm:ss |
%d |
Downtime dd:hh:mm |
%D |
Downtime with seconds dd:hh:mm:ss |
%i |
Unique ID for outage |
%I |
IP of host down |
%w |
warning/what |
%u |
error-type converted into string describing it |
%h |
hostname with failure |
%r |
reliability percentage |
%V |
Verbose History (not implemented) |
%c |
Failure iteration count (since last success) |
%C |
Success iteration count (since last failure) |
%U |
Service state (as `up' or `down') |