Add per-rule custom plugin intervals

Group rules by their effective invoke interval.
Use the global interval when a rule omits its interval.
Reject non-positive invoke intervals before scheduler startup.
Test grouped cadence, concurrency, and shutdown behavior.
This commit is contained in:
Veer Singh
2026-07-20 13:55:00 -07:00
parent 059959141d
commit 25105fd576
6 changed files with 910 additions and 31 deletions
+15
View File
@@ -11,6 +11,20 @@
* `enable_message_change_based_condition_update`: Flag controls whether message change should result in a condition update.
* `skip_initial_status`: Flag controls whether condition will be emitted during plugin initialization.
### Rule Config
* `timeout`: The JSON string sets the execution timeout for one rule.
* `invoke_interval`: The JSON string sets the invoke interval for one rule. The rule uses the global `invoke_interval` when this field is absent.
For example, this rule runs every seven seconds:
```
{
"path": "./config/plugin/check_ntp.sh",
"invoke_interval": "7s"
}
```
### Annotated Plugin Configuration Example
```
@@ -41,6 +55,7 @@
"reason": "NTPIsDown", // This is the reason shown for this event
// and the message shown comes from stdout.
"path": "./config/plugin/check_ntp.sh",
"invoke_interval": "7s",
"timeout": "3s"
},
{