Return code of 127 is out of bounds.?


hi all.
i’ve been using nagios 1.3 for a few weeks.
2 or 3 days ago i tried to add a service to monitor ldap.
theres a plugin named check_ldaps in libexec but when i try to run #./check_ldaps -help get an error which says that no file or folder found. i mean check_ldaps doesnt seem to be there. but when i ls, i can see it here :stuck_out_tongue:
anyway i wrote my service definitions and restart nagios. wait for some time and get this error : Return code of 127 is out of bounds. plugin may be missing.
my eyes are gone ? or something wrong with nagios ?
now see ls results and tell me that your eyes are still works fine :stuck_out_tongue:

[email protected]# ls
check_breeze check_fping check_jabber check_nntps check_rpc check_time
check_by_ssh check_ftp check_ldaps check_nt check_sensors check_udp
check_dhcp check_game check_load check_ntp check_simap check_udp2
check_dig check_hpjd check_log check_nwstat check_smtp check_ups
check_disk check_http check_mailq check_oracle check_snmp check_users
check_disk_smb check_icmp check_mrtg check_overcr check_spop check_wave
check_dns check_ifoperstatus check_mrtgtraf check_ping check_ssh negate
check_dummy check_ifstatus check_pop check_ssmtp urlize
check_file_age check_imap check_nagios check_procs check_swap
check_flexlm check_ircd check_nntp check_real check_tcp
[email protected]#

u think u can also see the check_ldaps there…
now the second command to run :

[email protected]# ./check_ldaps -help
bash: ./check_ldaps: No such file or directory
[email protected]#

what do i have to do ?

and the second question is :
please tell me how i can monitor sql server via nagios ?

urgent help needed.
thanks in advance.


Well, from the command line, check_ldaps won’t run unless you write the whole path. So if you want to run it from command line, it’d probably work if you executed /usr/local/nagios/libexec/./check_ldaps…
and then any options you felt necessary. Now, as for why it wont run in nagios…that, I can’t be sure. I’d check user/group permissions for that plugin and make sure the user nagios is running under is authorized to use that particular plugin.


all other plugins work fine. but check_ldaps not and dont know why.
would any one of you please give me the whole path to check check_ldaps from command line.

and if you dont mind please tell me how to write a command and service definition for check_ldaps.
maybe thats the point i am doing mistakes.
thanks in advance.
bye for now.


Yeah, you’ll need to write a command definition for check_ldaps. I assumed you’d already done that.

If you used the defaults during the installation, your path to check_ldaps would be /usr/local/nagios/libexec/check_ldaps. But to be sure, you’ll have to look in your resource.cfg file to find out what the $USER1$ macro is set to. That should be your base nagios directory.

I’m not familiar with check_ldaps, but a lot of times, if you try and just run the plugin from command line, it will return a list of options. In that case, you might be able to write the command by looking at your options and those of the commands that have already been written and seeing how they’ve been formatted.


check command :

‘check_ldaps’ command definition

define command{
command_name check_ldaps
command_line /usr/local/nagios/libexec/check_ldaps -H $HOSTADDRESS$

service definition:

Service definition

define service{
use generic-service ; Name of servic
e template to use
host_name hostnamehere
service_description LDAP
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 3
retry_check_interval 1
contact_groups contactgrouphere
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command check_ldaps

i wrote the above. i am not familiar too. its the first time trying to check ldap.

do i need to add anything else after “check_ldaps” line?
this is maybe the wrong or missing part.

dont get anything when try to ./check_ldaps -help cos it gives an error message which i wrote in my first thread.


i suppos the sql server you talk about is MSSQL… Check for nt_client. with that you can get snmp requests for any value you find in thw Windows performance monitor :slight_smile:



[quote=“mfakbulut”]hi all.
[email protected]# ./check_ldaps -help
bash: ./check_ldaps: No such file or directory

ls -la check_ldaps
lrwxrwxrwx 1 root root 10 Jun 25 16:23 check_ldaps -> check_ldap
ls -la check_ldap
-rwxr-xr-x 1 nagios nagios 40692 Jun 25 16:23 check_ldap
What are your permissions?


Now that I look more closely at your output of ls, I dont see the file check_ldap, but only the check_ldaps, which is a link in my folder.
So please show a ls -la of check_ldaps


#ls -l

lrwxr-xr-x 1 root nagios 10 Nov 29 11:03 check_ldaps -> check_ldap

check_ldaps is a symlink to check_ldap.

but i dont understand if theres something wrong or missing thats why check_ldap not configured when installing plugins, then why the symlink is there ?
is this a nagios lack