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

learn more… | top users | synonyms

1
vote
1answer
1k 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 ...
0
votes
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 ...
2
votes
0answers
15 views

Varnish failing intermittently for no obvious reason

For the last few years we have been running Varnish as a cache and load balancer in front of several apache servers serving several thousand websites. We also use monit to ensure that if varnish ...
0
votes
0answers
16 views

monit file content check if not match

I have monit set up as follows: check file log with PATH /var/log/nginx/access.log if NOT match "HTTP/[0-9.]{3} 200.*" then alert I need it to send an alert when the log brings up any ...
3
votes
1answer
17 views

Monit use alert along with exec

I have rule like this: if memory usage > 85% for 10 cycles then alert I want to notify not only via email but also via slack. So I can add second line like this: if memory usage > 85% for 10 ...
0
votes
1answer
46 views

How to monitor the postfix mail queue using monit?

Is there a way to monitor the postfix mail queue using monit? the available scripts just check, up/down/memory or CPU. I would like notices when the queue starts filling up. it would be nice to be ...
0
votes
1answer
36 views

monit: how do I restart many Tomcats without overloading the server?

My server has several separate Apache Tomcat instances that each take a lot of time and CPU to start. It is not possible to start all of them at the same time. This would generate too much I/O, each ...
0
votes
1answer
38 views

Monit can't restart nginx

I've got monit up and running on an Ubuntu 12.04 server, to monitor nginx, but I can't get it to successfully start nginx up again. My setup is thus: the monit config file is: -rwx------ 1 root root ...
2
votes
1answer
512 views

Monit: How to optimally monitor an URL

My webserver runs nginx with php5-fpm. If some trouble occurs, usually php5-fpm hung up, resulting in a "bad gateway" server error. Of course, I never know, if nginx may crash as well, some day. When ...
5
votes
4answers
3k 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
49 views

using monit to stop or start a service

I would like to use monit to monitor my DNS server. if BIND failed it should stop OSPFD. i tried this but I get an error; > check process named with pidfile /var/run/named/named.pid start > ...
0
votes
2answers
589 views

Monit Webmin service is not activating

I have written a script in monit interface for Webmin service. I can execute the process where in I am unable to restart the service. check process webmin with pidfile /var/webmin/miniserv.pid ...
0
votes
0answers
17 views

monit exec file and match result

Is there a way to get monit to run a python script and check the result? I was thinking something like this but it doesnt execute, only reads the file check file app1-check with path ...
0
votes
0answers
14 views

monit mysql not monitored centos

I've been successfully using Monit for several months now and MySQL is one of the services that I've been monitoring without issue. My Monit config is all still in place: Check MySQL check ...
2
votes
1answer
4k 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 ...
0
votes
1answer
92 views

Monit unable to restart php5-fpm

Monit is correctly detecting that php5-fpm is unavailable as seen in the logs. However, it does not seem to be able to restart the service. log: [EDT Jun 11 18:04:20] error : 'php5-fpm' failed, ...
0
votes
0answers
42 views

setup monit and mmonit

I have installed monit and mmonit on two different machines. I have made below changes to /etc/monit.conf file: set eventqueue basedir /var/monit/ slots 1000 set mmonit ...
3
votes
4answers
1k views

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 = ...
-1
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
52 views

Monit “method not defined”

I'm currently trying to use monit to purge my /var/log partition from specific files whenever the partition runs out of free disk space. I created a file named toto and tried this test after reading ...
1
vote
0answers
29 views

Monit Alert with Multiple URLs

I've got a monit setup to http check several subdomains of an http server. Currently, they are multiple check host statements that look like this: CHECK HOST a.example.com with address 1.2.3.4 if ...
1
vote
1answer
70 views

Secure Monit 5.6 httpd on Ubuntu Trusty

I'm trying to securely install the monit on Ubuntu 14.04 Trusty. The default packaged version is 5.6. From what I can see, monit is basically unusable without the httpd service enabled (ie you can't ...
1
vote
1answer
86 views

How can I restart “monit” when it stops or crashes?

I am setting up a server and have just installed "monit" to monitor processes and restart them (and alert me) when certain conditions are met. It works great. My question is what happens when monit ...
1
vote
1answer
783 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
0answers
61 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
1answer
534 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 ...
1
vote
2answers
171 views

301 response when monit checks for file on nginx

I have a monit script that checks that nginx is up and running. One thing it does is checks for a file 'ping.txt'. I can view it in the browser, but what would cause the script to get a 301 redirect ...
1
vote
1answer
31 views

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

monit daemon not triggered at startup

I am using Debian and would like to trigger monit at startup. As such monit is working perfectly fine if i start manually from sudo monit. However for some reason it doesnt trigger at startup. Tried ...
2
votes
0answers
181 views

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" ] ...
-3
votes
1answer
488 views

Daemonizing a C program and location of copying the file [closed]

I have to run a C program using monit. so I had to demonize it. what i did was i took a daemon template made some changes and arrived at this file as below, which is a script file: # Source function ...
1
vote
2answers
838 views

Suppress Monit message 'Monit instance changed' on stop/start

I have monit installed on some user laptops/desktop so it can make sure a couple processes are always running/get restarted as needed. But since the devices are regularly shutdown/restarted I ...
3
votes
1answer
94 views

How to configure Monit to alert me when anything appears in syslog

I want Monit to alert me if ANYTHING shows up in syslog - as anything in there would be abnormal. I've tried the following and I'm not receiving any alert emails when I manually add something to ...
3
votes
1answer
87 views

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 ...
2
votes
2answers
520 views

Monit unable to start/stop nginx server

I have problems with monitoring nginx. Monit can monitor nginx and display resources usage (RAM usage, etc.), but is unable to start/stop nginx. I get only a simple message: "Execution failed". Syslog ...
2
votes
0answers
78 views

mysql service status doesn't show started when it is started by monit

I installed monit on my Ubuntu 14.04 server and configured it to monitor mysql with the below config in monitrc. check process mysqld with pidfile /var/run/mysqld/mysqld.pid start program = ...
0
votes
1answer
57 views

Monit - send alert if mailserver down

Is there a way to make monit alert other than by mail: Sometimes the mailservers are down. How would I get a message about it? My idea was to make monit pass an http request to a defined service, is ...
2
votes
2answers
1k views

Unable to access monit daemon via HTTP from host port using Vagrant

I want to use monit to monitor services on my Ubuntu VM(precise 32) but I cannot access the monit daemon via HTTP from the host (local) machine. I have enabled the following settings in ...
1
vote
1answer
384 views

Execute custom monit script upon failure to restart the process [duplicate]

I have a case where empty PID files are being generated by certain processes which are monitored by monit. Monit is NOT so good in handling empty files and tries to re-start the process even when the ...
1
vote
1answer
273 views

Awaken monit daemon every few hours for all monitored processes

I am seeing a problem with monit config in configuring the monit daemon to awaken every few hours and start monitoring the processes which were set to "Not Monitored" state. PROBLEM: When the monit ...
0
votes
0answers
76 views

Monit : How to get email alerts for “check program” tests

I'm having a bit of trouble configuring a test with Monit. I have M/Monit (3.2.2) configured and 5 Monit agents (5.11) running on Ubuntu server 14.04. I already have several tests (hdd, ram, cpu, ...
2
votes
2answers
97 views

turn off monit text alerts at night

I have monit running 24/7/365 and sending alerts to an e-mail address and text messages to a phone equally. However I would now like to stop the phone text msgs at night so they don't wake me up. I ...
2
votes
2answers
629 views

How to watch a service with multiple processes with Monit?

I'm trying to watch the mailing list manager sympa with monit. A running sympa instance consists of multiple processes for the different tasks of list management (e.g. a separate process for archiving ...
-3
votes
1answer
181 views

How can i send daily alerts for linux server monitoring using Monit tool(free edition)? [closed]

I am using monit free edition to monitor server status, but in that the alerts works only when some triggering action done. However, I want to send a daily alert of all the details of server as monit ...
1
vote
1answer
3k views

monit: can't connect to the http interface

I'm setting up monit on a new site, which i'll refer to as mywebsite.com during this question. I've set up the config to access monit's web interface page, but i can't connect to it. I've got a ...
2
votes
2answers
496 views

Monit won't run

I have two identical EC2 instances (the second is a replica of the first), running Gentoo. The first instance has monit running which monitors a single process and some system resources and functions ...
4
votes
2answers
964 views

Monit appears to be working on command line but get 404 'There is no service by that name' in web interface

Monit seems to be working, but when I go to the web interface at port :2812 I get: Not Found There is no service by that name monit 5.2.5 -- But again, things appear ok on the CLI ...
0
votes
0answers
77 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 ...
10
votes
2answers
5k views

Sending a test/example alert from monit?

I've configured monit tests and alerts — but I want to make sure that everything in my alert stack (outgoing email servers, sms email gateways…) is functioning properly. Is there a handy way to fire ...
-1
votes
1answer
85 views

Monitoring MySQL – “Execution failed”

Got some trouble with a VPS where MySQL dies on me from time to time. As a temporarily fix I've installed Monit to make sure that the process is restarted when it dies. I checked the site today and it ...