Questions tagged [monit]

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

Monit is a free open source utility for managing and monitoring processes, programs, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.

382 questions
6
votes
7 answers

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 mode without its http support - the command…
Jas
  • 701
  • 4
  • 13
  • 23
6
votes
4 answers

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/mysql stop" if failed port 3306 protocol mysql…
Matchu
  • 213
  • 2
  • 8
6
votes
3 answers

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 configure monit to watch for vsftpd, should I create pid…
jackhab
  • 751
  • 1
  • 8
  • 20
5
votes
1 answer

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 Puma provided Capistrano 2 recipe which uses the…
Andrew
  • 3,293
  • 8
  • 32
  • 35
5
votes
1 answer

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 cpu > 95% for 2 cycles then restart if cpu > 95% for…
Firze
  • 335
  • 6
  • 16
5
votes
2 answers

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 server socket gracefully to start again. This is my…
kakopappa
  • 151
  • 1
  • 4
5
votes
2 answers

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 Bluepill in the past, and that was the default…
allaire
  • 185
  • 1
  • 10
5
votes
1 answer

Monit won't start: "Cannot translate '' 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 known Control file syntax OK When I run sudo monit…
Hakan B.
  • 185
  • 1
  • 1
  • 8
5
votes
6 answers

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. Is there a way to do this, or has anyone…
Josh Nankin
  • 722
  • 11
  • 27
4
votes
1 answer

Forbidden Invalid CSRF Token +monit

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 process nginx with pidfile /var/run/nginx.pid …
4
votes
2 answers

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 this error. Dec 30 00:56:52 [23926]: The SSL…
4
votes
1 answer

Restart process using monit, when the checksum of a file changed

I want to restart a process monitored by monit, when the checksum of a file failed. Currently i use check process prosody with pidfile /var/run/prosody/prosody.pid depends certificate_file start program "/etc/init.d/prosody start" stop…
allo
  • 1,524
  • 1
  • 19
  • 35
4
votes
1 answer

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" ] && check process foo .... My use case: I have a…
Dmitry z
  • 143
  • 4
4
votes
1 answer

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 service is still down after two cycles then we want to…
John Mee
  • 2,298
  • 1
  • 23
  • 27
4
votes
2 answers

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. Problem server: # service monit restart Stopping monit: …
Chris Kimpton
  • 713
  • 9
  • 18
1 2
3
25 26