Skip to content

Bugfix/Cleanup/Stability of Raritan Residual current check#935

Open
nightwatcher74 wants to merge 1 commit into
Checkmk:masterfrom
nightwatcher74:raritan_fix
Open

Bugfix/Cleanup/Stability of Raritan Residual current check#935
nightwatcher74 wants to merge 1 commit into
Checkmk:masterfrom
nightwatcher74:raritan_fix

Conversation

@nightwatcher74

Copy link
Copy Markdown
Contributor

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:

  • Your operating system name and version
  • Any details about your local setup that might be helpful in troubleshooting
  • Detailed steps to reproduce the bug
  • An agent output or SNMP walk
  • The ID of a submitted crash report for reference (if applicable)

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:

  • What is the expected behavior?
  • What is the observed behavior?
  • If it's not obvious from the above: In what way does your patch change the current behavior?
  • Consider writing a unit test that would have failed without your fix.
  • Is this a new problem? What made you submit this PR (new firmware, new device, changed device behavior)?

… 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,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant