Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hardware::pdu::cyberpower::snmp::plugin] incorrect data output in "load" mode #5165

Closed
Aleksey-Maksimov opened this issue Sep 3, 2024 · 8 comments
Labels

Comments

@Aleksey-Maksimov
Copy link

Hello.

In the plugin "hardware::pdu::cyberpower::snmp::plugin" the "load" mode incorrectly displays information about the load in watts and there is not enough information about the voltage.

# ./centreon_plugins.pl --plugin=hardware::pdu::cyberpower::snmp::plugin --mode=load 
--filter-uom="null" --hostname='10.3.2.100' --snmp-community='it' --snmp-version=1 
--use-new-perfdata --warning-phase-current=14 --critical-phase-current=16

OK: Device 'ATS011' bank '1' current : 1.1 A - phase '1' state: normal, current : 1.1 A, power : 2240 W | 
'ATS011~1#bank.current.ampere'=1.1;;;0; 
'ATS011~1#phase.current.ampere'=1.1;0:14;0:16;0; 
'ATS011~1#phase.power.watt'=2240;;;0;

Here we see that the value is 2240W.
Judging by the fact that I see in the plugin code https://github.com/centreon/centreon-plugins/blob/develop/src/hardware/pdu/cyberpower/snmp/mode/load.pm#L233 the value from ePDU2PhaseStatusPower is multiplied by 10.
I think this is wrong, because OID .1.3.6.1.4.1.3808.1.1.6.4.4.1.7 (ePDU2PhaseStatusPower) according to the description in the MIB file returns the value in Watts.
And this seems to be true.

изображение

Description of the ePDU2PhaseStatusPower parameter in the CPS-MIB: "Indicates the load power, in watts, consumed on the Rack PDU phase being queried"
It turns out that multiplying the result of ePDU2PhaseStatusPower by 10 is an error that needs to be fixed, since the plugin is currently returning incorrect data.

And one more thing.
It would be nice if the plugin additionally polled the outgoing voltage in volts.
This value can be obtained from OID .1.3.6.1.4.1.3808.1.1.6.4.4.1.6 (ePDU2PhaseStatusVoltage)
From CPS-MIB: "Indicates the Voltage, in tenths of Volts, of the Rack PDU phase being queried."
This value is interesting to us, but it should have its own metric, for example *#phase.voltage.volts
Please note that the voltage is given in tenths of a volt.

MIB and snmpalk files are attached: CyberPower-ATS-PDU44005.zip

Thanks.

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

Thanks for this feedback and the data to test it. I created the dev ticket according this request.

@lucie-dubrunfaut
Copy link
Contributor

Can you tell me if this could be the result expected ?

OK: Device 'ATS011' bank '1' current : 1 A - phase '1' state: normal, current : 1 A, power : 219 W, voltage : 217.8 V | 'ATS011~1#bank.current.ampere'=1A;;;0; 
'ATS011~1#phase.current.ampere'=1A;;;0; 
'ATS011~1#phase.power.watt'=219W;;;0; 
'ATS011~1#phase.voltage.volt'=217.8V;;;0;

@Aleksey-Maksimov
Copy link
Author

Yes, that seems to be true.

@lucie-dubrunfaut
Copy link
Contributor

You can test with the fix proposed here : #5187

@lucie-dubrunfaut
Copy link
Contributor

Delivered with the October release. If the issue persists, feel free to re-open this Issue.

@Aleksey-Maksimov
Copy link
Author

Thank you. It works.

@Aleksey-Maksimov
Copy link
Author

I just don't understand why when new plugin releases come out there is no version information in them??

/centreon_plugins.pl --version
Global Version: (dev)

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

So far the plugin versioning system, even if it exists, has not been maintained or used to my knowledge. This could be a suggestion to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants