The configuration requires different operator:
if failed port 8081 protocol http and responsetime < 1 ms then alert
Similarly to the other statement, the "if failed" rule defines the normal
state, that triggers the error if the expression is not true.
Best regards,
The M/Monit team
> On 3. 5. 2022, at 22:13, Lutz Mader <[email protected]> wrote:
>
> Hello M/Monit Support,
> nice to see, but the messages does not fit well, I think.
>
> For my definition
> check host Localhost with address 192.168.1.4
> if failed port 8081 protocol http and responsetime > 1 ms then alert
>
> I got the following
> [2022-05-03T21:49:03+0200] debug : 'Localhost' succeeded testing
> protocol [HTTP] at [192.168.1.4]:8081 [TCP/IP] [response time 0.908 ms]
> [2022-05-03T21:49:03+0200] debug : 'Localhost' connection succeeded
> to [192.168.1.4]:8081 [TCP/IP]
> [2022-05-03T21:49:03+0200] error : 'Localhost' response time 0.908 ms
> exceeded the limit [time > 1 ms]
>
> The messages "response time 0.908 ms exceeded the limit" does not fit,
> the response time does not exceeded the limit.
>
> For the following
> check host Localhost with address 192.168.1.4
> if failed port 8081 protocol http and responsetime < 1 ms then alert
>
> The messages fit better
> [2022-05-03T21:55:58+0200] debug : 'Localhost' succeeded testing
> protocol [HTTP] at [192.168.1.4]:8081 [TCP/IP] [response time 0.877 ms]
> [2022-05-03T21:55:58+0200] debug : 'Localhost' connection succeeded
> to [192.168.1.4]:8081 [TCP/IP]
> [2022-05-03T21:55:58+0200] debug : 'Localhost' response time 0.877 ms
> succeeded [time < 1 ms]
> :
> [2022-05-03T21:56:28+0200] debug : 'Localhost' succeeded testing
> protocol [HTTP] at [192.168.1.4]:8081 [TCP/IP] [response time 1.099 ms]
> [2022-05-03T21:56:28+0200] debug : 'Localhost' connection succeeded
> to [192.168.1.4]:8081 [TCP/IP]
> [2022-05-03T21:56:28+0200] error : 'Localhost' response time 1.099 ms
> exceeded the limit [time < 1 ms]
>
> This is true, the limit was exceeded.
>
> Nice to see, someone add the responsetime option.
>
>> Fixed (will be part of next release)
>>
>> Best regards,
>> The M/Monit team
>
> With regards,
> a comment only,
> Lutz