Exporting metrics to Grafana and OpenTelemetry
Push journey, Event, certificate and exposure metrics to Grafana Cloud, Grafana Alloy, an OpenTelemetry Collector, Datadog or New Relic over OTLP/HTTP.
v1Updated
Metrics export pushes your organisation’s ScoutSentinel metrics to your own observability stack, so journey health sits next to the rest of your telemetry. It speaks OTLP over HTTP, which Grafana Cloud, Grafana Alloy, the OpenTelemetry Collector, Datadog, New Relic and Honeycomb all accept.
Metrics export is part of the Enterprise plan. On other plans the card under Integrations, Observability is locked, and POST /v1/integrations answers 422 with the problem code entitlement_exceeded.
How it works
Every minute ScoutSentinel checks which exports are due. For each one it computes a snapshot of your organisation’s metrics, encodes it as an OTLP ExportMetricsServiceRequest and sends one POST to your endpoint. Only your organisation’s data is ever in the payload.
- Interval: 60 seconds by default, from 30 to 3600.
- Timeout: 10 seconds. Redirects are not followed.
- Compression: gzip (
Content-Encoding: gzip) unless you turn it off. - Retries: on
429,408and5xxanswers and on network errors the next attempt backs off exponentially, up to one hour, and honours aRetry-Afterheader. Other4xxanswers back off the same way, because they usually mean a credential or URL needs fixing. - Status: the integration card shows the last export, its HTTP status, the number of data points and a short excerpt of the endpoint’s answer. Partial success answers (
rejectedDataPoints) are reported. - Destinations: HTTPS only, public hosts only. Private, loopback and link-local addresses are refused.
Export failures never affect probes, Events or notifications.
Settings
| Setting | Meaning |
|---|---|
| Endpoint | The OTLP/HTTP URL. A base URL is accepted; /v1/metrics is added when it is missing. |
| Protocol | http/protobuf (binary protobuf) or http/json. |
| Headers | Request headers, usually authentication. Stored encrypted and never shown again; the form shows only the last four characters. |
| Interval | Seconds between exports. |
| Temporality | cumulative or delta, see below. |
| Resource attributes | Extra key and value pairs added to the resource of every export. |
| Metric prefix | scoutsentinel by default. |
| Journey names | Adds journey.name next to journey.id. Turn it off if journey names are sensitive. |
| Environments | Limit the export to some environments. Asset, certificate and exposure metrics are organisation wide. |
Temporality
Gauges are last values. Sums and the duration histogram are sent in one of two ways:
- Cumulative (default): each series counts from 00:00 UTC of the current day, with that instant as its start time. The start time is stable all day; the new day is an ordinary counter reset, which
rate()andincrease()handle. - Delta: each export covers the time since the last successful export. Datadog’s OTLP metrics intake accepts delta only. New Relic recommends delta for sums and histograms.
Grafana Cloud
- Sign in to the Grafana Cloud Portal and open your stack.
- On the OpenTelemetry tile choose Configure. The page shows the OTLP endpoint for your stack, for example
https://otlp-gateway-prod-eu-west-0.grafana.net/otlp, and your instance ID. Use the endpoint shown there: the host depends on your region. - On the same page generate an access policy token. It needs the
metrics:writescope. - In ScoutSentinel open Integrations, Observability, Metrics export and choose Grafana Cloud. Paste the endpoint, enter the instance ID and the token, and choose Use as Authorization header. ScoutSentinel builds
Authorization: Basic <base64 of instanceId:token>for you. - Connect, then choose Send test. The test pushes one data point,
scoutsentinel.export.connection_test, and shows the endpoint’s answer.
Grafana Cloud stores OTLP metrics in Prometheus form: dots become underscores, units are appended and monotonic sums end in _total. scoutsentinel.journey.run.duration in ms becomes the scoutsentinel_journey_run_duration_milliseconds histogram. Resource attributes, including your organisation slug, land on the target_info metric rather than on every series.
A first dashboard query, availability per journey:
scoutsentinel_journey_availability_ratio{environment="Production"}
Grafana Alloy or an OpenTelemetry Collector
Choose OpenTelemetry Collector or Grafana Alloy and enter the public HTTPS address of your receiver. ScoutSentinel pushes from the internet, so the receiver must be reachable over HTTPS and should require authentication.
Alloy, receiving on port 4318 with basic authentication and forwarding to any OTLP backend:
otelcol.auth.basic "scoutsentinel" {
username = "scoutsentinel"
password = sys.env("SCOUTSENTINEL_PUSH_PASSWORD")
}
otelcol.receiver.otlp "scoutsentinel" {
http {
endpoint = "0.0.0.0:4318"
auth = otelcol.auth.basic.scoutsentinel.handler
}
output {
metrics = [otelcol.exporter.otlphttp.backend.input]
}
}
otelcol.exporter.otlphttp "backend" {
client {
endpoint = "https://otlp.example.com"
}
}
The same with the OpenTelemetry Collector:
extensions:
basicauth/server:
htpasswd:
inline: |
scoutsentinel:${env:SCOUTSENTINEL_PUSH_PASSWORD}
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
auth:
authenticator: basicauth/server
exporters:
otlphttp:
endpoint: https://otlp.example.com
service:
extensions: [basicauth/server]
pipelines:
metrics:
receivers: [otlp]
exporters: [otlphttp]
Terminate TLS in front of the receiver, or give it a certificate with its tls settings. In ScoutSentinel set the header Authorization to Basic followed by the base64 of scoutsentinel:<password>.
Datadog and New Relic
| Destination | Endpoint | Header | Temporality |
|---|---|---|---|
| Datadog | https://otlp.datadoghq.com or the OTLP intake of your site, such as https://otlp.datadoghq.eu |
dd-api-key |
Delta |
| New Relic | https://otlp.nr-data.net (US), https://otlp.eu01.nr-data.net (EU) |
api-key, an ingest licence key |
Delta |
The presets fill in the header name, the protocol and the temporality.
Metrics
Names are shown with the default prefix. Every export carries the resource attributes service.name (scoutsentinel), scoutsentinel.organisation.slug and scoutsentinel.organisation.name, plus any you add, and the instrumentation scope scoutsentinel.metrics-export. Attributes are limited to the ones in the table, so the number of series stays bounded: at most 500 journeys and the 200 certificates that expire soonest.
| Metric | Type | Unit | Attributes | Meaning |
|---|---|---|---|---|
scoutsentinel.journey.availability.ratio |
Gauge | 1 |
environment, journey.id, journey.name, channel |
Passing runs divided by decided (pass or fail) runs over the last hour; absent when nothing was decided |
scoutsentinel.journey.runs |
Sum | {run} |
environment, journey.id, journey.name, channel, outcome, probe.type, location.key |
Observations recorded for the journey |
scoutsentinel.journey.run.duration |
Histogram | ms |
environment, journey.id, journey.name, channel |
Run duration of the journey’s observations |
scoutsentinel.journey.status |
Gauge | 1 |
environment, journey.id, journey.name, channel |
Outcome status: 0 healthy, 1 degraded, 2 critical, 3 unknown (includes paused) |
scoutsentinel.journey.behaviour.changed |
Gauge | 1 |
environment, journey.id, journey.name, channel |
1 when the journey’s behaviour state is changed, otherwise 0 |
scoutsentinel.journey.last_run.timestamp |
Gauge | s |
environment, journey.id, journey.name, channel |
Unix time of the journey’s most recent observation |
scoutsentinel.events.open |
Gauge | {event} |
environment, severity, kind |
Events that are open or acknowledged right now |
scoutsentinel.events.opened |
Sum | {event} |
environment, severity, kind |
Events opened |
scoutsentinel.events.resolved |
Sum | {event} |
environment, severity, kind |
Events resolved |
scoutsentinel.event.time_to_explain.seconds |
Gauge | s |
environment |
Median time from an Event opening to its explanation, over Events opened in the last 24 hours |
scoutsentinel.evidence.completeness.ratio |
Gauge | 1 |
environment |
Share of Events opened in the last 24 hours whose evidence is complete |
scoutsentinel.certificate.expiry.days |
Gauge | d |
host |
Days until a tracked certificate expires (negative once expired); the 200 soonest |
scoutsentinel.assets.total |
Gauge | {asset} |
kind |
Assets in the organisation’s inventory by asset type |
scoutsentinel.exposure.findings.open |
Gauge | {finding} |
kind, severity |
Open exposure findings |
scoutsentinel.voice.calls |
Sum | {call} |
environment, journey.id, journey.name, outcome |
Voice probe calls; present only when voice probes ran |
scoutsentinel.voice.call.duration |
Gauge | ms |
environment, journey.id, journey.name |
Average voice call duration over the last hour |
Outcome and behaviour stay separate, as everywhere in ScoutSentinel: journey.status never folds in behaviour changes, and journey.behaviour.changed never affects the status.
Troubleshooting
| Symptom | Likely cause |
|---|---|
HTTP 401 or 403 |
The token is wrong, expired or lacks the write scope. For Grafana Cloud check that the instance ID and token belong to the same stack. |
HTTP 404 |
The endpoint path is wrong. The URL must end in /v1/metrics, which is added for you when you enter a base URL. |
| Datadog rejects the export with a temporality error | Cumulative temporality was sent. Choose delta. |
blocked_url |
The endpoint is not HTTPS, or it is a private or loopback address. |
| Counters drop to zero at midnight UTC | Expected with cumulative temporality; query with increase() or rate(). |