CMK version: 2.2.0p1 MSP
OS version: Ubuntu 22.04 LTSB
Since our update to version 2.2.0p1 today we’re getting a new error message from the MSSQL plugin.
We’re hosting multiple customers in multiple time regions in our SaaS environment.
Some of our customers are in the Asian time-zone, where the time is ahead of our monitoring server by 5 or 6 hours. The time-zone of the OS is set to utc +8, this also affects the SQL and application time. We need it to be set to this time for the customer. Sadly, this causes a new error message from the backup part of the MSSQL plugin.
Error message:
[database] Last backup: Jun 05 2023 20:02:22, Cannot reasonably calculate time since last backup (hosts time is running ahead), Time since last backup: -5 hours 3 minutesWARN
As far as I can tell this is not something I can change in the parameters of the service.
Does anyone know a solution for this situation? Changing the system time of the server is not an option.
Unfortunately, this is a fundamental problem within Checkmk. Most checks use the local time of the Checkmk server, rather than the current time of the remote server, as the basis for Time calculations.
Since you cannot specify a neagtive threshold as a workaround to compensate the time zone difference this has to be fixed in the MSSQL check.
What did the service show before you migrated to 2.2.0p1?
Hi LaSoe, thank you for the reply.
I was wondering if it’s possible to add some kind of offset to this check specifically from the parameters, that would fix my issue.
And indeed, as expected this is not something I can easily resolve as I don’t want to make changes to the MSSQL plugin either.
Before updating we never saw any errors, it seems however that the output used to also be “in the future” when I look at the graph.
If I can somehow say that it’s ok for the backup to be out of sync for -24 to +24 hours i’m good with that as well. One missed day doesn’t matter that much for me, it’s mainly if the back-ups aren’t running at all for a longer time.
Presumably, the MSSQL check in 2.2 has been improved to the effect that you are now alerted when a backup date is in the future, because this should not happen if you leave out the time zone problem.
Unfortunately, this means that you cannot compensate the time zone difference in the thresholds like “warn at -8h crit at -4h” as a workaround because the MSSQL check will allways first complains about the date in the future.
That’s what I figured, sadly this improvement is not an improvement for us. I do not want to filter this service out and/or permanently set it to maintenance. Also I don’t think it’s a healthy solution for us to change the time of the CheckMK server to the “highest” timezone, UTC +14.
In short I guess there is no solution if I don’t want to change the time of the machine/SQL and/or change the MSSQL script? That really sucks, as it was working perfectly (for us) before. I don’t mind the -5 hours, because it will eventually over time correct it self. We only create a back-up every 24 hours.
@jlagendijk you are actually not supposed to share this. Primarily because the changes, such an MKP implements are often very specific to the very customer it is built for, and it could break things for other users.
So while it is nice of you to try and help here, sharing MKPs you got from the support might actually prove detrimental.