Configuring Metrics Reporting
By default, collection of metrics is enabled and metrics are sent to a Graphite API-based endpoint (such as InfluxDB). The group name of this metrics reporter section is called reporters.graphite. You can keep the defaults or change the frequency of collection and the endpoints where you want to send the data. This group can be enabled or disabled in isolation.
Metrics configuration defines reporters that will receive metrics data, at a defined interval. The system outputs metrics data every interval to the defined reporter. You can define an interval for the reporter (period_in_seconds property).
To change the default settings, you need to locate or add the metrics group to your configuration file for the eMessage Connector, define the reporters (where to send metrics), and make the necessary changes to the settings.
1. In your configuration file, locate the metrics group and keep the default setting for the enabled property. If you do not find this group, open the emessage-all.conf sample configuration file; you can copy this group and the settings you want from that file.
metrics {
enabled = true
2. To define where the Connector outputs all metrics, locate or add the following graphite group to the reporters group, as follows:
// Report using Metrics
metrics {
enabled = true
reporters {
graphite {
// set to true to enable metric collection in graphite
// configure appropriate endpoint below
enabled = true

// a number value indicating how many seconds between
// each report of metrics.
period_in_seconds = 5

// Do NOT use. Leave disabled so that you can specify
// the graphite endpoints.
service-discovery {
enabled = false
}

// Can define graphite collector endpoints if
// service discovery is not enabled
endpoints = [
{
// the host of the graphite collector
//(like influxdb)
host = "localhost"
// the port that the collector is listening
// on to receive metric data
port = 2003
}
]
}
}
}
3. To configure the Graphite API-based endpoint (InfluxDB), set the properties of the graphite group and the endpoints group:
a. enabled property — Change the value to true.
b. period_in_seconds property — Change the number of seconds between each report of metrics, if desired. The default interval is 5 seconds.
c. service-discovery must be disabled to configure endpoints for the Graphite collector.
d. endpoints.host property — Specify the host name or IP address of the Graphite collector host machine (the InfluxDB host).
e. endpoints.port property — Specify the number of the port that the collector is listening on for metric data. The default port is 2003.
4. If you have completed configuring the Connector, save and close the configuration file. Otherwise, the following additional configuration items can be set in this configuration file:
5. If you have not completed the following steps, do so before you try to start the Connector:
Set the environment variable to point to your configuration file and your logback.xml file.
Configure the TokenPropertyAuthenticator. For details, refer to Configuring the TokenPropertyAuthenticator (eMessage Connector).
6. This step depends on whether you have previously started the eMessage Connector:
Previously started: Restart it for these configuration changes to take effect.
Not previously started: As long as you have set the environment variable, start the eMessage Connector..
Was this helpful?