Filesystem counters

This topic describes the data that gatord reads from the host filesystem counters.

The data in an instrumented filesystem node is read once every 100 milliseconds. The default behavior attempts to interpret the contents of the file as the string representation of a positive decimal integer, with an optional trailing newline. This value is turned directly into the counter value. If the value is not a valid string representation of a decimal integer, the counter value is discarded.

For more complex files, you can optionally specify a regular expression using the extended POSIX syntax. The first capture group of the first match of this regex pattern is interpreted as an integer. If this interpretation fails, either because there are no matches or because the data is not an integer, the counter value is discarded.

Filesystem counters use the event XML syntax that is shown in this example:

<?xml version="1.0" encoding="UTF-8"?>
<category name="Filesystem">
  <event counter="filesystem_loginuid"
         path="/proc/self/loginuid"
         title="The loginuid chart"
         name="The loginuid series"
         description="The description of the loginuid series"
         regex="^(\d+)"/>
</category>