monitoring/consul/config/service-intentions/monitoring-prometheus.hcl

35 lines
710 B
HCL

Kind = "service-intentions"
Name = "[[ .instance ]]-prometheus[[ .consul.suffix ]]"
Sources = [
{
Name = "[[ (merge .monitoring.prometheus .).traefik.instance ]]"
Permissions = [
{
Action = "allow"
HTTP {
Methods = ["GET", "HEAD", "POST"]
}
}
]
},
{
Name = "[[ .instance ]]-grafana[[ .consul.suffix ]]"
Permissions = [
{
# Deny access to the admin API from Grafana
Action = "deny"
HTTP {
PathPrefix = "/api/v1/admin"
}
},
{
Action = "allow"
HTTP {
PathPrefix = "/api/v1"
Methods = ["GET", "HEAD", "POST", "PUT"]
}
}
]
}
]