-
Notifications
You must be signed in to change notification settings - Fork 1
appenderTagFields
When storing and querying time series data, some repositories differentiate between fields and tags. InfluxDB is an example of a provider that does this. You can read a little about how InfluxDB receives these attributes in the definition of their Line Protocol.
Data elements are roughly divided into two categories: Tags and Fields. Tags are used to group and select measurements that will be included in output, while tags are the measurements themselves.
Typically when perfmon4j sends data to InfluxDB the category, subCategory, system name, group, and instanceName are considered tags, and all of the other elements are considered Fields.
To indicate a specific field should be treated as a Tag, rather than a field, you can use the TagFields attribute on the appender definition.
For example consider a Perfmon4j SnapShotMonitor that collects the following 4 elements of data:
- totalCapacity,
- activeWorkload,
- systemStatus (for this example a string value of "Green", "Yellow" or "Red")
- subSystemName
In this example you may prefer subSystemName to be considered a tag -- so you can build individual visualizations for each subsystem.
The following is an example of how you would inform the InfluxAppender to consider subSustemName a tag, rather than a field.
Perfmonconfig.xml fragment:
...
<appender name='influxdb-appender' className='org.perfmon4j.influxdb.InfluxAppender' interval='1 minute'>
<attribute name='baseURL'>http:\\...</attribute>
...
<attribute name='tagFields'>subSystemName</attribute>
</appender>
...
<snapShotMonitor name='SubSystemStatus' className='org.myorg.MySubSystemStatusSnapShot'>
<appender name='influxdb-appender'/>
</snapShotMonitor>
- To specify multiple fields use separate with a ',' (i.e. 'subSystemName,dataCenterName')
- To limit to a field to a specific monitor, you can prefix the field name with the monitor name, separated by a '|' (i.e. SubSystemStatus|subSystemName.