Questions tagged [monit]

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

Filter by
Sorted by
Tagged with
44 votes
5 answers
56k views

monit: check process without pidfile

I'm looking for a way to kill all processes with a given name that have been running for more than X amount of time. I spawn many instances of this particular executable, and sometimes it goes into a ...
Parand's user avatar
  • 748
14 votes
5 answers
5k views

What is the best way to monitor a production server?

We are running two production servers with Apache 2 and MySQL. I am looking for a reliable way of monitoring our load, stability and uptime. I have come across monit, but are there better ...
user avatar
3 votes
2 answers
4k views

Suppress Monit message 'Monit instance changed' on stop/start

I have monit installed on some user laptops/desktop so it can make sure a couple processes are always running/get restarted as needed. But since the devices are regularly shutdown/restarted I ...
Zoredache's user avatar
  • 132k
1 vote
1 answer
3k 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 ...
gowin09's user avatar
  • 21
33 votes
4 answers
28k views

How i configure monit to start a process with a specific user?

Monit runs with root, but i don't want to start my processes as root.. like mysql, mongrel, apache..
Guilherme's user avatar
  • 761
23 votes
5 answers
24k views

Make monit wait longer before thinking something is dead

I'm trying to start a program (Resque) but it takes a bit of time before a pidfile is written. Thus, I think that Monit thinks the program hasn't started and starts one or two more programs before ...
Ramon Tayag's user avatar
19 votes
2 answers
111k views

How to find the .pid file for a given process

I'm setting up monit and want to monitor a given python application. Monit does this by looking at the .pid files for processes, but I don't know where this would be. I also tried creating my own ...
Yarin's user avatar
  • 1,366
11 votes
4 answers
10k views

How to disable Monit instance start/stop alerts?

Monit sends an alert every time the monit daemon is stopped or started. This is obnoxious and not useful information. According to the docs, I set: set alert [email protected] but not on { ...
Winfield's user avatar
  • 266
8 votes
1 answer
20k views

monit: can't connect to the http interface

I'm setting up monit on a new site, which I'll refer to as mywebsite.com during this question. I've set up the config to access monit's web interface page, but I can't connect to it. I've got a ...
Max Williams's user avatar
6 votes
1 answer
12k views

How can I automatically restart my Docker containers with container auto-delete?

I have a general purpose VPS, and am Dockerising the apps on it. There will be around 5-6 containers on it, and very little else, so the box can be trivially rebuilt as required. For each app I have ...
halfer's user avatar
  • 181
5 votes
2 answers
16k views

How to check the result of a script with monit?

Is there a way to check the result of a script with monit? For example a script returns 0 means ok, but 1 means failed. The idea is to call the script from monit on the local machine directly and ...
user12096's user avatar
  • 937
4 votes
1 answer
4k views

I need to monitor a log file with monit if the file does not change monit will alert

I need help. I was looking in to Monit documentation and I need help. I could not find my answer there. I need to monitor a log file of a service, if that log file stops to increase in size or even ...
cr0c's user avatar
  • 988
4 votes
1 answer
3k views

How to suppress monit alert if restart successful?

We only want to be alerted if the service fails to restart. Is this possible? That is if, on the first check the service is down then restart it and don't bother to send us an alert; but if the ...
John Mee's user avatar
  • 2,678
4 votes
3 answers
2k views

Using monit for a process that doesn't background/run as a daemon

I"m using montit for other processes I need to run, but I have a process which doesn't run as a daemon, and I can't figure out how to monitor it with monit
aussiegeek's user avatar
4 votes
2 answers
6k views

Repeat monit alerts

How can I have monit continue to alert me on an interval until the condition has been fixed? Here's an example config: check filesystem datafs with path /dev/sda1 if space usage > 80% for 5 times ...
John Bachir's user avatar
  • 2,364
3 votes
2 answers
2k views

allow a user to run specific monit action

I have installed monit for many applications with the root user. One of the applications is started with a non-root user account. Unfortunately, when I update my app, I also need to restart it. My ...
Raphael's user avatar
  • 69
2 votes
2 answers
1k views

no httpd connection for monit started from systemd

When starting monit my logs show that [CET Oct 31 19:43:34] info : Starting Monit 5.16 daemon [CET Oct 31 19:43:34] error : monit: monit httpd not started since no connect allowed [CET Oct 31 ...
WoJ's user avatar
  • 3,657
2 votes
2 answers
4k views

how to monitor select processes on centos 5.x host?

I would like to monitor a select group of processes, vmware vm's, running on my centos 6 host. "top" gives me most of what I want in that I can use -p to specify only those processes and -c to get ...
bo gusman's user avatar
2 votes
1 answer
2k views

Sending mails with monit over Google Apps mailserver

I am trying to send notification mails using monit v5.1. I am using Google Apps as a mailserver, so I wanted to use their infrastructure for outgoing mails. I have entered the following information ...
j0nes's user avatar
  • 955
2 votes
2 answers
995 views

Why Monit does not work with my MySQL configuration file?

I'm using a custom configuration file for mysql in /etc/mysql/conf.d/myfile.cnf The contents of the file [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket ...
Max121's user avatar
  • 353
1 vote
3 answers
2k views

mailserver for google apps email

My domain is using google apps email for its email hosting. I was wondering if there was some way to connect to google email from my unix server so that I can send mail through that google apps ...
Michael Shnitzer's user avatar
1 vote
1 answer
208 views

Is there an easy way to do monit start <name>, only if its not running?

I know you can do monit start <name> to start an individual process (eg if I had taken it down temporarily using monit stop <name>), but is there any easy way to tell it to only start the ...
Mohamed Hafez's user avatar
0 votes
1 answer
895 views

using monit to monitor processes

i am trying to figure out how to use monit to get a notification when one of my processes starts to run once again. let me be clear- at first the process is running, stops to run and then runs again. ...
vivi's user avatar
  • 1
0 votes
2 answers
6k views

Monit: use content MATCH on “check file …” if match “xxx”

I've asked this question around a week a go at StackOverflow but no answer just yet, probably is no possible but don't know where to look for that answer, I hope someone can help over here. I'm using ...
Larry's user avatar
  • 23