Hello,
a short answer only.

> 1. Run the 5g-check script every cycle
> 4. And then finally, skip the check completely between the hours 23-6

Yes, every cycle, but not between 23:00 - 06:59 o’clock

> 2. If the output doesn't contain "NR5G", run the 5g-reboot script

Yes.

> 3. On the next cycle, if the output still doesn't contain "NR5G", do
> nothing - for the next 60 cycles

No, as long as the output does not contain the string (the content test
match), the command will executed.

> Something is not quite going to plan, as the "5g-reboot" script gets
> triggered repeatedly - instead of waiting for 60 cycles after the check
> fails initially. Does Monit somehow not remember the result of the last
> check, if using "IF CONTENT" maybe?

All counter, states are reset with each reload also.
If the string was found, the script will executed. This is the same
behavior like in "check file", where the test came from.

But, you can use the "if status" test to use the more fancy options
also, as long as the return code of the program contain the proper
result of the test.

A short answer only,
Lutz

Reply via email to