Nagios and ssh


Results 1 to 3 of 3

Thread: Nagios and ssh

  1. #1
    Join Date
    Mar 2004
    Location
    Gatineau Quebec
    Posts
    823

    Nagios and ssh

    hi gang!
    I'm doing some stuff with Nagios here and it's running on a server that has web, ftp, mail and ssh service running on it. I also just put nagios on and it seems to be working correctly. However, its constantly reporting an issue with ssh, saying critical status and 'connection refused' for status information.
    I have a feeling that this is basically because my sshd_config file is pretty tweaked.
    Problem is that i'm not sure 100% if this is the problem and if it is what nagios file do I have to change?

    system is Debian Lenny 2.6.26-2-686 Nagios Core version 3.2.2 installed from source.
    Linux user #367409

  2. #2
    Join Date
    Jul 2002
    Location
    New Orleans, LA USA
    Posts
    986
    From Nagios Troubleshooting:

    Where 192.168.2.51 is the name of IP address of the remote machine we want to monitor. If no SSH server is set up on the remote host, the plugin will return Connection refused status, and if it failed to connect, the result will state No route to host.

    So if that is true, Nagios can detect the difference between a failed connect and a refused connect.

    Maybe post your sshd, also your iptables if you use them (or whatever firewall rules). My assumption would be you are seeing the refused attempts from either a firewall rule table or /etc/hosts.deny.
    "Whenever you find yourself on the side of the majority, it's time to pause and reflect."

    -Mark Twain

  3. #3
    Join Date
    Mar 2004
    Location
    Gatineau Quebec
    Posts
    823
    sorry to bother you duudez i found the answer..
    edited

    /usr/local/nagios/etc//objects/localhost/cfg to detail:

    define service{
    use local-service ; Name of service template to use
    host_name localhost
    service_description SSH
    check_command check_ssh! -p 'mine ip address'
    notifications_enabled 0
    }

    now all is groovy.
    have you had a chance to try portuguese wine? look for some nice red Douro Villa Regia... yes I'm drunk
    Linux user #367409

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •