[Check_mk (english)] Problem with script check_by_ssh ..... (Return code of 255 is out of bounds)

I always said it’s the user!

Connect to your monitoring server, become root and change user to the nagios one:

su -

…then issue the command and watch it failing.

Marcel

···

2013/10/23 Marcel Schulte schulte.marcel@gmail.com

Francisco,

Open a terminal and execute the command as Nagios user. Does that work?

Regards,
Marcel

sent from my SGS3

Am 23.10.2013 15:29 schrieb “Francisco Gomez Leo” pacogomezleo@gmail.com:

How can i get that the string that it returns can i show it in my checkmk inteface , because always show me (Return code of 255 is out of bounds) CRIT

2013/10/23 Francisco Gomez Leo pacogomezleo@gmail.com

but i connect perfectly …

2013/10/23 Marcel Schulte schulte.marcel@gmail.com

If using root user the public part of root’s cert is used for the

connection. Nagios most likely does not run as root so you must setup

Nagios’ user’s pub part for the connection and it should work.

HTH,

Marcel

2013/10/23 Francisco Gomez Leo pacogomezleo@gmail.com:

when i execute the command by terminal , i used root user ,

/usr/local/lib/nagios/plugins/check_by_ssh -H “ipremoteserver” -l

“userremoteserver” -C /home/nagios/hardware.sh -E the “userremoteserver” has

access with rsa certificates and no password is needed , if he dont the

command wouldn´t works in the terminal of my monitoringserver.

Thanks for the answer

2013/10/23 Marcel Schulte schulte.marcel@gmail.com

Hi Francisco,

when you execute the command in terminal - as which user do you do

that? Nagios executes all plugins as the user it runs as…

Looks as if the script does not need a password for the ssh user so

this should work with rsa certificates or similar. The used user is

very important then as the public cert of the user is taken to

authenticate.

HTH,

Marcel

2013/10/23 Francisco Gomez Leo pacogomezleo@gmail.com:

Hi , i used check_by_ssh to execute another script in a remote server,

this

works when i execute the command in the shell but it dosent works when I

tried to used it with check_mk, that script always return (Return code

of

255 is out of bounds) “critical” , in the check_mk interface …

define command{ command_name check_nas_server command_line

/usr/local/lib/nagios/plugins/check_by_ssh -H “ipremoteserver” -l

“userremoteserver” -C /home/nagios/hardware.sh -E }

it should be return 0 or 1 , and a echo message …

Could you help me ? , the userremoteserver has nopassword access to the

remote server , and is correct.

thank regards


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en