Publish Metrics

Contents

Introduction

Installing StatsD Node

-Linux

-OSX

-Windows

Configuring Services

Enabling Publish Metrics from OverOps

 

Introduction

Publishing metrics is an element of the Advant Stack feature that enables exporting OverOps data for use in Anomaly Detection, Visualization, Analytics, and Telemetry. The dynamic data export to StatsD, enables you to use a variety of third-party tools, providing control over application data from OverOps.

OverOps support sending metrics to third-party graphing tools via StatsD. StatsD is an open-source implementation protocol to capture, aggregate and send metrics to modern DevOps tools. It enables visualization of any combination of events within OverOps. StatsD receives data from various sources in different types of metrics according to which they are aggregated.

By default, StatsD is installed on the Collector machine and the data is sent to the chosen service from there using the StatsD protocol.

 

 

To integrate with any of the graphing and alerting tools, follow the steps below:

  1. Install StatsD node.
  2. Configure the services with which to integrate.
  3. Enable Publishing Metrics from OverOps.

 

Installing StatsD Node

StatsD is a simple JavaScript application running inside Node.js. The StatsD node can be installed on each monitored OverOps machine with which the monitored nodes will communicate. Optionally, a central OverOps machine enables you to manage all your StatsD configurations through a centralized node. If your organization already has a StatsD server installed, you can connect directly to it and configure the host and port in the Publish Metric dialog box, described in Enabling Publish Metrics from OverOps below.

Linux

To install StatsD daemon on Linux provided by OverOps:

  1. Install Node.js and StatsD by running: sudo /opt/takipi/statsd/etc/takipi-statsd-install
  2. Configure the the services with which you want to integrate as described here.
  3. Launch StatsD by running – sudo /opt/takipi/statsd/etc/takipi-statsd-start

OSX

To install StatsD on OSX:

  1. Install Node.js using the .pkg installer.
  2. Download StatsD, or clone from GitHub.
  3. Download the Takipi config.json StatsD configuration file.
  4. Configure the services to which to send data as described here.
  5. Launch StatsD by running: node <path-to-stats.js> <path-to-config.json>  (stats.js is located in your StatsD folder).

Windows

To install StatsD on Windows:

  1. Install Node.js using the .msi installer.
  2. Download StatsD, or clone from GitHub.
  3. Download the Takipi config.json StatsD configuration file.
  4. Configure the services to send data to as described here.
  5. Launch StatsD by running node <path-to-stats.js> <path-to-config.json> (stats.js script is located in your StatsD folder).

 

Configuring Services

StatsD sends metrics into any graphing or alerting backend application using backend extensions. Backend is a .js file that communicates with the target service, for example Graphite. The credentials required to connect with the remote service (i.e. address, API key, password..) is placed in the config.json file that is sent as a parameter to StatsD.

The config.json has pre-populated configuration samples for all the services listed here. Simply uncomment the sections relevant to the services you want to use, and fill in the your credentials. StatsD configuration data is personal to your machine, and is protected.

If you’re using the prepackaged StatsD node (Linux only), all the relevant backend files have been provided. If you’re using your own StatsD node, make sure you’ve installed the appropriate StatsD backend for any of the following services (click to jump to instructions):

Grafana, Datadog, InfluxDB, Graphite, Hosted Graphite, AppDynamics, AWS Cloudwatch, New Relic, Librato, Zabbix, Anodot, Sentry

For details on configuring these services, click here.

 

Enabling Publish Metrics from OverOps

When StatsD integration is enabled, collection and aggregation of metrics is fully automated. It provides access to all data displayed in OverOps, for each exception in any analysis and visualization tool, including the data from predefined dashboard Views, error analysis Events, and number of active JVMs.

Note: Only services with support for StatsD protocol are able to read the metrics from OverOps.

The export configuration is dynamic, which means the every change made to the OverOps dashboard is reflected in the data sent to StatsD, providing a steady data flow.

In Views, when StatsD is configured, the metrics of every new View created is automatically sent to the defined backends through StatsD.

In the Events Stream, every event publishes its own statistics enabling the the recreating and customizing the OverOps dashboard in the tool of your choice. In addition, every event publishes tiny URL links to the event providing the Root Cause Analysis directly from the third-party graphic or alarm tool.

The JVM count sends query on how many JVMs are currently being monitored.

 

To publish metrics:

  1. From the OverOps dashboard, click Settings, and select Publish Metrics.
  2. In the Publish Metrics dialog box, from the top right corner, turn on StatsD.

The Publish Metrics dialog box is now active. You can change defaults, if necessary. OverOps sends all the metrics recorded in the Views and Events panels to the folder defined in the Output Metric Format section.

 3. If the StatsD node is installed on a machine other than the Collector, enter the hostname or IP address and port of the StatsD server.

The hostname and (optional) port of your StatsD server.

Example:

  • statsd.company.com:8127
  • 127.0.0.1:8125

The default StatsD port is 8125.

  4. Change the folder path of the different metrics (optional). A default path is provided for the Views and the Events metrics as well as the JVM count.

For more details on metric format, see Metric Name Formats

  5. When finished, click Save.

Once you saved the Publish Metric settings, metrics are sent from the Controller to the configured services.

 

Metric Name Formats

This section describes the formats of the metric name to use when publishing to StatsD.

The default patterns listed below per metric type.

Default pattern for Views metrics:

overops.${serviceid}.${application}.${server}.${deployment}.views.${viewname}

Default pattern for Events metrics:

overops.${serviceid}.${application}.${server}.${deployment}.events.${class}.${method}.${event}

Default pattern for JVM count:

overops.${serviceid}.${application}.${server}.jvmcount

 

The OverOps-specific variables that can be used by adding them to metric list are described below. In JVM count format, only {serviceid}, {application}, {applicationpid} and {server} may be used.

${server}

The name of the machine which is publishing the StatsD (e.g. "prod04")

${serviceid}

The unique numeric ID of the installation key on the machine (e.g. "S1234")

${applicationpid}

The process ID of the JVM to which the StatsD is related (e.g. "41884")

${application}

The name of the JVM to which the StatsD is related (e.g. "worker", "my-webapp")

${deployment}

The name of the release to which the StatsD is related (e.g. "ver-2017/07/07")

${viewname}

The name of the View that is being published (e.g. "invocations", "times")

${class}

The name of the class to which the StatsD is related (not fully-qualified)

${method}

The name of the method to which the StatsD is related

${event}

The name of the event to which the StatsD is related (e.g. "NullPointerExecption", "LogError")

${eventurl}

The path to the Error Analysis page of the event in OverOps. Add prefix according to 3rd party application (e.g: http://tkp.to/) and copy to browser.

${entrypointclass}

The name of the entry point's class to which the StatsD is related (not fully-qualified)

${entrypointmethod}

The name of the entry point's method to which the StatsD is related.

 

Have more questions? Submit a request