centreon-plugins icon indicating copy to clipboard operation
centreon-plugins copied to clipboard

add power supply status to [network::arista::snmp::plugin]

Open dalfo77 opened this issue 4 years ago • 6 comments

Please add the Power Supply status to plugin [network::arista::snmp::plugin]

The ID of the power supply can be extracted in the following tree: .1.3.6.1.2.1.47.1.1.1.1.2

# cat arista.1.3.6.1.2.1.snmpwalk | egrep 'PowerSupply[0-9]+$'
.1.3.6.1.2.1.47.1.1.1.1.2.100711000 = STRING: PowerSupply1
.1.3.6.1.2.1.47.1.1.1.1.2.100721000 = STRING: PowerSupply2

The status of a power supply can be extracted in the following tree: .1.3.6.1.2.1.131.1.1.1.3

# cat arista.1.3.6.1.2.1.snmpwalk | grep .1.3.6.1.2.1.131.1.1.1.3 | egrep '100711000|100721000'
.1.3.6.1.2.1.131.1.1.1.3.100711000 = INTEGER: 3
.1.3.6.1.2.1.131.1.1.1.3.100721000 = INTEGER: 3

If the number is not 3, the PSU is not OK, here an extract on an snmpwalk with a psu without cable

$ snmpwalk -c **** -v 2c *.*.*.* .1.3.6.1.2.1.131.1.1.1.3 | egrep '100711000|100721000'
SNMPv2-SMI::mib-2.131.1.1.1.3.100711000 = INTEGER: 3
SNMPv2-SMI::mib-2.131.1.1.1.3.100721000 = INTEGER: 2

I'm sending arista.1.3.6.1.4.1.snmpwalk and arista.1.3.6.1.2.1.snmpwalk by email to qgarnier and sbomm

Thanks, Matteo.

dalfo77 avatar Aug 31 '20 10:08 dalfo77

Hi @dalfo77

Thanks, did you test the entity plugin mode? (https://github.com/centreon/centreon-plugins/blob/dccdc34b0a97949526aa1b73174287f04fa19f3c/network/arista/snmp/plugin.pm#L35) It should work.

Simon

Sims24 avatar Aug 31 '20 10:08 Sims24

I tested the mode "entity" but it not extract data for PSU status

-bash-4.2$ ./centreon_plugins.pl --version
Global Version: (dev)
-bash-4.2$ ./centreon_plugins.pl --plugin=network::arista::snmp::plugin --mode=entity --hostname=*.*.*.* --snmp-version='2c' --snmp-community='****'  --verbose --filter-perfdata='NOPERF'  | grep -i power | grep -i supply
sensor 'PowerSupply1 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100711211, value = 9696]
sensor 'PowerSupply2 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100721211, value = 9424]
-bash-4.2$ ./centreon_plugins.pl --plugin=network::arista::snmp::plugin --mode=entity --hostname=*.*.*.* --snmp-version='2c' --snmp-community='****'  --verbose --filter-perfdata='NOPERF'  | egrep '100711000|100721000'
-bash-4.2$
-bash-4.2$ ./centreon_plugins.pl --plugin=network::arista::snmp::plugin --mode=entity --hostname=*.*.*.* --snmp-version='2c' --snmp-community='****'  --verbose --filter-perfdata='NOPERF'
OK: All 128 components are ok [128/128 sensors]. |
Checking sensors
sensor 'Cpu temp sensor' status is 'ok' [instance = celsius.100006001, value = 59.8]
sensor 'CpucardPwrCon Rail1 12V standby' status is 'ok' [instance = voltsAC.100006002, value = 11.95]
sensor 'CpucardPwrCon Rail2 5V' status is 'ok' [instance = voltsAC.100006003, value = 5.05]
sensor 'CpucardPwrCon Rail3 3V3' status is 'ok' [instance = voltsAC.100006004, value = 3.29]
sensor 'CpucardPwrCon Rail4 1V8' status is 'ok' [instance = voltsAC.100006005, value = 1.8]
sensor 'CpucardPwrCon Rail5 1V5' status is 'ok' [instance = voltsAC.100006006, value = 1.5]
sensor 'CpucardPwrCon Rail6 1V5' status is 'ok' [instance = voltsAC.100006007, value = 1.5]
sensor 'CpucardPwrCon Rail7 0V75' status is 'ok' [instance = voltsAC.100006008, value = 0.74]
sensor 'CpucardPwrCon Rail8 0V95' status is 'ok' [instance = voltsAC.100006009, value = 0.95]
sensor 'CpucardPwrCon Rail9 1V8' status is 'ok' [instance = voltsAC.100006010, value = 1.8]
sensor 'CpucardPwrCon Rail10 3V3' status is 'ok' [instance = voltsAC.100006011, value = 3.3]
sensor 'CpucardPwrCon Rail11 0V95' status is 'ok' [instance = voltsAC.100006012, value = 0.95]
sensor 'CpucardPwrCon Rail12 1V2' status is 'ok' [instance = voltsAC.100006013, value = 1.22]
sensor 'CPU board temp sensor' status is 'ok' [instance = celsius.100006014, value = 41]
sensor 'Back-panel temp sensor' status is 'ok' [instance = celsius.100006015, value = 38.9]
sensor 'Front-panel temp sensor' status is 'ok' [instance = celsius.100006016, value = 27]
sensor 'Board sensor' status is 'ok' [instance = celsius.100006017, value = 37]
sensor 'Switch chip sensor' status is 'ok' [instance = celsius.100006018, value = 62.6]
sensor 'PwrCon3 Rail1 POS12V_STDBY' status is 'ok' [instance = voltsAC.100006019, value = 11.89]
sensor 'PwrCon3 Rail2 POS12V' status is 'ok' [instance = voltsAC.100006020, value = 11.94]
sensor 'PwrCon3 Rail3 POS6V8_STDBY' status is 'ok' [instance = voltsAC.100006021, value = 6.71]
sensor 'PwrCon3 Rail4 POS3V3_STDBY' status is 'ok' [instance = voltsAC.100006022, value = 3.3]
sensor 'PwrCon3 Rail5 POS3V3' status is 'ok' [instance = voltsAC.100006023, value = 3.29]
sensor 'PwrCon3 Rail6 POS3V3_SFP' status is 'ok' [instance = voltsAC.100006024, value = 3.31]
sensor 'PwrCon3 Rail7 POS3V0' status is 'ok' [instance = voltsAC.100006025, value = 3]
sensor 'PwrCon3 Rail8 POS2V5' status is 'ok' [instance = voltsAC.100006026, value = 2.48]
sensor 'PwrCon3 Rail9 POS1V8' status is 'ok' [instance = voltsAC.100006027, value = 1.79]
sensor 'PwrCon3 Rail10 POS1V35_0' status is 'ok' [instance = voltsAC.100006028, value = 1.34]
sensor 'PwrCon3 Rail11 POS1V35_1' status is 'ok' [instance = voltsAC.100006029, value = 1.34]
sensor 'PwrCon3 Rail12 POS1V25' status is 'ok' [instance = voltsAC.100006030, value = 1.24]
sensor 'PwrCon3 Rail13 POS1V2' status is 'ok' [instance = voltsAC.100006031, value = 1.2]
sensor 'PwrCon3 Rail14 POS1V0_C' status is 'ok' [instance = voltsAC.100006032, value = 1]
sensor 'PwrCon3 Rail15 POS1V0_DDR' status is 'ok' [instance = voltsAC.100006033, value = 1]
sensor 'PwrCon3 Rail16 POS1V0' status is 'ok' [instance = voltsAC.100006034, value = 1]
sensor 'DOM Temperature Sensor for Ethernet6' status is 'ok' [instance = celsius.100306201, value = 34.4]
sensor 'DOM Voltage Sensor for Ethernet6' status is 'ok' [instance = voltsDC.100306202, value = 3.33]
sensor 'DOM TX Bias Sensor for Ethernet6' status is 'ok' [instance = amperes.100306211, value = 5.35]
sensor 'DOM TX Power Sensor for Ethernet6' status is 'ok' [instance = watts.100306212, value = 0.6179]
sensor 'DOM RX Power Sensor for Ethernet6' status is 'ok' [instance = watts.100306213, value = 0.647]
sensor 'DOM Temperature Sensor for Ethernet8' status is 'unavailable' [instance = celsius.100308201, value = 0]
sensor 'DOM Voltage Sensor for Ethernet8' status is 'unavailable' [instance = voltsDC.100308202, value = 0]
sensor 'DOM TX Bias Sensor for Ethernet8' status is 'unavailable' [instance = amperes.100308211, value = 0]
sensor 'DOM TX Power Sensor for Ethernet8' status is 'unavailable' [instance = watts.100308212, value = 0]
sensor 'DOM RX Power Sensor for Ethernet8' status is 'unavailable' [instance = watts.100308213, value = 0]
sensor 'DOM Temperature Sensor for Ethernet13' status is 'ok' [instance = celsius.100313201, value = 35.2]
sensor 'DOM Voltage Sensor for Ethernet13' status is 'ok' [instance = voltsDC.100313202, value = 3.33]
sensor 'DOM TX Bias Sensor for Ethernet13' status is 'ok' [instance = amperes.100313211, value = 4.97]
sensor 'DOM TX Power Sensor for Ethernet13' status is 'ok' [instance = watts.100313212, value = 0.5963]
sensor 'DOM RX Power Sensor for Ethernet13' status is 'ok' [instance = watts.100313213, value = -100000]
sensor 'DOM Temperature Sensor for Ethernet24' status is 'ok' [instance = celsius.100324201, value = 31.9]
sensor 'DOM Voltage Sensor for Ethernet24' status is 'ok' [instance = voltsDC.100324202, value = 3.31]
sensor 'DOM TX Bias Sensor for Ethernet24' status is 'ok' [instance = amperes.100324211, value = 27.51]
sensor 'DOM TX Power Sensor for Ethernet24' status is 'ok' [instance = watts.100324212, value = 0.5214]
sensor 'DOM RX Power Sensor for Ethernet24' status is 'ok' [instance = watts.100324213, value = 0.0001]
sensor 'DOM Temperature Sensor for Ethernet49' status is 'ok' [instance = celsius.100349201, value = 45.3]
sensor 'DOM Voltage Sensor for Ethernet49' status is 'ok' [instance = voltsDC.100349202, value = 3.28]
sensor 'DOM TX Bias Sensor for Ethernet49/1' status is 'ok' [instance = amperes.100349211, value = 49.7]
sensor 'DOM TX Power Sensor for Ethernet49/1' status is 'ok' [instance = watts.100349212, value = 0.6132]
sensor 'DOM RX Power Sensor for Ethernet49/1' status is 'ok' [instance = watts.100349213, value = 0.6479]
sensor 'DOM TX Bias Sensor for Ethernet49/2' status is 'ok' [instance = amperes.100349221, value = 49.7]
sensor 'DOM TX Power Sensor for Ethernet49/2' status is 'ok' [instance = watts.100349222, value = 0.6426]
sensor 'DOM RX Power Sensor for Ethernet49/2' status is 'ok' [instance = watts.100349223, value = 0.5983]
sensor 'DOM TX Bias Sensor for Ethernet49/3' status is 'ok' [instance = amperes.100349231, value = 49.7]
sensor 'DOM TX Power Sensor for Ethernet49/3' status is 'ok' [instance = watts.100349232, value = 0.6636]
sensor 'DOM RX Power Sensor for Ethernet49/3' status is 'ok' [instance = watts.100349233, value = 0.7843]
sensor 'DOM TX Bias Sensor for Ethernet49/4' status is 'ok' [instance = amperes.100349241, value = 49.7]
sensor 'DOM TX Power Sensor for Ethernet49/4' status is 'ok' [instance = watts.100349242, value = 0.6048]
sensor 'DOM RX Power Sensor for Ethernet49/4' status is 'ok' [instance = watts.100349243, value = 0.5084]
sensor 'DOM Temperature Sensor for Ethernet51' status is 'ok' [instance = celsius.100351201, value = 53.9]
sensor 'DOM Voltage Sensor for Ethernet51' status is 'ok' [instance = voltsDC.100351202, value = 3.28]
sensor 'DOM TX Bias Sensor for Ethernet51/1' status is 'ok' [instance = amperes.100351211, value = 50.05]
sensor 'DOM TX Power Sensor for Ethernet51/1' status is 'ok' [instance = watts.100351212, value = 0.6132]
sensor 'DOM RX Power Sensor for Ethernet51/1' status is 'ok' [instance = watts.100351213, value = 0.7564]
sensor 'DOM TX Bias Sensor for Ethernet51/2' status is 'ok' [instance = amperes.100351221, value = 50.05]
sensor 'DOM TX Power Sensor for Ethernet51/2' status is 'ok' [instance = watts.100351222, value = 0.6174]
sensor 'DOM RX Power Sensor for Ethernet51/2' status is 'ok' [instance = watts.100351223, value = 0.9114]
sensor 'DOM TX Bias Sensor for Ethernet51/3' status is 'ok' [instance = amperes.100351231, value = 50.05]
sensor 'DOM TX Power Sensor for Ethernet51/3' status is 'ok' [instance = watts.100351232, value = 0.6216]
sensor 'DOM RX Power Sensor for Ethernet51/3' status is 'ok' [instance = watts.100351233, value = 0.7843]
sensor 'DOM TX Bias Sensor for Ethernet51/4' status is 'ok' [instance = amperes.100351241, value = 50.05]
sensor 'DOM TX Power Sensor for Ethernet51/4' status is 'ok' [instance = watts.100351242, value = 0.6048]
sensor 'DOM RX Power Sensor for Ethernet51/4' status is 'ok' [instance = watts.100351243, value = 0.7068]
sensor 'DOM Temperature Sensor for Ethernet52' status is 'ok' [instance = celsius.100352201, value = 38]
sensor 'DOM Voltage Sensor for Ethernet52' status is 'ok' [instance = voltsDC.100352202, value = 3.32]
sensor 'DOM TX Bias Sensor for Ethernet52/1' status is 'ok' [instance = amperes.100352211, value = 7.55]
sensor 'DOM TX Power Sensor for Ethernet52/1' status is 'ok' [instance = watts.100352212, value = 0.7933]
sensor 'DOM RX Power Sensor for Ethernet52/1' status is 'ok' [instance = watts.100352213, value = 0.0001]
sensor 'DOM TX Bias Sensor for Ethernet52/2' status is 'ok' [instance = amperes.100352221, value = 7.51]
sensor 'DOM TX Power Sensor for Ethernet52/2' status is 'ok' [instance = watts.100352222, value = 0.7888]
sensor 'DOM RX Power Sensor for Ethernet52/2' status is 'ok' [instance = watts.100352223, value = 0.0001]
sensor 'DOM TX Bias Sensor for Ethernet52/3' status is 'ok' [instance = amperes.100352231, value = 7.49]
sensor 'DOM TX Power Sensor for Ethernet52/3' status is 'ok' [instance = watts.100352232, value = 0.8374]
sensor 'DOM RX Power Sensor for Ethernet52/3' status is 'ok' [instance = watts.100352233, value = 0.0001]
sensor 'DOM TX Bias Sensor for Ethernet52/4' status is 'ok' [instance = amperes.100352241, value = 7.65]
sensor 'DOM TX Power Sensor for Ethernet52/4' status is 'ok' [instance = watts.100352242, value = 0.721]
sensor 'DOM RX Power Sensor for Ethernet52/4' status is 'ok' [instance = watts.100352243, value = 0.0001]
sensor 'DOM Temperature Sensor for Ethernet54' status is 'ok' [instance = celsius.100354201, value = 38.5]
sensor 'DOM Voltage Sensor for Ethernet54' status is 'ok' [instance = voltsDC.100354202, value = 3.33]
sensor 'DOM TX Bias Sensor for Ethernet54/1' status is 'ok' [instance = amperes.100354211, value = 7.49]
sensor 'DOM TX Power Sensor for Ethernet54/1' status is 'ok' [instance = watts.100354212, value = 0.912]
sensor 'DOM RX Power Sensor for Ethernet54/1' status is 'ok' [instance = watts.100354213, value = 0.7688]
sensor 'DOM TX Bias Sensor for Ethernet54/2' status is 'ok' [instance = amperes.100354221, value = 7.49]
sensor 'DOM TX Power Sensor for Ethernet54/2' status is 'ok' [instance = watts.100354222, value = 0.8835]
sensor 'DOM RX Power Sensor for Ethernet54/2' status is 'ok' [instance = watts.100354223, value = 0.83]
sensor 'DOM TX Bias Sensor for Ethernet54/3' status is 'ok' [instance = amperes.100354231, value = 7.49]
sensor 'DOM TX Power Sensor for Ethernet54/3' status is 'ok' [instance = watts.100354232, value = 0.911]
sensor 'DOM RX Power Sensor for Ethernet54/3' status is 'ok' [instance = watts.100354233, value = 0.898]
sensor 'DOM TX Bias Sensor for Ethernet54/4' status is 'ok' [instance = amperes.100354241, value = 7.49]
sensor 'DOM TX Power Sensor for Ethernet54/4' status is 'ok' [instance = watts.100354242, value = 0.9038]
sensor 'DOM RX Power Sensor for Ethernet54/4' status is 'ok' [instance = watts.100354243, value = 0.8658]
sensor 'Fan Tray 1 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100601111, value = 7281]
sensor 'Fan Tray 2 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100602111, value = 7317]
sensor 'Fan Tray 3 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100603111, value = 7317]
sensor 'Fan Tray 4 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100604111, value = 7281]
sensor 'Hotspot temperature sensor' status is 'ok' [instance = celsius.100711101, value = 38]
sensor 'Inlet temperature sensor' status is 'ok' [instance = celsius.100711102, value = 26]
sensor 'Input current sensor' status is 'ok' [instance = amperes.100711103, value = 0.36]
sensor 'Output current sensor' status is 'ok' [instance = amperes.100711104, value = 5.3]
sensor 'Input voltage sensor' status is 'ok' [instance = voltsAC.100711105, value = 227.25]
sensor 'Output voltage sensor' status is 'ok' [instance = voltsAC.100711106, value = 12.03]
sensor 'PowerSupply1 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100711211, value = 9296]
sensor 'Hotspot temperature sensor' status is 'ok' [instance = celsius.100721101, value = 38]
sensor 'Inlet temperature sensor' status is 'ok' [instance = celsius.100721102, value = 27]
sensor 'Input current sensor' status is 'ok' [instance = amperes.100721103, value = 0.33]
sensor 'Output current sensor' status is 'ok' [instance = amperes.100721104, value = 4.69]
sensor 'Input voltage sensor' status is 'ok' [instance = voltsAC.100721105, value = 227.5]
sensor 'Output voltage sensor' status is 'ok' [instance = voltsAC.100721106, value = 12.01]
sensor 'PowerSupply2 Fan 1 Sensor 1' status is 'ok' [instance = rpm.100721211, value = 9312]

dalfo77 avatar Aug 31 '20 11:08 dalfo77

I have looked the snmpwalk. From the MIB:

EntityOperState  ::=  TEXTUAL-CONVENTION
       STATUS         current
       DESCRIPTION
            " Represents the possible values of operational states.

              A value of 'disabled' means the resource is totally
              inoperable.  A value of 'enabled' means the resource
              is partially or fully operable.  A value of 'testing'
              means the resource is currently being tested
              and cannot therefore report whether it is operational
              or not.  A value of 'unknown' means that this
              resource is unable to report operational state."
       SYNTAX         INTEGER
                 {
                 unknown (1),
                 disabled (2),
                 enabled (3),
                 testing (4)
                 }

I have looked all values and there are many entities in 'disabled', 'unknown',... We'll get too many errors. We can check a state change maybe ? Or i set everything 'ok' and you can override the threshold for some instance ? or both

garnier-quentin avatar Sep 07 '20 13:09 garnier-quentin

Ciao, i've just sent the snmpwalk by email to qgarnier and sbomm, before and after a PSU off

grep .1.3.6.1.2.1.131.1.1.1.3 PSU_o*  | egrep '100711000|100721000'
PSU_off_arista.1.3.6.1.2.1.snmpwalk:.1.3.6.1.2.1.131.1.1.1.3.100711000 = INTEGER: 3
PSU_off_arista.1.3.6.1.2.1.snmpwalk:.1.3.6.1.2.1.131.1.1.1.3.100721000 = INTEGER: 2
PSU_on_arista.1.3.6.1.2.1.snmpwalk:.1.3.6.1.2.1.131.1.1.1.3.100711000 = INTEGER: 3
PSU_on_arista.1.3.6.1.2.1.snmpwalk:.1.3.6.1.2.1.131.1.1.1.3.100721000 = INTEGER: 3

dalfo77 avatar Sep 08 '20 14:09 dalfo77

There is any news? You need more data/test?

dalfo77 avatar Oct 21 '20 14:10 dalfo77

Hi, any update about this issue? Has been solved in the meanwhile?

Fuuzz avatar Mar 25 '21 11:03 Fuuzz

Hi, Thanks for your interest in Centreon. Requests for new features and enhancements must be suggested here. Troubleshooting and questions must now be asked here (cf our new issue template.

Thank you for your understanding.

fmattesct avatar Oct 31 '23 15:10 fmattesct