• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

Monit Problem

michi119

New Member
EDITED:
Anderes Problem nun ...
Monit scheint zu laufen mit folgender config
Code:
set daemon  120
# poll at 2-minute intervals. Monit will wakeup every two minute to
# monitor things. Time must be given in seconds.

set logfile syslog facility log_daemâon
# Set syslog logging.

# Set a default mail from-address for all alert messages emitted by monit.
# All alert mail will be sent to belâw mail address.
set mail-format { from: root@localhost }
set alert root@localhost

# You can define your mail-notification format. Do man monit
mail-format {
   from: webmaster@XXXXXXXXX.de
   subject: $SERVICE $EVENT at $DATE
   message: Monit $ACTION $SERVICE at $DATE on $HOST,

   MfG,
   Timo Lxxxxxxxxx
             }

# Make monit start its web-server. So you can access it from web browser.
 set httpd port 2812 and
 use address indiaXXX.server4you.de

##Monit web-server ACL.
  allow localhost       # allow localhost to connect to the server and
  allow 172.19.1.2     # allow 172.19.1.2 to connect to the server,
  allow 127.0.0.1

# You can give only one per entry

  allow admin:xxxPASSWORDxxx    # user name and password for authentication.

  allow michi119:xxxPASSWORDxxx   # set multiple user to access through browser.
# Monitoring the apache2 web services.
# It will check process apache2 with given pid file.
# If process name or pidfile path is wrong then monit will
# give the error of failed. tough apache2 is running.
   check process apache2 with pidfile /var/run/apache2.pid

#Below is actions taken by monit when service got stuck.
   start program = "/etc/init.d/apache2 start"
   stop program  = "/etc/init.d/apache2 stop"
# Admin will notify by mail if below of the condition satisfied.
   if cpu is greater than 60% for 2 cycles then alert
   if cpu > 80% for 5 cycles then restart
   if totalmem > 3036 MB for 5 cycles then restart
   if children > 3036 then restart
   if loadavg(5min) greater than 10 for 8 cycles then stop
   if 3 restarts within 5 cycles then timeout
 group server

#CHECKING MYSQL
  check process mysql with pidfile /var/run/mysqld/mysqld.pid

#Below is actions taken by monit when service got stuck.
  start program = "/etc/init.d/mysql start"
  stop program  = "/etc/init.d/mysql stop"
# Admin will notify by mail if below of the condition satisfied.
  if cpu is greater than 60% for 2 cycles then alert
  if cpu > 80% for 5 cycles then restart
  if totalmem > 3036 MB for 5 cycles then restart
  if children > 3036 then restart
  if loadavg(5min) greater than 10 for 8 cycles then stop
  if 3 restarts within 5 cycles then timeout
 group mysql


#Monitoring slapd process.
#  check process slapd with pidfile /var/run/ldap/slapd.pid
#  start program = "/etc/init.d/slapd start"
#  stop program  = "/etc/init.d/slapd stop"
#  if failed port 389 then restart
#  if 2 restarts within 3 cycles then timeout
# group server

# monit will only monit/give alert in this mode.
   mode passive

# Check Database file, size,permission etc...
#       check file slapd-database with path /var/ldap/var/openldap-data/mydata.db
#       if failed permission 700 then alert
#       if failed uid data then alert
#       if failed gid data then alert
#       if timestamp > 15 minutes then alert
#       if size > 100 MB then alert

#Check directory for permission.
       check directory bin with path /bin
       if failed permission 755 then unmonitor
       if failed uid 0 then unmonitor
       if failed gid 0 then unmonitor

#Check host for which services up/down on particular port.
      check host the-hellhounds.net with address 127.0.0.1
      if failed icmp type echo with timeout 4 seconds then alert
      if failed port 21 then alert
#      if failed port 22 type tcp 22 with timeout 40 seconds then aler
      if failed port 80 protocol http then alert
      if failed port 389 type tcp with timeout 15 seconds then alert

Problem:
Code:
india197:/etc/monit# monit validate
'the-hellhounds.net' failed, cannot open a connection to INET[127.0.0.1:389] via TCP
india197:/etc/monit# monit status
monit: cannot read status from the monit daemon
india197:/etc/monit# telnet localhost 2812
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
über den Browser ist Monit nicht zu Erreichen. Woran kann das liegen?
und wie lasse ich, sollte es mal klappen, Monit auch noch Pure-ftpd überwachen?
 
Last edited by a moderator:
Back
Top