Usage Metering
Ingestion Options
Prometheus
6 min
ingesting meters with prometheus remote write amberflo supports ingesting metrics directly from prometheus using its native remote write functionality this enables real time ingestion of usage data as meter events, allowing you to monitor and allocate infrastructure costs with precision this approach works particularly well for environments where prometheus is already deployed, such as in kubernetes clusters, but it is not limited to kubernetes you can send any relevant prometheus metrics from your infrastructure or applications why use prometheus for meter ingestion? low lift integration no custom agent or amberflo library required simply configure remote write in prometheus real time metering prometheus pushes events directly to amberflo as they are generated flexible attribution use dimensions like namespace, node, tenant, or application to enable fine grained usage tracking and cost allocation custom metrics supports ingestion of both built in system metrics and any custom metrics sent to prometheus from your it environment example use case kubernetes prometheus is often used to monitor kubernetes clusters with amberflo, you can ingest metrics such as kube state metrics for example, pod states, resource requests, and limits node metrics cpu, memory, disk, and i/o usage from underlying nodes kubelet metrics container level metrics like actual resource consumption custom application metrics data sent to prometheus by in cluster apps amberflo uses the namespace label as the customerid by default, which allows for accurate cost allocation by namespace (or by other dimensions if preferred) to use prometheus remote write with amberflo, you need the following you provide any prometheus monitored system (e g a kubernetes cluster) prometheus deployed and collecting metrics outbound internet access from prometheus amberflo provides an api to accept the remote write ability to set custom ingestion schema for metric data prometheus remote write configuration below is an example configuration snippet to enable remote write in your prometheus setup remote write \ url https //app amberflo io/ingest/prometheus name amberflo write relabel configs \ source labels \[ name , pod] separator " " regex 'kube pod info\ coredns( +)' action keep \ action replace source labels \[namespace] target label customerid \ regex 'customerid|node|pod|helm sh chart| name ' action labelkeep headers x api key xxx xxx xxx this configuration keeps only relevant metrics based on name and pod maps the prometheus namespace label to amberflo’s customerid limits which labels are sent to amberflo for ingestion authenticates using your amberflo api key