add missing linkspeeds (#2711)
Signed-off-by: Cam Cope <ccope@crusoeenergy.com>
This commit is contained in:
parent
742ec0970a
commit
2346fd9b06
|
@ -276,29 +276,84 @@ func (c *ethtoolCollector) updateSpeeds(ch chan<- prometheus.Metric, prefix stri
|
|||
duplex string
|
||||
phy string
|
||||
}{
|
||||
unix.ETHTOOL_LINK_MODE_10baseT_Half_BIT: {10, half, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_10baseT_Full_BIT: {10, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_100baseT_Half_BIT: {100, half, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_100baseT_Full_BIT: {100, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseT_Half_BIT: {1000, half, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseT_Full_BIT: {1000, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseT_Full_BIT: {10000, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_2500baseT_Full_BIT: {2500, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseKX_Full_BIT: {1000, full, "KX"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT: {10000, full, "KX4"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseKR_Full_BIT: {10000, full, "KR"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseR_FEC_BIT: {10000, full, "R_FEC"},
|
||||
unix.ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT: {20000, full, "MLD2"},
|
||||
unix.ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT: {20000, full, "KR2"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT: {40000, full, "KR4"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT: {40000, full, "CR4"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT: {40000, full, "SR4"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT: {40000, full, "LR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT: {56000, full, "KR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT: {56000, full, "CR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT: {56000, full, "SR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT: {56000, full, "LR4"},
|
||||
unix.ETHTOOL_LINK_MODE_25000baseCR_Full_BIT: {25000, full, "CR"},
|
||||
unix.ETHTOOL_LINK_MODE_10baseT_Half_BIT: {10, half, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_10baseT_Full_BIT: {10, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_100baseT_Half_BIT: {100, half, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_100baseT_Full_BIT: {100, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseT_Half_BIT: {1000, half, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseT_Full_BIT: {1000, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseT_Full_BIT: {10000, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_2500baseT_Full_BIT: {2500, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseKX_Full_BIT: {1000, full, "KX"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT: {10000, full, "KX4"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseKR_Full_BIT: {10000, full, "KR"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseR_FEC_BIT: {10000, full, "R_FEC"},
|
||||
unix.ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT: {20000, full, "MLD2"},
|
||||
unix.ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT: {20000, full, "KR2"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT: {40000, full, "KR4"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT: {40000, full, "CR4"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT: {40000, full, "SR4"},
|
||||
unix.ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT: {40000, full, "LR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT: {56000, full, "KR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT: {56000, full, "CR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT: {56000, full, "SR4"},
|
||||
unix.ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT: {56000, full, "LR4"},
|
||||
unix.ETHTOOL_LINK_MODE_25000baseCR_Full_BIT: {25000, full, "CR"},
|
||||
unix.ETHTOOL_LINK_MODE_25000baseKR_Full_BIT: {25000, full, "KR"},
|
||||
unix.ETHTOOL_LINK_MODE_25000baseSR_Full_BIT: {25000, full, "SR"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT: {50000, full, "CR2"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT: {50000, full, "KR2"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT: {100000, full, "KR4"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT: {100000, full, "SR4"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT: {100000, full, "CR4"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT: {100000, full, "R4_ER4"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT: {50000, full, "SR2"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseX_Full_BIT: {1000, full, "X"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseCR_Full_BIT: {10000, full, "CR"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseSR_Full_BIT: {10000, full, "SR"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseLR_Full_BIT: {10000, full, "LR"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT: {10000, full, "LRM"},
|
||||
unix.ETHTOOL_LINK_MODE_10000baseER_Full_BIT: {10000, full, "ER"},
|
||||
unix.ETHTOOL_LINK_MODE_5000baseT_Full_BIT: {5000, full, "T"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseKR_Full_BIT: {50000, full, "KR"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseSR_Full_BIT: {50000, full, "SR"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseCR_Full_BIT: {50000, full, "CR"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT: {50000, full, "LR_ER_FR"},
|
||||
unix.ETHTOOL_LINK_MODE_50000baseDR_Full_BIT: {50000, full, "DR"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT: {100000, full, "KR2"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT: {100000, full, "SR2"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT: {100000, full, "CR2"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT: {100000, full, "LR2_ER2_FR2"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT: {100000, full, "DR2"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT: {200000, full, "KR4"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT: {200000, full, "SR4"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT: {200000, full, "LR4_ER4_FR4"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT: {200000, full, "DR4"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT: {200000, full, "CR4"},
|
||||
unix.ETHTOOL_LINK_MODE_100baseT1_Full_BIT: {100, full, "T1"},
|
||||
unix.ETHTOOL_LINK_MODE_1000baseT1_Full_BIT: {1000, full, "T1"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT: {400000, full, "KR8"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT: {400000, full, "SR8"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT: {400000, full, "LR8_ER8_FR8"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT: {400000, full, "DR8"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT: {400000, full, "CR8"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseKR_Full_BIT: {100000, full, "KR"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseSR_Full_BIT: {100000, full, "SR"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT: {100000, full, "LR_ER_FR"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseCR_Full_BIT: {100000, full, "CR"},
|
||||
unix.ETHTOOL_LINK_MODE_100000baseDR_Full_BIT: {100000, full, "DR"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT: {200000, full, "KR2"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT: {200000, full, "SR2"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT: {200000, full, "LR2_ER2_FR2"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT: {200000, full, "DR2"},
|
||||
unix.ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT: {200000, full, "CR2"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT: {400000, full, "KR4"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT: {400000, full, "SR4"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT: {400000, full, "LR4_ER4_FR4"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT: {400000, full, "DR4"},
|
||||
unix.ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT: {400000, full, "CR4"},
|
||||
unix.ETHTOOL_LINK_MODE_100baseFX_Half_BIT: {100, half, "FX"},
|
||||
unix.ETHTOOL_LINK_MODE_100baseFX_Full_BIT: {100, full, "FX"},
|
||||
} {
|
||||
if linkModes&(1<<bit) != 0 {
|
||||
ch <- prometheus.MustNewConstMetric(c.entry(linkMode), prometheus.GaugeValue,
|
||||
|
|
Loading…
Reference in New Issue