You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description = "Address of the prometheus instance"
7
+
description = "Hostname of the Prometheus server (default 'localhost')"
8
8
}
9
9
"--port" = {
10
10
value = "$prometheus_port$"
11
-
description = "Port of the prometheus instance"
11
+
description = "Port of the Prometheus server (default 9090)"
12
12
}
13
13
"--secure" = {
14
-
value = "$prometheus_secure$"
15
-
description = "Use secure connection"
14
+
set_if = "$prometheus_secure$"
15
+
description = "Use a HTTPS connection"
16
16
}
17
17
"--insecure" = {
18
18
set_if = "$prometheus_insecure$"
19
-
description = "Allow use of self signed certificates when using SSL"
19
+
description = "Skip the verification of the server's TLS certificate"
20
+
}
21
+
"--bearer" = {
22
+
value = "$prometheus_bearer$"
23
+
description = "Specify the Bearer Token for server authentication"
24
+
}
25
+
"--user" = {
26
+
value = "$prometheus_user$"
27
+
description = "Specify the user name and password for server authentication <user:password>"
28
+
}
29
+
"--ca-file" = {
30
+
value = "$prometheus_ca_file$"
31
+
description = "Specify the CA File for TLS authentication"
32
+
}
33
+
"--cert-file" = {
34
+
value = "$prometheus_cert_file$"
35
+
description = "Specify the Certificate File for TLS authentication"
36
+
}
37
+
"--key-file" = {
38
+
value = "$prometheus_key_file$"
39
+
description = "Specify the Key File for TLS authentication"
20
40
}
21
41
"--timeout" = {
22
42
value = "$prometheus_timeout$"
23
-
description = "Timeout for the check"
43
+
description = "Timeout in seconds for the CheckPlugin (default 30)"
24
44
}
25
45
}
46
+
47
+
vars.prometheus_hostname = "localhost"
48
+
vars.prometheus_port = 9090
49
+
vars.prometheus_timeout = 30
26
50
}
27
51
28
-
object CheckCommand "prometheus-query" {
52
+
object CheckCommand "prometheus-alert" {
29
53
import "prometheus"
30
54
31
-
command += [ "query" ]
55
+
command += [ "alert" ]
32
56
33
57
arguments += {
34
-
"--query" = {
35
-
value = "$prometheus_query$"
36
-
description = "An Prometheus query which will be performed and the value result will be evaluated"
37
-
}
38
-
"--warning" = {
39
-
value = "$prometheus_warning$"
40
-
description = "The warning threshold for a value"
58
+
"--name" = {
59
+
value = "$prometheus_alert$"
60
+
repeat_key = true
61
+
description = "The name of one or more specific alerts to check. This parameter can be repeated e.G.: '--name alert1 --name alert2' If no name is given, all alerts will be evaluated"
41
62
}
42
-
"--critical" = {
43
-
value = "$prometheus_critical$"
44
-
description = "The critical threshold for a value"
63
+
"--problems" = {
64
+
value = "$prometheus_alert_problems$"
65
+
description = "Display only alerts which status is not inactive/OK. Note that in combination with the --name flag this might result in no alerts being displayed"
0 commit comments