How to change socket timeout

Most of the time my server is not able to connect to remote server within 10 secs.
So it gives socket timeout error.
How to change this socket timeout?? Can I set it to some higher value ??

Thanks !!!

In the /etc/nagios-plugins/check_ssh.cfg you could define new modified command with the -t switch after which you should enter the timeout value in seconds.
After you have defined the new command you have to edit the desired service definition and change the check_command variable.

If you want to get familiar with the syntax of the command then from terminal you can execute:
locate check_ssh
which would show you where plugin executable is and then you just execute the command with the --help switch, for example:
/usr/lib/nagios-plugins/check_ssh --help

Hey Albin,Thanks …but i m not getting what u have explained…
There is no ‘/etc/nagios-plugins/check_ssh.cfg’ on my box…
The path for plugins is /usr/local/src/nagios-plugins-1.4.11/plugins/…
but there is no .cfg file…contains check_command binary, .c & .o files…
To be more specific,I want to set socket timeout for check_ftp and check_http commands…
So can u guide me ???

Thanks !!!

Hm?
Those .c and .o files are the sources. Have you compiled nagios-plugins in order to install Nagios completely? If not, you should. Maybe this will help:
onlamp.com/pub/a/onlamp/2002 … tml?page=2

If you have compiled nagios-plugins and installed them properly, then there should be .cfg files in nagios etc folder and plugin executables somewhere within usr folder (distribution dependent).