Skip to main content

Prometheus Monitor

Ingest your own Prometheus metrics into BlackTide using the standard remote_writeprotocol. We accept Snappy-compressed protobuf payloads on a tokenized endpoint and alert when your Prometheus stops pushing.

What is a Prometheus Monitor?

A Prometheus Monitor turns BlackTide into the long-term storage for metrics your own Prometheus is already scraping. You configure remote_write to forward samples to us; we authenticate the feed, enforce quotas, and raise an incident if no samples arrive within the expected push interval.

Unlike HTTP or TCP monitors, Prometheus monitors are push-based: your Prometheus connects to BlackTide, not the other way around. This means:

  • Works behind firewalls and private networks (outbound only)
  • You keep full control over which metrics you send via relabel_configs
  • No need to expose /metrics to the public internet

Configuration Options

FieldDescriptionExample
Metric TokenThe btm_… bearer token used by your Prometheus to authenticatebtm_live_1a2b3c…
Expected Push IntervalSeconds between batches. Alert fires if no samples arrive within this window.60 (default)
Metric Name FilterOptional regex applied to metric names. Leave empty to accept all metrics.my_app_.*

Ingestion Endpoint

BlackTide accepts Prometheus remote_write at:

POST https://api.blacktide.xyz/api/v1/write
Authorization: Bearer btm_YOUR_TOKEN_HERE
Content-Type: application/x-protobuf
Content-Encoding: snappy
X-Prometheus-Remote-Write-Version: 0.1.0

The endpoint follows the standard Prometheus remote_write spec 1.0, so any compliant client (Prometheus, Grafana Agent, VictoriaMetrics vmagent, OpenTelemetry Collector with prometheusremotewrite exporter) will work.

prometheus.yml Configuration

remote_write:
  - url: "https://api.blacktide.xyz/api/v1/write"
    authorization:
      type: Bearer
      credentials: "btm_YOUR_TOKEN_HERE"
    queue_config:
      max_samples_per_send: 1000
      batch_send_deadline: 5s

After saving, reload Prometheus with SIGHUP or restart the process. Samples should start flowing within batch_send_deadline.

Filtering What You Send

To reduce payload size and stay inside rate limits, send only the metrics you care about:

remote_write:
  - url: "https://api.blacktide.xyz/api/v1/write"
    authorization:
      type: Bearer
      credentials: "btm_YOUR_TOKEN_HERE"
    write_relabel_configs:
      # Only forward metrics starting with my_app_
      - source_labels: [__name__]
        regex: "my_app_.*"
        action: keep

Other Clients

Grafana Agent

metrics:
  configs:
    - name: default
      remote_write:
        - url: https://api.blacktide.xyz/api/v1/write
          authorization:
            type: Bearer
            credentials: btm_YOUR_TOKEN_HERE

VictoriaMetrics vmagent

vmagent \
  -remoteWrite.url=https://api.blacktide.xyz/api/v1/write \
  -remoteWrite.bearerToken=btm_YOUR_TOKEN_HERE \
  -promscrape.config=prometheus.yml

Payload Limits

  • Compressed body: 5 MB max per request
  • Decompressed body: 50 MB max per request
  • Label value length: 1024 characters max
  • Samples per second: Enforced per token (see your plan on the Pricing page)

If you exceed the sample rate, BlackTide returns 429 Too Many Requests and Prometheus will back off and retry. Increase batch_send_deadline and reducemax_samples_per_send if you consistently hit the limit.

When Alerts Fire

The monitor transitions to down when no samples arrive withinexpectedPushIntervalSeconds. Typical causes:

  • Your Prometheus process crashed or was restarted without remote_write config
  • Network issue between your Prometheus and BlackTide
  • The btm_ token was revoked or expired
  • You hit your samples-per-second quota and Prometheus stopped retrying

Getting a Metric Token

  1. Go to Settings → Metric Tokens
  2. Click Create token, pick a name (e.g. prod-prometheus)
  3. Copy the btm_… value — it is only shown once
  4. Paste it into prometheus.yml as shown above

You can rotate tokens at any time without recreating the monitor. The token and the monitor are linked by ID, so revoking a token only stops that specific feed.

Troubleshooting

Monitor is down but Prometheus looks healthy

Check:

  • Prometheus UI → Status → Remote Write for send errors
  • Token has not been revoked in BlackTide settings
  • expectedPushIntervalSeconds is larger than your scrape interval plus any retry backoff

429 Too Many Requests

You are above the samples-per-second quota. Either add a keep relabel to drop metrics you don’t need, or upgrade your plan.

400 Bad Request

Usually a protocol mismatch. Confirm Content-Type: application/x-protobuf andContent-Encoding: snappy headers are being sent. Prometheus sets these automatically; custom HTTP clients must set them explicitly.

Next Steps