Page 2 of 2

Re: [sort of SOLVED] Script (plugin) not working as expected

Posted: Mon Mar 19, 2012 9:59 am
by shirishlnx
Hello ...

Here am not sure wht you are trying to achieve what s your

Code: Select all

"/usr/opt/something/command"
[/b]
#######
First:
/usr/lib/nagios/plugins/check_by_ssh -H 10.xx.xx.xx -C /usr/opt/something/command

Here you are not passing any user info who to fire this command on remote node ...??
Correct it as:
/usr/lib/nagios/plugins/check_by_ssh -l nagios -H 10.xx.xx.xx -C /usr/opt/something/command
#######
Second:
You need to stablish a password less auth ssh login from you nagios server to Remote server .. Follow below first ...
Step 1> Login to remote host
# create user nagios with some password
Step-2> From NagiosServer: Login as user nagios
# ssh-keygen -t dsa <-- do not pass any pass phrase
# ssh-copy-id -i .ssh/id_dsa.pub nagios@your-remote-server-ip
TEST
# ssh nagios@your-remote-server-ip

#### Now test Below
/usr/lib/nagios/plugins/check_by_ssh -l nagios -H <your-remote-server-ip> -C "uname -a"

#######
Third
Now ensure that what command you are fireying on remote host : user nagios should have proper permission to fire same .

--Shirish Shukla
http://shirishlinux.blogspot.in

Re: [sort of SOLVED] Script (plugin) not working as expected

Posted: Wed Mar 21, 2012 10:17 am
by darthcolo
Thanks for your help.
I will check it as soon as I have some spare time.

Re: [sort of SOLVED] Script (plugin) not working as expected

Posted: Thu Jun 14, 2012 8:38 am
by shirishlnx
Does your problem got resolved !