Commit Graph

26 Commits

Author SHA1 Message Date
Ian Fijolek
fd8e81cb1a Update slog to v2 2026-01-15 10:58:35 -08:00
Ian Fijolek
85afa3d9ef Merge branch 'master' into next-major 2025-12-11 16:17:38 -08:00
Ian Fijolek
be2e8121c5 Refactor validation for alert and monitor to return errors 2025-02-13 12:17:59 -08:00
Ian Fijolek
9e20c00dde Move monitor init to it's own method and refactor config validate to return err 2025-02-13 12:17:59 -08:00
Ian Fijolek
df1c7aa74b Refactor test package and some field types
Fairly big test refactor and changing some of the fields from pointers
2025-02-13 12:17:59 -08:00
Ian Fijolek
7c72eabd6b Initial step of hcl migration 2025-02-13 12:17:46 -08:00
IamTheFij
0535bdf156 Fix incorrect alertCount 2025-02-13 12:12:01 -08:00
Ian Fijolek
3f6c8f5a22 Breaking: Remove 'SecondsOrDuration' for check_interval
Now requires an explicit duration unit. Eg. 30s
2024-11-14 11:18:39 -08:00
Ian Fijolek
7d87c3d036 Add default values for AlertEvery
There is also a test error corrected in TestMonitorFailureAlertEvery
where the same test conditions were repeated twice.
2022-12-19 15:49:32 -08:00
Ian Fijolek
860c2cdf43 Add custom type to parse out seconds as int and durations as strings 2021-05-12 10:33:42 -07:00
Ian Fijolek
bdf7355fa7 Add duration parsing for intervals 2021-05-11 10:41:39 -07:00
Ian Fijolek
befea7375f Add check runtime metric 2021-05-11 10:41:39 -07:00
Ian Fijolek
5f250f17a8 Add more liniting and update to pass 2021-05-10 21:53:26 -07:00
Ian Fijolek
fda9e1bfc3 Replace log with slog 2021-05-10 21:53:26 -07:00
Ian Fijolek
f0e179851f Update linting and a test case 2021-01-08 18:31:22 -05:00
Ian Fijolek
aad9eaa32f Update exported status metric to properly reflect alerting status of a monitor
It was using the result of the individual check and not the monitor as a whole
2020-07-14 17:09:56 -07:00
Ian Fijolek
25c5179d3d Switch to a single key for command and command shell
This makes the configuration more similar to Minitor-py and
docker-compose. If a string is passed, it will be executed in a shell.
If an array is passed, it will be executed in as a command directly.

This breaks compatiblity with previous versions of Minitor-go, but
closer to compatiblity with Minitor-py.
2020-02-19 17:38:06 -08:00
Ian Fijolek
0269ad3512 Add new test for multi-line YAML strings 2020-01-07 10:28:14 -08:00
Ian Fijolek
1b07059825 Make AlertDown required for a Monitor 2019-10-04 16:23:48 -07:00
Ian Fijolek
ac8ab9ef43 Add debug flag to adjust log verbosity a bit
Not as good as a proper logging system, but still provids a bit of
control over log verbosity
2019-10-04 16:05:25 -07:00
Ian Fijolek
6aaeeb32d4 Refactor a bit more for testing, update tests 2019-10-04 14:47:38 -07:00
Ian Fijolek
1280fbb7bd Update to fix issues with AlertAfter. Disallow 0 2019-10-02 20:52:57 -07:00
Ian Fijolek
061b0c980a WIP: Building tests, figuring out what I want AlertAfter to do 2019-10-02 18:01:55 -07:00
Ian Fijolek
7b746ed62a Commands all running 2019-10-02 09:37:29 -07:00
Ian Fijolek
dd0b8e3f38 Added ability to run commands in a shell
Diverges a small amount from the Python version for this.
2019-10-01 08:26:07 -07:00
Ian Fijolek
342b12432e WIP 2019-09-21 15:03:26 -07:00