monit is a free, open source process supervision tool for Unix and Linux.

learn more… | top users | synonyms

2
votes
0answers
16 views

Varnish failing intermittently for no obvious reason

For the last few years we have been running Varnish as a cache and load balancer in front of several apache servers serving several thousand websites. We also use monit to ensure that if varnish ...
0
votes
0answers
18 views

monit file content check if not match

I have monit set up as follows: check file log with PATH /var/log/nginx/access.log if NOT match "HTTP/[0-9.]{3} 200.*" then alert I need it to send an alert when the log brings up any ...
3
votes
1answer
17 views

Monit use alert along with exec

I have rule like this: if memory usage > 85% for 10 cycles then alert I want to notify not only via email but also via slack. So I can add second line like this: if memory usage > 85% for 10 ...
0
votes
1answer
36 views

monit: how do I restart many Tomcats without overloading the server?

My server has several separate Apache Tomcat instances that each take a lot of time and CPU to start. It is not possible to start all of them at the same time. This would generate too much I/O, each ...
0
votes
1answer
41 views

Monit can't restart nginx

I've got monit up and running on an Ubuntu 12.04 server, to monitor nginx, but I can't get it to successfully start nginx up again. My setup is thus: the monit config file is: -rwx------ 1 root root ...
0
votes
1answer
49 views

using monit to stop or start a service

I would like to use monit to monitor my DNS server. if BIND failed it should stop OSPFD. i tried this but I get an error; > check process named with pidfile /var/run/named/named.pid start > ...
0
votes
0answers
17 views

monit exec file and match result

Is there a way to get monit to run a python script and check the result? I was thinking something like this but it doesnt execute, only reads the file check file app1-check with path ...
0
votes
0answers
14 views

monit mysql not monitored centos

I've been successfully using Monit for several months now and MySQL is one of the services that I've been monitoring without issue. My Monit config is all still in place: Check MySQL check ...
0
votes
1answer
97 views

Monit unable to restart php5-fpm

Monit is correctly detecting that php5-fpm is unavailable as seen in the logs. However, it does not seem to be able to restart the service. log: [EDT Jun 11 18:04:20] error : 'php5-fpm' failed, ...
0
votes
0answers
43 views

setup monit and mmonit

I have installed monit and mmonit on two different machines. I have made below changes to /etc/monit.conf file: set eventqueue basedir /var/monit/ slots 1000 set mmonit ...
0
votes
1answer
46 views

How to monitor the postfix mail queue using monit?

Is there a way to monitor the postfix mail queue using monit? the available scripts just check, up/down/memory or CPU. I would like notices when the queue starts filling up. it would be nice to be ...
0
votes
1answer
54 views

Monit “method not defined”

I'm currently trying to use monit to purge my /var/log partition from specific files whenever the partition runs out of free disk space. I created a file named toto and tried this test after reading ...
1
vote
0answers
29 views

Monit Alert with Multiple URLs

I've got a monit setup to http check several subdomains of an http server. Currently, they are multiple check host statements that look like this: CHECK HOST a.example.com with address 1.2.3.4 if ...
1
vote
1answer
86 views

How can I restart “monit” when it stops or crashes?

I am setting up a server and have just installed "monit" to monitor processes and restart them (and alert me) when certain conditions are met. It works great. My question is what happens when monit ...
1
vote
0answers
63 views

How to configure Monit for use with Puma Ruby Web Server?

I am getting started with Monit and don't have a lot of systems knowledge. I have a Ruby app running on Puma. I want to use Monit to automatically restart Puma if it ever dies. I'm currently using the ...
1
vote
1answer
70 views

Secure Monit 5.6 httpd on Ubuntu Trusty

I'm trying to securely install the monit on Ubuntu 14.04 Trusty. The default packaged version is 5.6. From what I can see, monit is basically unusable without the httpd service enabled (ie you can't ...
1
vote
1answer
31 views

How to restart and alert if condition matches in Monit?

How can I do multiple things when condition is matched? For example if I want to restart a process and also send alert email. I know I can do it with two separate lines, but can I combine them? if ...
0
votes
0answers
13 views

monit daemon not triggered at startup

I am using Debian and would like to trigger monit at startup. As such monit is working perfectly fine if i start manually from sudo monit. However for some reason it doesnt trigger at startup. Tried ...
2
votes
0answers
182 views

How to make Monit “check process” conditional inside docker based on docker run args?

I would like to make Monit's "check process" work conditionally based on an env variable. Here's the pseudo-code of what I would like to achieve(not a valid monit config syntax): [ -n "$run_foo" ] ...
3
votes
1answer
88 views

Monit - How to add a delay between stop and start

I would like to know whether it is possible to add a delay between stop/start methods. This is mainly because it requires at least 10 secs delay to close all open socket connections and close the ...
3
votes
1answer
95 views

How to configure Monit to alert me when anything appears in syslog

I want Monit to alert me if ANYTHING shows up in syslog - as anything in there would be abnormal. I've tried the following and I'm not receiving any alert emails when I manually add something to ...
2
votes
0answers
78 views

mysql service status doesn't show started when it is started by monit

I installed monit on my Ubuntu 14.04 server and configured it to monitor mysql with the below config in monitrc. check process mysqld with pidfile /var/run/mysqld/mysqld.pid start program = ...
0
votes
1answer
60 views

Monit - send alert if mailserver down

Is there a way to make monit alert other than by mail: Sometimes the mailservers are down. How would I get a message about it? My idea was to make monit pass an http request to a defined service, is ...
1
vote
1answer
391 views

Execute custom monit script upon failure to restart the process [duplicate]

I have a case where empty PID files are being generated by certain processes which are monitored by monit. Monit is NOT so good in handling empty files and tries to re-start the process even when the ...
1
vote
1answer
275 views

Awaken monit daemon every few hours for all monitored processes

I am seeing a problem with monit config in configuring the monit daemon to awaken every few hours and start monitoring the processes which were set to "Not Monitored" state. PROBLEM: When the monit ...
0
votes
0answers
76 views

Monit : How to get email alerts for “check program” tests

I'm having a bit of trouble configuring a test with Monit. I have M/Monit (3.2.2) configured and 5 Monit agents (5.11) running on Ubuntu server 14.04. I already have several tests (hdd, ram, cpu, ...
2
votes
2answers
641 views

How to watch a service with multiple processes with Monit?

I'm trying to watch the mailing list manager sympa with monit. A running sympa instance consists of multiple processes for the different tasks of list management (e.g. a separate process for archiving ...
0
votes
0answers
78 views

Checking if a TCP port is closed with monit

I would like to check that a defined port on a host is closed, for example the 8080 port on host www.example.com. I tried something like: check host www.example.com with address www.example.com ...
-1
votes
1answer
86 views

Monitoring MySQL – “Execution failed”

Got some trouble with a VPS where MySQL dies on me from time to time. As a temporarily fix I've installed Monit to make sure that the process is restarted when it dies. I checked the site today and it ...
1
vote
0answers
87 views

why basic auth loops when using nginx and monit

I was trying to configure nginx so that http://example.com/monit will access http://127.0.0.1:2812, which is the url monit is listening. Two authentication was set, via nginx(nginx.conf file) and ...
-1
votes
1answer
30 views

how to get top utilization process by mail using monit

I would like to configure monit tool If CPU usage > 10% then send top utilization process list by mail. how to configure with monitrc file. check process all_process if cpu usage > 10% then ...
2
votes
1answer
524 views

Monit: How to optimally monitor an URL

My webserver runs nginx with php5-fpm. If some trouble occurs, usually php5-fpm hung up, resulting in a "bad gateway" server error. Of course, I never know, if nginx may crash as well, some day. When ...
1
vote
0answers
35 views

How to get monit to only alert once when a check fails, not when it comes back successful?

Apologies if this is the same question as How to suppress monit alert if restart successful?, but it appears like it might be different, so I'm asking again.. We want to have a monit alert check when ...
0
votes
0answers
61 views

Using Monit to reload (without changing PID)

I'm able to start and stop a process configured with monit (through Upstart) with no issue. However, restarts/reloads of this process should be gentle, with no downtime/PID changes. The process ...
0
votes
1answer
538 views

Configure Monit to monitor PHP5-FPM on Ubuntu/Nginx setup

System: LEMP running on Ubuntu 14.04 I'm trying to configure the tool Monit to restart Nginx or PHP-FPM if ever there is a problem. It is correctly monitoring Nginx however under status for PHP-FPM ...
0
votes
0answers
42 views

Monit event on process recovery

Anybody knows how to do an event a single time when a process is recovered? check process apache with pidfile /var/run/apache2.pid group www-data start program = "/etc/init.d/apache start" stop ...
0
votes
0answers
503 views

Make Monit check OpenVPN client connection status

We're running a multi-site business, each site connected to a central OpenVPN server to provide access to internal systems. I'm currently using Monit to check if OpenVPN client is running and if the ...
0
votes
1answer
686 views

Monit failed to start shell script

So I am having a problem with monit starting a process this is my code: check process program_1 matching "program_1" start program = "/home/user1/files/start.sh" stop program = ...
0
votes
0answers
39 views

Monitor link status with monit

Does anybody know a good way to monitor an ethernet link status (packet losss, connection loss) with monit? The default config file only provides 1 example for network monitoring (through pings and ...
3
votes
1answer
254 views

Monit ignores memory usage threshold config

I installed Monit 5.6 from Ubuntu repositories to alert me about unusually high memory and CPU usages on my VPS. It turned out that 75% memory usage is rather usual for my setup, so I changed the line ...
2
votes
2answers
114 views

Monit reports “failed to stop” before timeout

I am starting and stopping a process via monit with the following syntax: stop program = "..." with timeout 90 seconds Everything works well, except that Monit always reports failed to stop after ...
1
vote
0answers
53 views

monit: how send email like alert

I'd like customize alert message add the option if cpu > 75% for 2 cycles then exec "command|mail -s subject test@example.com" to monitrc config file how can I add that command? check ...
1
vote
1answer
89 views

Monitor a process using monit in ubuntu

On my server I have started a service using a script created by myself. I want to monitor that process using monit. I didn't see any .pid file for that process in the /var/run directory. How can I ...
1
vote
1answer
195 views

How do I check file count inside a directory with monit?

I have a directory on my server and I want to monitor the number of files inside this directory with Monit... How can I do this? Thanks.
0
votes
0answers
33 views

High cpu usage of Play server when started by monit

When I run "play start" from command line, the CPU load is very light. But when monit starts the program (as the same user), then the CPU usage tends to 100 - 130% all the time! Here is the content ...
2
votes
1answer
613 views

How can I configure monit to only alert rather than restart?

I'm looking for a way to have monit only send out an alert when a particular process goes down. For example: check process apache with pidfile /var/run/httpd.pid group www start program = ...
0
votes
2answers
306 views

Monit cannot restart apache

I have got monit installed on a lot of our VMs. It all works fine except for this one VM. Monit is set to monitor apache and check if it is down. For some reason, monit is saying that apache is down ...
0
votes
1answer
221 views

Monit on EC2 - Monit works but it doesn't monitor any service

I have a ubuntu 14.04 instance on amazon, I've installed monit with some simple configuration files but it seems like it doesn't monitor them. I have installed monit a couple of times in other servers ...
0
votes
0answers
97 views

Monit: How to check a program executed by a specific user?

I have been using monit/mmonit to monitor my system. One if its features is the check program syntax, which runs a program and validates its return value: # Asserts that there are more than 40 users ...
1
vote
1answer
791 views

monit does not run script after “if does not exist” check

I'm having trouble with monit. I have setup monitoring with monit. However, I'm having trouble with a check for the process running. If the process is not running, i want to run an specific script ...