Input Module to Generate Periodic Statistics of Internal Counters
Module Name: impstats
Available since: 5.7.0+, 6.1.1+
Author: Rainer Gerhards <rgerhards@adiscon.com>
Description:
This module provides periodic output of rsyslog internal counters. Note that the whole statistics system is currently under development. So availabilty and format of counters may change and is not yet stable (so be prepared to change your trending scripts when you upgrade to a newer rsyslog version).
The set of available counters will be output as a set of syslog messages. This output is periodic, with the interval being configurable (default is 5 minutes). Be sure that your configuration records the counter messages (default is syslog.info).
Note that loading this module has impact on rsyslog performance. Depending on settings, this impact may be noticable (for high-load environments).
The rsyslog website has an updated overview of available rsyslog statistic counters.
Configuration Directives:
- $PStatInterval <Seconds>
Sets the interval, in seconds at which messages are generated. Please note that the actual interval may be a bit longer. We do not try to be precise and so the interval is actually a sleep period which is entered after generating all messages. So the actual interval is what is configured here plus the actual time required to generate messages. In general, the difference should not really matter. - $PStatFacility <numerical facility>
The numerical syslog facility code to be used for generated messages. Default is 5 (syslog).This is useful for filtering messages. - $PStatSeverity <numerical severity>
The numerical syslog severity code to be used for generated messages. Default is 6 (info).This is useful for filtering messages. - $PStatJSON <on/off> (rsyslog v6.3.8+ only)
If set to on, stats messages are emitted as structured cee-enhanced syslog. If set to off, legacy format is used (which is compatible with pre v6-rsyslog).
- This module MUST be loaded right at the top of rsyslog.conf, otherwise stats may not get turned on in all places.
- experimental code
Sample:
This activates the module and records messages to /var/log/rsyslog-stats in 10 minute intervals:
[rsyslog.conf overview] [manual index] [rsyslog site]
This documentation is part of the
rsyslog
project.
Copyright © 2010 by Rainer
Gerhards and
Adiscon.
Released under the GNU GPL version 3 or higher.

