Skip to content

solarwinds/prometheus2appoptics

Repository files navigation

Prometheus remote storage provider for AppOptics

CircleCI

NOTE: this is considered EXPERIMENTAL and is not yet recommended for production systems.

An implementation of a Prometheus remote storage adapter for AppOptics.

prometheus2appoptics is a web application that handles incoming payloads of Prometheus Sample data and then converts it into AppOptics Measurement semantics and pushes that up to AppOptics' REST API in rate-limit-compliant batches.

Assumptions:

  • All Prometheus Labels can be converted into AppOptics Measurement Tags
  • Any Prometheus sample w/ a NaN value is worthless and can be discarded
  • prometheus2appoptics will handle any difference in throughput between Prometheus' remote storage flush rate and AppOptics's ingestion limit. As of Prometheus 1.7, the storage rate of remote storage sample queues is not configurable, but such options exist internally and the exposure of those options is scheduled for the 2.0 release)

Deployment

Two methods of deployment supported:

  1. Deployment of a binary to indvidual system
  2. (Recommended) Deployment via Docker container

Deploying as a Container

docker run --env ACCESS_TOKEN=<APPOPTICS_TOKEN> --env SEND_STATS=true -p 4567 solarwinds/prometheus2appoptics

Configuring Prometheus

To configure Prometheus to send samples to this binary, add the following to your prometheus.yml:

# Remote write configuration
remote_write:
  - url: "http://<STORAGE_ADAPTER_HOST>:<STORAGE_ADAPTER_PORT>/receive"

Development

Create the bin with

make build

prometheus2appoptics supports several runtime flags for configuration:

--bind-port (the port the HTTP handler will bind to - defaults to 4567)
--send-stats (sends stats to AppOptics if true, to stdout if false - defaults to false)
--access-email (email address associated with API token - defaults to "")
--access-token (API token string - defaults to "")

Prometheus

  • Install Prometheus by downloading the latest stable release
  • Untar the download and put it anywhere you want.
  • Open prometheus.yml and configure it with running services.
  • To just have some data, you can install the "random" RPC process from Prometheus and run several of them at once
  • You can also run the node exporter on your local system for local stats. Remember to set up a target section in the config file.

Questions/Comments?

Please open an issue, we'd love to hear from you. As a SolarWinds Innovation Project, this adapter is supported in a best-effort fashion.