Commit Graph
100 Commits
Author SHA1 Message Date
andreasandClaude Sonnet 4.6 b5963badd6 feat: async subprocess in nagios_runner with stderr capture and signal handling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 16:18:09 +02:00
andreasandClaude Sonnet 4.6 a76a39b4a0 fix: remove redundant no-commands log lines; fix skip_reason docstring style
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 16:15:44 +02:00
andreasandClaude Sonnet 4.6 94e1597978 feat: set skip_reason on nagios_runner when no commands configured
When NagiosRunnerPlugin has no commands configured, set skip_reason before
returning False from initialize(). This allows PluginLoader to log INFO
(not WARNING) when the plugin is skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 16:13:03 +02:00
andreas c9c2ed772f fix: document skip_reason in Plugin docstring; remove unused import in test 2026-04-25 16:10:35 +02:00
andreas aeb78dcb8e feat: add skip_reason to Plugin; improve PluginLoader init messaging 2026-04-25 16:08:07 +02:00
andreasandClaude Sonnet 4.6 77b337e4dd Add implementation plan for plugin error checking and daemon logging fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 16:04:13 +02:00
andreasandClaude Sonnet 4.6 293461f3f6 Add design spec for plugin error checking and daemon logging fixes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 15:49:09 +02:00
andreas c70a4807dc version 5.1.2
Release / release (push) Successful in 6s
2026-04-25 07:25:06 +02:00
andreasandClaude Sonnet 4.6 1a470e7cfa Fix plugin config lookup shadowed by CLIENT_DEFAULTS plugins key
CLIENT_DEFAULTS seeds "plugins": {} so raw_config.get("plugins", raw_config)
always returned the empty subdict instead of falling back to the full config.
Plugins configured at top-level (e.g. nagios_runner: ...) were therefore
never found, resulting in "No Nagios commands configured".

Now checks the plugins subdict first, then top-level keys, so both
config layouts work correctly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 12:58:42 +02:00
andreasandClaude Sonnet 4.6 990c658e65 Apply grace period to all threshold alerts before logging/notifying
Threshold alerts (plugin metrics, RTT) were firing immediately on the
first breach. Now every state transition to WARNING/CRITICAL starts a
grace-period timer (grace_seconds from the 'grace' config key). The
notification is deferred until the next heartbeat after grace_seconds
have elapsed. If the metric recovers within the grace window, both the
alert and the recovery are suppressed — no spurious pages for transient
spikes.

Two helper methods added to ThresholdChecker:
- _apply_grace: handles the state-change path (defer or suppress)
- _check_pending_or_renotify: handles the stable-alert path (fire
  deferred notification once grace expires, or fall through to reminders)

The overdue case is unchanged — on_overdue already fires only after
interval+grace seconds of silence, which is equivalent behaviour.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 12:00:40 +02:00
andreasandClaude Sonnet 4.6 b78d6ac0fe Fix RECOVER routing: use consistent level name and route via alerted channel
threshold.py was emitting level="RECOVERED" for metric recoveries, which
failed the is_recover check in send_notification (which only matched "RECOVER"),
bypassing _alerted_channels routing and the min_level bypass added in the
previous commit. Changed to "RECOVER" so all recovery paths are consistent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 11:29:04 +02:00
andreasandClaude Sonnet 4.6 afd5060f59 Fix early reminder notifications and lost recovery notifications
- AlertState.update() now resets last_notification when the alert level
  changes, so a WARNING→CRITICAL escalation restarts the reminder interval
  rather than inheriting a nearly-expired timer.
- _dispatch_to_channel() bypasses min_level for RECOVER, so recovery
  notifications are delivered even after a server restart when
  _alerted_channels is empty and the fallback dispatch path is used.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 18:11:22 +02:00
andreas f61f7aebc2 Use python3 consistently 2026-04-19 09:49:30 +02:00
andreas 79bf00abfd version 5.0.12
Release / release (push) Successful in 6s
2026-04-08 16:47:12 -04:00
andreas d77277857f Add user management and a settings page 2026-04-08 16:21:55 -04:00
andreas 02bc42fbf0 get rtt time differently 2026-04-07 10:40:12 -04:00
andreas 832a8b0bda save state to pickle file, restart timers on restart 2026-04-06 17:24:59 -04:00
andreas 83d5ead471 Merge branch 'master' of git.wrede.ca:andreas/heartbeat 2026-02-09 07:25:47 -05:00
andreas d339133981 collect correct args for restart 2026-02-09 07:25:42 -05:00
andreas 7be129ad40 collect correct args for restart 2026-02-09 07:22:44 -05:00
andreas 179048e565 bump 2026-02-08 16:10:37 -05:00
andreas 8fe64ae8c5 version 5.0.3 2026-02-08 16:10:02 -05:00
andreas b6574872cc remove egg-info 2026-02-08 16:08:18 -05:00
andreas 5e6dfc75ad link and flake cleanup 2026-02-08 16:05:03 -05:00
andreas 087a264e97 typo 2026-02-08 14:45:06 -05:00
andreas d9ca0b74e2 fix -i option 2026-02-08 14:42:10 -05:00
andreas 999740bc99 version 5.0.2 2026-02-08 14:40:59 -05:00
andreas 4c53b7cec9 support SSL ws session 2026-02-08 14:32:12 -05:00
andreas 535b839bfc Add smtp auth 2026-02-06 20:04:12 -05:00
andreas e3dd461d04 fix order of AFs 2026-02-06 19:49:21 -05:00
andreas e55a81568f make socket listen on IPv4 and IPv6 2026-02-06 19:25:23 -05:00
andreas 83fbba433e use system packages 2026-02-06 17:04:15 -05:00
andreas a494b162cd remove 2026-02-06 16:54:49 -05:00
andreas 83b7139643 typo 2026-02-06 15:53:01 -05:00
andreas 5dca9369dd fix bumpminor.sh script 2026-02-06 15:51:48 -05:00
andreas 3748a6fc8f add install script 2026-02-06 15:39:26 -05:00
andreas 3ca619e86d add hbc and prepare for package 2026-02-06 15:19:14 -05:00
andreas 4df700e4ef refactor and rewrite for asyncio 2026-02-06 12:34:59 -05:00
andreas 700ea8d6a4 refactor 2026-02-04 12:45:35 -05:00
andreas 0a27b763f7 re-fix cert path 2025-02-28 16:39:08 -05:00
andreas e2fd6acac0 Revert "use hbd as certificate host"
This reverts commit 058a048224.
2025-02-01 13:45:33 -05:00
andreas cc1dbd5ecb start event loop early 2025-02-01 12:41:18 -05:00
andreas 058a048224 use hbd as certificate host 2024-09-07 07:13:56 -04:00
andreas f052baae75 unbuffered cmd subprocess 2024-06-03 15:40:31 -04:00
andreas 4dd06a2969 keep IPv4 addrs as IPv4 2024-04-21 15:56:21 -04:00
andreas fda5648046 keep IPv4 addrs as IPv4 2024-04-21 15:55:28 -04:00
andreas 44ca879e76 use rndc key, Kdy... {key,private} gives strange errors 2022-12-30 16:05:14 -05:00
andreas 90f7d6b045 up msg list to last 100 2022-04-11 17:20:12 -04:00
andreas abf4e4d586 init display state pproperly 2022-03-15 16:20:12 -04:00
andreas 38cd881b22 more uppercase constants 2022-03-15 15:38:48 -04:00
andreas dda2513d27 remove ond connections 2022-03-15 15:35:01 -04:00
andreas d40ee33ece upper case constants 2022-03-15 15:34:45 -04:00
andreas 96eb380d58 cpitalize constants 2022-03-09 08:46:41 -05:00
andreas cddf809759 formating and vscode problems 2022-03-05 17:28:04 -05:00
andreas be5858428c start hbc only after we hav a network connection 2022-01-22 08:36:45 -05:00
andreas e911fc4420 formating 2022-01-20 20:14:59 -05:00
andreas 6caf808301 Merge branch 'master' of git.wrede.ca:andreas/heartbeat
sequence
2022-01-17 04:01:00 -05:00
andreas 3c041af5cc subprotocols must be a list, not a str 2022-01-17 04:00:45 -05:00
andreas a38d182189 Merge branch 'master' of git.wrede.ca:andreas/heartbeat
sequence
2022-01-10 15:20:05 -05:00
andreas 4e7fb6237f run_rbc protect agains double execution 2022-01-10 15:16:57 -05:00
andreas 2377b3367a run_rbc protect agains double execution 2022-01-10 15:04:21 -05:00
andreas 112a9f4aac add msg to install script 2021-11-28 12:25:55 -05:00
andreas 98eed4e045 fix signal message handling 2021-10-28 06:28:27 -04:00
andreas a8cb713b57 use local signal-cli 2021-09-17 06:32:53 -04:00
andreas 6ac69ac4ca spelling 2021-06-20 15:42:56 -04:00
andreas b0e93fb295 cleanup SSL handling 2021-06-20 13:40:49 -04:00
andreas 3fc70da932 cleanup SSL handling 2021-06-20 13:15:31 -04:00
andreas e00e0928bb report ws clients 2021-06-19 21:38:56 -04:00
andreas 3e771d7aba also listen on a SSL websocket 2021-06-16 16:41:03 -04:00
andreas d27ad50c0e don't exit when client closes 2021-06-07 13:34:06 -04:00
andreas 8a4042f95f fix requirements 2021-06-07 11:29:39 -04:00
andreas 13b009d6e0 ass ginal as msg carrier 2021-06-07 11:28:35 -04:00
andreas a74e3f6d04 cleanup 2021-06-07 08:47:06 -04:00
andreas edf45c033f typo 2021-05-18 10:58:15 -04:00
andreas 088647c4b4 tell websockets about verdue host 2021-05-17 05:26:51 -04:00
andreas 25c548344b only one event loop 2021-05-16 22:02:54 -04:00
andreas 9a598d1de1 bump version 2021-05-16 10:21:54 -04:00
andreas 6624cc9e23 add websocket server 2021-05-16 10:19:54 -04:00
andreas d952656dc1 enable lint 2021-05-03 17:39:31 -04:00
andreas 0d954937bb 2to3 and black 2021-05-03 17:39:08 -04:00
andreas e9c2ebf60e remove unwanted files 2021-05-03 17:31:15 -04:00
andreas 3252340eb8 re-format with black 2021-05-03 17:26:42 -04:00
andreas 62ef10620f re-format with black 2021-05-03 17:24:04 -04:00
andreas 4d7442d70c re-format with black 2021-05-03 17:21:56 -04:00
andreas aebd1e8b01 add VSCode settings 2021-05-03 17:20:57 -04:00
andreas 1aee4f154f catch exception 2021-05-03 17:17:49 -04:00
andreas 0950513d82 wapanafa to wrede 2021-04-23 13:25:48 -04:00
andreas 4d74d90e43 allow multiple domains 2021-03-07 13:14:36 -05:00
andreas 82660b4c70 allow config of dyndomains 2021-03-07 13:09:31 -05:00
andreas 00f8657e09 revert to python 3.5 2021-02-02 18:43:39 +01:00
andreas 73b65fd7a5 revert to python 3.5 2021-02-02 18:37:23 +01:00
andreas 4424ead81a make dyn domain name variable 2021-02-01 03:44:55 -05:00
andreas 7ef6df05ca decode binary 2020-12-08 17:23:21 -05:00
andreas b530a5d928 Merge branch 'master' of git.wrede.ca:andreas/heartbeat
sequence
2020-05-08 07:38:45 -04:00
andreas 4cadcb4c28 set option before use 2020-05-08 07:38:17 -04:00
andreas 310343d740 change host to wombat 2020-03-29 11:58:55 -04:00
andreas bc55e958b4 report mattermost connection problems 2020-03-20 06:56:59 -04:00
andreas 3e1bafdd8a show watched hosts in bold 2020-03-11 16:08:31 -04:00
andreas a72caf0d7a load modules after config 2020-02-04 18:42:03 -05:00
andreas 328ce83058 allow all pushsrvs, fix boot msg timing 2020-02-04 18:21:59 -05:00