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
1
vote
0 answers

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 Linux(Debian) Working directory…
David
  • 11
  • 2
1
vote
1 answer

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 restarted and another alert when the service is ok. I have…
Onitlikesonic
  • 1,161
  • 4
  • 15
  • 24
1
vote
1 answer

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

I know you can do monit start to start an individual process (eg if I had taken it down temporarily using monit stop ), but is there any easy way to tell it to only start the new process if the pid in the pidfile isn't running? Or do I…
1
vote
1 answer

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 monit initctl: Job failed to start. I did on…
new14
  • 187
  • 3
  • 9
1
vote
1 answer

How to run a shell script before restarting a service in Monit in case of a crash

I am using Monit 5.3.2 in my Linux box. I am monitoring some services using Monit. I want to run a script before the running the restart command. I have used the below conditions for the same. if does not exist for 2 times within 3 cycles then exec…
Supratik
  • 2,104
  • 10
  • 49
  • 66
1
vote
0 answers

Monit 5.3.2 not working on Ubuntu 12.04 x86_64

I have monit working on several servers but when I install it on Ubuntu 12.04 64-bit server I get the following error reported in the log file and monitoring doesn't work. [EDT Jun 24 21:26:20] error : State file '/var/lib/monit/state': Unable to…
Tyler
  • 77
  • 1
  • 10
1
vote
1 answer

Rewrite URLs with Apache (to be used in combination with mod_proxy)

I'm using Apache and mod_proxy to provide access to the Monit GUI over HTTP. So far my configuration is as follows: ProxyRequests Off Order deny,allow Allow from all ProxyPreserveHost on …
Max
  • 3,373
  • 15
  • 51
  • 71
1
vote
0 answers

Monit unable to send email alerts

I have set monit to send email if my java listener failed on port 8000. I have tried to close the listner and run monit validate below is the errors I got. monit validate 'cs8000' process is not running Sendmail error: 550-Verification failed for…
user111196
  • 1,257
  • 2
  • 13
  • 13
1
vote
2 answers

PID file for C program for monit

How can I create a pid file for a C program to be used in monit, and how do I monitor that C program using monit?
1
vote
1 answer

Monit not restarting service

I have a node.js script I want to daemonize on a Funtoo system (I tagged as Gentoo, since I don't think there's anything really specific to Funtoo in here vs Gentoo), and I do this with the following init script: #!/sbin/runscript depend(){ …
Matt Sieker
  • 358
  • 4
  • 11
1
vote
1 answer

using monit to restart custom daemon

I wrote a php daemon using system daemon pear class. How do I use monit to restart it when it fails? I have the following code in my monit config file: check process merge with pidfile /var/www/merge/merge.pid group 1000 start program =…
Chris Hansen
  • 139
  • 1
  • 1
  • 4
1
vote
4 answers

Stop mysqld service when monit service stops

I'm monitoring mysqld with monit but I would like that if I stop monit then the mysqld service also stops.
edotan
  • 1,786
  • 12
  • 37
  • 57
1
vote
2 answers

configure Monit application on Linux Centos error message

I'm trying to configure Monit to monitor my pidfile. I had no problem except for one. this is what I configured: check process chat with pidfile /var/run/chat.pid start program = "/etc/init.d/chat start" start program = "/etc/init.d/chat stop" this…
edotan
  • 1,786
  • 12
  • 37
  • 57
1
vote
2 answers

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 response back? monit script snippet: if failed…
99miles
  • 361
  • 3
  • 6
  • 16
1
vote
2 answers

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 strictly necessary. What I'd like do is keep P around…
Pistos
  • 2,863
  • 5
  • 21
  • 21