Last active
November 22, 2019 08:16
-
-
Save alexesDev/86de55742bcbcc0b8263ab139b062135 to your computer and use it in GitHub Desktop.
Example Consul Exporter Nomad Job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "consul-exporter" { | |
datacenters = ["dc1"] | |
group "consul-exporter" { | |
task "consul-exporter" { | |
driver = "exec" | |
artifact { | |
source = "https://github.com/prometheus/consul_exporter/releases/download/v0.4.0/consul_exporter-0.4.0.linux-amd64.tar.gz" | |
options { | |
checksum = "md5:9e05d5bf3c41d1b16ede47723e62b644" | |
} | |
} | |
config { | |
command = "/local/consul_exporter-0.4.0.linux-amd64/consul_exporter" | |
args = ["--web.listen-address=${NOMAD_ADDR_http}"] | |
} | |
resources { | |
cpu = 100 | |
memory = 64 | |
network { | |
mbits = 1 | |
port "http" {} | |
} | |
} | |
service { | |
name = "consul-exporter" | |
tags = ["metrics"] | |
port = "http" | |
check { | |
name = "alive" | |
type = "http" | |
path = "/metrics" | |
interval = "10s" | |
timeout = "2s" | |
} | |
} | |
} | |
} | |
} | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment