staging: telemetry: add smartctl exporter

This commit is contained in:
Baptiste Jonglez 2025-03-12 21:04:41 +01:00
parent b98e72af96
commit 8f0a45f03e
3 changed files with 97 additions and 40 deletions

View file

@ -16,6 +16,17 @@ scrape_configs:
cert_file: /etc/prometheus/consul-client.crt
key_file: /etc/prometheus/consul-client.key
- job_name: 'smartctl-exporter'
scrape_interval: 60s
consul_sd_configs:
- server: 'https://localhost:8501'
services:
- 'smartctl-exporter'
tls_config:
ca_file: /etc/prometheus/consul.crt
cert_file: /etc/prometheus/consul-client.crt
key_file: /etc/prometheus/consul-client.key
- job_name: 'garage'
authorization:
type: Bearer

View file

@ -3,7 +3,7 @@ job "telemetry-system" {
type = "system"
priority = "100"
group "collector" {
group "node_exporter" {
network {
port "node_exporter" { static = 9100 }
}
@ -46,4 +46,49 @@ job "telemetry-system" {
}
}
}
group "smartctl_exporter" {
network {
port "smartctl_exporter" { static = 9101 }
}
task "smartctl_exporter" {
driver = "docker"
user = "root"
config {
image = "prometheuscommunity/smartctl-exporter:v0.13.0"
network_mode = "host"
privileged = true
args = [
"--web.listen-address=0.0.0.0:9101"
]
}
resources {
cpu = 50
memory = 40
}
service {
tags = [ "telemetry" ]
port = 9101
address_mode = "driver"
name = "smartctl-exporter"
check {
type = "http"
path = "/"
port = 9101
address_mode = "driver"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
}

View file

@ -47,5 +47,6 @@ ports so that we can avoid conflicts when adding services.
8999 opendkim
9090 prometheus
9100 node_exporter
9101 smartctl_exporter
9334 tricot metrics
9991 guichet