Icinga / icinga-powershell-framework

This PowerShell module will allow to fetch data from Windows hosts and use them for inventory and monitoring solutions. Together with the Icinga Web 2 module, a detailed overview of your Windows infrastructure will be drawn.
MIT License
77 stars 33 forks source link

invoke-icingachecktimesync not capable of handling negative values #733

Closed robertkrenn closed 5 months ago

robertkrenn commented 5 months ago

While checking the timesync on our windows servers, it happens quite often, that the timesync offset is for example -30ms. The check imediately turns critical saying "-30ms is greater than the threshold of 500ms", what is completely wrong in each way. What is the defined way to deal with that. By setting threshold to 500ms we think 500ms by value, positive and negative offset to the timeserver.

LordHepipud commented 5 months ago

Thank you for the issue. Please have a look on the Plugin Documentation for threshold handling.

In order to receive a CRITICAL state only if the value exceeds 500ms, you have to modify your threshold like this:

~:500ms

If you want to check for a value lower than 500ms and higher than 500ms, it would be like this:

-500ms:500ms