Check_mk-pse_poe wrong vaues

Hi I’ve just upgraded to v2 raw, great work by the way! Aside the fact that the color in the warn and critical state do not differentiate making it difficult to discern, I have an issue with the check_mk-pse_poe check which for some HP 1920 switches (not the S variant) the percentage is on 1000% scale. I feel the issue is some conversion missing and the wattage is wrongfully reported. Is there a workaround or fix to make it work OK?

Thank you!

Hi @Gregory_Tsintaris,

it’s may the same behaviour like in the post Pse_poe liefert weit über 100% bei DELL N1548P.

I don’t speak German… Judging by the translation, it seems a check must be modified? Any insight on where to search?

Actually there is no fix for it. An idea is to change the check but keeping in mind if you just divide the output by 1000 you may run in problems with other devices reporting the values in W instead of mW.

As @tosch said there is no general solution at the moment. I had a system last week with the same problem. All the switches there had the same output and i changed the check. But it would be preferred that this is configurable.

If you want to change it globally in your system, you can do the following

copy “~/share/check_mk/checks/pse_poe” to “~/local/share/check_mk/checks/…” and modify the lines
33 and 34 from

poe_max=int(poe_max),
poe_used=int(poe_used),

to

poe_max=int(poe_max) / 1000,
poe_used=int(poe_used) / 1000,

Then all your values should be shown in normal Watts.

It would be good to have it as a parameter, it does not apply on my environment since I others that work fine. I’ll the values to check if a simple if loop at some point will solve the issue…

Thank you for the hint though!

Thanks for this solution, but still it shows the percentage as “15400%”.

This will only help if all devices report the same metric. In my case this will not work

dev1
Device 1 reports in mW

dev2
Device 2 reports in mW and W…

For anyone interested I have made a quick and dirty fix (I’m not a coder, be gentle!) attached[pse_poe.txt the modified file. It works flawlessly for my environment!
pse_poe.txt (2.6 KB)

I changed your fix a little bit, it also recognize now if the max value is in milliwatt.
My change look for every of the two values if it is over 1k.
pse_poe.txt (2.5 KB)

2 Likes

Looks good and works for me. Thank you andreas :wink:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.