Port Timeout times make no sense

Issue #115 resolved
J created an issue

The port timeout numbers I'm seeing make no sense to me.

From the monit 5.10 web GUI:

Port If failed [10.1.2.104:3156/status.status56 [HTTP via TCP] with timeout 20000 seconds] for 5 cycles then restart Port If failed [10.1.2.104:3056 [DEFAULT via TCP] with timeout 5000 seconds] then restart

The process description:

check process php-fpm-php5.6 with pidfile /var/run/php-fpm-php5.6.pid stop program = "/sbin/service php-fpm-php5.6 stop" start program = "/sbin/service php-fpm-php5.6 start" if failed host 10.1.2.104 port 3056 type TCP then restart if failed host 10.1.2.104 port 3156 protocol http and request '/ping.status56' with timeout 20 seconds for 5 cycles then restart

Is there a divide by 1000 error in the Port Timeout logic?

Comments (5)

  1. Val V

    Hello,

    is it included with 5.11? because it still doesn't make any sense (though cli now reports correct values of seconds -- in comparison with 5.10).

    I'm trying to set up the following:

    check host a with address b.tld
        if failed ping count 5 with timeout 10 seconds
            then alert
    

    and it doesn't work, but once I remove extra attributes:

    check host a with address b.tld
        if failed ping
            then alert
    

    it starts to work, AND syslog shows the following insane values:

    Jan 05 22:55:38 [monit] Ping response for b.tld 1/3 timed out -- no response within 5000 seconds_
    Jan 05 22:55:48 [monit] Ping response for b.tld 2/3 timed out -- no response within 5000 seconds_
    Jan 05 22:55:58 [monit] Ping response for b.tld 3/3 timed out -- no response within 5000 seconds_
    Jan 05 22:55:58 [monit] 'a' ping test failed_
    

    but monit -t -c ... -v reports normal values of seconds for timeout in both cases:

    • Ping = if failed [count 3 with timeout 5 seconds] then alert -- default value
    • Ping = if failed [count 5 with timeout 10 seconds] then alert
  2. Log in to comment