Use this documentation with care! It describes the outdated version 7, which was actively developed around 2014 and is considered dead by the rsyslog team.

This documentation reflects the latest update of the v7-stable branch. It describes the 7.6.8 version, which was never released. As such, it contains some content that does not apply to any released version.

To obtain the doc that properly matches your installed v7 version, obtain the doc set from your distro. Each version of rsyslog contained the version that exactly matches it.

As general advise, it is strongly suggested to upgrade to the current version supported by the rsyslog project. The current version can always be found on the right-hand side info box on the rsyslog web site.

Note that there is only limited rsyslog community support available for the outdated v7 version (officially we do not support it at all, but we usually are able to answer simple questions). If you need to stick with v7, it probably is best to ask your distribution for support.



Module Name:    mmcount

Author:Bala.FA <>

Status:Non project-supported module - contact author or rsyslog mailing list for questions

Available since: 7.5.0


mmcount: message modification plugin which counts messages

This module provides the capability to count log messages by severity
or json property of given app-name.  The count value is added into the
log message as json property named 'mmcount'

Example usage of the module in the configuration file


 # count each severity of appname gluster
 action(type="mmcount" appname="gluster")

 # count each value of gf_code of appname gluster
 action(type="mmcount" appname="glusterd" key="!gf_code")

 # count value 9999 of gf_code of appname gluster
 action(type="mmcount" appname="glusterfsd" key="!gf_code" value="9999")

 # send email for every 50th mmcount
 if $app-name == 'glusterfsd' and $!mmcount <> 0 and $!mmcount % 50 == 0 then {
    $template mailSubject,"50th message of gf_code=9999 on %hostname%"
    $template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'"
    $ActionMailSubject mailSubject
    $ActionExecOnlyOnceEveryInterval 30

[rsyslog.conf overview] [manual index] [rsyslog site]

This documentation is part of the rsyslog project. Copyright © 2008-2013 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 3 or higher.

Previous topic

IP Address Anonimization Module (mmanon)

Next topic

Fields Extraction Module (mmfields)

This Page