Cleanup metrics handling
This commit is contained in:
parent
8ca4189c93
commit
4d873fa548
|
@ -5,6 +5,8 @@ job "miniflux" {
|
||||||
region = "global"
|
region = "global"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
group "miniflux" {
|
group "miniflux" {
|
||||||
|
|
||||||
count = 1
|
count = 1
|
||||||
|
@ -22,9 +24,13 @@ job "miniflux" {
|
||||||
port = 8085
|
port = 8085
|
||||||
|
|
||||||
meta {
|
meta {
|
||||||
alloc = "${NOMAD_ALLOC_INDEX}"
|
alloc = "${NOMAD_ALLOC_INDEX}"
|
||||||
job = "${NOMAD_JOB_NAME}"
|
datacenter = "${NOMAD_DC}"
|
||||||
namespace = "${NOMAD_NAMESPACE}"
|
group = "${NOMAD_GROUP_NAME}"
|
||||||
|
job = "${NOMAD_JOB_NAME}"
|
||||||
|
namespace = "${NOMAD_NAMESPACE}"
|
||||||
|
node = "${node.unique.name}"
|
||||||
|
region = "${NOMAD_REGION}"
|
||||||
}
|
}
|
||||||
|
|
||||||
connect {
|
connect {
|
||||||
|
|
|
@ -10,7 +10,7 @@ job "[[ .instance ]]" {
|
||||||
|
|
||||||
network {
|
network {
|
||||||
mode = "bridge"
|
mode = "bridge"
|
||||||
[[- if $c.prometheus.enabled ]]
|
[[- if conv.ToBool .prometheus.enabled ]]
|
||||||
port "metrics" {}
|
port "metrics" {}
|
||||||
[[- end ]]
|
[[- end ]]
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ job "[[ .instance ]]" {
|
||||||
env {
|
env {
|
||||||
LISTEN_ADDR = "127.0.0.1:8085"
|
LISTEN_ADDR = "127.0.0.1:8085"
|
||||||
BASE_URL = "[[ .miniflux.public_url ]]"
|
BASE_URL = "[[ .miniflux.public_url ]]"
|
||||||
[[- if $c.prometheus.enabled ]]
|
[[- if conv.ToBool $c.prometheus.enabled ]]
|
||||||
METRICS_COLLECTOR = 1
|
METRICS_COLLECTOR = 1
|
||||||
[[- end ]]
|
[[- end ]]
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,5 +43,6 @@ miniflux:
|
||||||
|
|
||||||
# Prometheus configuration
|
# Prometheus configuration
|
||||||
prometheus:
|
prometheus:
|
||||||
|
enabled: '[[ .prometheus.available ]]'
|
||||||
metrics_url: http://localhost:8085/metrics
|
metrics_url: http://localhost:8085/metrics
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue