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

learn more… | top users | synonyms

3
votes
1answer
151 views

Process 'clamd' “not monitored”

the output of monit summary says clamav is not monitored. The configuration says: check process clamd with pidfile /var/run/clamav/clamd.pid start program = "/etc/init.d/clamav-daemon start" ...
2
votes
1answer
44 views

On restart, start with “monitor all” enabled

I have monit enabled and monitoring one of my applications, where if the application restarts more than 4 times in 10 cycles, I stop it, and run a script (which, among other action, also does ...
2
votes
1answer
1k 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 ...
2
votes
1answer
942 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 ...
1
vote
1answer
255 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
2k 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 ...
4
votes
0answers
212 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 ...
4
votes
0answers
202 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
0answers
6 views

aggregation of monit alerts per cycle

I have a dozen of identical services configured in monit. When I enable alerts for check process on these services and alert condition arises in all of the services I receive a dozen of identical ...
2
votes
0answers
35 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 ...
2
votes
0answers
74 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 ...
2
votes
0answers
290 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" ] &...
2
votes
0answers
255 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 = "/etc/...
2
votes
0answers
736 views

Monit unable to start sidekiq on Opsworks server

I have used AWS Opsworks to create some servers. I have Sidekiq running as part of my Rails application. When I deploy Sidekiq restarts nicely. I am configuring Monit to watch the pid and start and ...
2
votes
0answers
391 views

Kill runaway Phusion Passenger child processes with monit?

Is there any way to monitor and kill Phusion child processes that are using too much memory or cpu with monit? There are many examples for Apache, but since Phusion runs in its own process, runaway ...
1
vote
0answers
117 views

Monit “check program” and restart based on exit code

When I use check process, monit will start the program I define under start program then monit will restart it if it stops. But when I use check program monit will not automatically start it. If the ...
1
vote
0answers
42 views

monit: add NOALERT in an IF construct

On debian jessie, I have configured monit to check for HAproxy particular port forwardings, and to restart it if failed like this: check process haproxy with pidfile /run/haproxy.pid group www-...
1
vote
0answers
24 views

Alert on simultaneous failure of multiple monit services

We're using Monit to check our web servers. When the check fails (or succeeds) the corresponding compontent on a status page is updated via a shell script like this: check host web-a-https with ...
1
vote
0answers
21 views

how do I set monit to non-daemon mode

I'm trying to get monit to just excite the monitrc script once and then exit. I've tried monit -v -Ic /tmp/monitrc but when I look at the output it says: Runtime constants: Control file ...
1
vote
0answers
160 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
vote
0answers
66 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 ...
1
vote
0answers
1k 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 ...
1
vote
0answers
71 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
0answers
67 views

Is there any way to have monit not try to restart a process?

I have monit watching a process and killing it if it's running for too long. I do not want this process to be automatically restarted, however. I don't have a start program specified, but each cycle, ...
1
vote
0answers
811 views

using monit to control node.js pm2 response time

I want to use monit for ability to reload pm2 node.js site if response is longer than 2 seconds. This is my monit config /etc/monit/monitrc: check process pm2 with pidfile "/root/.pm2/pids/...
1
vote
0answers
201 views

monit, unable to start node.js script

I need to run my stats collecting daemon & send alerts, when it is down. I tried thousands of variants.. and last was: check process collect-stats with pidfile /var/run/nodeutils/collect-stats....
1
vote
0answers
148 views

Restarting a program with monit

Hopefully someone can help me out with this: I am running a game server that crashes with a segfault every 3 hours, I am trying to get a restart script working but I'm a complete noob when it comes to ...
1
vote
0answers
302 views

Monit 5.3.2 not working on Ubuntu 12.04 x86_64

I have monit working on several servers but when I install it on Ubuntu 12.04 64-bit server I get the following error reported in the log file and monitoring doesn't work. [EDT Jun 24 21:26:20] error ...
1
vote
0answers
386 views

Monit unable to send email alerts

I have set monit to send email if my java listener failed on port 8000. I have tried to close the listner and run monit validate below is the errors I got. monit validate 'cs8000' process is not ...
0
votes
0answers
14 views

Running monit AND supervisord simulatenously. Any possible issues?

Two aims: 1) Make sure background daemons such as webserver/rabbitmq are running all the time. If they crash they are automatically restarted etc. For this I am using monit with a config like: set ...
0
votes
0answers
6 views

Monit cannot read content

I've installed the latest version of Monit and created a very basic rule: alert me when the word "Google" cannot be found on google.com (deface check). I keep getting following error: failed to [www....
0
votes
0answers
16 views

How to restart nginx when getting 502, with Monit

In Monit, how can I check the health of my Nginx server (if it is returning 502, for example) and how to restart it when this occurs. The environment is an Ubuntu 14.04 64bit
0
votes
0answers
20 views

Monitoring HAProxy to determine need to scale

I'm learning about load-balancing and auto scaling at the moment. I have a VM running HAproxy with 3 nodes under it to distribute traffic. My endgoal is to spam it to overload number of requests it ...
0
votes
0answers
23 views

Monit run script on restart

So I have been trying to get Monit to run a script on start of a service. While Monit has no problem restarting the service, I of course want to be alerted when if my service required starting, not ...
0
votes
0answers
19 views

Monit for PHP7 connection failed

Trying to get monit working for PHP7 but getting a connection error. Here is the config file: check process php7.0-fpm with pidfile /run/php/php7.0-fpm.pid group phpcgi start program = "/usr/sbin/...
0
votes
0answers
20 views

Configure alerts on failed Unicorn restart

Our setup looks like this: Ubuntu 14.04.4 LTS AWS Opsworks Chef 12 Monit 5.17 Ruby 2.3 Rails 4.0.8 And we managed to get everything working just nicely, yet however if for some reason, Unicorn ...
0
votes
0answers
26 views

Is it possible to visualize disk stats using Monit Graph?

I am using Monit and Monit Graph in order to monitor Mysql and Apache processes. I have found in monit documentation and in serverfault (also here) that I can monitor disk usage and get alerts. ...
0
votes
0answers
16 views

How to set maximum limit to monit exec?

I have monit setup on servers. I am sending out SNS on monit alerts as below. check filesystem "root" with path /dev/xvda1 if space usage > 80% for 10 cycles then exec "/bin/bash -c '/usr/...
0
votes
0answers
14 views

Escalate monit events to pager address

is it possible to send escalating notification to pager address in case when monit test failed for n-times? We want to receive a pager beep only in case when monit tried to do its best and problem is ...
0
votes
0answers
35 views

Monit's $HOST variable expanding to “SYSTEM”

For some reason, Monit's $HOST variable is being expanded to "SYSTEM" which is causing problems for emailing (becomes "From: monit@SYSTEM"). The /etc/hostname and /etc/hosts files are correctly ...
0
votes
0answers
43 views

How to monitor multiple instances of the same process with Monit

I have one process of which I need to run multiple instances. I would like to monitor this with Monit. Currently this is how I'm doing it. check program maintain_workers with path maintain_workers....
0
votes
0answers
7 views

How to use number of CPUs as a multiplier in monit config?

What is the best way to use number of CPUs as a multiplier in monit confs? I need this for a system that has varrying number of CPUs, depending on predicted load. Right now the only idea I have is ...
0
votes
0answers
11 views

How to stop monit thinking a flow to start program has failed

I have a web server that I want to monitor using the host rather than the process and restart the webserver if it's stopped responding. The problem is that this webserver takes about 30 minutes until ...
0
votes
0answers
61 views

Monit http status monitoring behaviour

I am using monit v 5.15 and I try to set up monitoring for http status using the basic: if failed port 80 protocol http request "/status.fpm" status > 500 then alert And I ...
0
votes
0answers
126 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 ...
0
votes
0answers
123 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 ...
0
votes
0answers
51 views

monit service permission starting a linux service

I'm running monit to monitor a linux service i wrote which basically makes sure that a mounted partition exist. the service start action is: mount -a the service stop action is: umount /...../.... ...
-1
votes
0answers
12 views

Monitor logs with Monit?

I have a cluster of zookeepers that occasionally enters a state where they can not reconnect to each other without a restart. The best way to detect this condition, I believe, is to monitor the logs ...