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

learn more… | top users | synonyms

1
vote
2answers
322 views

monit hostname is always localhost

I've got monit running on a server to alert by email with the following config set mailserver 127.0.0.1 using hostname "vps1.sender.com" set mail-format { from: monit@sender.com } set alert ...
2
votes
1answer
1k 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
2answers
90 views

monit displays false number from my uptime script

I've wrote a script for fetch real uptime and display in monit. But I think it displays just exit error status. My uptime script is: #!/bin/sh uptime=`uptime | awk -F " " '{print $3}'` echo $uptime ...
0
votes
1answer
112 views

Low traffic Nginx on AWS Ubuntu 11.10 EC2, returns 499 when tested by monit, why?

I have a very low traffic Nginx box that serves as a reverse proxy to an external service. I have Monit on the box to restart nginx if it crashes. Needless to say, nginx stops at least once a day on ...
1
vote
1answer
168 views

Monit — Daemonize non-daemon process?

I have a ruby process that don't run as a daemon (it runs in the foreground), but can generate a pid file. My question is does Monit always expects to monitor background/daemonized processes? I used ...
1
vote
0answers
55 views

Restarting a program with monit

Hopefully someone can help me out with this: I am running a game server that crashes with a segfault every 3 hours, I am trying to get a restart script working but I'm a complete noob when it comes to ...
-1
votes
2answers
325 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
0answers
22 views

Monit stop script never called

My monitrc looks like this : check process java with pidfile /opt/release/RUNNING_PID start program = "/bin/su -c /opt/release/start.sh root" stop program = "/bin/su -c /opt/release/stop.sh ...
0
votes
1answer
153 views

Monit detecting error, but not restarting asterisk

I am running Ubuntu 13.04 with the corresponding versions of monit (5.5-6) and asterisk (1.8.13.1). I have monit set up to watch my asterisk log file for disconnection to my SIP provider and restart ...
2
votes
1answer
135 views

Why does Monit perform actions on unspecified cycles?

I am using Monit 5.5 with the CHECK PROGRAM directive to execute an external script that does some work to verify if my app is functioning properly. I want to do this check every few cycles so as to ...
1
vote
1answer
149 views

How to user monit to count the number of instances of a process

Is it possible to use monit to count the number of instances of a process (in my case Celery) and take an action accordingly. For example if there are 4 instances of celery daemon, then take action
2
votes
1answer
409 views

Is it necessary to monitor the PID of proccesses?

In some tutorials I've seen the following snippet for monitoring processes with PID: check process nodejs with pidfile "/var/run/yourprogram.pid" start program = "/sbin/start myapp" stop ...
0
votes
1answer
30 views

Monit action to restart all services

I have configured monit to check for my services, and I'm checking if one of the services still sane. If this service is not working as it should I would want monit to restart ALL the services I'm ...
2
votes
1answer
1k 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
0answers
191 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 ...
3
votes
2answers
303 views

Monit 5.5 binding to localhost only, but should be on all

Using Centos 6.4, using a yum installed Monit 5.5. I have 2 servers with monit installed - same version, same config - but one binds on all addresses and the other only binds on the localhost. ...
0
votes
0answers
257 views

how to config monit for send mail alert apache restart

I'm configuring /etc/monitrc and I need a config that Monit sneds an alert email when httpd service start I'm trying with this configuration: check process httpd with pidfile /var/run/apache2.pid ...
1
vote
1answer
248 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 ...
0
votes
1answer
62 views

Can't get monit to start program

I'm trying to get monit to monitor a program and start it if it goes down. Here's my basic config: check process maitre_d_8000 with pidfile /home/tango/env/maitre_d/8000/pid.pid start program = ...
1
vote
1answer
74 views

Exec when service is ok with monit

I need to run a shell script if a service is ok with monit, to link to my other monitoring system (nagios). Basically what I need to achieve is to make monit send an alert when a service was ...
1
vote
1answer
30 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
3answers
242 views

Passively monitor IO wait spike on process level

We use munin and monit to keep track of general stats about our vps, in last a couple of weeks, we have been running into issues where random IO wait spike is killing our server performance. Since ...
0
votes
1answer
237 views

Why Monit does not work with my MySQL configuration file?

I'm using a custom configuration file for mysql in /etc/mysql/conf.d/myfile.cnf The contents of the file [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket ...
0
votes
1answer
62 views

How to set user who runs command in monit respecting his .bash_profile?

I want to supervise my Rails application running on unicorn with monit. Running following two from shell when logged in as root would fail: "/srv/app/current/config/unicorn.sh start" su -c ...
4
votes
1answer
859 views

How do I get monit to do multiple actions when a monitored process has failed?

I have a custom service that I want to monitor with monit. When the process fails I want to copy the log to a shared file system and restart the service. Something like the following but I am not ...
0
votes
0answers
86 views

Monit: How to temporarily unmonitor a process as a non-root user?

I need to temporarily unmonitor a custom daemon when I deploy a new version. I tried monit unmonitor <name>, but it says I don't own monitrc since my deploy script does not run as root or have ...
1
vote
0answers
297 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
votes
1answer
142 views

Can you do a monit stop <name>, with a timeout to force kill a process? [duplicate]

I have a long running daemon I need to take down for maintenance every now and then, is there an easy way to run monit stop <name>, but if the process doesn't stop after a period of time then to ...
1
vote
1answer
67 views

Is there an easy way to do monit start <name>, only if its not running?

I know you can do monit start <name> to start an individual process (eg if I had taken it down temporarily using monit stop <name>), but is there any easy way to tell it to only start the ...
3
votes
1answer
454 views

I need to monitor a log file with monit if the file does not change monit will alert

I need help. I was looking in to Monit documentation and I need help. I could not find my answer there. I need to monitor a log file of a service, if that log file stops to increase in size or even ...
2
votes
1answer
93 views

Combining uninstall, stop, install, start script via monit

We have socket listener which listens on port 9000 so below is how we wrote the alert for monit. The listener runs via yajsw daemon tool. So currently when it fails on port 9000 we get an email. What ...
0
votes
1answer
140 views

Load balance M/Monit collector

I am new to Monit monitoring system. Can we load balance mmonit collector (two instances) to avoid single point failure. I mean if monit collector (instance) is down, whole monitoring system will be ...
0
votes
2answers
471 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 ...
1
vote
1answer
182 views

allow a user to run specific monit action

I have installed monit for many applications with the root user. One of the applications is started with a non-root user account. Unfortunately, when I update my app, I also need to restart it. My ...
0
votes
1answer
169 views

Monit from epel not able to start via upstart method

I have centos 6.3 machine and did a yum install monit (version monit 5.1.1-4.el6 from epel) and then I setup the up the http://mmonit.com/wiki/Monit/Upstart and tried to start monit initctl start ...
0
votes
1answer
47 views

Comparison in Monit Permissions Testing

I'm trying to use Monit to check the permissions of a particular directory, but I only care that it's readable to all users. I don't care about any other permissions (write, execute) for the owner, ...
1
vote
1answer
490 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
2answers
259 views

getaddrinfo: command not found [duplicate]

Possible Duplicate: How do I fix “getaddrinfo: localhost Name or service not found” for telnet server? I've installed a new Ubuntu 12.04 on an AWS EC2 instance and everything worked fine ...
2
votes
1answer
185 views

How to use monit to make sure only one instance of process is running

I have ruby daemons running. Once in a while we'll accidentally start up a second instance of it, which causes race conditions. Can I use Monit to detect if multiple instances of 'my_ruby_daemon' is ...
2
votes
1answer
181 views

Is it possible for Monit to perform a Sysfence style load average calculation using conditionals?

I am beginning to migrate from Sysfence to Monit on a RHEL Linux box and I wonder if it possible to create the following sysfence equivalent in Monit. Sysfence configuration (partial) For example, ...
2
votes
1answer
63 views

Suppress all alerts for a specific Monit service check?

Under my Monit 5.4 installation, I'm interested in suppressing all alerts for a particular service check. Given the following stanza: check process nslcd with pidfile ...
2
votes
1answer
111 views

Monit server went down

One of our developers needs some sort of notification in order to know whether the application is running smoothly or not.And We already decided that we will implement monit in order to get this ...
0
votes
1answer
28 views

Monit Password Restrictions?

Are there password requirements for a monit password? I'm unable to start monit. Doing monit -t shows that the syntax error is a ! In my password. I changed it to % and then it said that character ...
0
votes
1answer
142 views

Monit runs exec action too often

I've written a script which sends me an sms notification. I call with exec action in monit test. It works, but I'm getting overwhelmed by messages. Is there a way to suppress sending subsequent ...
2
votes
1answer
250 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 ...
0
votes
2answers
318 views

Does exist a linux service for watching/checking (and restarting, i.e. for a segfault) running daemons? [closed]

I'm searching for a linux service that watches/checks every n seconds a list of running processes/daemons for detecting (and noticing+restarting the process) any issues (like a segmentation fault in ...
1
vote
1answer
471 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 - ...
2
votes
0answers
260 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 ...
8
votes
1answer
5k views

Monit versus Nagios

Does nagios offer any additional functionality when compared to monit? This answer states that monit is a clumsy tool for situational awareness, which is the reason I'm asking the question.
1
vote
2answers
226 views

Monit and Thin and Unfound Gems

I've been using Monit to monitor my Thin server and everything was working until I upgraded my Rails version from 2.3.4 to 2.3.14. Now when I try and start Thin using monit it gives me an unfound gem ...