Added source interface identifier to exportUSGstats function
This commit is contained in:
		
							parent
							
								
									cd1a4ac034
								
							
						
					
					
						commit
						746ab856e0
					
				|  | @ -114,7 +114,13 @@ func (u *promUnifi) exportUSGstats(r report, labels []string, gw *unifi.Gw, st u | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	labelLan := []string{"lan", labels[1], labels[2], labels[3]} | 	labelLan := []string{"lan", labels[1], labels[2], labels[3]} | ||||||
| 	labelWan := []string{"all", labels[1], labels[2], labels[3]} | 	var sourceInterface string | ||||||
|  | 	if st.SourceInterface != "" { | ||||||
|  | 		sourceInterface = st.SourceInterface | ||||||
|  | 	} else { | ||||||
|  | 		sourceInterface = "all" | ||||||
|  | 	} | ||||||
|  | 	labelWan := []string{sourceInterface, labels[1], labels[2], labels[3]} | ||||||
| 
 | 
 | ||||||
| 	r.send([]*metric{ | 	r.send([]*metric{ | ||||||
| 		{u.USG.LanRxPackets, counter, gw.LanRxPackets, labelLan}, | 		{u.USG.LanRxPackets, counter, gw.LanRxPackets, labelLan}, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue