LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-12-2005, 02:49 AM   #1
sriramsreedhar
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
Lightbulb Nagios - Return code of 127 for check of service


Hi guys

I have the port 5666 running localhost as well as remotely.

Plugins are placed in /usr/local/nagios/libexec/
all the check_commands* are there.

If I run the command manually then I get the response remotely as well
as locally see below.

[root@wninpx01 etc]# /usr/local/nagios/libexec/check_http -H 10.33.16.78
HTTP OK HTTP/1.1 200 OK - 12270 bytes in 0.004 seconds
|time=0.004346s;;;0.000000 size=12270B;;;0

checkcommands.cfg

define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$
}

resource.cfg file has the following line

$USER1$=/usr/local/nagios/libexec


I have also tried manually giving the full path in the file chekcommands.cfg

# 'check_http' command definition
define command{
command_name check_http
command_line /usr/local/nagios/libexec/check_http -H 10.33.16.78
}

This still wont start my webbased to show the services running


The following is the logs

Aug 12 07:01:39 wninpx01 nagios: Warning: Return code of 127 for check
of service 'HTTP' on host 'cluster3' was out of bounds. Make sure the
plugin you're trying to run actually exists.

Aug 12 07:02:39 wninpx01 nagios: Warning: Return code of 127 for check
of service 'IMAP' on host 'cluster3' was out of bounds. Make sure the
plugin you're trying to run actually exists.



Could someone please help !!


Regards

- Sriram Sreedhar (sriramsreedhar@gmail.com)
 
Old 08-12-2005, 06:16 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Never ran into this, but my first guess would be that
the user nagios it run as doesn't have perms on the
files/directories.


Cheers,
Tink
 
Old 08-14-2005, 03:21 AM   #3
sriramsreedhar
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks tink

Its started working now ...

dont know what went wrong ... I will definitely try to figure out post that out ...

I have reset the permissions and it started working ... although permissions previously given were all ok

can u help me on check_disk command options

Ip I connect to is 10.34.1.7

and it has got the folowing disks mounted

[root@cluster3 nrpe-2.0]# df -ah
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 132G 5.5G 120G 5% /
none 0 0 0 - /proc
usbdevfs 0 0 0 - /proc/bus/usb
/dev/sda1 99M 9.3M 84M 10% /boot
none 0 0 0 - /dev/pts
none 503M 0 503M 0% /dev/shm


I want this to list if more than 50 % usage


Can u tell me how I can use the command line
 
Old 02-19-2014, 04:08 PM   #4
ramikhshan
LQ Newbie
 
Registered: Feb 2014
Posts: 1

Rep: Reputation: Disabled
Solved

Return code of 127 for check of service 'HTTP' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists

you need to change the plugin path. it seems that you have installed plugin more than once.

to do that:

find your resource.cfg

vi /etc/nagios/private/resource.cfg

old plugin path---------
#$USER1$=/usr/lib/nagios/plugins

new plugin path---------
$USER1$=/usr/local/nagios/libexec

then restart nagios

GOOD LUCK
 
1 members found this post helpful.
Old 02-22-2014, 04:54 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,474

Rep: Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118Reputation: 8118
Quote:
Originally Posted by ramikhshan View Post
Return code of 127 for check of service 'HTTP' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists you need to change the plugin path. it seems that you have installed plugin more than once. to do that:

find your resource.cfg
vi /etc/nagios/private/resource.cfg

old plugin path---------
#$USER1$=/usr/lib/nagios/plugins

new plugin path---------
$USER1$=/usr/local/nagios/libexec

then restart nagios
...and since this thread has been closed for NINE YEARS before you posted this, I think the OP had already solved the problem....
 
Old 11-14-2016, 03:32 PM   #6
labradort
LQ Newbie
 
Registered: Jan 2014
Posts: 2

Rep: Reputation: Disabled
The problem is still relevant even if the original poster is resolved

Never assume a question is only of interest to the original poster.

Here I am in 2016 finding the answer provided gave me a clue on a configuration error I had for a minute.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dd return code barefootdoctor Linux - General 2 10-13-2005 01:54 PM
how to check the return value of a program Sammy2ooo Linux - General 1 04-27-2004 03:55 PM
Nagios and Check.cgi kopite2012 Linux - Newbie 1 04-08-2004 05:42 AM
Return code from main() using gcc Meatwad Programming 13 01-27-2004 07:36 PM
Problem when Nagios Monitoring runs ping service sanfran49 Linux - Software 0 08-22-2003 01:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration