-
Notifications
You must be signed in to change notification settings - Fork 1
/
node-exporter.nomad
72 lines (62 loc) · 1.53 KB
/
node-exporter.nomad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
variable "node_exporter_version" {
description = "Version of node exporter"
type = string
default = "1.5.0"
}
job "node-exporter" {
priority = 100
meta {
auto-backup = true
backup-schedule = "@daily"
backup-target-db = "postgres"
}
datacenters = ["dc1"]
type = "system"
group "node-exporter" {
count = 1
network {
port "http" {}
}
service {
name = "node-exporter"
tags = ["http"]
port = "http"
check {
name = "node-exporter-alive"
type = "tcp"
interval = "20s"
timeout = "15s"
}
check {
name = "Node-exporter healthy"
type = "http"
path = "/metrics"
interval = "10s"
timeout = "5s"
}
}
ephemeral_disk {
size = 300
}
task "node-exporter" {
# The "driver" parameter specifies the task driver that should be used to
# run the task.
driver = "raw_exec"
config {
command = "node_exporter/node_exporter-${var.node_exporter_version}.linux-arm64/node_exporter"
args = [
"--web.listen-address=:${NOMAD_PORT_http}"
]
}
artifact {
source = "https://github.com/prometheus/node_exporter/releases/download/v${var.node_exporter_version}/node_exporter-${var.node_exporter_version}.linux-arm64.tar.gz"
destination = "local/node_exporter"
mode = "any"
}
resources {
cpu = 60
memory = 125
}
}
}
}