Monitor Statistics and Metrics of Syslog
Monitor Statistics and Metrics of Syslog
The monitoring() source queries the statistics (counters) that syslog-ng PE collects, formats them, and optionally
resets the counters.
Type: String
Description: Specifies which statistics will be included in the messages. Note that the list of available statistics
depends on your syslog-ng PE configuration (mainly the configured sources and destinations) and on the stats-level()
global option. The * string includes every available counters. The syntax of the query option is identical to the syslog-
ng-ctl query get “<query>” command.
Example:
the "destination*" query lists the configured destinations, and the metrics related to each destination.
memory_usage: The memory used by the messages in the different queue types (in bytes). This includes every queue
used by the object, including memory buffers (log-fifo) and disk-based buffers (both reliable and non-reliable). For
example:
dst.network;d_net#0;tcp,127.0.0.1:9999;a;memory_usage;0
matched: The number of messages that are accepted by a given filter. Available for filters and similar objects (for
example, a conditional rewrite rule). For example, if a filter matches a specific hostname, then the matched counter
contains the number of messages that reached the filter from this hosts.
filter;demo_filter;;a;matched;28
not_matched: The number of messages that are filtered out by a given filter. Available for filters and similar objects
(for example, a conditional rewrite rule). For example, if a filter matches a specific hostname, then
the not_matched counter contains the number of messages that reached the filter from other hosts, and so the filter
discarded them.
filter;demo_filter;;a;not_matched;0
written: The number of messages successfully delivered to the destination. This value is calculated from other
counters: written = processed - queued - dropped. This metric is calculated from other metrics. You cannot reset this
metric directly: to reset it, you have to reset the metrics it is calculated from.