check_by_ssh plugin

nemir nemiria nemir at hotmail.com
Wed Apr 27 09:44:08 CEST 2005


Apologies about tbe blank response.  I did type something up at some point,  
I promise!  ;)



>                   i am using nagios 2.0b3 on Fedora Core 3 with
>Selinux disabled. i am able to configure services on my machine for
>remote servers. now i want to check the remote servers harddisk
>partions status like how much free space etc........i have tried
>check_by_ssh plugin but i didn't got success with it...........i have
>tried check_by_ssh plugin from the command prompt and it works great
>but it asks for the password there which i don't want to enter. i used
>-i parameter of check_by_ssh and it asks me for the passphrase but i
>haven't set any passphrase for the linux server...The remote servers
>consists of both linux and windows.........

Anyways,  let me retype quickly.  To make check_by_ssh work you will need to 
exchange ssh keys.  Here is a quick and dirty cut'n'paste from a cheat sheet 
I wrote up last time I did it.


You need to log in as (or su - to) nagios

Then run the following command:

ssh-keygen -t dsa


This will create the right folder and the right filenames if you accept the 
defaults.  When it asks you for a password,  this is the password that you 
will need to enter each time you log in with this key,  rather than the 
username/passwd of the account you're logging in with.  Because this is to 
facilitate automated nagios plugins,  this must be left blank.

Once you have done this,  you need to

cd /nagioshome/.ssh
in this directory is a file called id_rsa.pub.  Copy this over to the server 
you need to connect to and run the command on that server as follows:

cat /path/to/id_rsa.pub /nagioshome/.ssh/authorized_keys


Make sure permissions on the files in the folder /root/.ssh are as follows:

monitor:nagios:~/.ssh>ls -al
total 36
drwx------  2 nagios  nagios   512 Mar 19 06:31 .
drwxr-xr-x  9 nagios  nagios   512 Mar 14 19:59 ..
-rw-r--r--  1 nagios  nagios   735 Mar 19 06:31 authorized_keys
-rw-------  1 nagios  nagios  3239 Jul  7  2004 id_rsa
-rw-r--r--  1 nagios  nagios   760 Jul  7  2004 id_rsa.pub
-rw-r--r--  1 nagios  nagios   895 Mar 19 05:43 known_hosts

Make sure to replace nagioshome with the correct path to the nagios 
account's home directory.

>i have installed the
>plugins 1.4 package available at sourceforge.net......but in that
>there is no nrpe plugin.........Does that comes seperately and if it
>so where to find it....

nrpe can be found at http://sourceforge.net/projects/nrpe/

regards,

nemir






>
>
>--
>
>Thanks,
>__________________________________
>Ashish
>System Administrator
>
>
>-------------------------------------------------------
>SF.Net email is sponsored by: Tell us your software development plans!
>Take this survey and enter to win a one-year sub to SourceForge.net
>Plus IDC's 2005 look-ahead and a copy of this survey
>Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id5hix
>_______________________________________________
>Nagios-users mailing list
>Nagios-users at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/nagios-users
>::: Please include Nagios version, plugin version (-v) and OS when 
>reporting any issue.
>::: Messages without supporting info will risk being sent to /dev/null




-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start!  http://www.idcswdc.com/cgi-bin/survey?id=105hix
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list