update deps, fix channel bug for uap_vaps
This commit is contained in:
		
							parent
							
								
									85c7f6441e
								
							
						
					
					
						commit
						4f77e5ea36
					
				|  | @ -59,11 +59,11 @@ | ||||||
| 
 | 
 | ||||||
| [[projects]] | [[projects]] | ||||||
|   branch = "master" |   branch = "master" | ||||||
|   digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" |   digest = "1:982be0b5396e16a663697899ce69cc7b1e71ddcae4153af157578d4dc9bc3f88" | ||||||
|   name = "github.com/prometheus/client_model" |   name = "github.com/prometheus/client_model" | ||||||
|   packages = ["go"] |   packages = ["go"] | ||||||
|   pruneopts = "UT" |   pruneopts = "UT" | ||||||
|   revision = "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016" |   revision = "d1d2010b5beead3fa1c5f271a5cf626e40b3ad6e" | ||||||
| 
 | 
 | ||||||
| [[projects]] | [[projects]] | ||||||
|   digest = "1:f119e3205d3a1f0f19dbd7038eb37528e2c6f0933269dc344e305951fb87d632" |   digest = "1:f119e3205d3a1f0f19dbd7038eb37528e2c6f0933269dc344e305951fb87d632" | ||||||
|  | @ -106,12 +106,12 @@ | ||||||
|   revision = "6d18c012aee9febd81bbf9806760c8c4480e870d" |   revision = "6d18c012aee9febd81bbf9806760c8c4480e870d" | ||||||
| 
 | 
 | ||||||
| [[projects]] | [[projects]] | ||||||
|   digest = "1:0d815236933294be05901215b375de3a7c990abcb769069eccca32a825a15862" |   digest = "1:87738e338f505d3e3be1f80d36b53f3c4e73be9b7ad4ccae46abbe9ef04f3f71" | ||||||
|   name = "golift.io/unifi" |   name = "golift.io/unifi" | ||||||
|   packages = ["."] |   packages = ["."] | ||||||
|   pruneopts = "UT" |   pruneopts = "UT" | ||||||
|   revision = "68fa5c1f82da4567d8c192c52397984551cb08b9" |   revision = "ba857a3a04311fed362cb43fa7bf4066bc3a7e55" | ||||||
|   version = "v4.1.4" |   version = "v4.1.5" | ||||||
| 
 | 
 | ||||||
| [[projects]] | [[projects]] | ||||||
|   digest = "1:b75b3deb2bce8bc079e16bb2aecfe01eb80098f5650f9e93e5643ca8b7b73737" |   digest = "1:b75b3deb2bce8bc079e16bb2aecfe01eb80098f5650f9e93e5643ca8b7b73737" | ||||||
|  |  | ||||||
|  | @ -99,7 +99,7 @@ func (u *InfluxUnifi) processVAPTable(r report, t map[string]string, vt unifi.Va | ||||||
| 			"satisfaction":              s.Satisfaction.Val, | 			"satisfaction":              s.Satisfaction.Val, | ||||||
| 			"satisfaction_now":          s.SatisfactionNow.Val, | 			"satisfaction_now":          s.SatisfactionNow.Val, | ||||||
| 			"num_sta":                   s.NumSta, | 			"num_sta":                   s.NumSta, | ||||||
| 			"channel":                   s.Channel, | 			"channel":                   s.Channel.Val, | ||||||
| 			"rx_bytes":                  s.RxBytes.Val, | 			"rx_bytes":                  s.RxBytes.Val, | ||||||
| 			"rx_crypts":                 s.RxCrypts.Val, | 			"rx_crypts":                 s.RxCrypts.Val, | ||||||
| 			"rx_dropped":                s.RxDropped.Val, | 			"rx_dropped":                s.RxDropped.Val, | ||||||
|  |  | ||||||
|  | @ -177,16 +177,12 @@ func (u *promUnifi) exportUAP(r report, d *unifi.UAP) { | ||||||
| func (u *promUnifi) exportUAPstats(r report, labels []string, ap *unifi.Ap, bytes ...unifi.FlexInt) { | func (u *promUnifi) exportUAPstats(r report, labels []string, ap *unifi.Ap, bytes ...unifi.FlexInt) { | ||||||
| 	labelU := []string{"user", labels[1], labels[2]} | 	labelU := []string{"user", labels[1], labels[2]} | ||||||
| 	labelG := []string{"guest", labels[1], labels[2]} | 	labelG := []string{"guest", labels[1], labels[2]} | ||||||
| 	if len(bytes) > 0 { |  | ||||||
| 		r.send([]*metric{ |  | ||||||
| 			// ap only stuff.
 |  | ||||||
| 			{u.Device.BytesD, counter, bytes[0], labels},   // not sure if these 3 Ds are counters or gauges.
 |  | ||||||
| 			{u.Device.TxBytesD, counter, bytes[1], labels}, // not sure if these 3 Ds are counters or gauges.
 |  | ||||||
| 			{u.Device.RxBytesD, counter, bytes[2], labels}, // not sure if these 3 Ds are counters or gauges.
 |  | ||||||
| 			{u.Device.BytesR, gauge, bytes[3], labels},     // only UAP has this one, and those ^ weird.
 |  | ||||||
| 		}) |  | ||||||
| 	} |  | ||||||
| 	r.send([]*metric{ | 	r.send([]*metric{ | ||||||
|  | 		// ap only stuff.
 | ||||||
|  | 		{u.Device.BytesD, counter, bytes[0], labels},   // not sure if these 3 Ds are counters or gauges.
 | ||||||
|  | 		{u.Device.TxBytesD, counter, bytes[1], labels}, // not sure if these 3 Ds are counters or gauges.
 | ||||||
|  | 		{u.Device.RxBytesD, counter, bytes[2], labels}, // not sure if these 3 Ds are counters or gauges.
 | ||||||
|  | 		{u.Device.BytesR, gauge, bytes[3], labels},     // only UAP has this one, and those ^ weird.
 | ||||||
| 		// user
 | 		// user
 | ||||||
| 		{u.UAP.ApWifiTxDropped, counter, ap.UserWifiTxDropped, labelU}, | 		{u.UAP.ApWifiTxDropped, counter, ap.UserWifiTxDropped, labelU}, | ||||||
| 		{u.UAP.ApRxErrors, counter, ap.UserRxErrors, labelU}, | 		{u.UAP.ApRxErrors, counter, ap.UserRxErrors, labelU}, | ||||||
|  |  | ||||||
|  | @ -79,8 +79,7 @@ func (u *promUnifi) exportUDM(r report, d *unifi.UDM) { | ||||||
| 	}) | 	}) | ||||||
| 	// Wireless Data - UDM (non-pro) only
 | 	// Wireless Data - UDM (non-pro) only
 | ||||||
| 	if d.Stat.Ap != nil && d.VapTable != nil { | 	if d.Stat.Ap != nil && d.VapTable != nil { | ||||||
| 		u.exportUAPstats(r, labels, d.Stat.Ap) | 		u.exportUAPstats(r, labels, d.Stat.Ap, d.BytesD, d.TxBytesD, d.RxBytesD, d.BytesR) | ||||||
| 		//		u.exportUAPstats(r, labels, d.Stat.Ap, d.BytesD, d.TxBytesD, d.RxBytesD, d.BytesR)
 |  | ||||||
| 		u.exportVAPtable(r, labels, *d.VapTable) | 		u.exportVAPtable(r, labels, *d.VapTable) | ||||||
| 		u.exportRADtable(r, labels, *d.RadioTable, *d.RadioTableStats) | 		u.exportRADtable(r, labels, *d.RadioTable, *d.RadioTableStats) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue