$treeview $search $mathjax $extrastylesheet
artdaq_utilities
v1_04_10
$projectbrief
|
$projectbrief
|
$searchbox |
Send a metric to Graphite. More...
Public Member Functions | |
GraphiteMetric (fhicl::ParameterSet const &config, std::string const &app_name) | |
GraphiteMetric Constructor. | |
virtual | ~GraphiteMetric () |
GraphiteMetric Destructor. Calls stopMetrics(). | |
std::string | getLibName () const override |
Get the library name for the Graphite metric. | |
void | sendMetric_ (const std::string &name, const std::string &value, const std::string &) override |
Send a metric to Graphite. | |
void | sendMetric_ (const std::string &name, const int &value, const std::string &unit) override |
Send a metric to Graphite. | |
void | sendMetric_ (const std::string &name, const double &value, const std::string &unit) override |
Send a metric to Graphite. | |
void | sendMetric_ (const std::string &name, const float &value, const std::string &unit) override |
Send a metric to Graphite. | |
void | sendMetric_ (const std::string &name, const unsigned long int &value, const std::string &unit) override |
Send a metric to Graphite. | |
void | startMetrics_ () override |
Perform startup actions. For Graphite, this means reconnecting the socket. | |
void | stopMetrics_ () override |
Perform shutdown actions. This shuts down the socket and closes it. |
Send a metric to Graphite.
Graphite accepts metrics in a tree hiereachy, using '.' as a delimiter. Therefore, the metric artdaq.BoardReader.Fragment_Rate will appear in Graphite as: artdaq/ BoardReader/ Fragment_Rate
This plugin sends TCP messages with the following content: [name] [value] [timestamp], units are discarded
Definition at line 32 of file graphite_metric.cc.
artdaq::GraphiteMetric::GraphiteMetric | ( | fhicl::ParameterSet const & | config, | |
std::string const & | app_name | |||
) | [inline, explicit] |
GraphiteMetric Constructor.
config | ParameterSet used to configure GraphiteMetric | |
app_name | Name of the application sending metrics |
* GraphiteMetric accepts the following Parameters: * "host" (Default: "localhost"): Destination host * "port" (Default: 2003): Destination port * "namespace" (Default: "artdaq."): Directory name to prepend to all metrics. Should include the trailing '.' *
Definition at line 56 of file graphite_metric.cc.
std::string artdaq::GraphiteMetric::getLibName | ( | ) | const [inline, override, virtual] |
Get the library name for the Graphite metric.
Reimplemented from artdaq::MetricPlugin.
Definition at line 77 of file graphite_metric.cc.
void artdaq::GraphiteMetric::sendMetric_ | ( | const std::string & | name, | |
const unsigned long int & | value, | |||
const std::string & | unit | |||
) | [inline, override] |
Send a metric to Graphite.
name | Name of the metric. Will have the namespace prepended | |
value | Value of the metric | |
unit | Units of the metric (Not used) |
Definition at line 146 of file graphite_metric.cc.
void artdaq::GraphiteMetric::sendMetric_ | ( | const std::string & | name, | |
const float & | value, | |||
const std::string & | unit | |||
) | [inline, override, virtual] |
Send a metric to Graphite.
name | Name of the metric. Will have the namespace prepended | |
value | Value of the metric | |
unit | Units of the metric (Not used) |
Implements artdaq::MetricPlugin.
Definition at line 135 of file graphite_metric.cc.
void artdaq::GraphiteMetric::sendMetric_ | ( | const std::string & | name, | |
const double & | value, | |||
const std::string & | unit | |||
) | [inline, override, virtual] |
Send a metric to Graphite.
name | Name of the metric. Will have the namespace prepended | |
value | Value of the metric | |
unit | Units of the metric (Not used) |
Implements artdaq::MetricPlugin.
Definition at line 124 of file graphite_metric.cc.
void artdaq::GraphiteMetric::sendMetric_ | ( | const std::string & | name, | |
const int & | value, | |||
const std::string & | unit | |||
) | [inline, override, virtual] |
Send a metric to Graphite.
name | Name of the metric. Will have the namespace prepended | |
value | Value of the metric | |
unit | Units of the metric (Not used) |
Implements artdaq::MetricPlugin.
Definition at line 113 of file graphite_metric.cc.
void artdaq::GraphiteMetric::sendMetric_ | ( | const std::string & | name, | |
const std::string & | value, | |||
const std::string & | ||||
) | [inline, override, virtual] |
Send a metric to Graphite.
name | Name of the metric. Will have the namespace prepended | |
value | Value of the metric |
Implements artdaq::MetricPlugin.
Definition at line 84 of file graphite_metric.cc.