mirror of
https://github.com/nshttpd/mikrotik-exporter.git
synced 2024-11-15 10:15:18 +01:00
added DHCPL collection to configs and collectors (#69)
This commit is contained in:
parent
c00607abe0
commit
75b5f8be36
@ -13,6 +13,7 @@ type Config struct {
|
||||
Features struct {
|
||||
BGP bool `yaml:"bgp,omitempty"`
|
||||
DHCP bool `yaml:"dhcp,omitempty"`
|
||||
DHCPL bool `yaml:"dhcpl,omitemptu"`
|
||||
DHCPv6 bool `yaml:"dhcpv6,omitempty"`
|
||||
Routes bool `yaml:"routes,omitempty"`
|
||||
POE bool `yaml:"poe,omitempty"`
|
||||
|
5
main.go
5
main.go
@ -39,6 +39,7 @@ var (
|
||||
withBgp = flag.Bool("with-bgp", false, "retrieves BGP routing infrormation")
|
||||
withRoutes = flag.Bool("with-routes", false, "retrieves routing table information")
|
||||
withDHCP = flag.Bool("with-dhcp", false, "retrieves DHCP server metrics")
|
||||
withDHCPL = flag.Bool("with-dhcpl", false, "retrieves DHCP server lease metrics")
|
||||
withDHCPv6 = flag.Bool("with-dhcpv6", false, "retrieves DHCPv6 server metrics")
|
||||
withPOE = flag.Bool("with-poe", false, "retrieves PoE metrics")
|
||||
withPools = flag.Bool("with-pools", false, "retrieves IP(v6) pool metrics")
|
||||
@ -189,6 +190,10 @@ func collectorOptions() []collector.Option {
|
||||
opts = append(opts, collector.WithDHCP())
|
||||
}
|
||||
|
||||
if *withDHCPL || cfg.Features.DHCPL {
|
||||
opts = append(opts, collector.WithDHCPL())
|
||||
}
|
||||
|
||||
if *withDHCPv6 || cfg.Features.DHCPv6 {
|
||||
opts = append(opts, collector.WithDHCPv6())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user