monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit] Help Needed


From: Hartman, Jerome
Subject: [monit] Help Needed
Date: Mon, 16 Jun 2008 13:37:53 -0500

I am having trouble getting monit to monitor my Apache process and it keeps stopping below is my config file an the web output please help.  Everything is working fine.

 

set daemon  60

set logfile syslog facility log_daemon

set mailserver ourserver.com

set mail-format { from: address@hidden }

set alert address@hidden

set httpd port 2812 and

     SSL ENABLE

     PEMFILE  /var/certs/monit.pem

     allow user:password

 

check system localhost

    if loadavg (1min) > 4 then alert

    if loadavg (5min) > 2 then alert

    if memory usage > 75% then alert

    if cpu usage (user) > 70% then alert

    if cpu usage (system) > 30% then alert

    if cpu usage (wait) > 20% then alert

 

check process sshd with pidfile /var/run/sshd.pid

   start program  "/etc/init.d/sshd start"

   stop program  "/etc/init.d/sshd stop"

   if failed port 22 protocol ssh then restart

   if 5 restarts within 5 cycles then timeout

 

check process mysql with pidfile /var/run/mysqld/mysqld.pid

   group database

   start program = "/etc/init.d/mysqld start"

   stop program = "/etc/init.d/mysqld stop"

   if failed host 127.0.0.1 port 3306 then restart

   if 5 restarts within 5 cycles then timeout

 

check process apache with pidfile /var/run/httpd.pid

   group www

   start program = "/etc/init.d/httpd start"

   stop program  = "/etc/init.d/httpd stop"

   if failed host 127.0.0.1 port 443 protocol http

      and request "/monit/token" then restart

   if cpu is greater than 60% for 2 cycles then alert

   if cpu > 80% for 5 cycles then restart

   if totalmem > 500 MB for 5 cycles then restart

   if children > 250 then restart

   if loadavg(5min) greater than 10 for 8 cycles then stop

   if 3 restarts within 5 cycles then timeout

 

check file httpd.conf

     with path //etc/httpd/conf/httpd.conf

 

Web output

 

Process status

 

Parameter   Value

Name  apache

Pid file    /var/run/httpd.pid

Status      not monitored

Group www

Monitoring mode   active

Monitoring status not monitored

Start program     '/etc/init.d/httpd start' timeout 1 cycle(s)

Stop program      '/etc/init.d/httpd stop' timeout 1 cycle(s)

Check service     every 1 cycle

Timeout     If 3 restart within 5 cycles then unmonitor else if passed then alert

Data collected    Mon Jun 16 13:21:52 2008

Port Response time      -

Process id -

Parent process id       -

Process uptime    -

CPU usage   -

Memory usage      -

Children    -

Total CPU usage (incl. children)    -

Total memory usage (incl. children) -

Port  If failed 127.0.0.1:443/monit/token [HTTP via TCP] with timeout 5 seconds 1 times within 1 cycle(s) then restart else if passed 1 times within 1 cycle(s) then alert

Pid   If changed 1 times within 1 cycle(s) then alert

Ppid  If changed 1 times within 1 cycle(s) then alert

Load average (5min)     If greater than 10.0 8 times within 8 cycle(s) then stop else if passed 1 times within 1 cycle(s) then alert

Children    If greater than 250 1 times within 1 cycle(s) then restart else if passed 1 times within 1 cycle(s) then alert

Memory amount limit (incl. children)      If greater than 512001 5 times within 5 cycle(s) then restart else if passed 1 times within 1 cycle(s) then alert

CPU usage limit   If greater than 80.0% 5 times within 5 cycle(s) then restart else if passed 1 times within 1 cycle(s) then alert

CPU usage limit   If greater than 60.0% 2 times within 2 cycle(s) then alert else if passed 1 times within 1 cycle(s) then alert

 

 

 

 

Thank you,

 

Jerome Hartman

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                         

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]