Skip to content

Instantly share code, notes, and snippets.

@asrivascrealytee
Created March 11, 2019 16:17
Show Gist options
  • Save asrivascrealytee/00856a03518e665754ed87b8224cc8ea to your computer and use it in GitHub Desktop.
Save asrivascrealytee/00856a03518e665754ed87b8224cc8ea to your computer and use it in GitHub Desktop.
Grafana+loki+promtail nomad example
job "grafana" {
datacenters = ["dc1"]
type = "service"
group "grafana" {
count = 1
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
task "grafana" {
driver = "docker"
config {
image = "grafana/grafana"
port_map {
grafana_port = 3000
}
}
resources {
cpu = 50
memory = 32
network {
mbits = 1
port "grafana_port"{}
}
}
service {
name = "graphana"
port = "grafana_port"
check {
type = "http"
path = "/health"
interval = "10s"
timeout = "2s"
}
}
}
}
}
@ufukhalis
Copy link

Hey, I was trying to install Grafana-Loki. So, I have a question regarding promtail job. path: /alloc/logs/* this one only gives about logs promtail job. In my nomad, I have other jobs and I would like to push their logs, in that case, which path should I use? Or is there any better way to push other job logs?

@cyriltovena
Copy link

@ufukhalis
Copy link

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment