Yogibaer75 / Check_MK-Things

From check plugins to website extensions
62 stars 17 forks source link

Fix ilo_api_mem.py #27

Open systeembeheerder opened 1 year ago

systeembeheerder commented 1 year ago

Plugin fails to detect warning state in module; fixed syntax.

Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> health="Warning"
>>> if health == "Good" or "OK":
...   print ("strange")
...
strange
>>>
systeembeheerder commented 10 months ago

@Yogibaer75 in your code

if data[3] == "GoodInUse" or "OK":

gives the wrong results. See the test above.

Yogibaer75 commented 10 months ago

Can you please migrate the checks to the generic redfish agent? I joined all the manufacturer versions to one special agent. This one is then the only one who gets fixed and further development.