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

learn more… | top users | synonyms

0
votes
0answers
11 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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
votes
0answers
17 views

Monit fails with message APACHE-STATUS: error — no scoreboard found

We have mod_status setup and we have the weblink monitor link working real well. both the http://www.example.com/server-status?refresh=5 and ...
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
0answers
16 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
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
28 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
15 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
10 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
14 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
36 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
23 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
139 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
38 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
77 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
30 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
58 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
29 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
79 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
25 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
55 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
74 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
208 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
19 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 ...
0
votes
0answers
43 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 ...
1
vote
4answers
1k views

How do I setup a monit script to check if a directory exists and create it if it doesn't

In the monit documentation I can see there is a check directory command but I can't see any examples of how to use it to see if the directory exists and if it doesn't to create the directory using the ...
1
vote
1answer
38 views

Is it possible to setup Monit to send alerts to Nagios

I am trying to setup Monit on an auto-scaled group of machines. Ideally I would like monit to send alerts to my nagios service (which is already configured to escalate alerts). I have found this old ...
0
votes
1answer
269 views

Checking if a TCP port is closed with monit

I would like to check that a defined port on a host is closed, for example the 8080 port on host www.example.com. I tried something like: check host www.example.com with address www.example.com ...
1
vote
2answers
150 views

Kill or revive a process based on system memory usage

Consider a system with limited memory, like a smallish VPS. Suppose there are a handful of processes that need to stay alive, and one process "P" that would be nice to have around, but is not ...
6
votes
4answers
4k views

Can Monit be configured to never unmonitor/timeout a service?

Monit seems to give up restarting a service if it fails a few times, and unmonitors it. I can’t find anything in the documentation about the specifics of when or why. My Monit config would be setup ...
0
votes
1answer
3k views

mysql monitoring with monit

can someone please steer me in the right direction. I'm completely new to Monit, set it up, everything working fine, but I'm having a problem with mysql. This is the set up in my conf file: check ...