Update hp_proliant_da_phydrv.py - don't convert disk size to bytes #803
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix size reporting on ProLiant Disks - the value is output with the "MB" unit, and doesn't need converting to bytes.
Thank you for your interest in contributing to Checkmk!
Consider looking into Readme regarding process details.
General information
In checking a ProLiant iLO disk information, the size is output as MB, e.g.
But this value is suspiciously large.
The size value is specified to be in megabytes (1,048,576), so the unit is correct.
https://oidref.com/1.3.6.1.4.1.232.3.2.5.1.1.45
But it's mistakenly being converted from MiB to bytes before it is output (
size=int(size) * 1024**2
).With this fix it outputs the more reasonable value: 572325MB (~558.9 GB):
Attaching an SNMP Walk for 1.3.6.1.4.1.232.3.2.5.1.1. on the server (with serial numbers truncated.)
snmpwalk_v2c_cpublic_.1.3.6.1.4.1.232.3.2.5.1.1.txt
OMD - Open Monitoring Distribution Version 2.3.0p26.cre
Running on Ubuntu 24.04.1 LTS
Bug reports
Please include:
Proposed changes
Sometimes it is hard for us to assess the quality of a fix.
While it may work for you, it is our job to ensure that it works for everybody.
These are some ways to help us: