mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-28 17:12:13 +00:00
Do not expose groups with 0 alerts
This commit is contained in:
parent
75c57ffd00
commit
c157b78a04
@ -126,6 +126,9 @@ func (d *Dispatcher) Groups() AlertOverview {
|
||||
Silenced: sid,
|
||||
})
|
||||
}
|
||||
if len(apiAlerts) == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
alertGroup.Blocks = append(alertGroup.Blocks, &AlertBlock{
|
||||
RouteOpts: &route.RouteOpts,
|
||||
|
9
main.go
9
main.go
@ -38,9 +38,12 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
configFile = flag.String("config.file", "config.yml", "The configuration file")
|
||||
dataDir = flag.String("data.dir", "data/", "The data directory")
|
||||
showVersion = flag.Bool("version", false, "Print version information.")
|
||||
showVersion = flag.Bool("version", false, "Print version information.")
|
||||
|
||||
configFile = flag.String("config.file", "config.yml", "The configuration file")
|
||||
dataDir = flag.String("data.dir", "data/", "The data directory")
|
||||
|
||||
externalURL = flag.String("web.external-url", "", "The URL under which Prometheus is externally reachable (for example, if Prometheus is served via a reverse proxy). Used for generating relative and absolute links back to Prometheus itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Prometheus. If omitted, relevant URL components will be derived automatically.")
|
||||
listenAddress = flag.String("web.listen-address", ":9093", "Address to listen on for the web interface and API.")
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user