Skip to main content
Prometheus is an open-source systems monitoring and alerting toolkit. You can send Simplismart metrics to Prometheus using the OpenTelemetry Collector with the Prometheus remote write exporter.

Prerequisites

  • Prometheus instance with remote write endpoint (or Grafana Cloud)
  • OpenTelemetry Collector installed
  • Simplismart API Key

OpenTelemetry Collector configuration


receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: "model-suite"
          scrape_interval: 60s
          scheme: https
          metrics_path: /observability/metrics/federate/
          authorization:
            type: Bearer
            credentials: "${MODEL_SUITE_METRICS_TOKEN}"
          params:
            namespace: ["NAMESPACES_HERE"]
            bundle: ["core"]
            source: ["deployment"]
          static_configs:
            - targets: ["api.app.simplismart.ai"]

processors:
  batch:

exporters:
  prometheusremotewrite:
    endpoint: "${PROMETHEUS_REMOTE_WRITE_URL}"
    # If your Prometheus requires auth (e.g. Grafana Cloud):
    auth:
      authenticator: basicauth

extensions:
  basicauth:
    client_auth:
      username: "${PROMETHEUS_USERNAME}"
      password: "${PROMETHEUS_PASSWORD}"

service:
  extensions: [basicauth]
  pipelines:
    metrics:
      receivers: [prometheus]
      processors: [batch]
      exporters: [prometheusremotewrite]

Configuration parameters

namespace

The namespace parameter accepts a comma-separated list of deployment slugs. You can specify up to 10 deployment slugs. To increase this limit, reach out to support at support@simplismart.tech. Example: ["slug-1", "slug-2", "slug-3"]

scrape_interval

The recommended scrape interval is 60 seconds. It is advised not to reduce the interval below 30 seconds, as shorter intervals may not provide meaningful additional visibility and can lead to unnecessary overhead.

Test locally

To test this setup locally, first export your environment variables:
export MODEL_SUITE_METRICS_TOKEN='PASTE_JWT_HERE'
export PROMETHEUS_REMOTE_WRITE_URL='PASTE_PROMETHEUS_REMOTE_URL_HERE'
export PROMETHEUS_USERNAME='PASTE_PROMETHEUS_REMOTE_WRITE_USERNAME'
export PROMETHEUS_PASSWORD='PASTE_PROMETHEUS_REMOTE_WRITE_PASSWORD'
Then save the configuration above as otelcol.yaml and run:
docker run --rm \
  -e MODEL_SUITE_METRICS_TOKEN \
  -e PROMETHEUS_REMOTE_WRITE_URL \
  -e PROMETHEUS_USERNAME \
  -e PROMETHEUS_PASSWORD \
  -v "$PWD/otelcol.yaml:/tmp/config.yaml:ro" \
  otel/opentelemetry-collector-contrib:latest \
  --config=/tmp/config.yaml
This will start the OpenTelemetry Collector in a Docker container using your local configuration file.