Bugfix/Cleanup/Stability of Raritan Residual current check#935
Open
nightwatcher74 wants to merge 1 commit into
Open
Bugfix/Cleanup/Stability of Raritan Residual current check#935nightwatcher74 wants to merge 1 commit into
nightwatcher74 wants to merge 1 commit into
Conversation
… of 0,030A and no warn. This will be set to None and the check will crash. Becuase this is security sensitive, a WARN value will be set to CRIT and a CRIT value will be set also on WARN. So in all cases a CRIT Message will be set! I decided to make this solution because it is important to get an event in all cases because it can save lives.
I also merge the complete dataclasses to pydantic and add a funktion to easier get the capabilities of the Raritan device instead of check the bits itself. Funktions that are required as shared funktions when the legacy check will be rewirtten are moves to lib. The shared funktions can be included wir __init__.py:
from cmk.plugins.raritan import (
InletSensorEnabledThresholds,
InletDeviceCapabilities,
InletPoleCapabilities,
RaritanData,
SensorValues,
Sensor,
PDU,
TYPE_MAPPING,
UNIT_MAPPING,
)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The Raritan PDU sends per default only a Crit value of 0,030A and no warn. This will be set to None and the check will crash. Becuase this is security sensitive, a WARN value will be set to CRIT and a CRIT value will be set also on WARN. So in all cases a CRIT Message will be set! I decided to make this solution because it is important to get an event in all cases because it can save lives.
I also merge the complete dataclasses to pydantic and add a funktion to easier get the capabilities of the Raritan device instead of check the bits itself. Funktions that are required as shared funktions when the legacy check will be rewirtten are moves to lib. The shared funktions can be included wir init.py: from cmk.plugins.raritan import (
InletSensorEnabledThresholds,
InletDeviceCapabilities,
InletPoleCapabilities,
RaritanData,
SensorValues,
Sensor,
PDU,
TYPE_MAPPING,
UNIT_MAPPING,
)
Thank you for your interest in contributing to Checkmk!
Consider looking into Readme regarding process details.
General information
Please give a brief summary of the affected device, software or appliance.
Keep in mind that we are experts in monitoring, but we cannot be experts on all supported devices.
A little context will help us assess your proposed change.
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: