Skip to content

Commit

Permalink
Merge pull request #4293 from systeminit/firecracker_process_explorer
Browse files Browse the repository at this point in the history
feat: add process-exporter to the stack to track firecracker metrics
  • Loading branch information
sprutton1 authored Aug 7, 2024
2 parents fee0803 + 115dbaf commit 52d22ed
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 1 deletion.
22 changes: 22 additions & 0 deletions component/deploy/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,27 @@ services:
init:
condition: service_completed_successfully

prometheus:
image: prom/prometheus
profiles: [rebaser, pinga, sdf, veritech]
ports:
- "9000:9090"
volumes:
- "config:/etc/prometheus/"
depends_on:
- otelcol

process-exporter:
image: ncabatoff/process-exporter
profiles: [veritech]
command:
- '-procfs=/host/proc'
- '-config.path=/config/proc-exporter.yml'
ports:
- "9256:9256"
volumes:
- "config:/config/"
- /proc:/host/proc:ro

volumes:
config:
3 changes: 3 additions & 0 deletions component/init/configs/proc-exporter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process_names:
- comm:
- firecracker
15 changes: 15 additions & 0 deletions component/init/configs/prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
global:
scrape_interval: 100ms
scrape_configs:
- job_name: service_metrics
static_configs:
- targets:
- otelcol:9090
- job_name: firecracker
static_configs:
- targets:
- process-exporter:9256
- job_name: node-exporter
static_configs:
- targets:
- node-exporter:9100
3 changes: 2 additions & 1 deletion dev/Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ groups = {
"promtail",
"grafana",
"loki",
"process-exporter",
],
}

Expand Down Expand Up @@ -109,7 +110,7 @@ def find_group(name, groups):

# Use Docker Compose to provide the platform services
docker_compose("./docker-compose.platform.yml")
compose_services = ["jaeger", "nats", "otelcol", "postgres", "postgres-test", "db", "db-test", "loki", "grafana", "localstack", "promtail", "prometheus"]
compose_services = ["jaeger", "nats", "otelcol", "postgres", "postgres-test", "db", "db-test", "loki", "grafana", "localstack", "promtail", "prometheus", "process-exporter"]
for service in compose_services:
if service == "jaeger":
links = [
Expand Down
12 changes: 12 additions & 0 deletions dev/docker-compose.platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,18 @@ services:
depends_on:
- otelcol

process-exporter:
#<<: *loki-logged-service
image: ncabatoff/process-exporter
command:
- '-procfs=/host/proc'
- '-config.path=/config/config.yml'
ports:
- "9256:9256"
volumes:
- "./process-exporter-config/config.yml:/config/config.yml"
- "/proc:/host/proc:ro"

localstack:
#<<: *loki-logged-service
image: localstack/localstack
Expand Down
3 changes: 3 additions & 0 deletions dev/process-exporter-config/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
process_names:
- comm:
- firecracker
4 changes: 4 additions & 0 deletions dev/prometheus-config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ scrape_configs:
static_configs:
- targets:
- otelcol:9090
- job_name: firecracker
static_configs:
- targets:
- process-exporter:9256

0 comments on commit 52d22ed

Please sign in to comment.