Check host additional parameter "for X cycles"

Issue #236 closed
Alexander Kanogin created an issue

I use monit version 5.14:

root@host1:~# monit -V
This is Monit version 5.14
Copyright (C) 2001-2015 Tildeslash Ltd. All Rights Reserved.

The logs in "Bad configuration" get strange messages:

Aug 16 06:07:56 host1 monit[10118]: Ping response for 1.1.1.137 1/5 failed -- received 28 bytes, expected at least 48 bytes
Aug 16 06:07:56 host1 monit[10118]: Ping response for 1.1.1.137 2/5 failed -- received 28 bytes, expected at least 48 bytes
Aug 16 06:07:56 host1 monit[10118]: Ping response for 1.1.1.137 3/5 failed -- received 28 bytes, expected at least 48 bytes
Aug 16 06:07:56 host1 monit[10118]: Ping response for 1.1.1.137 4/5 failed -- received 28 bytes, expected at least 48 bytes
Aug 16 06:07:56 host1 monit[10118]: Ping response for 1.1.1.137 5/5 failed -- received 28 bytes, expected at least 48 bytes

Bad configuration:

set daemon 30
    with start delay 180
check host host1-1.1.1.137
    with address 1.1.1.137
    if failed icmp type echo count 5 with timeout 10 seconds for 4 cycles then alert

Good configuration:

set daemon 30
    with start delay 180
check host host1-1.1.1.137
    with address 1.1.1.137
    if failed icmp type echo count 5 with timeout 10 seconds then alert

Comments (4)

  1. Tildeslash repo owner

    The "for X cycles" option shouldn't make difference - it just requires X consecutive errors before the event is triggered. The error message shows, that the response received from the server wasn't an ICMP echo response ... monit check that the packet is at least large enough to hold ip/icmp headers - in this case the response was too small. When you removed the "for X cycles" option, it was just coincidence that the server started responding with correct ping response.

    If the problem will persist, please get a network trace of the ICMP communication between monit and the ping target and send it to us.

  2. Log in to comment