Skip to content

Commit

Permalink
Fix labels case.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Krivak committed Sep 9, 2023
1 parent 10c0657 commit 53d18af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ func (c *Collector) collectLANUserTable(
}, []string{
"connection",
"interface",
"ipv4_addr",
"ipv4",
"hostname",
"MACAddr",
"mac",
})

reg.MustRegister(clientGauge)
Expand Down
13 changes: 7 additions & 6 deletions collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,13 @@ func TestCollector_ServeHTTP(t *testing.T) {
`# HELP connect_box_lan_client LAN client.`,
`# TYPE connect_box_lan_client gauge`,
`connect_box_lan_client{` +
`MACAddr="EthernetMACAddr",connection="ethernet",` +
`hostname="EthernetHostname",interface="EthernetInterface",` +
`ipv4_addr="EthernetIPv4Addr"} 1`,
`connect_box_lan_client{MACAddr="WIFIMACAddr",connection="wifi",` +
`hostname="WIFIHostname",interface="WIFIInterface",` +
`ipv4_addr="WIFIIPv4Addr"} 1`,
`connection="ethernet",hostname="EthernetHostname",` +
`interface="EthernetInterface",ipv4="EthernetIPv4Addr",` +
`mac="EthernetMACAddr"} 1`,
`connect_box_lan_client{` +
`connection="wifi",hostname="WIFIHostname",` +
`interface="WIFIInterface",ipv4="WIFIIPv4Addr",` +
`mac="WIFIMACAddr"} 1`,
`# HELP connect_box_oper_state Operational state.`,
`# TYPE connect_box_oper_state gauge`,
`connect_box_oper_state 1`,
Expand Down

0 comments on commit 53d18af

Please sign in to comment.