Browse Source

Add prom ports to nextcloud backup

authelia
IamTheFij 2 months ago
parent
commit
3b8f9734ac
  1. 4
      nomad/metrics/prometheus.nomad
  2. 16
      nomad/nextcloud/nextcloud.nomad

4
nomad/metrics/prometheus.nomad

@ -132,10 +132,6 @@ scrape_configs:
metrics_path: "/metrics"
consul_sd_configs:
- server: "${var.consul_address}"
services:
- "cadvisor"
- "nodeexporter"
- "blocky-api"
relabel_configs:
- source_labels: [__meta_consul_service_metadata_metrics_addr]
action: keep

16
nomad/nextcloud/nextcloud.nomad

@ -27,10 +27,15 @@ job "nextcloud" {
network {
mode = "bridge"
port "web" {
host_network = "loopback"
to = 80
}
port "backup" {
to = 8080
}
}
volume "nextcloud-data" {
@ -138,6 +143,16 @@ job "nextcloud" {
}
}
service {
name = "nextcloud-backups"
port = "backup"
meta {
metrics_addr = "${NOMAD_ADDR_backup}"
}
}
# TODO: Add service and expose /metrics for prometheus to grab
task "backup" {
driver = "docker"
@ -150,6 +165,7 @@ job "nextcloud" {
config {
image = "iamthefij/resticscheduler"
args = ["/jobs/nextcloud.hcl"]
ports = ["backup"]
mount {
type = "bind"

Loading…
Cancel
Save