Sysmon beta versions 0.89 and later and the inital release of Sysmon 0.90 include a new configuration file format. This was necessary to allow greater configuration options, and the addition of new features. This also allows us to properly configure sysmon to detect parallel paths and outages on them properly, including ring topology. 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.
As of 0.90, there is only one feature missing from sysmon that was previously
available. That is the ability to configure generic
variables and perform replacements based upon them. This feature
will be coming back soon, but is not implemented yet.
The above network topology can be represented in the following network configuration file:
root=sysmon-host;
object sysmon-host {
ip "sysmon-host";
type ping;
desc "ping-sysmon-host";
dep "router1";
};
object router1 {
ip "router1.example.com";
type ping;
desc "router1";
};
object router2 {
ip "router2.example.com";
type ping;
desc "router2";
};
object router3 {
ip "router3.example.com";
type ping;
desc "router3";
};
object router1-2-link {
ip "1.2.3.4";
type ping;
desc "link-rtr1-to-rtr2";
dep "router1";
dep "router2";
};
object router2-3 {
ip "2.3.4.5";
type ping;
desc "link-rtr2-to-rtr3";
dep "router2";
dep "router3";
};
object rtr1-3-link {
ip "3.4.5.6";
type ping;
desc "rtr1-3-link};
dep "router1";
dep "router3"
};
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 that field, just as you could prior to 0.90.
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.
A list of valid global configuration options follows:
include "/path/to/file";
(Specify another configuration file to be included
at this point).
config showupalso;
(Make sysmon show the hosts checked as up as well
as the ones that are checked as down in the configuration file)
config nologconnects;
(Do not log connect information from the client.
By default sysmond listens on port 1345 for client connections from the
curses, python, java, and other clients).
config noheartbeat;
(Sysmon normally sends a "heartbeat" packet when
started to our registration server. This includes the hostname, version
of sysmon, and the operating system you are running on. Sysmon only
sends this once upon startup. Failure to send this will not affect
system performance or operation).
config nosubject;
(Sysmon normally sends a Subject: line in the message
to the contact specified within an object. Some paging systems have
problems when a subject is specified, or it does not get passed along properly
when you have limited characters to be received. Specifying this
option causes sysmon to omit the subject: line).
config statusfile (text|html) "/path/to/file";
(Sysmon has the ability to specify a file to dump
current status to. File type can be either html or text. This
file is updated whenever there is a state change on an object).
config logging syslog [facility];
(Sysmon logs various information via syslog.
You can specify what service to log to, or specify "none" for no logging).
root "object-name";
(This is a required option. You specify what
object in your config file is the first dependency in your monitoring,
so we know where we are within the network to allow us to traverse it properly).
config queuetime [integer];
(This allows you to specify how often an object
is queued to be checked. This defaults to 60 seconds after the last
test is over).
config dnsexpire [integer];
(This allows you to specify how often sysmon's internal
dns cache is expired. Default is 15 minutes. Time is specified
in seconds).
config dnslog [integer];
(This allows you to specify how often sysmon logs
dnscache related data. Default is 10 minutes. Time is specified
in seconds).
config pageinterval [integer];
(This option allows you to specifiy that sysmon
send a reminder e-mail/page to you. Default is to not send reminders.
Time is specified in minutes).
config maxqueued [integer];
(This specifies how many tests may be performed
at one time. Default is 100. Because of file descriptor limits
that your operating system may have, and the file descriptor intensity
of sysmon, you may need to increase or decrease this depending on the size
of your configuration file).
config numfailures [integer];
(This specifies how many times a host should be
checked as "down" before the contact is e-mailed/paged. Default is
4).
config pmesg "string";
(This specifies the format of the text sent in the
body of the message. See *FIXME* builtin expansions *FIXME* for ways
to display information about the test. Default is specified in config.h.
grep PMESG src/config.h).
config (from|sender) "username@example.com";
(Allows you to reset who the page/e-mail comes from
instead of root@localhost).
config subject "string";
(This specifies the format of the text sent in the
subject of the message. See *FIXME* builtin expansions *FIXME*
for ways to display information about the test. Default is specified
in config.h. grep SUBJECT src/config.h).
config upcolor "string";
(This allows you to specify a color as used in HTML tags
to be used for hosts that are currently UP as displayed in the configured
html file).
config downcolor "string";
(See config upcolor).
config recentcolor "string";
(Hosts that are down, but have not reached the count
of numfailures are this color. See config upcolor).
config replyto "user@example.com";
(Allows insertion of reply-to: header in e-mail/pages
sent).
config errorsto "user@example.com";
(Allows insertion of errors-to: header in e-mail/pages
sent).
config header "text";
(Allows insertion of header).
config authkey "text";
(Password/Authentication key used to restrict access
to client port).
Once you have declared an object, the following configuration options exist within it:
type "(ping|pop3|tcp|udp|radius|nntp|smtp|imap|x500|www|sysmon)";
Specify the check type.
port [integer];
Specify the port type for tcp and udp based checks
desc "text";
Specify the description of the object
reverse;
Reverse the meaning of up vs down in monitoring.
Useful when using to monitor other sysmonds and to take over backup monitoring.
ip "text|ip-address";
an IP address or valid dns-name of the host
to be monitored.
secret "string";
Only valid for radius check.
url "string";
only valid for http check
urltext "string-to-search-for";
String to search for within the url requested.
password "password";
Only valid for pop3, imap and radius check.
username "username";
Only valid for pop3, imap and radius check.
spawn "/program/to/run";
Program to execute upon monitoring failure.
Can also contain *FIXME* replacement options *FIXME* that PMESG and
SUBJECT
can contain.
contact "username@example.com";
e-mail address to send up/down messages to.
dep "object-we-depend-on";
Dependency for this object. If that host is
not up, we do not get monitored.
page "text";
Not implemented yet.
also-notify "text";
Not implemented yet.