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
2
votes
1 answer

Configure a app in a subpath in nginx

I have a nginx + passenger + single rails app setup in a Fedora server. My nginx.conf regarding my app looks something like this: server { listen 80; server_name myapp.mycompany.com; root /opt/apps/myapp_large_name/public; …
Rubem Azenha
  • 675
  • 3
  • 8
  • 15
2
votes
1 answer

Using Monit to monitor Resque

I'm trying to use resque as a job runner for Rails. I've tried this config, and many other ways of demonizing the rescue task (because running rake resque:work leaves the terminal tied to that command). Unfortunately, their example configuration…
Alex
  • 29
  • 2
2
votes
5 answers

monit syntax error : "if 5 restarts within 5 cycles then alert"

I am trying to get an alert from monit if it fails to restart a service 5 times, but I get a syntax error /etc/monit/monit.d/engine.conf:5: Error: syntax error 'alert' any idea what's wrong with it? /etc/monit/monitrc: set daemon 120 set…
Omry
  • 675
  • 1
  • 7
  • 16
2
votes
2 answers

daemon running for several hours, and dies

After restart server, this is running: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 19653 lighttpd 16 0 67584 39m 16m R 21.3 15.3 0:17.60 php-cgi 8006 mysql 15 0 137m 22m 4800 S 5.3 8.8 1:07.91…
baskaran
2
votes
3 answers

Restart apache with monit

I'm trying to figure out some issues on my server where my CPU is reaching 100% utilization every other day. This causes all my websites and http services to fail. How can I configure monit to restart the httpd service when my cpu hits 100% for say…
ibyte
  • 73
  • 6
1
vote
1 answer

2 identical VPS (Ubuntu 18.04): Postfix - Alerts from Monit to Google mail is not working

Let's start from beginning. I have a two identical VPS servers with Ubuntu 18.04 OS and Monit installed on both. I configured mailserver on the monit (for sending alerts) configuration as a localhost on both. The problem is that on one server…
1
vote
1 answer

Monit : Add username and password for mysql check

I have a "problem" with my Monit configuration. The monitoring works as expected, but I get the following errors on the mysql error file /var/log/mysql/error.log each time the monitoring script runs : 190821 10:47:49 [Warning] Access denied for user…
mcoeur
  • 13
  • 6
1
vote
1 answer

Send additional (custom) data to m/monit

I use monit (https://mmonit.com/monit/) for system monitoring. Also I use my own "backend" instead of m/monit and I want to receive additional data from the monit instances. For example, is it possible to read the data from the file and then send…
Vadym
  • 111
  • 4
1
vote
2 answers

Monit network availability checking

I'd like to start a service with monit but only when I have the correct ip bound to the host. Can this be done somehow with the normal config? For example I want to start a process xxx with pidfile xxx.pid, but only if host currently has 10.0.0.1…
viraptor
  • 1,264
  • 6
  • 21
  • 40
1
vote
3 answers

mailserver for google apps email

My domain is using google apps email for its email hosting. I was wondering if there was some way to connect to google email from my unix server so that I can send mail through that google apps account. For example, monit (the server monitoring…
1
vote
2 answers

monit failed protocol test [HTTP] at [localhost]:8080

I get the error "monit failed protocol test [HTTP] at [localhost]:8080" every so often. The application, tomcat, has not stopped and is still running just fine. I know port 8080 is open because I can get to it in the browser on my personal PC ( so…
Tony B
  • 254
  • 2
  • 12
1
vote
1 answer

monitoring mongodb with monit

I cannot get the most basic script working on monitoring mongodb on ubuntu 16.04 monit 5.16 check process mongod with pidfile /var/run/mongod.pid group database start program = "/usr/sbin/service mongod start" stop program = "/usr/sbin/service…
farhadf
  • 115
  • 6
1
vote
0 answers

Restart Monit service upon multiple conditions

I have a service monitored by monit, and I would like to restart it if it meets either one of two distinct conditions: if memory usage is >15% if memory usage is >5% AND the current system time is between 4AM and 6AM. Here is an example of a…
abeboparebop
  • 111
  • 3
1
vote
1 answer

monit check http response header

unfortunately, the documentation is not clear about the HTTP content. https://mmonit.com/monit/documentation/monit.html#HTTP i want to monitor a specific response header, not the content itself, like this: CHECK HOST example.de WITH ADDRESS…
sgohl
  • 1,373
  • 1
  • 11
  • 16
1
vote
1 answer

linux : monit : iptables

Under linux, at least centos and I think also debian, there is a "iptables" listed in the daemons. But it is really a script to load and save them, it doesn' start a process, neither write a pidfile. How can I check iptables up and running with…
Massimo
  • 260
  • 3
  • 13