Send metrics & infrastructure to Epok
Updated Nov 22, 2026 · today
On the hosted service, Epok accepts metrics over OTLP. Prometheus remote_write is not yet on the hosted service. This page covers an SDK, three OpenTelemetry Collector recipes (hostmetrics, kubeletstats, Prometheus scrape) and the Epok Helm chart.
The one thing that matters for correlation: give each metric a service label (or an OTLP service.name resource attribute). Epok normalizes the common aliases automatically, so the metric lands on the right service in the investigation instead of a separate dashboard.
Endpoints: /v1/metrics (OTLP); API key: app.epok.cloud, then Settings, then API Keys
From your app (any OpenTelemetry SDK)
OTLP over HTTP with protobuf. Set the protocol explicitly: some SDKs default to gRPC (.NET, the Python distro), and there is no gRPC port here. The endpoint accepts OTLP JSON as well. Give the base URL in OTEL_EXPORTER_OTLP_ENDPOINT: the SDK adds /v1/metrics itself. A signal-specific OTEL_EXPORTER_OTLP_METRICS_ENDPOINT, or an endpoint passed in code, is used as given and needs the full /v1/metrics URL.
export OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.epok.cloud"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf" # set explicitly: some SDKs default to grpc (no :4317)
export OTEL_EXPORTER_OTLP_HEADERS="x-api-key=YOUR_API_KEY"
export OTEL_METRIC_EXPORT_INTERVAL=10000 # optional: 10 s instead of 60 s while you testOpenTelemetry Collector: hostmetrics (Linux VM)
The hostmetrics receiver emits system.cpu/memory/filesystem.utilization as 0-to-1 fractions (turned on below), which is exactly the shape Epok's saturation detection wants. Set service.nameso the host joins the service it runs. The key comes from the collector's environment (EPOK_API_KEY), not the file.
# otelcol-contrib (hostmetrics is in the contrib distribution)
# export EPOK_API_KEY=<your ingest key> then: otelcol-contrib --config epok-host.yaml
receivers:
hostmetrics:
collection_interval: 30s
scrapers:
cpu:
metrics: { system.cpu.utilization: { enabled: true } }
memory:
metrics: { system.memory.utilization: { enabled: true } }
filesystem:
metrics: { system.filesystem.utilization: { enabled: true } }
disk: {}
load: {}
network: {}
processors:
resourcedetection:
detectors: [env, system] # sets host.name
resource:
attributes:
- { key: service.name, value: my-service, action: upsert } # joins the host to your service
batch:
send_batch_max_size: 10000 # at or under Epok's 10,000 entries per batch
exporters:
otlphttp/epok:
endpoint: https://ingest.epok.cloud # the exporter adds /v1/metrics; protobuf + gzip by default
headers:
x-api-key: ${env:EPOK_API_KEY}
service:
pipelines:
metrics:
receivers: [hostmetrics]
processors: [resourcedetection, resource, batch]
exporters: [otlphttp/epok]OpenTelemetry Collector: kubeletstats (Kubernetes)
Run the collector as a DaemonSet. Each pod reads its own node's kubelet: node, pod and container CPU, memory and filesystem, with k8s.pod.name and k8s.namespace.name on every series. The comments list the environment and RBAC the pod needs.
# otelcol-contrib as a DaemonSet. The pod needs:
# env K8S_NODE_NAME from fieldRef spec.nodeName, env EPOK_API_KEY from a Secret,
# and RBAC: get on nodes/stats and nodes/proxy (ClusterRole bound to its ServiceAccount).
# Container resources (one collector per node), for example:
# resources: { requests: { cpu: 50m, memory: 128Mi }, limits: { cpu: 200m, memory: 256Mi } }
#
# Cardinality: every pod and container restart is a NEW series (pod and
# container names/uids are labels), so a busy cluster churns series fast. Each
# workspace has an active-series cap; new series past it are refused (the
# exporter logs a partial success). Start with metric_groups [node, pod] and
# add container once you have seen how many series the first two add.
receivers:
kubeletstats:
collection_interval: 30s
auth_type: serviceAccount
endpoint: "https://${env:K8S_NODE_NAME}:10250"
insecure_skip_verify: true # kubelet serving certs are usually self-signed
metric_groups: [node, pod, container] # container = the most series
processors:
resource:
attributes:
- { key: k8s.cluster.name, value: my-cluster, action: upsert }
batch:
send_batch_max_size: 10000 # at or under Epok's 10,000 entries per batch
exporters:
otlphttp/epok:
endpoint: https://ingest.epok.cloud # the exporter adds /v1/metrics; protobuf + gzip by default
headers:
x-api-key: ${env:EPOK_API_KEY}
service:
pipelines:
metrics:
receivers: [kubeletstats]
processors: [resource, batch]
exporters: [otlphttp/epok]OpenTelemetry Collector: scrape Prometheus endpoints
Already expose /metrics (an exporter or your app)? The prometheus receiver scrapes it and forwards over OTLP. The job_name becomes service.name.
# otelcol-contrib: scrape Prometheus /metrics endpoints and forward over OTLP.
# export EPOK_API_KEY=<your ingest key>
receivers:
prometheus:
config:
scrape_configs:
- job_name: my-service # becomes service.name on every series
scrape_interval: 30s
static_configs:
- targets: ["localhost:9100"] # your exporter or app: host:port
processors:
batch:
send_batch_max_size: 10000 # at or under Epok's 10,000 entries per batch
exporters:
otlphttp/epok:
endpoint: https://ingest.epok.cloud # the exporter adds /v1/metrics; protobuf + gzip by default
headers:
x-api-key: ${env:EPOK_API_KEY}
service:
pipelines:
metrics:
receivers: [prometheus]
processors: [batch]
exporters: [otlphttp/epok]All three recipes were run against an Epok ingest endpoint with otelcol-contrib 0.123.0 (kubeletstats: config validation only).
Kubernetes
Install the Epok Helm chart with agent.enabled=true and cluster.enabled=true: Kubernetes. The per-node agent sends node, pod and container CPU, memory and filesystem series from the kubelet; the cluster collector sends pod phase, container restarts and deployment state. Pod and container series carry the same serviceas the pod's logs. These power the pod-Pending, restart and node-pressure signals that pair with Epok's log-based Kubernetes detection.
Confirm it's working
- In the app, Connect, then Metrics names the first metric it sees from you. SDKs send every 60 s by default, and a metric shows there within about 15 s of arriving. Then open Metrics in Epok (app.epok.cloud). Your host series (
system_cpu_utilization, memory, filesystem) appear in the metric list. - Open the Service page for the
serviceyou set. The infra strip shows live CPU and memory for that service. - The metric detectors (saturation, anomaly, slow-drift, reporting-gap) arm automatically for those series, with no rules to write. They hold fire for roughly the first 3 hours after your first metric arrives: a baseline built from minutes of startup noise generates false pages, so the gate is deliberate.
Nothing showing up? Check your collector logs for a non-2xx on the ingest call. 400 means the body did not parse: the payload does not match the content type it was sent under (a truncated batch, a bad gzip, or JSON sent as protobuf); 404 or 405 usually means the path was given twice (set the base URL only; the exporter adds /v1/metrics); 403 means a key arrived and was rejected because it is wrong, rotated or missing the ingest scope, and a common cause is${env:EPOK_API_KEY} sent literally because the variable was not set in the collector's environment; 401 means no credential was found at all, so the auth block itself is missing or malformed; 429 means you are over your daily volume or rate limit; 503means metrics ingest isn't switched on for your account. That is a gate rather than a fault, and nothing in the config can fix it.
Your first look
Wait one to two minutes after the first write, then open Infrastructure, then Metrics. It opens filtered to infrastructure-origin series. Type system_ into the metric filter box: if you followed the hostmetrics section above, the three utilization series are there: system_cpu_utilization, system_memory_utilization, system_filesystem_utilization.
The one thing worth doing first: select system_filesystem_utilization and use Break down by to split it by host. Every label you attached is a chip. A fleet of flat lines with one climbing away from the rest is exactly the shape capacity forecasting is built to catch. Seeing it split cleanly is your proof that the service and host labels landed, which is what decides whether these metrics show up inside an investigation or sit in a corner as their own dashboard.
If the breakdown chips are missing or everything collapses into one line, the labels did not make it. Go back to the service label on the scrape config or the resource processor before going further. Then open Infrastructure, then Host Map for the same data as one row per host.
Next
- Instrument your app for tracing: metrics say a host is saturated; spans say which request path pays for it. Correlating the two is where a root-cause verdict comes from.
- Browser RUM & session replay: the last hop, from a saturated node to the user who felt it.
- What watches these series: every detector, what it fires on, and what a series needs to be eligible for it.
- Limits: payload caps, daily volume, rate limits, retention.