check network response times

Issue #718 resolved
Ulrich Windl created an issue

Currently the result of network PING is binary: Either the host responded within timeout, or not. However monit has the response time in the status display already, so why not allow querying the response time value? For example one might trigger a warning if PING response times are significantly higher than average. Similar could apply to any network connectivity test.

Comments (7)

  1. Schlumie

    Need this feature too. Have a backupline with much higher pingtimes. So I could check if backupline is used, or other problems exists.... Looking forward for implementation....

  2. Tildeslash repo owner

    Fix Issue #718: Add support for response time monitoring to TCP/UDP ports, unix sockets and ping. Example for ping and port test: if failed ping responsetime < 50 ms then alert if failed port 443 protocol https and responsetime < 50 ms then alert

    → <<cset 38530e481d80>>

  3. Jerry


    Sorry to dig up an old issue, but I’m struggling to find documentation on this responsetime parameter. If i try your example it fails to validate:

    check host google-ping address
    if failed ping responsetime < 50 ms then alert

    Sep 15 14:23:21 cas monit[2171422]: /etc/monit/conf-enabled/host-connectivity-checks:12: syntax error 'responsetime'

    What am I doing wrong ?

  4. Ulrich Windl reporter

    Jerry and Lutz: In 5.29 the documented syntax (as part of a host check) has no “<“:


  5. Lutz Mader

    Thanks Ulrich,
    you are right, the “<“ is used implicitly.

    if failed host port 1234 responsetime 50 ms then alert

    And a host test work, but the ping test does not, based on 5.29.0 and 5.32.0.

    check host google-ping address
    if failed ping responsetime 10 ms then alert
    monit -t
    /usr/local/etc/monit/config/t.cfg:2: syntax error 'responsetime'

    Have a nice weekend,

    The ping test became available in a future release, see commit tildeslash / Monit / commit / f3ef8cf6c303 — Bitbucket

    The commit fixed the missing responsetime support and “Add support for the "responsetime" option to the ping test.“.

  6. Ulrich Windl reporter

    I confirm it: While the manual page lists the syntax, it does not seem to be implemented: I see the lexer knows “responsetime”, and validate.c uses icmp->responsetime.limit, but still there’s a syntax error.

  7. Log in to comment