Merge pull request #118 from awprice/interface-link-downs

add link-downs metric to interface collector
This commit is contained in:
Steve Brunton 2021-08-09 21:23:03 -04:00 committed by GitHub
commit fd39a467e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,8 +21,7 @@ func newInterfaceCollector() routerOSCollector {
} }
func (c *interfaceCollector) init() { func (c *interfaceCollector) init() {
c.props = []string{"name", "type", "disabled", "comment", "slave", "actual-mtu", "running", "rx-byte", "tx-byte", "rx-packet", "tx-packet", "rx-error", "tx-error", "rx-drop", "tx-drop"} c.props = []string{"name", "type", "disabled", "comment", "slave", "actual-mtu", "running", "rx-byte", "tx-byte", "rx-packet", "tx-packet", "rx-error", "tx-error", "rx-drop", "tx-drop", "link-downs"}
labelNames := []string{"name", "address", "interface", "type", "disabled", "comment", "running", "slave"} labelNames := []string{"name", "address", "interface", "type", "disabled", "comment", "running", "slave"}
c.descriptions = make(map[string]*prometheus.Desc) c.descriptions = make(map[string]*prometheus.Desc)
for _, p := range c.props[5:] { for _, p := range c.props[5:] {