mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-18 13:05:28 +00:00
fix parsing include databases
Signed-off-by: Paul van der Linden <mail@paultjuh.org>
This commit is contained in:
parent
cbc6ae3c59
commit
ffa6782e41
@ -1149,7 +1149,9 @@ func ExcludeDatabases(s string) ExporterOpt {
|
||||
// IncludeDatabases allows to filter result from AutoDiscoverDatabases
|
||||
func IncludeDatabases(s string) ExporterOpt {
|
||||
return func(e *Exporter) {
|
||||
e.includeDatabases = strings.Split(s, ",")
|
||||
if len(s) > 0 {
|
||||
e.includeDatabases = strings.Split(s, ",")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user