механизм вывода для показателей производительности (inference engine for performance metrics)
EVENT MONITORING
It is common for production systems to be monitored in a central
location. Traditionally on UNIX systems this has been performed
by the system log facilities - see logger(1), and syslogd
(1). On
Windows, communication with the system event log is handled by
pcp-eventlog
(1).
pmie
fits into this model when rules use the syslog action. Note
that if the action string begins with -p (priority) and/or -t
(tag) then these are extracted from the string and treated in the
same way as in logger(1) and pcp-eventlog
(1).
However, it is common to have other event monitoring frameworks
also, into which you may wish to incorporate performance events
from pmie
. You can often use the shell action to send events to
these frameworks, as they usually provide their a program for
injecting events into the framework from external sources.
A final option is use of the stomp (Streaming Text Oriented
Messaging Protocol) action, which allows pmie
to connect to a
central JMS (Java Messaging System) server and send events to the
PMIE topic. Tools can be written to extract these text messages
and present them to operations people (via desktop popup windows,
etc). Use of the stomp action requires a stomp configuration
file to be setup, which specifies the location of the JMS server
host, port number, and username/password.
The format of this file is as follows:
host=messages.sgi.com # this is the JMS server (required)
port=61616 # and its listening here (required)
timeout=2 # seconds to wait for server (optional)
username=joe # (required)
password=j03ST0MP # (required)
topic=PMIE # JMS topic for pmie messages (optional)
The timeout value specifies the time (in seconds) that pmie
should wait for acknowledgements from the JMS server after
sending a message (as required by the STOMP protocol). Note that
on startup, pmie
will wait indefinitely for a connection, and
will not begin rule evaluation until that initial connection has
been established. Should the connection to the JMS server be
lost at any time while pmie
is running, pmie
will attempt to
reconnect on each subsequent truthful evaluation of a rule with a
stomp action, but not more than once per minute. This is to
avoid contributing to network congestion. In this situation,
where the STOMP connection to the JMS server has been severed,
the stomp action will return a non-zero error value.