Project

General

Profile

Online Monitoring

Metric Plugins

As of release v1_12_06, Artdaq supports several optional plugins for delivering metric data from the applications. Included in the base package are plugin types "file" and "graphite". Configuration for metric plugins must go in the daq.metrics block in the FhiCL configuration file for the artdaq application. There are two required configuration parameters for all metric plugins: "metricPluginType", denoting the type of the plugin to use, and "level", indicating the verbosity of metrics that should be sent to the plugin instance. For example:

daq.metrics {
   logfile: {
     level: 0
     metricPluginType: "file" 
     fileMode: "append" 
     fileName: "/tmp/FileMetric.out" 
     uniquify: false
   }

   verbosefile: {
     level: 5
     metricPluginType: "file" 
     fileMode: "Overwrite" 
     fileName: "/tmp/FileMetric_%UID%.verbose.out" 
     uniquify: true
   }

   graphite: {
     level: 3
     metricPluginType: "graphite" 
     host: "localhost" 
     port: "2003" 
     namespace: "artdaq." 
   }
}

This block would create two instances of the "file" plugin, one which logs the least verbose metrics to "/tmp/FileMetric.out", appending to that file if it exists, and the other logging all metric data to a transient file "/tmp/FileMetric.verbose_<PID>.out". The value "append" for fileMode is the default, passing "Overwrite", "Create", or "Write" causes the file to be overwritten if it exists. The uniquify: <true|false> parameter instructs the file_metric plugin to make a unique file name for the output based on the PID of the running process. If the string "%UID%" is present in the fileName parameter, it is replaced with the PID, otherwise it is either appended to the end of the name or inserted before the last period in the fileName, depending on if the fileName contains any periods.

The above example would also create an instance of the "graphite" metric plugin, sending to a graphite instance at localhost:2003 (both default values). Note the "." in the namespace, this value is prepended to all of the metric names for organizational purposes (an Aggregator may therefore set this value to "artdaq.aggregator.", an EventBuilder to "artdaq.evb." and so forth).

In addition to the "file" and "graphite" plugin types, there is also a "ganglia" metric plugin, available here: Artdaq-ganglia-plugin

artdaq built-in metric catalog