upgrade from monit 5.14 to monit 5.25

Issue #750 invalid
Apurav Gupta created an issue

Hi, We have the following syntax which is working for us in monit 5.14:

check host <host-name> with address <host-address> every 1 cycle
    if failed port 443 protocol https request /red-compass/v1/up status = 200 for 2 cycles then alert

but the same is not working in monit 5.25, we are seeing the following error message:

/etc/monit.d/urls.conf:4: Error: an EVERY statement must have a value greater than 1 '1'
/etc/monit.d/urls.conf:5: Error: syntax error 'https'

Could you please help us with this. We have monit installed on an EC2-instance running Red Hat

Comments (5)

  1. Apurav Gupta reporter

    My apologies, on further invetigation I found out the monit version I was using was 5.2.5 and not 5.25 which might be the cause of this issue.

  2. Tildeslash repo owner

    I'm unable to reproduce the problem ... monit doesn't check the "every" statement value - just the "cycles" count.

    Using following test configuration:

    set daemon 5
    
    set httpd port 2812 address localhost allow localhost
    
    check system $HOST
            every 1 cycle
    
    check host test with address google.com every 1 cycle
        if failed port 443 protocol https for 2 cycles then alert
    

    Is it official monit release or patched by some 3rd party?

    Note that "every 1 cycle" doesn't make sense anyway - if it is omitted, monit will check the service every single cycle => to solve the problem you can drop the "every 1 cycle" statement.

  3. Log in to comment