No monitoring of services after install
Issue #140
resolved
I've installed Monit 5.9 on my Debian Jessie (8.0) machine from the repositories. However, after configuring and starting up monit I can view the web-interface but no services are showing.
Some information about the system
x1@srv1:~$ sudo monit --version
This is Monit version 5.9
Copyright (C) 2001-2014 Tildeslash Ltd. All Rights Reserved.
x1@srv1:~$ cat /etc/debian_version
8.0
# other information
[ 0.000000] Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.3 (Debian 4.8.3-16) ) #1 SMP Debian 3.16.7-ckt2-1 (2014-12-08)
# /var/log/syslog
Jan 4 12:38:48 srv1 monit[2791]: Starting Monit 5.9 daemon with http interface at [1.2.3.4:2812]
Jan 4 12:38:48 srv1 monit[2793]: Starting Monit HTTP server at [1.2.3.4:2812]
Jan 4 12:38:48 srv1 monit[2793]: Monit HTTP server started
Jan 4 12:38:48 srv1 monit[2793]: 'srv1.example.com' Monit started
Jan 4 12:38:48 srv1 monit[2789]: Starting daemon monitor: monit.
x1@srv1:~$ sudo monit status
The Monit daemon 5.9 uptime: 1m
System 'srv1.example.com'
status Running
monitoring status Monitored
load average [0.16] [0.23] [0.18]
cpu 0.1%us 0.3%sy 0.3%wa
memory usage 94.1 MB [4.6%]
swap usage 0.0 B [0.0%]
data collected Sun, 04 Jan 2015 12:39:48
some config-vars from monitrc
set daemon 60 # check services at 2-minute intervals
set logfile syslog facility log_daemon
set httpd port 2812 and
use address 1.2.3.4 ### server ip (now changed to 1.2.3.4
allow someUser:somePassword
include /etc/monit/conf.d/*
example of my config for sshd
x1@srv1:~$ sudo tail /etc/monit/monitrc.d/sshd
check process sshd with pidfile /var/run/sshd.pid
start program "/etc/init.d/ssh start"
stop program "/etc/init.d/ssh stop"
if failed port 2886 protocol ssh then restart
if 5 restarts within 5 cycles then timeout
x1@srv1:~$ ls -l /var/run/sshd.pid
-rw-r--r-- 1 root root 4 Jan 4 12:16 /var/run/sshd.pid
x1@srv1:~$ ls -l /etc/init.d/ssh
-rwxr-xr-x 1 root root 4077 Oct 21 20:04 /etc/init.d/ssh
Comments (3)
-
repo owner -
repo owner - changed status to resolved
-
repo owner - removed version
Removing version: 5.9 (automated comment)
- Log in to comment
your include statement sets Monit to include files from the "/etc/monit/conf.d/" directory, whereas your configuration file is "/etc/monit/monitrc.d/sshd" => fix the include statement ("include /etc/monit/conf.d/" -> "include /etc/monit/monitrc.d/") or move the include files.