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

learn more… | top users | synonyms

19
votes
3answers
7k views

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

Monit runs with root, but i don't want to start my processes as root.. like mysql, mongrel, apache..
16
votes
5answers
7k 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 ...
14
votes
5answers
3k 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 ...
11
votes
1answer
2k 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 ...
8
votes
1answer
5k 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.
7
votes
1answer
3k 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 ...
7
votes
1answer
1k 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 ...
6
votes
4answers
2k 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 user@mycompany.com but not on { ...
5
votes
1answer
521 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 ...
5
votes
3answers
2k 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. In my environment, I want it to ...
5
votes
3answers
1k 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. ...
4
votes
4answers
12k 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 ...
4
votes
3answers
1k 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 ...
4
votes
2answers
253 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
1answer
1k 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 ...
3
votes
4answers
528 views

Recommendations for Monitoring services [closed]

I would like to install a monitoring services (Monit or others) on my web server and am looking for recommendation. I have no idea which is good, and what parameters which I should evaluate on, and ...
3
votes
3answers
2k 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 ...
3
votes
3answers
784 views

How to prevent monit daemon stopped?

I use monit to make sure everything running fine, but monit daemon was also stopped. I dont know how this be, and how to prevent monit daemon from stopped?
3
votes
2answers
777 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 ...
3
votes
2answers
330 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. ...
3
votes
1answer
546 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 ...
3
votes
1answer
376 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 ...
3
votes
1answer
175 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 ...
3
votes
1answer
1k views

Monit is restarting apache2, should I fix the monit config, or the server config?

Monit is restarting apache2 frequently, based on the totalmem > 200m test in my apache2 stanza. I'm not sure that I actually have a problem, or if I should increase the totalmem test in my monit ...
3
votes
3answers
306 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
3
votes
2answers
1k views

nginx proxypass monit links

I'm trying to setup Nginx to forward requests to several backend services using proxy_pass. Loading https://example.com/monit works, however the links within the page are to https://example.com/sshd ...
3
votes
1answer
567 views

Monit having trouble determining if the Bitcoin daemon is running

I'm setting up Monit to monitor the Bitcoin daemon to make sure it runs 24/7 and restarts it if something goes wrong. The Bitcoin binary is at /usr/local/bin/bitcoind, and the data directory is at ...
3
votes
0answers
187 views

Monit will not start my node js app

I have a problem with Monit that I use for monitoring of my Node.js app. I just moved from a single core machine to a multi core one. On both of them I run Ubuntu 11.10. On the old one this was ...
3
votes
0answers
148 views

monit reporting “connection failure” when actually a “content failure”?

I have a monit rule which looks like this: check host example.com with address example.com if failed url http://example.com/status content == "ok" then alert group example.com But when ...
2
votes
3answers
1k views

Monit - how to check loadavg only when no backup is running?

I've got Monit configuration with: check system example.com if loadavg (1min) > 4 then alert if loadavg (5min) > 2 then alert I want to get rid of messages every time backup is ...
2
votes
5answers
3k 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 ...
2
votes
1answer
155 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 ...
2
votes
1answer
1k 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 ...
2
votes
1answer
378 views

How do I restart MySQL in monit when page contains specific text?

How do I check if a web page contains the text "Error connecting to database" and if the text exists in the page restart the database? Here's what I have so far but it isn't working: check host ...
2
votes
1answer
2k 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 ...
2
votes
2answers
3k 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 ...
2
votes
3answers
717 views

What exactly does M/monit mean?

what exactly does M/monit mean?
2
votes
3answers
2k views

Monit wont start/stop any processes

I've got monit running on a linux vserver, installed in a custom location /home/user/bin/monit as that is the only suitable location according to the webhost providers. When I installed monit I ...
2
votes
1answer
174 views

How to integrate monit into web app deployment process

I have: Tomcat with webapp deployed via mvn tomcat:redeploy. Monit, pinging the host and restarting server if ping failed. The thing is there in a moment during the redeployment when ping will ...
2
votes
1answer
235 views

Monitor a long running process

I need to start a long running, memory/disk/cpu intensive process on Linux, and monitor it so I can : check it terminates with a good status code, collect stats (mem cpu disk every x minutes ) alert ...
2
votes
1answer
44 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 ...
2
votes
1answer
269 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 ...
2
votes
1answer
191 views

Is it possible for Monit to perform a Sysfence style load average calculation using conditionals?

I am beginning to migrate from Sysfence to Monit on a RHEL Linux box and I wonder if it possible to create the following sysfence equivalent in Monit. Sysfence configuration (partial) For example, ...
2
votes
2answers
1k views

Centos Linux monit configuration

I'm trying to do the following: monit stop mysqld monit: Cannot connect to the monit daemon. Did you start it with http support? it only works when I stop the monit service. any suggestions? ...
2
votes
1answer
702 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 ...
2
votes
1answer
103 views

Monit “is alive” check of PostgreSQL tends to fail during a run of pg_dump, is there a better way?

I use pg_dump for my primary backup, once every three hours. I also use monit. When monit checks if PostgreSQL is alive during the pg_dump run, it sometimes times out, and restarts postgres. This ...
2
votes
1answer
214 views

How to use monit to make sure only one instance of process is running

I have ruby daemons running. Once in a while we'll accidentally start up a second instance of it, which causes race conditions. Can I use Monit to detect if multiple instances of 'my_ruby_daemon' is ...
2
votes
1answer
1k views

Can't get Monit to work

I am trying to configure Monit on my local machine to get a taste at how it works, but I have some issues. What I am trying to do is to get any evidence that Monit is up and running correctly and is ...
2
votes
1answer
308 views

With Monit, how do I restart a process when a directory timestamp check fails?

In my /etc/monit/monitrc I have the following lines: check process foo_server with pidfile /var/run/bwam_server.pid start program = "/Users/foo/foo_server.sh start" stop program = ...
2
votes
1answer
187 views

monit mysql server blocked because of too many bad connections

Is there any tweak for monit or another way to monitor whether one server can access mysql on another server? I tried it with monit but as you probably know, after 10 attempts, mysql blocks the ...