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

learn more… | top users | synonyms

-1
votes
1answer
22 views

Monit not able to start program in screen

I have monit able to watch the program but the start script is not working. The stop script works just fine. The when monit tries to start it, it just says execution failed. Monit part check ...
0
votes
1answer
8 views

“check file” in monitrc fails with syntax error

I have the following in /etc/monit/monitrc on line 130-131: check file ip-172-31-37-63:1.log with path /home/ubuntu/.vnc if match "Connections\: accepted" then exec /home/ubuntu/alerts/slack.rb ...
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 ...
1
vote
1answer
2k views

Monit check log file content

I am having a issue with Monits content check. I know I can check the log file like this check file test.log with path logs/test.log if not match "something" for 5 cycles then alert But the log ...
8
votes
4answers
5k 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 { ...
0
votes
1answer
1k views

Monit failed to start shell script

So I am having a problem with monit starting a process this is my code: check process program_1 matching "program_1" start program = "/home/user1/files/start.sh" stop program = ...
0
votes
1answer
1k views

Configure Monit to monitor PHP5-FPM on Ubuntu/Nginx setup

System: LEMP running on Ubuntu 14.04 I'm trying to configure the tool Monit to restart Nginx or PHP-FPM if ever there is a problem. It is correctly monitoring Nginx however under status for PHP-FPM ...
7
votes
1answer
8k 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 ...
0
votes
0answers
12 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 = ...
1
vote
3answers
869 views

Monit: how do you stop monit from running the exec statement every time the test fails?

How do you stop monit from running the exec statement every time the test fails? The statement in my monitrc is: check filesystem tmpfs with path /var ...
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 ...
1
vote
1answer
1k views

Issues in monitoring apache tomcat server using Monit

I have installed Monit using the following command in Ubuntu Linux 12.04.1 server sudo apt-get install monit My main goal in using Monit is to restart my - MySQL and Apache tomcat services ...
0
votes
2answers
1k views

monit fails to start apache

I'm running Apache, and trying to monitor it wiht Monit. The monitoring seems to work fine, but when Apache is down, Monit does not succeed to start it. Monit does detect that it's down, but the ...
0
votes
1answer
44 views

MONIT: Monitoring logfile on counting and changes of timestamp

I want to monitor a logfile and I am only interested in the "Received new block" lines. I need two different scripts to monitor a) the height, which should always be one number higher then the height ...
15
votes
2answers
4k 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 ...
2
votes
0answers
5 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
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 ...
5
votes
2answers
2k views

Monit monitor http status with 404 page

I am trying to monitor HTTP status with 404 or 403 page. As you all know Monit takes those pages as failed connection, but how could I change that. I just want to monitor that it shows the 404 or 403 ...
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
1answer
48 views

Debian: How to upgrade MONIT correctly?

I did sudo apt-get install monit but it only installs version 5.9 and the current version is 5.17.1. So I did wget https://mmonit.com/monit/dist/binary/5.17.1/monit-5.17.1-linux-x64.tar.gz to download ...
0
votes
0answers
19 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
1answer
16 views

Monit is reporting low memory use

Monit is reporting very low memory use that is not consistent with actual use. If I look at Monit, under System I see "5.7% [918.0 MB]" though the real scenario is very different; total ...
1
vote
2answers
1k views

Monit http-based API

I'm just wondering whether monit has an API, which we could poll-regularly (perhaps something that is http-based) ? It would be very useful to create an integrated monitoring solution across multiple ...
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 ...
4
votes
2answers
7k views

monit send email does not work

I am trying to use monit, and set up email server using gmail. The configuration file is like this: set mailserver smtp.gmail.com port 587 username "someuser@gmail.com" password "password" using ...
1
vote
1answer
37 views

Monit Web Service not available

I'm trying to configure monit on my server using chef solo. When I visit port 2812 response saying this webpage is not availble. config/chef/files/default/monitrc set daemon 30 set pidfile ...
0
votes
1answer
26 views

monit can not resolve hostname: getaddrinfo does not find host

I use monit v5.16 running on Debian Wheezy to check if a server is up or down using the ping instruction. Here is my configuration: check host my.server.domain with address my.server.domain ...
1
vote
2answers
163 views

Monitoring zabbix server (itself) externally

I have some infrastructure (servers, switches etc) monitored by a Zabbix server, setup to alert in case of issues; so far so good. But what if the Zabbix server itself (or any of the underlying ...
0
votes
2answers
42 views

Prevent monit from checking while restarting

We have the following monit config which restarts tomcat if unable to connect to it: check host Tomcat-Foo with address localhost stop program = "/usr/bin/systemctl stop tomcat.service" start ...
7
votes
5answers
5k 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 ...
0
votes
1answer
40 views

Nginx M/Monit password protect

I am trying to protect access to M/Monit web interface: Box: ubuntu 14.04 nginx 1.8.1 mmonit-3.5.1 I created a mmonit config file under /etc/nginx/sites-available: server { listen 8080; ...
6
votes
2answers
1k 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 ...
1
vote
0answers
95 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 ...
0
votes
0answers
13 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
32 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
2answers
70 views

monit: Consolidated dashboard for monit running on multiple machines

I have monit setup on multiple machines. For Example: x.example.com:2812, y.example.com:2812 and z.example.com:2812. Is there a way so that we can see all these dashboards consolidated at one place ...
1
vote
0answers
38 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 ...
1
vote
2answers
81 views

monit “check program” with email?

I have this in a monit script (lines 11-13): check program foo with path "/usr/local/bin/foo.sh" with timeout 300 seconds if status != 0 then alert dan@example.com monit reload says: ...
0
votes
0answers
38 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 ...
1
vote
3answers
3k views

Can't find httpd.pid to use for Monit apache2 monitoring

I'm new to Linux and I setup Ubuntu 12.04 on Digital Ocean. I installed Monit and got it to monitor MySQL successfully with email alert. I want to monitor Apache2 as well but cannot find any ...
0
votes
4answers
57 views

Heavy stress test on Apache [closed]

We have a production server running Apache that sometimes crashes because of too much load, I'm trying to replicate the situation on a test server in order to test Monit. So my goal here is to ...
1
vote
2answers
1k views

Using runit and monit to run / monitor services

I am configuring some services to run on Ubuntu server. I was going through the link below where they use runit to run the services and monit to monitor the services - ...
1
vote
0answers
20 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 ...
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 ...
1
vote
1answer
89 views

Is there a feature built into Docker for monitoring and ensuring containers are always running?

My first thought would be Monit, which I use to monitor other processes. Is there a different way of doing this in the Docker universe? I wish to monitor both the Docker daemon and specific ...
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
1answer
26 views

Send monit alert to log file instead of email

I am using monit for several processes. But I do not want to sent an email when there is an issue, whereas I need it to log it to a file. Can this be done? OS: Ubuntu 14.04 Monit: 5.6 Current ...
1
vote
1answer
226 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
0answers
20 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 ...
0
votes
2answers
26 views

monitoring muliple machines from one monit webpage

I have multiple machines, a monit instance running on each of them. I'd like one of the instances to be the "master" instance, i.e. the other machines would report to it and I could monitor them all ...