Fix routes collector to be compatible with latest RouterOS release (#66)

* Fix routes collector to be compatible with latest RouterOS release

Tested on RouterOS 6.46.1

* remove ipv6 pool collector
This commit is contained in:
Daniel Hodges
2020-02-03 21:33:02 -05:00
committed by GitHub
parent 5cea9840a7
commit c00607abe0
3 changed files with 16 additions and 30 deletions

View File

@@ -30,17 +30,7 @@ func (c *poolCollector) describe(ch chan<- *prometheus.Desc) {
}
func (c *poolCollector) collect(ctx *collectorContext) error {
err := c.collectForIPVersion("4", "ip", ctx)
if err != nil {
return err
}
err = c.collectForIPVersion("6", "ipv6", ctx)
if err != nil {
return err
}
return nil
return c.collectForIPVersion("4", "ip", ctx)
}
func (c *poolCollector) collectForIPVersion(ipVersion, topic string, ctx *collectorContext) error {