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>
The counter attribute must be a unique identifier code, and must begin with the filesystem_ prefix.
The path attribute is the location on the filesystem to be read.
The class attribute is the counter class, which explains how to interpret the data.
The title attribute is the name of the chart in the Timeline view that shows the data series. Multiple event counters can have the same title, which means they are all plotted on the same chart.
The name attribute is the name of the data series in the chart in the Timeline view.
The description attribute provides some documentation of the counter.
The regex attribute is optional. It contains the extended POSIX regular expression to use to search and extract the counter integer value from the file content. The content of the first match group of the first hit in the search is interpreted as an integer to determine the counter value.