Send Metrics to the Platform

You can send metrics from anywhere as long as you can reach the Prometheus endpoint.

You can find some examples to configure available metric sources with Prometheus.

FluentBit

This repository provides a basic example of how to configure FluentBit to send metrics to the IONOS Monitoring Service.

Provision a pipeline

Provision a monitoring pipeline using REST API https://monitoring.de-txl.ionos.com/pipelines.

Example API Request Body

{
  "properties": {
    "name": "example"
  }
}

Usage

  1. Grab the key from the above response or provision a new key using REST API https://monitoring.de-txl.ionos.com/pipelines/<PIPELINE_ID>/key.

  2. Install FluentBit package, appropriate for your distribution.

  3. Update the HTTP endpoint and the APIKEY in the fluentbit.conf file.

  4. Configure FluentBit to your desired state.

  5. Run FluentBit and Profit.

Grafana Agent

This example shows how to configure Grafana Agent to send metrics to the monitoring pipeline.

Provision a pipeline

Provision a monitoring pipeline using REST API https://monitoring.de-txl.ionos.com/pipelines.

Example API Request Body

{
  "properties": {
    "name": "example"
  }
}

Usage `

  1. Grab the key from the above response or provision a new key using REST API https://monitoring.de-txl.ionos.com/pipelines/<PIPELINE_ID>/key.

  2. Install Grafana Agent package, appropriate for your distribution. (https://grafana.com/docs/agent/latest/about/)

  3. Update the HTTP endpoint and the APIKEY in the config file.

  prometheus.remote_write "LABEL" {
    endpoint {
      url = "your pipeline's httpEndpoint"

      headers = {
        "APIKEY" = "<API_KEY>",
      }
  }
}

Prometheus

Prometheus is a monitoring and alerting toolkit that is designed for reliability and scalability. It is a pull-based system that scrapes metrics from instrumented jobs, either directly or via an intermediary push gateway for short-lived jobs. It stores all scraped samples locally and runs rules over this data to either aggregate and record new time series from existing data or generate alerts.

Provision a pipeline

Provision a monitoring pipeline using REST API https://monitoring.de-txl.ionos.com/pipelines.

Example API Request Body

{
  "properties": {
    "name": "example"
  }
}

Usage

  1. Grab the key from the above response or provision a new key using REST API https://monitoring.de-txl.ionos.com/pipelines/<PIPELINE_ID>/key.

  2. Install Prometheus package, appropriate for your distribution.

  3. Update the HTTP endpoint and the APIKEY in the prometheus config file.

url: "your pipeline's httpEndpoint"
headers:
  APIKEY: "<APIKEY>"

OpenTelemetry

OpenTelemetry is a set of APIs, libraries, agents, and instrumentation to provide observability for cloud-native software. It is a CNCF project.

Provision a pipeline

Provision a monitoring pipeline using REST API https://monitoring.de-txl.ionos.com/pipelines.

Example API Request Body

{
  "properties": {
    "name": "example"
  }
}

Usage

  1. Grab the key from the above response or provision a new key using REST API https://monitoring.de-txl.ionos.com/pipelines/<PIPELINE_ID>/key.

  2. Update the HTTP endpoint and the APIKEY in the config file.

exporters:
  prometheusremotewrite:
    endpoint: "your pipeline's httpEndpoint"
    external_labels:
      APIKEY: <API_KEY>
      label_name2: label_value2

Last updated