Remove IP address from device info label.
Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
8f5b76944d
commit
1cd1928dd4
|
|
@ -165,7 +165,7 @@ func descUAP(ns string) *uap {
|
|||
|
||||
func (u *promUnifi) exportUAP(r report, d *unifi.UAP) {
|
||||
labels := []string{d.Type, d.SiteName, d.Name}
|
||||
infoLabels := []string{d.IP, d.Version, d.Model, d.Serial, d.Mac}
|
||||
infoLabels := []string{d.Version, d.Model, d.Serial, d.Mac}
|
||||
// Wireless System Data.
|
||||
r.send([]*metric{
|
||||
{u.Device.Info, prometheus.GaugeValue, 1.0, append(labels, infoLabels...)},
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ type unifiDevice struct {
|
|||
|
||||
func descDevice(ns string) *unifiDevice {
|
||||
labels := []string{"type", "site_name", "name"}
|
||||
infoLabels := []string{"ip", "version", "model", "serial", "mac"}
|
||||
infoLabels := []string{"version", "model", "serial", "mac"}
|
||||
return &unifiDevice{
|
||||
Info: prometheus.NewDesc(ns+"info", "Device Information", append(labels, infoLabels...), nil),
|
||||
Uptime: prometheus.NewDesc(ns+"uptime", "Uptime", labels, nil),
|
||||
|
|
@ -73,7 +73,7 @@ func descDevice(ns string) *unifiDevice {
|
|||
// UDM is a collection of stats from USG, USW and UAP. It has no unique stats.
|
||||
func (u *promUnifi) exportUDM(r report, d *unifi.UDM) {
|
||||
labels := []string{d.Type, d.SiteName, d.Name}
|
||||
infoLabels := []string{d.IP, d.Version, d.Model, d.Serial, d.Mac}
|
||||
infoLabels := []string{d.Version, d.Model, d.Serial, d.Mac}
|
||||
// Dream Machine System Data.
|
||||
r.send([]*metric{
|
||||
{u.Device.Info, prometheus.GaugeValue, 1.0, append(labels, infoLabels...)},
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ type usg struct {
|
|||
}
|
||||
|
||||
func descUSG(ns string) *usg {
|
||||
// labels := []string{"ip", "version", "model", "serial", "type", "mac", "site_name", "name"}
|
||||
// labels := []string{"version", "model", "serial", "type", "mac", "site_name", "name"}
|
||||
// labelWan := append([]string{"port"}, labels[6:]...)
|
||||
labels := []string{"port", "site_name", "name"}
|
||||
return &usg{
|
||||
|
|
@ -72,7 +72,7 @@ func descUSG(ns string) *usg {
|
|||
|
||||
func (u *promUnifi) exportUSG(r report, d *unifi.USG) {
|
||||
labels := []string{d.Type, d.SiteName, d.Name}
|
||||
infoLabels := []string{d.IP, d.Version, d.Model, d.Serial, d.Mac}
|
||||
infoLabels := []string{d.Version, d.Model, d.Serial, d.Mac}
|
||||
// Gateway System Data.
|
||||
r.send([]*metric{
|
||||
{u.Device.Info, prometheus.GaugeValue, 1.0, append(labels, infoLabels...)},
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ func descUSW(ns string) *usw {
|
|||
|
||||
func (u *promUnifi) exportUSW(r report, d *unifi.USW) {
|
||||
labels := []string{d.Type, d.SiteName, d.Name}
|
||||
infoLabels := []string{d.IP, d.Version, d.Model, d.Serial, d.Mac}
|
||||
infoLabels := []string{d.Version, d.Model, d.Serial, d.Mac}
|
||||
if d.HasTemperature.Val {
|
||||
r.send([]*metric{{u.Device.Temperature, prometheus.GaugeValue, d.GeneralTemperature, labels}})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue