Merge pull request #143 from davidnewhall/superq/metric_names
Update some metrics
This commit is contained in:
commit
ceb44ced85
|
|
@ -46,8 +46,8 @@ func descClient(ns string) *uclient {
|
|||
return &uclient{
|
||||
Anomalies: prometheus.NewDesc(ns+"anomalies", "Client Anomalies", labelW, nil),
|
||||
BytesR: prometheus.NewDesc(ns+"transfer_rate_bytes", "Client Data Rate", labelW, nil),
|
||||
CCQ: prometheus.NewDesc(ns+"ccq_percent", "Client Connection Quality", labelW, nil),
|
||||
Satisfaction: prometheus.NewDesc(ns+"satisfaction_percent", "Client Satisfaction", labelW, nil),
|
||||
CCQ: prometheus.NewDesc(ns+"ccq_ratio", "Client Connection Quality", labelW, nil),
|
||||
Satisfaction: prometheus.NewDesc(ns+"satisfaction_ratio", "Client Satisfaction", labelW, nil),
|
||||
Noise: prometheus.NewDesc(ns+"noise_db", "Client AP Noise", labelW, nil),
|
||||
RoamCount: prometheus.NewDesc(ns+"roam_count_total", "Client Roam Counter", labelW, nil),
|
||||
RSSI: prometheus.NewDesc(ns+"rssi_db", "Client RSSI", labelW, nil),
|
||||
|
|
@ -95,8 +95,8 @@ func (u *promUnifi) exportClient(r report, c *unifi.Client) {
|
|||
labelW[len(labelW)-1] = "false"
|
||||
r.send([]*metric{
|
||||
{u.Client.Anomalies, prometheus.CounterValue, c.Anomalies, labelW},
|
||||
{u.Client.CCQ, prometheus.GaugeValue, c.Ccq / 10, labelW},
|
||||
{u.Client.Satisfaction, prometheus.GaugeValue, c.Satisfaction, labelW},
|
||||
{u.Client.CCQ, prometheus.GaugeValue, c.Ccq / 1000, labelW},
|
||||
{u.Client.Satisfaction, prometheus.GaugeValue, c.Satisfaction.Val / 100.0, labelW},
|
||||
{u.Client.Noise, prometheus.GaugeValue, c.Noise, labelW},
|
||||
{u.Client.RoamCount, prometheus.CounterValue, c.RoamCount, labelW},
|
||||
{u.Client.RSSI, prometheus.GaugeValue, c.Rssi, labelW},
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ type uap struct {
|
|||
RadioChannel *prometheus.Desc
|
||||
RadioCuSelfRx *prometheus.Desc
|
||||
RadioCuSelfTx *prometheus.Desc
|
||||
RadioCuTotal *prometheus.Desc
|
||||
RadioExtchannel *prometheus.Desc
|
||||
RadioGain *prometheus.Desc
|
||||
RadioGuestNumSta *prometheus.Desc
|
||||
|
|
@ -108,8 +107,8 @@ func descUAP(ns string) *uap {
|
|||
VAPMacFilterRejections: prometheus.NewDesc(ns+"vap_mac_filter_rejects_total", "VAP MAC Filter Rejections", labelV, nil),
|
||||
VAPNumSatisfactionSta: prometheus.NewDesc(ns+"vap_satisfaction_stations", "VAP Number Satisifaction Stations", labelV, nil),
|
||||
VAPAvgClientSignal: prometheus.NewDesc(ns+"vap_average_client_signal", "VAP Average Client Signal", labelV, nil),
|
||||
VAPSatisfaction: prometheus.NewDesc(ns+"vap_satisfaction_percent", "VAP Satisfaction", labelV, nil),
|
||||
VAPSatisfactionNow: prometheus.NewDesc(ns+"vap_satisfaction_now_percent", "VAP Satisfaction Now", labelV, nil),
|
||||
VAPSatisfaction: prometheus.NewDesc(ns+"vap_satisfaction_ratio", "VAP Satisfaction", labelV, nil),
|
||||
VAPSatisfactionNow: prometheus.NewDesc(ns+"vap_satisfaction_now_ratio", "VAP Satisfaction Now", labelV, nil),
|
||||
VAPDNSAvgLatency: prometheus.NewDesc(ns+"vap_dns_latency_average_seconds", "VAP DNS Latency Average", labelV, nil),
|
||||
VAPRxBytes: prometheus.NewDesc(ns+"vap_receive_bytes_total", "VAP Bytes Received", labelV, nil),
|
||||
VAPRxCrypts: prometheus.NewDesc(ns+"vap_receive_crypts_total", "VAP Crypts Received", labelV, nil),
|
||||
|
|
@ -152,9 +151,8 @@ func descUAP(ns string) *uap {
|
|||
RadioTxPower: prometheus.NewDesc(ns+"radio_transmit_power", "Radio Transmit Power", labelR, nil),
|
||||
RadioAstBeXmit: prometheus.NewDesc(ns+"radio_ast_be_xmit", "Radio AstBe Transmit", labelR, nil),
|
||||
RadioChannel: prometheus.NewDesc(ns+"radio_channel", "Radio Channel", labelR, nil),
|
||||
RadioCuSelfRx: prometheus.NewDesc(ns+"radio_channel_utilization_receive_percent", "Radio Channel Utilization Receive", labelR, nil),
|
||||
RadioCuSelfTx: prometheus.NewDesc(ns+"radio_channel_utilization_transmit_percent", "Radio Channel Utilization Transmit", labelR, nil),
|
||||
RadioCuTotal: prometheus.NewDesc(ns+"radio_channel_utilization_percent", "Radio Channel Utilization", labelR, nil),
|
||||
RadioCuSelfRx: prometheus.NewDesc(ns+"radio_channel_utilization_receive_ratio", "Radio Channel Utilization Receive", labelR, nil),
|
||||
RadioCuSelfTx: prometheus.NewDesc(ns+"radio_channel_utilization_transmit_ratio", "Radio Channel Utilization Transmit", labelR, nil),
|
||||
RadioExtchannel: prometheus.NewDesc(ns+"radio_ext_channel", "Radio Ext Channel", labelR, nil),
|
||||
RadioGain: prometheus.NewDesc(ns+"radio_gain", "Radio Gain", labelR, nil),
|
||||
RadioGuestNumSta: prometheus.NewDesc(ns+"radio_guest_stations", "Radio Guest Station Count", labelR, nil),
|
||||
|
|
@ -262,8 +260,8 @@ func (u *promUnifi) exportVAPtable(r report, labels []string, vt unifi.VapTable)
|
|||
{u.UAP.VAPMacFilterRejections, prometheus.CounterValue, v.MacFilterRejections, labelV},
|
||||
{u.UAP.VAPNumSatisfactionSta, prometheus.GaugeValue, v.NumSatisfactionSta, labelV},
|
||||
{u.UAP.VAPAvgClientSignal, prometheus.GaugeValue, v.AvgClientSignal, labelV},
|
||||
{u.UAP.VAPSatisfaction, prometheus.GaugeValue, v.Satisfaction, labelV},
|
||||
{u.UAP.VAPSatisfactionNow, prometheus.GaugeValue, v.SatisfactionNow, labelV},
|
||||
{u.UAP.VAPSatisfaction, prometheus.GaugeValue, v.Satisfaction.Val / 100.0, labelV},
|
||||
{u.UAP.VAPSatisfactionNow, prometheus.GaugeValue, v.SatisfactionNow.Val / 100.0, labelV},
|
||||
{u.UAP.VAPDNSAvgLatency, prometheus.GaugeValue, v.DNSAvgLatency.Val / 1000, labelV},
|
||||
{u.UAP.VAPRxBytes, prometheus.CounterValue, v.RxBytes, labelV},
|
||||
{u.UAP.VAPRxCrypts, prometheus.CounterValue, v.RxCrypts, labelV},
|
||||
|
|
@ -321,16 +319,15 @@ func (u *promUnifi) exportRadtable(r report, labels []string, rt unifi.RadioTabl
|
|||
{u.UAP.RadioTxPower, prometheus.GaugeValue, t.TxPower, labelR},
|
||||
{u.UAP.RadioAstBeXmit, prometheus.GaugeValue, t.AstBeXmit, labelR},
|
||||
{u.UAP.RadioChannel, prometheus.GaugeValue, t.Channel, labelR},
|
||||
{u.UAP.RadioCuSelfRx, prometheus.GaugeValue, t.CuSelfRx, labelR},
|
||||
{u.UAP.RadioCuSelfTx, prometheus.GaugeValue, t.CuSelfTx, labelR},
|
||||
{u.UAP.RadioCuTotal, prometheus.GaugeValue, t.CuTotal, labelR},
|
||||
{u.UAP.RadioCuSelfRx, prometheus.GaugeValue, t.CuSelfRx.Val / 100.0, labelR},
|
||||
{u.UAP.RadioCuSelfTx, prometheus.GaugeValue, t.CuSelfTx.Val / 100.0, labelR},
|
||||
{u.UAP.RadioExtchannel, prometheus.GaugeValue, t.Extchannel, labelR},
|
||||
{u.UAP.RadioGain, prometheus.GaugeValue, t.Gain, labelR},
|
||||
{u.UAP.RadioGuestNumSta, prometheus.GaugeValue, t.GuestNumSta, labelR},
|
||||
{u.UAP.RadioNumSta, prometheus.GaugeValue, t.NumSta, labelR},
|
||||
{u.UAP.RadioUserNumSta, prometheus.GaugeValue, t.UserNumSta, labelR},
|
||||
{u.UAP.RadioTxPackets, prometheus.CounterValue, t.TxPackets, labelR},
|
||||
{u.UAP.RadioTxRetries, prometheus.CounterValue, t.TxRetries, labelR},
|
||||
{u.UAP.RadioTxPackets, prometheus.GaugeValue, t.TxPackets, labelR},
|
||||
{u.UAP.RadioTxRetries, prometheus.GaugeValue, t.TxRetries, labelR},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ func descDevice(ns string) *unifiDevice {
|
|||
MemUsed: prometheus.NewDesc(ns+"memory_used_bytes", "System Memory Used", labels, nil),
|
||||
MemTotal: prometheus.NewDesc(ns+"memory_installed_bytes", "System Installed Memory", labels, nil),
|
||||
MemBuffer: prometheus.NewDesc(ns+"memory_buffer_bytes", "System Memory Buffer", labels, nil),
|
||||
CPU: prometheus.NewDesc(ns+"cpu_utilization_percent", "System CPU % Utilized", labels, nil),
|
||||
Mem: prometheus.NewDesc(ns+"memory_utilization_percent", "System Memory % Utilized", labels, nil),
|
||||
CPU: prometheus.NewDesc(ns+"cpu_utilization_ratio", "System CPU % Utilized", labels, nil),
|
||||
Mem: prometheus.NewDesc(ns+"memory_utilization_ratio", "System Memory % Utilized", labels, nil),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,8 +88,8 @@ func (u *promUnifi) exportUDM(r report, d *unifi.UDM) {
|
|||
{u.Device.MemUsed, prometheus.GaugeValue, d.SysStats.MemUsed, labels},
|
||||
{u.Device.MemTotal, prometheus.GaugeValue, d.SysStats.MemTotal, labels},
|
||||
{u.Device.MemBuffer, prometheus.GaugeValue, d.SysStats.MemBuffer, labels},
|
||||
{u.Device.CPU, prometheus.GaugeValue, d.SystemStats.CPU, labels},
|
||||
{u.Device.Mem, prometheus.GaugeValue, d.SystemStats.Mem, labels},
|
||||
{u.Device.CPU, prometheus.GaugeValue, d.SystemStats.CPU.Val / 100.0, labels},
|
||||
{u.Device.Mem, prometheus.GaugeValue, d.SystemStats.Mem.Val / 100.0, labels},
|
||||
})
|
||||
|
||||
// Switch Data
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ func descUSW(ns string) *usw {
|
|||
RxErrors: prometheus.NewDesc(pns+"receive_errors_total", "Total Receive Errors", labelP, nil),
|
||||
RxMulticast: prometheus.NewDesc(pns+"receive_multicast_total", "Total Receive Multicast", labelP, nil),
|
||||
RxPackets: prometheus.NewDesc(pns+"receive_packets_total", "Total Receive Packets", labelP, nil),
|
||||
Satisfaction: prometheus.NewDesc(pns+"satisfaction_percent", "Satisfaction", labelP, nil),
|
||||
Satisfaction: prometheus.NewDesc(pns+"satisfaction_ratio", "Satisfaction", labelP, nil),
|
||||
Speed: prometheus.NewDesc(pns+"port_speed_bps", "Speed", labelP, nil),
|
||||
TxBroadcast: prometheus.NewDesc(pns+"transmit_broadcast_total", "Total Transmit Broadcast", labelP, nil),
|
||||
TxBytes: prometheus.NewDesc(pns+"transmit_bytes_total", "Total Transmit Bytes", labelP, nil),
|
||||
|
|
@ -168,7 +168,7 @@ func (u *promUnifi) exportPortTable(r report, labels []string, pt []unifi.Port)
|
|||
{u.USW.RxErrors, prometheus.CounterValue, p.RxErrors, labelP},
|
||||
{u.USW.RxMulticast, prometheus.CounterValue, p.RxMulticast, labelP},
|
||||
{u.USW.RxPackets, prometheus.CounterValue, p.RxPackets, labelP},
|
||||
{u.USW.Satisfaction, prometheus.GaugeValue, p.Satisfaction, labelP},
|
||||
{u.USW.Satisfaction, prometheus.GaugeValue, p.Satisfaction.Val / 100.0, labelP},
|
||||
{u.USW.Speed, prometheus.GaugeValue, p.Speed.Val * 1000000, labelP},
|
||||
{u.USW.TxBroadcast, prometheus.CounterValue, p.TxBroadcast, labelP},
|
||||
{u.USW.TxBytes, prometheus.CounterValue, p.TxBytes, labelP},
|
||||
|
|
|
|||
Loading…
Reference in New Issue