Help: Newbie - Return code of 127 is out of bounds - in status.log file
Srinivas Kotapally
ksrinivas at bisil.com
Fri Oct 10 23:51:51 CEST 2003
Thanks for the post... I have been able to resolve the problem! I am able
to see the services! The problem was that I did not have a .htaccess file
in the /sbin. I was getting the password interface though!
I have 2 questions!
1. I want to check the postgres services as well using the command "ps -ef |
grep postmaster". How do I add these to the services?
2. I have blocked all ICMP traffic to the box... so the check_ping macro
shows the host as down! Is there any other way to check that the host is
up?
Regards
KS
-----Original Message-----
From: Marc Powell [mailto:mpowell at ena.com]
Sent: Friday, October 10, 2003 3:53 PM
To: ksrinivas at bisil.com; Nagios (E-mail)
Subject: RE: [Nagios-users] Help: Newbie - Return code of 127 is out of
bounds - in status.log file
Yup, I forgot to mention the need for your contact and contactgroups but
you're breaking down before that even comes into play. The "?" means
that your htaccess authentication isn't working properly. I made the
assumption that you were but are you being asked for a username and
password when you go to the web interface? Do you have a .htaccess file
in both the share *and* the sbin directories (sbin is most important to
this particular issue). Looking back through the thread, I see you have
it in share but no mention of it in ~nagios/sbin. This is key and is
probably the cause of your problems.
Once that's done, you'll just need to verify that you have a contact
named ' ksriniva' that is a member of the linux-admins contact_group.
--
Marc
> -----Original Message-----
> From: Srinivas Kotapally [mailto:ksrinivas at bisil.com]
> Sent: Friday, October 10, 2003 2:38 PM
> To: Marc Powell; 'Nagios (E-mail)'
>
> The nagios Version 1.1. It says I am logged in as "?" user. I guess
it
> does not know what user I am logging in as!!
>
> Thanks for the help!
>
> Below are the configuration files:
>
> The hosts.cfg file:
> ====================
>
> # Generic host definition template
> define host{
> name generic-host ; The name of
this
> host template - referenced in other host definitions, used for
template
> recursion/resolution
> notifications_enabled 1 ; Host notifications
are
> enabled
> event_handler_enabled 1 ; Host event handler
is
> enabled
> flap_detection_enabled 1 ; Flap detection is
> enabled
> process_perf_data 1 ; Process performance
data
> retain_status_information 1 ; Retain status
> information across program restarts
> retain_nonstatus_information 1 ; Retain non-status
> information across program restarts
>
> register 0 ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
> }
>
> # 'linux1' host definition
> define host{
> use generic-host ; Name of host
> template to use
>
> host_name MUSTANG
> alias <<SITE NAME>>
> address <<IP ADDRESS>>
> check_command check-host-alive
> max_check_attempts 10
> notification_interval 480
> notification_period 24x7
> notification_options d,u,r
> }
>
> The services.cfg file:
> =======================
>
> # Generic service definition template
> define service{
> name generic-service ; The 'name'
of
> this service template, referenced in other service definitions
> active_checks_enabled 1 ; Active service
checks
> are enabled
> passive_checks_enabled 1 ; Passive service
checks
> are enabled/accepted
> parallelize_check 1 ; Active service
checks
> should be parallelized (disabling this can lead to major performance
> problems)
> obsess_over_service 1 ; We should obsess
over
> this service (if necessary)
> check_freshness 0 ; Default is to NOT
check
> service 'freshness'
> notifications_enabled 1 ; Service
notifications
> are enabled
> event_handler_enabled 1 ; Service event
handler is
> enabled
> flap_detection_enabled 1 ; Flap detection is
> enabled
> process_perf_data 1 ; Process performance
data
> retain_status_information 1 ; Retain status
> information across program restarts
> retain_nonstatus_information 1 ; Retain non-status
> information across program restarts
>
> register 0 ; DONT REGISTER THIS
> DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
> }
>
> # Service definition
> define service{
> use generic-service ; Name
of
> service template to use
>
> host_name MUSTANG
> service_description PING
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 5
> retry_check_interval 1
> contact_groups linux-admins
> notification_interval 240
> notification_period 24x7
> notification_options c,r
> check_command check_ping!100.0,20%!500.0,60%
> }
>
>
> # Service definition
> define service{
> use generic-service ; Name
of
> service template to use
>
> host_name MUSTANG
> service_description HTTP
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 2
> retry_check_interval 1
> contact_groups linux-admins
> notification_interval 240
> notification_period 24x7
> notification_options w,u,c,r
> check_command check_http
> }
>
>
> # Service definition
> define service{
> use generic-service ; Name
of
> service template to use
>
> host_name MUSTANG
> service_description Current Users
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 5
> retry_check_interval 2
> contact_groups linux-admins
> notification_interval 240
> notification_period 24x7
> notification_options w,u,c,r
> check_command check_local_users!75!150
> }
>
>
> # Service definition
> define service{
> use generic-service ; Name
of
> service template to use
>
> host_name MUSTANG
> service_description Total Processes
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 5
> retry_check_interval 2
> contact_groups linux-admins
> notification_interval 240
> notification_period 24x7
> notification_options w,u,c,r
> check_command
check_local_procs!150!200!RSZDT
> }
>
>
> # Service definition
> define service{
> use generic-service ; Name
of
> service template to use
>
> host_name MUSTANG
> service_description /dev/hda1 Free Space
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 5
> retry_check_interval 1
> contact_groups linux-admins
> notification_interval 120
> notification_period 24x7
> notification_options w,u,c,r
> check_command
check_local_disk!20%!10%!/dev/hda1
> }
>
> hostgourps.cfg:
> ===============
>
> # 'linux-boxes' host group definition
> define hostgroup{
> hostgroup_name linux-boxes
> alias Linux Servers
> contact_groups linux-admins
> members MUSTANG
> }
> The htpasswd.users file:
> ========================
>
> nagiosadmin:<password>
> ksriniva:<password>
> nagios:<password>
>
>
>
> -----Original Message-----
> From: Marc Powell [mailto:mpowell at ena.com]
> Sent: Friday, October 10, 2003 3:11 PM
> To: ksrinivas at bisil.com; Nagios (E-mail)
> Subject: RE: [Nagios-users] Help: Newbie - Return code of 127 is out
of
> bounds - in status.log file
>
>
> We'll need to see your specific host, service, hostgroup definitions
and
> your htpasswd.users file (you can remove the passwords) to be able to
go
> much further with this. Nagios version would be useful as well.
>
> We'll also need to know what nagios thinks you're logged in as (upper
> left hand box in the main window, says 'Logged in as...'.
>
> --
> Marc
>
> > -----Original Message-----
> > From: Srinivas Kotapally [mailto:ksrinivas at bisil.com]
> > Sent: Friday, October 10, 2003 1:41 PM
> > To: Marc Powell; Nagios (E-mail)
> >
> > Marc
> >
> > I had missed one step in the nagios installation... Setting up of
the
> > commands (macros). I have done that but am still getting the
> permissions
> > problem!
> >
> > It is important to note that the user you are logging in as (you do
> have
> > .htaccess configured properly, don't you?) must be an authorized
> contact
> > for the hosts and services that you want them to see.
> >
> > I have set-up the .htaccess in the /usr/local/nagios/share directory
> with
> > the entry:
> > AuthName "Nagios Access"
> > AuthType Basic
> > AuthUserFile /usr/local/nagios/etc/htpasswd.users
> > require valid-user
> >
> > I have both nagios and for myself set-up as users in the
> htpasswd.users
> > directory! Both nagios and me are contacts and users on the system.
> Both
> > are also the authorised contact for the 1 host that I have set-up.
> >
> > I am still getting the permissions problem!
> >
> > "It appears as though you do not have permission to view information
> for
> > any of the services you requested...
> >
> >
> > If you believe this is an error, check the HTTP server
authentication
> > requirements for accessing this CGI
> > and check the authorization options in your CGI configuration file."
> >
> > Can you please help?
> >
> >
> > Regards
> >
> > KS
> >
> >
> >
> > -----Original Message-----
> > From: Marc Powell [mailto:mpowell at ena.com]
> > Sent: Wednesday, October 08, 2003 5:09 PM
> > To: ksrinivas at bisil.com; Nagios (E-mail)
> > Subject: RE: [Nagios-users] Help: Newbie - Return code of 127 is out
> of
> > bounds - in status.log file
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Srinivas Kotapally [mailto:ksrinivas at bisil.com]
> > > Sent: Wednesday, October 08, 2003 3:46 PM
> > > To: Nagios (E-mail)
> > >
> > > Hi all
> > >
> > > I have just finished setting up Nagios. I have a problem
already...
> I
> > am
> > > looking at the log file (status.log) and have seen the following
> entry
> > in
> > > the log file:
> > > SERVICE;<my_host>;/dev/hda1 Free
> > >
> >
>
Space;CRITICAL;1/3;HARD;1065646603;1065646903;ACTIVE;1;1;1;1065216471;0;
> > CR
> > > IT
> > > ICAL;0;0;0;429480;0;0;1;0;0;1;0;0.00;0;1;1;1;(Return code of 127
is
> > out of
> > > bounds - plugin may be missing)
> > >
> > > What does this indicate?
> >
> > That the plugin is missing as far as nagios is concerned. Your
> specific
> > service definition and command definition would be useful. Some
things
> > to check --
> >
> > * Verify in resource.cfg that $UER1$ points to your nagios
> > libexec directory.
> > * Verify in commands.cfg that either $USER1$ is used in the
> > command_line for the specific plugin or the full path to the plugin
is
> > specified
> > e.g -
> > define command{
> > command_name verify_http
> > command_line $USER1$/check_http -H $ARG1$ -I
> > $HOSTADDRESS$ -s \/html
> > }
> > * Verify that the plugin actually exists in the path specified
> > (typically /usr/local/nagios/libexec/) **and is executable by the
> nagios
> > user**. Test this by su -'ing to nagios and executing the plugin.
> >
> > >
> > > Also, from my web interface when I try to see "Service Detail" I
get
> > the
> > > following message:
> > > It appears as though you do not have permission to view
information
> > for
> > > any
> > > of the services you requested...
> > > If you believe this is an error, check the HTTP server
> authentication
> > > requirements for accessing this CGI
> > > and check the authorization options in your CGI configuration
file.
> > >
> > > Does this mean that my configuration is incorrect?
> >
> > Yes.
> >
> > > Can anyone please guide me in the configuration?
> >
> > http://nagios.sourceforge.net/docs/1_0/cgiauth.html
> >
> > It is important to note that the user you are logging in as (you do
> have
> > .htaccess configured properly, don't you?) must be an authorized
> contact
> > for the hosts and services that you want them to see.
> >
> >
> > --
> > Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 7112 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031010/ad3bbca9/attachment.bin>
More information about the Users
mailing list