Questions tagged [monit]
monit is a free, open source process supervision tool for Unix and Linux.
397
questions
44
votes
5
answers
57k
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 ...
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..
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 ...
21
votes
2
answers
20k
views
Sending a test/example alert from monit?
I've configured monit tests and alerts — but I want to make sure that everything in my alert stack (outgoing email servers, sms email gateways…) is functioning properly. Is there a handy way to fire ...
19
votes
1
answer
16k
views
Monit versus Nagios
Does nagios offer any additional functionality when compared to monit?
This answer states that monit is a clumsy tool for situational awareness, which is the reason I'm asking the question.
19
votes
2
answers
112k
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 ...
15
votes
1
answer
23k
views
how to set up monit to monitor disk-space
I use monit on my server to monitor apache and mysql running.
Now I want to add an alert if the disk gets too full. I added this for testing in /etc/monit/monitrc:
check device rootfs with path /dev/...
15
votes
2
answers
8k
views
Disable Monit alerts when PID changed
When you monitor a process with Monit by its pid, like :
check process blop with pidfile /.../blop.pid
start program = "..."
stop program = "..."
you get an alert when the pidfile is ...
14
votes
2
answers
12k
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 ...
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 ...
12
votes
6
answers
38k
views
Simple way of restarting crashed processes?
I need to monitor several processes running on my webserver. For some reason, varnish currently crashes once every day or two. I'm using monit to supposedly restart varnish automatically, but it doesn'...
12
votes
1
answer
25k
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 - ...
12
votes
1
answer
20k
views
Free alternatives to M/Monit interface for the Monit systems management system [closed]
I really like Monit systems management system but I have no IT
budget to purchase M/Monit interface which is used to manage multiple
hosts for our small university lab. I have checked out Ruby based
...
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 { ...
11
votes
4
answers
28k
views
monit send email does not work
I am trying to use monit, and set up email server using gmail.
The configuration file is like this:
set mailserver smtp.gmail.com port 587
username "[email protected]" password "password"
using ...
11
votes
2
answers
12k
views
Monit lists Apache as Not Monitored
I've just installed and configured monit according to the monit documentation. All services apart from Apache are listed as Running, but Apache says Not Monitored.
The relevant lines in monit's ...
10
votes
1
answer
2k
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 ...
9
votes
4
answers
7k
views
Can Monit be configured to never unmonitor/timeout a service?
Monit seems to give up restarting a service if it fails a few times, and unmonitors it. I can’t find anything in the documentation about the specifics of when or why.
My Monit config would be setup ...
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 ...
8
votes
2
answers
5k
views
Monit connection test frequency
I want to have Monit check a web application's health, running a cheap/trivial check frequently and an expensive/nontrivial check less frequently (e.g. 1/5 minutes). How can I tell it to check a given ...
8
votes
2
answers
2k
views
What's the point of using runit in combination with monit?
I see a lot of people using monit in combination with runit. Isn't that redundant? What is the point of using runit as well? Is it because it's more reliable when dealing with services (as it doesn't ...
7
votes
7
answers
28k
views
after installing monit when i do monit status myproc i get "error connecting to the monit daemon"
after installing monit when i do monit status myproc i get "error connecting to the monit daemon"
I read somewhere that
The status command won't work in the
case that monit is running indaemon
...
7
votes
1
answer
17k
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 ...
7
votes
3
answers
3k
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 ...
7
votes
1
answer
3k
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 ...
7
votes
3
answers
3k
views
What does monit consider to be memory usage?
Once can have monit monitor memory usage…
check system foo
if memory usage > 95% then alert
Does it use free RAM, or free -/+ buffers/cache? (or something else?)
# free -m
total ...
7
votes
1
answer
3k
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 ...
7
votes
1
answer
2k
views
How to monitor passenger with monit
I want to set up monit to monitor passenger but everything I've found so far has basically said just monitor your website using monit. If possible I'd like to monitor passenger directly so I have more ...
7
votes
3
answers
3k
views
Configuring Monit to Send Mail through Office365
I'm trying to configure monit to send emails through Office365. Here's the relevant configuration:
set mailserver smtp.office365.com port 587
username "username" password "password"
using ...
6
votes
3
answers
6k
views
vsftpd does not create pid file required for monit
I want to monitor vsftpd server from monit on CentOS 5.4 but somehow vsftpd does not create pid file in /var/run (nor in any other place).
Is this behavior normal for this distro?
How should I ...
6
votes
1
answer
5k
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 = "/...
6
votes
1
answer
10k
views
How do I get monit to do multiple actions when a monitored process has failed?
I have a custom service that I want to monitor with monit. When the process fails I want to copy the log to a shared file system and restart the service. Something like the following but I am not ...
6
votes
4
answers
3k
views
Monit can't detect MySQL, but I can
Monit is configured to watch MySQL on localhost at port 3306.
check process mysqld with pidfile /var/lib/mysql/li175-241.pid
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/...
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 ...
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 ...
5
votes
1
answer
11k
views
Monit won't start: "Cannot translate '<hostname>' to FQDN name -- nodename nor servname provided"
I installed monit-5.3.2 on OS X 10.7 but haven't been able to get it running.
When I run sudo monit -t I get:
monit: Cannot translate 'hakan' to FQDN name -- nodename nor servname provided, or not ...
5
votes
3
answers
3k
views
What exactly does M/monit mean?
what exactly does M/monit mean?
5
votes
6
answers
6k
views
monitoring nfs with monit
I'd like to monitor NFS mounts and the NFS server process using Monit.
On the server, I'd need a PID file, but I can't seem to find a way of getting that created with existing configuration files. ...
5
votes
2
answers
3k
views
Monit — Daemonize non-daemon process?
I have a ruby process that don't run as a daemon (it runs in the foreground), but can generate a pid file. My question is does Monit always expects to monitor background/daemonized processes?
I used ...
5
votes
2
answers
4k
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 ...
5
votes
1
answer
2k
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 ...
4
votes
3
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 ...
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 ...
4
votes
2
answers
9k
views
Monit http-based API
I'm just wondering whether monit has an API, which we could poll-regularly (perhaps something that is http-based) ?
It would be very useful to create an integrated monitoring solution across multiple ...
4
votes
2
answers
2k
views
monit, let's encrypt, and file permissions
I decided to put monit on my vps running centos 7.
I've already got let's encrypt on the server and the certs are installed. I wanted to point monit at the fullchain.pem or the cert.pem, but I get ...
4
votes
1
answer
2k
views
Taking two actions in monit
My monit script works to detect an outage with a process and inform me when the rule is:
IF DOES NOT EXIST THEN ALERT
My monit script works to detect an outage and automatically fix it when the ...
4
votes
2
answers
2k
views
Monit 5.5 binding to localhost only, but should be on all
Using Centos 6.4, using a yum installed Monit 5.5.
I have 2 servers with monit installed - same version, same config - but one binds on all addresses and the other only binds on the localhost.
...
4
votes
2
answers
1k
views
Use monit to monitor apache2 subprocesses
I am currently using Monit to monitor Apache and restart it if its memory usage is too high. However, I'd also like to be able to monitor the individual apache2 subprocesses that are spawned, and ...
4
votes
1
answer
4k
views
Monit: Customize alert message to include command output
I would like to customize the Monit's alert message, so that whenever I get an alert, the email also includes the output of a command like top, so that I will already know more details about what ...
4
votes
1
answer
2k
views
Forbidden Invalid CSRF Token +monit [closed]
I have installed monit on AWS ec2 and it working fine. But when I try to restart the nginx service through monit UI,i got an error like "Forbidden Invalid CSRF Token +monit".
My configuration
check ...