monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feature request and reverse condition


From: cgzones
Subject: Feature request and reverse condition
Date: Wed, 07 Sep 2011 20:09:37 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

Hi list,
I want to act on a specific event very soon, and be sure that the event was not only an exception.
So the only option i found is per "for X cycles", but a cycle can be very long.
My thought is a directive like "with recheck [in X seconds]".
An example (for ssh-service):
if failed host localhost port 22 protocol ssh then restart -> if failed host localhost port 22 protocol ssh with recheck in 3 seconds then restart

If then condition fails one time, he check the comparison in 3 seconds again, and if it fails again the action is done (restart), else only an alert is send or nothing is done.
So with these method i/monit can react quicker than with "if failed host localhost port 22 protocol ssh for 2 cycles then restart", because a cycle takes 20-120 seconds;
and more secure than "if failed host localhost port 22 protocol ssh then restart", because the check failed two times.

Another question:
I want to check my firewall; it should block for example all mysql/smtp-requests from outside.
So with the following lines, monit alert when a connection fails; but i want to get an alert when the connection does not fail.
if failed host localhost port 25 protocol smtp then alert
if failed host localhost port 3306 protocol mysql then alert

Is there an alias-action, like "if failed host localhost port 25 protocol smtp then donothing else if succeeded then alert" or what else can i do?

Best Regards
                   Christian Göttsche


reply via email to

[Prev in Thread] Current Thread [Next in Thread]