Monitor costs with Prometheus
Export detailed cost metrics to Prometheus for comprehensive monitoring, alerting, and integration with your existing observability stack.
Cost Metrics Export
Export detailed cost metrics to Prometheus for monitoring and alerting
Budget Alerts
Set up Prometheus alerts for cost thresholds and budget overruns
Trend Analysis
Historical cost data for trend analysis and capacity planning
Integration setup
Deploy Prometheus Exporter
Install the DeepCost Prometheus exporter in your cluster
Configure Scrape Target
Add DeepCost exporter as a scrape target in Prometheus config
Import Dashboards
Import pre-built Grafana dashboards for cost visualization
Set Up Alerts
Configure alert rules for budget thresholds and anomalies
Monitoring Benefits
Real-time alerts
Get notified when costs exceed thresholds
Historical data
Long-term storage for trend analysis
Custom dashboards
Build custom visualizations in Grafana
Available Cost Metrics
deepcost_cluster_cost_total
CounterTotal cluster cost by namespace, workload, and time period
deepcost_resource_utilization
GaugeResource utilization percentage for CPU, memory, and storage
deepcost_optimization_savings
GaugePotential and realized savings from optimization recommendations
deepcost_budget_usage_ratio
GaugeBudget usage ratio by department, team, or project
Prometheus Configuration
Add this scrape config to your Prometheus configuration:
# prometheus.yml
scrape_configs:
- job_name: 'deepcost'
static_configs:
- targets: ['deepcost-exporter:8080']
scrape_interval: 30s
metrics_path: /metrics
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'deepcost-cluster'Example Alert Rules
Sample Prometheus alert rules for cost monitoring:
# alerts.yml
groups:
- name: deepcost.rules
rules:
- alert: HighClusterCosts
expr: deepcost_cluster_cost_total > 10000
for: 5m
labels:
severity: warning
annotations:
summary: "Cluster costs are high"
description: "Cluster costs exceed $10,000"
- alert: BudgetExceeded
expr: deepcost_budget_usage_ratio > 0.9
for: 1m
labels:
severity: critical
annotations:
summary: "Budget threshold exceeded"
description: "Budget usage is at {{ $value }}%"