Commit Graph

17 Commits

Author SHA1 Message Date
e2b479c34f support new checker api
With this, it is now possible to support multiple check instances and
balance the load.
2019-08-12 14:49:53 +02:00
142f9cf358 fill in state_change column
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-05-28 13:38:16 +02:00
2bfe75c8a7 cmd/moncheck: use mapping only for notifications
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-10 09:09:15 +02:00
532f55d640 fix idle in transaction
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-04-09 09:51:52 +02:00
7ed255d591 moncheck - add hostname to notifications
This can help with determining which exact check connection broke the
check.
2019-01-11 13:02:37 +01:00
3b222e06ed moncheck - make workers configurable
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.
2019-01-07 15:50:55 +01:00
affbe8c420 moncheck - log the state which wasn't found 2018-12-12 14:05:46 +01:00
af843d76e1 moncheck - move notifications to dedicated table
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-11 20:21:14 +01:00
02925bc335 moncheck - add alarm mapping to notification
This should enable the notifier to make a decent decision on what to do.
2018-12-11 13:24:13 +01:00
24456400eb moncheck - add mapping levels
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-11 13:02:23 +01:00
40e744cd6a moncheck - add PATH environment
This adds the path environment configuration to control which programs
to call.
2018-12-10 09:34:00 +01:00
83a1b45b19 moncheck - add timeout option
Before the timeout for checks was static. With this change it is finally
an option to configure.
2018-11-29 10:45:33 +01:00
ddc0053ce8 moncheck - add function to remove acknowledge
An acknowledge should be set to false when the alarm switches to an ok
state.
2018-11-20 21:47:35 +01:00
b7cacc928f remove debug output
This output was poluting the log and wasn't necessary.
2018-11-19 11:30:29 +01:00
4db00b00ed moncheck: fix error reporting of daedlines
The deadlines were wrong all over the place, so this commit finally
fixes that.
2018-11-18 21:38:04 +01:00
1960907547 moncheck - adjust queries to take less data
With selecting only the bare minimum we get much nicer performance.
2018-11-16 20:09:31 +01:00
bfd2b5d324 initial commit 2018-11-16 10:39:21 +01:00