0

In the office we have a server M / Monit to monitor all servers. In the last few days, on some servers can not monitor the ssh service. All servers have the same configuration to monitor the service and others.

I tried restarting the service, and even reinstalling the client monit but the result is the same. It is not possible to monitor the service.

Thank you Regards

Gon
  • 91
  • 1
  • 2
  • 8
  • What do you mean by "not possible to monitor"? Are you getting an error message? What to the logs on the remote server say? – larsks Dec 22 '10 at 14:19

1 Answers1

0

Test basic connectivity between m/monit and monit by attempting to telnet from your m/monit machine to one running monit, as in:

mmonit:~# telnet monit.example.org 2812

Change 2812 if you're running monit on a non-default port. If you're able to telnet in and hit enter you should at least receive a HTTP 400 response.

If that works, please show us your monitrc from the monit machine. I use a stanza similar to the following to monitor sshd (minor path tweaks may be needed according to your environment and personal preference):

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
nlo
  • 341
  • 2
  • 3
  • connectivity between m / monit monit is correct and because only 1 service fails, ssh. Looking at your setup, I have the same. The problem is that other servers have the same configuration and does not fail. – Gon Dec 23 '10 at 16:37