A
A
Anatoly602015-08-07 12:05:35
Monit
Anatoly60, 2015-08-07 12:05:35

How to properly set up monitoring with monit?

It is necessary to check the availability of the host, and if it is not available, execute the script once, and then execute the script when it becomes available again.
Current config:

check host localhost with address 127.0.0.1
    if failed 
          port 80 protocol http 
       for 1 times within 1 cycles
       then exec "/var/www/alert.sh"

Calls the script every minute, many times if the host is not available. In addition, there is currently no indication that the host has become available again. How to write such a config on monit?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question