Table of Contents
MonAMI looks for the configuration file
monami.conf
. It will first look for this
file in the /home/paul/MonAMI-test-install/etc
directory. If monami.conf
is not found
there, the program will check the current directory. If the
configuration file still cannot be found, MonAMI will exit with
error code 1.
The configuration file can describe four things:
configuration for MonAMI, independent of specific monitoring,
which services need monitoring (the monitoring targets) and how to get that information,
where information should be sent (the reporting targets),
how data should flow from the monitoring targets to the reporting target.
As will be discussed later, it is possible to split parts of MonAMI configuration into different files. This allows a set of monitoring definitions to be stated independently of other monitoring activity, which may prove useful when MonAMI is satisfying multiple groups requiring monitoring of services.
Comments can be included by starting a line with the hash
(#
) symbol. White space (consisting of space or
tab characters) before the hash symbol is allowed in comment
lines.
Each configuration file is split into multiple stanzas (or sections). Each stanza has a section title line followed by zero or more attribute lines.
A section title is a line containing a word in square brackets
("[mysql]
" for example). The case used for the
section title does not matter: "[MySQL]
",
"[mysql]
" and "[mySQL]
" can be used
interchangeably.
All lines following a section title line until the next section
title line (or the end of the file) must be either a blank line,
a comment line or an attribute line. Attribute lines are
keyword-value pairs separated by an equals symbol
("=
"), for example:
name = myMonitor
White space at the start of the line, either side of the equals symbol and at the end of the line is ignored. Other white space, if significant, is preserved.
If a line ends with a back-slash symbol ("\
") then
that line and the one following it are combined into a single
line. This can be repeated, allowing a single very long line to
be broken into several shorter (and more manageable) lines; each
of the shorter lines, except the last one, must end with a
back-slash symbol.
Example configuration files are include in Section 3.8, “Example configurations”.
The following sections describe the different sections that may appear in a configuration file, along with the valid assignment lines that further refine MonAMI behaviour.