aboutsummaryrefslogtreecommitdiff
path: root/cmd/moncheck
AgeCommit message (Collapse)AuthorFilesLines
2023-09-05add support for debug checker log outputGibheer1-0/+1
With monzero supporting slog to get debug output from check commands, moncheck now supports that too by changing the level to debug.
2023-09-05migrate moncheck to slogGibheer1-9/+68
With this moncheck itself is also changed to use slog. The early config parsing is still using log as we do not have any idea what else to use. But from then slog is used at all points. With the additional config options a man page was also added to explain the new config options.
2021-12-02cmd/moncheck - fix missing return valueGibheer1-3/+5
2021-12-02cmd/moncheck - switch to monzero.CheckerGibheer1-85/+15
This switches the internals of the moncheck instance to using the monzero.Checker API. This way we can reuse it completely and also see if it works properly.
2019-08-12support new checker apiGibheer1-13/+10
With this, it is now possible to support multiple check instances and balance the load.
2019-05-28fill in state_change columnGibheer1-2/+6
Any time the state of the check changes, we need to refresh the column. This will be used in the frontend. This way it is much faster than using the notifications and also doesn't rely on the last of it being still around.
2019-04-10cmd/moncheck: use mapping only for notificationsGibheer1-16/+9
This should make the frontend much easier to handle than before. It isn't the best solution, but it makes it easier in the frontend for now.
2019-04-09fix idle in transactionGibheer1-18/+8
It happend all the time, that connections were hanging in idle in transaction state. This was caused by a rollback stuck behind a sleep loop to wait for the next bunch of checks to run. This also replaces a Query() call with QueryRow, as we only expect a single row and this cleans up the code a bit.
2019-01-11moncheck - add hostname to notificationsGibheer1-5/+10
This can help with determining which exact check connection broke the check.
2019-01-07moncheck - make workers configurableGibheer1-2/+3
The default worker count was set to 25, which might be too much depending on the amount of cores available. Now make the default 25 and let people decide on how many they want to use.
2018-12-12moncheck - log the state which wasn't foundGibheer1-3/+4
2018-12-11moncheck - move notifications to dedicated tableGibheer1-9/+9
It would be nice to support multiple notification mechanisms with a way to disable all or part of them. So for now, this is bound to the check but may change again in the future. Apart from that, all notifications get written to the notification table, so that the notifiers can do their job and ACK their own notifications.
2018-12-11moncheck - add alarm mapping to notificationGibheer1-1/+1
This should enable the notifier to make a decent decision on what to do.
2018-12-11moncheck - add mapping levelsGibheer1-12/+27
This adds mapping levels to the check runner. When the exit code is returned, the actual level is looked up using the configured mapping. After that, the state is entered into the table and added the same way to the notifications.
2018-12-10moncheck - add PATH environmentGibheer1-3/+12
This adds the path environment configuration to control which programs to call.
2018-11-29moncheck - add timeout optionGibheer1-8/+12
Before the timeout for checks was static. With this change it is finally an option to configure.
2018-11-20moncheck - add function to remove acknowledgeGibheer1-1/+18
An acknowledge should be set to false when the alarm switches to an ok state.
2018-11-19remove debug outputGibheer1-1/+0
This output was poluting the log and wasn't necessary.
2018-11-18moncheck: fix error reporting of daedlinesGibheer1-18/+79
The deadlines were wrong all over the place, so this commit finally fixes that.
2018-11-16moncheck - adjust queries to take less dataGibheer1-3/+7
With selecting only the bare minimum we get much nicer performance.
2018-11-16initial commitGibheer1-0/+141