This may just be an artifact of Promtail, which of course is out of scope for this forum. However, I am asking here because in this case Promtail is doing service discovery on a Nomad/Consul cluster.
In the attached screenshot we can see that Promtail has used Consul to discover labels/services that are in a Nomad cluster. The service that is being monitored is called awesome-api
. The job
specification includes two service
stanzas that look like this:
service {
name = "awesome-api"
tags = ["awesome","api","http"]
port = "http"
check {
type = "http"
path = "/status"
interval = "2s"
timeout = "2s"
}
}
service {
name = "awesome-api"
tags = ["awesome","api","metrics","logs"]
port = "metrics"
}
The Promtail service discovery has three services listed. Apparently the service that exposes the metrics
port has been discovered twice. If I look in the Consul listing, it
$ consul catalog services -tags
awesome-api http,awesome,logs,metrics,api
If I look in the Consul Web UI I see the one service which has two instances.
Any idea why Promtail would see more than that? (I realize as I type this up that I will also need to visit the Promtail community to see what they say about this.)