Two different kinds of counters are possible.
counters increment their value each time a match is made.
counters contain the last matched value.
A counter line constists of a name, a colon and a delimited regular expression:
The name is used as the
counter looks like the example above, and simply increments the
SNMP value each time a match is made.
A value counter has a second part to its regular expression, similar to
a sed replace:
name: /([0-9]+) degrees/\1/
The backslash-numeral refers to the regular expression group. \0 refers to
the entire matched text. The resulting value is available in the
SNMP value. If the result is parseable as an integer, it is also available