Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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
add comment

1 Answer 1

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
share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.