homelab/nomad-job/platform/nut_exporter.nomad

47 lines
894 B
Plaintext
Raw Normal View History

2023-10-08 14:50:19 +00:00
job "nut_exporter" {
datacenters = ["homelab"]
priority = 50
type = "service"
meta {
forcedeploy = "0"
}
group "nut_exporter"{
network {
mode = "host"
port "http" {
to = 9199
}
}
service {
name = "nutexporter"
port= "http"
check {
name= "nut_exporter_probe"
type= "http"
path= "/ups_metrics"
interval = "60s"
timeout = "2s"
}
}
task "nut_exporter" {
driver = "docker"
config {
2024-03-17 17:58:24 +00:00
image = "ghcr.service.consul:5000/druggeri/nut_exporter"
2023-10-08 14:50:19 +00:00
ports = ["http"]
}
env {
2024-02-24 16:11:40 +00:00
NUT_EXPORTER_SERVER= "192.168.1.43"
2023-10-08 14:50:19 +00:00
NUT_EXPORTER_VARIABLES = "battery.runtime,battery.charge,input.voltage,output.voltage,output.voltage.nominal,ups.load,ups.status,ups.realpower"
}
resources {
memory = 20
}
}
}
}