8.6.4. Counter Handler Module

The counter event handler module is used to count certain events. You can define arbitrary counter names and each occurrence of an event will modify the counter in the counter table according to the selected action.

These counters can be used to graph time series of failed authentication, assigned tokens, user numbers or any other data with any condition over time.

8.6.4.1. Possible Actions

8.6.4.1.1. increase_counter

This action increases the counter in the database table eventcounter. If the counter does not exists, it will be created and increased.

8.6.4.1.2. decrease_counter

This action decreases the counter in the database table eventcounter. If the counter does not exists, it will be created and decreased.

Note

This action will not decrease the counter beyond zero unless the option allow_negative_values is enabled.

8.6.4.1.3. reset_counter

This action resets the counter in the database table eventcounter to zero.

8.6.4.2. Possible Options

8.6.4.2.1. counter_name

This is the name of the counter in the database. You can have as many counters in as many event handlers as you like.

8.6.4.2.2. allow_negative_values

Only available for the decrease_counter action. Allows the counter to become negative. If set

to False (default) decreasing stops at zero. .. note:: Since the option allow_negative_values is an attribute of the counter event handler action (and not the counter itself in the database) it is possible to define multiple event handler accessing the same counter. Thus if a negative counter is accessed by an event handler with the option allow_negative_values set to true, the counter will be reset to zero