Skip to main content
Squasher accepts metrics over OTLP, not the Prometheus protocols. Run an OpenTelemetry Collector that scrapes your targets, or that receives remote write, and forwards the metrics to Squasher. On a Linux host, the Squasher Collector can also scrape a list of targets.

Prerequisites

  • An OpenTelemetry Collector Contrib build (otelcol-contrib) that can reach your targets.
  • An ingest key in the Collector’s environment as SQUASHER_API_KEY. See Create an ingest key.

Scrape your targets

Use the Prometheus receiver when the Collector can reach each target’s metrics endpoint. It takes standard Prometheus scrape configuration, service discovery, and relabeling.
otel-collector-config.yaml
The receiver sets service.name from the scrape job. Use metric_relabel_configs to drop series and labels that you do not query before you add more jobs.

Scrape with the Squasher Collector

The Squasher Collector can also scrape Prometheus endpoints on the same host or on its private network. It scrapes only the targets that you list. It opens no port: every scrape is an outbound request. It has no service discovery and no relabeling. Add a prometheus receiver to the Collector configuration, /etc/squasher-collector/config.yaml. Then add it to the receivers of the metrics pipeline, and keep the receivers that are there:
config.yaml
Check the file, then restart the Collector:
Each target becomes one resource with service.name from job, and service.instance.id as host:port. The receiver values in the example are the defaults. The Collector reads the Prometheus text format and the OpenMetrics text format. Each scrape also sends these metrics for the target, also when the scrape fails: A scrape fails when the response is larger than max_body_size, or has more samples than sample_limit. It also fails with scrape_budget when the response bodies of the scrapes that run at the same time would use more than max_in_flight_bytes. Other targets wait until fewer than max_concurrent_scrapes scrapes run. To use service discovery or relabeling, use the OpenTelemetry Collector above.

Receive remote write

If a Prometheus server must push its data, use the Prometheus Remote Write receiver from Collector Contrib. It is alpha and accepts Remote Write 2.0 only.
otel-collector-config.yaml
Then point Prometheus at the receiver with the Remote Write 2.0 message:
prometheus.yml
Collector Contrib v0.141.0 and earlier works with Prometheus 3.7.x and earlier. v0.142.0 and later works with Prometheus 3.8.0 and later. Check the receiver’s compatibility table before you upgrade either one.

What Squasher keeps

Verify

  1. Start the Collector with SQUASHER_API_KEY set, and check its logs for export failures.
  2. In Squasher, select Logs in the sidebar and choose Metrics in the source menu.
  3. Find a known metric from checkout-api, and check its service, unit, and labels.

Limits

  • Squasher does not store summaries. Change them to histograms, or leave them out. The Squasher Collector changes them to gauges and sums for you.
  • The Remote Write receiver does not accept summaries or classic histograms.
  • The Prometheus Alertmanager connector receives alerts, not metric series.

Next steps

OpenTelemetry

See the endpoint and what Squasher does with each signal.

Kubernetes

Collect workload metrics with the Helm chart.