mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-11 13:06:36 +00:00
Remove fluent-style kingpin
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -11,9 +11,14 @@ import (
|
||||
"regexp"
|
||||
)
|
||||
|
||||
const (
|
||||
FlagSmtpServerBlacklist = "collector.smtp.server-blacklist"
|
||||
FlagSmtpServerWhitelist = "collector.smtp.server-whitelist"
|
||||
)
|
||||
|
||||
var (
|
||||
serverWhitelist = kingpin.Flag("collector.smtp.server-whitelist", "Regexp of virtual servers to whitelist. Server name must both match whitelist and not match blacklist to be included.").Default(".+").String()
|
||||
serverBlacklist = kingpin.Flag("collector.smtp.server-blacklist", "Regexp of virtual servers to blacklist. Server name must both match whitelist and not match blacklist to be included.").String()
|
||||
serverWhitelist *string
|
||||
serverBlacklist *string
|
||||
)
|
||||
|
||||
type SMTPCollector struct {
|
||||
@@ -64,6 +69,11 @@ type SMTPCollector struct {
|
||||
serverBlacklistPattern *regexp.Regexp
|
||||
}
|
||||
|
||||
func newSMTPCollectorFlags(app *kingpin.Application) {
|
||||
serverWhitelist = app.Flag(FlagSmtpServerWhitelist, "Regexp of virtual servers to whitelist. Server name must both match whitelist and not match blacklist to be included.").Default(".+").String()
|
||||
serverBlacklist = app.Flag(FlagSmtpServerBlacklist, "Regexp of virtual servers to blacklist. Server name must both match whitelist and not match blacklist to be included.").String()
|
||||
}
|
||||
|
||||
func newSMTPCollector() (Collector, error) {
|
||||
log.Info("smtp collector is in an experimental state! Metrics for this collector have not been tested.")
|
||||
const subsystem = "smtp"
|
||||
|
||||
Reference in New Issue
Block a user