Questions tagged [monit]

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

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.

434 questions
5
votes
1 answer

How do I ensure monit starts on system startup?

I am using the Amazon Linux AMI. I want to ensure that monit on system startup always calls monit -c $CONFIG where $CONIFG is the default monit configuration file location (usually /etc/monit.conf). I want to ensure it is always monitoring my…
dubeegee
  • 781
  • 1
  • 6
  • 14
4
votes
3 answers

PHP-FPM, Monit, ping/status pages, Apache

I'm trying to monitor my FPM daemon with Monit, and I'm assuming that the following is not the best technique due to respawning and the PID changing? check process php5-fpm with pidfile "/var/run/php5-fpm.pid" start = "/etc/init.d/php5-fpm…
besson3c
  • 128
  • 1
  • 2
  • 7
4
votes
2 answers

Daemonized Node.js fails every 60 seconds with Monit

Gurus of SO I am running Node.js as a daemon using monit & it turns out that it fails every 60 seconds on the dot. Here's my monit.log root@mybox:/etc/monit# tail -f /var/log/monit.log [UTC Sep 4 12:07:50] info : 'nodejs' start:…
iUsable
  • 361
  • 3
  • 13
4
votes
3 answers

Ensure that certain processes are running when my Rails app loads

I want to ensure that certain processes like Sunspot Solr search and delayed_job are running when my Rails 3 app initializes or loads. I'm somewhat of a noob and from what I can tell, I could write a custom initializer or use a process monitoring…
lightyrs
  • 2,809
  • 2
  • 29
  • 32
4
votes
2 answers

Monit and /etc/environment

I have RAILS_ENV='production' variable set in /etc/environment, and simple bash script #!/bin/bash printenv In monit config I check if this script is running.(it's for testing purposes only, as there is no process like this, monit should try to…
Marcin Doliwa
  • 3,639
  • 3
  • 37
  • 62
4
votes
2 answers

Monit not working with Redis

I am configuring Monit to monitor Redis and Redis Sentinel. But every time Monit is run, it logs that both Redis and Redis Sentinel are not running and tries to run them although both of them are already done. It fails in starting the Redis…
Muhammad Tahir
  • 5,006
  • 1
  • 19
  • 36
4
votes
2 answers

How to make monit start processes in order?

In the monit config file, we have a list of processes we expect monit to check for. Each one looks like: check process process_name_here with pidfile /path/to/file.pid start program = "/bin/bash ..." stop program = "/bin/bash ..." if…
Michael Y.
  • 661
  • 7
  • 12
4
votes
3 answers

How to run ruby via sudo

Hi I am creating a new init script for monitoring a ruby program . NAME=differ FILE_PATH=/home/amer/Documents/ruby_projects/differ/ PIDFILE=/home/amer/pid/differ.pid PID=$$ EXEC='/home/amer/.rvm/rubies/ruby-2.0.0-p247/bin/ruby…
Amerrnath
  • 2,227
  • 4
  • 22
  • 33
4
votes
1 answer

How to support several nodejs services by upstart and monit?

I have created an upstart script in order to daemonize a node.js app: description "app_name" start on startup stop on shutdown script export HOME="/home/ubuntu/nodeapp" exec sudo -u nodejs /usr/local/bin/node $HOME/app/server.js…
Erik
  • 14,060
  • 49
  • 132
  • 218
4
votes
3 answers

Use monit to monitor a java program

I am writing to get some help regarding starting my java programs via Monit. I have written a start script program.sh. The monit code and the scipt code is given with this posting. The issue is that I am not able the start and stop the program using…
Sparrow
  • 53
  • 1
  • 5
3
votes
3 answers

nginx and monit web interface - how to have monit on domain.com/monit versus domain.com

I am using monit on my ec2 instance and I am new to nginx. Below is my nginx config file: server { listen 80; server_name 127.0.0.1; location / { proxy_pass 127.0.0.1:2812; proxy_set_header Host $host; } } So..if I go to domain.com…
user959129
3
votes
1 answer

how to monitor gearmand daemon by Monit?

So the configuration file for monitoring gearman server is: set logfile /var/log/monit.log check process gearmand with pidfile /var/run/gearmand.pid start program = "sudo gearmand --pid-file=/var/run/gearmand.pid" stop program = "sudo kill…
yernarkaz
  • 51
  • 5
3
votes
1 answer

Monit to watch over God?

We're using God to monitor our server processes, and were wondering if we should use something like Monit to make sure God gets up if something unexpected happens. A quis custodiet ipsos custodes? conundrum :) Googling for it didn't bring any…
oliverbarnes
  • 2,111
  • 1
  • 20
  • 31
3
votes
2 answers

Monit: delay the next monitor cycle after a service test action condition has been met

When my server gets into high load, a graceful restart of Apache seems to bring things back under control. So I set up monit, with this configuration: set daemon 10 check system localhost if loadavg (1min) > 5 then exec "/etc/init.d/apache2…
Ben Dilts
  • 10,535
  • 16
  • 54
  • 85
3
votes
3 answers

Monit on CentOS causes httpd.pid not to be created

The solution was to replace this line: check process apache with pidfile /var/run/httpd.pid With this line: check process httpd with pidfile /var/run/httpd/httpd.pid And I also removed the 'group apache'. Original post: After installing Monit on…
bizna
  • 702
  • 8
  • 23