Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (63 sloc) 1.36 KB
job "prometheus" {
region = "global"
datacenters = ["dc1"]
type = "service"
group "app" {
count = 1
restart {
attempts = 3
delay = "20s"
mode = "delay"
}
task "prometheus" {
driver = "docker"
config {
image = "prom/prometheus:v2.8.1"
force_pull = true
port_map = {
http = 9090
}
volumes = [
"/opt/prometheus/:/etc/prometheus/"
]
args = [
"--config.file=/etc/prometheus/prometheus.yml",
"--storage.tsdb.path=/prometheus",
"--web.console.libraries=/usr/share/prometheus/console_libraries",
"--web.console.templates=/usr/share/prometheus/consoles",
"--web.enable-admin-api"
]
logging {
type = "journald"
config {
tag = "PROMETHEUS"
}
}
}
service {
name = "prometheus"
address_mode = "driver"
tags = [
"metrics"
]
port = "http"
check {
type = "http"
path = "/targets"
interval = "10s"
timeout = "2s"
address_mode = "driver"
}
}
resources {
cpu = 50
memory = 100
network {
port "http" {
static = "9090"
}
}
}
}
}
}
You can’t perform that action at this time.