Description:
The port-collector
gets data about services running on
specified TCP ports. It will attempt to connect to the specified
port on the host, and optionally send a string to it. It will
then examine the response, if any, for certain patterns. This
permits it to query almost any text-based protocol. For information
on how to set up a new service, look in the
scripts directory in the configuration directory.
The rrd specification can also override the port specified by the script,
by appending a colon and the port-number. E.G. for a web-server
on port 8000, you could specify the rrd like:
rrd port-http:8000
According to whether it can connect to the service and what response
it gets back, it sets a status to one of OK, WARN, ERROR, CRITICAL.
These are arbitrary levels, except that OK means normal, and their
meanings are determined by the configuration file. The
port-collector
will also log how long it took the service to
respond. These numbers are not intended for benchmarking, but only
for determining the health of the service.
Other data from the port-collector
The main RRD for the port-collector is port-*
, but it is possible to
define other RRDs. If you want to collect information from the results
elicited by the send string, you can provide either or both of the
infopattern
or valuepattern
in the script associated with the RRD.
The script must be named the same as the rrd. Look in the
scripts configfile docs for details on scripts.
A matching valuepattern
will cause the port-collector to return
variables named RRDNAME:value#
with "#
" replaced by a single digit,
corresponding to the number of the parenthesized part of the pattern that
was matched.
A matching infopattern
will cause the port-collector to create status
files for this host called INFO1-RRDNAME. None of the existing pagemakers
use these status files, but the view-writer could do so if a
view template refered to them.
[