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

learn more… | top users | synonyms

1
vote
1answer
10 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 ...
-1
votes
0answers
12 views

Install and Configure Monit to monitor CPU, RAM and network usage [on hold]

I wanted to monitor the RAM, CPU and network usage for my single server using monit. I wanted a way so that I can view these stats from a remote localhost. If there was excessive load on the server, I ...
0
votes
0answers
5 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 ...
1
vote
0answers
21 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
26 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
37 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 ...
-1
votes
0answers
20 views

Monit $host is always localhost

When I get monit alerts $HOST is always localhost Date: Fri, 27 Feb 2015 11:55:58 Action: restart Host: localhost Description: process is not running In the config I have: # ...
1
vote
0answers
25 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
30 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
86 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
81 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
28 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, ...
1
vote
2answers
101 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
20 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
43 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
50 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
18 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
144 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
23 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
23 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
188 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
20 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
228 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
212 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
20 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
105 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
44 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
38 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
64 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
118 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
31 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 ...
1
vote
2answers
230 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
111 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
113 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
71 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
0answers
355 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 ...
0
votes
1answer
53 views

Monit config restart program

I have monit configuration like this: check process unicorn with pidfile /tmp/pids/unicorn.0.pid start program = "/etc/init.d/unicorn start" stop program = "/etc/init.d/unicorn stop" restart program ...
0
votes
1answer
222 views

Restarting shell script with &disown using Monit

I have a shell script that runs a C++ backend mail system (PluginHandler). I need to monitor this process in Monit and restart it if it fails. The script: export ...
1
vote
1answer
956 views

Cannot read status the monit daemon, even with allowed group

I cannot seem to get monit status or other CLI commands to work. I've built monit v5.8 to run on a Raspberry Pi. I'm able to add services to be monitored, and the web interface can be accessed just ...
1
vote
1answer
435 views

Monit cannot connect to Solr/Jetty instance

I have my Solr/Jetty up and running well on Ubuntu 12.04. I am trying to hookup my monit conf to monitor it, but it is having trouble connecting to the service. I have Solr running on port 8983 and ...
2
votes
1answer
161 views

How to make Monit “check process” conditional?

I have a monit script that does something like this: check process sidekiq_1 with pidfile /tmp/pids/sidekiq_1.pid start program = "/bin/bash -l -c 'bundle exec sidekiq start" as uid jim and gid jim ...
6
votes
3answers
747 views

Monit failing to connect to Dovecot over SSL IMAP

I run Monit to keep check on processes on a Debian server. It's working as normal for all other services (Apache SSL, Postfix, SSH etc.) but Monit's checks on Dovecot are failing repeatedly. I think ...
2
votes
1answer
854 views

Bash script match grep output and send message

I am developing a script for monit status checking so I can send OK status messages to NagiOS NSCA server (passive checks). The problem I am having is that my bash script still sends messages if the ...
1
vote
1answer
330 views

Monit and multiple actions: chaining commands in Monit restart command?

After some researches, it occurs that even if I can find some talks about multiple actions when restarting a service, it also seems it it not really possible to achieve : if failed port 80 and ...
5
votes
1answer
936 views

What are the advantages of using a process manager inside a Docker container?

As mentioned by Jerome, You also need to add a process manager; for instance Monit or Supervisor. This is because Docker will watch one single process. If you need multiple processes, you need to ...
3
votes
1answer
283 views

Upstart: Why two processes when running as a different user?

I want to keep a nodejs app running, so I followed this: http://howtonode.org/deploying-node-upstart-monit and installed Monit and Upstart which have been working perfectly for a couple of months. I ...
1
vote
2answers
553 views

using monit to kill the right process withown knowing it's PID

I am trying to use monit to find surefire processes running too long and kill them. The machine is running parallel builds so it is possible to have several surefire processes runnig at the same time ...
1
vote
1answer
1k views

Monit configuration reload - supposed to restart monitored services?

Running Monit 5.4 on an Ubuntu server. When I use monit reload, it seems that it restarts monitored services (Tomcat 7 in this situation). Is it the expected behavior? Documentation says : reload ...
1
vote
2answers
575 views

Monit monitor http status with 404 page

I am trying to monitor HTTP status with 404 or 403 page. As you all know Monit takes those pages as failed connection, but how could I change that. I just want to monitor that it shows the 404 or 403 ...
0
votes
2answers
415 views

Monit issues with mysql Ubuntu server 12.04

I've installed Monit on Ubuntu server 12.04 but Im having issues getting mysql monitoring to work at all. Here is what I have done so far. #/etc/default/monit startup=1 #/etc/mysql/my.cnf pid-file ...