Help: Newbie - Return code of 127 is out of bounds - in status.log file

Srinivas Kotapally ksrinivas at bisil.com
Fri Oct 10 21:37:41 CEST 2003


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: 5808 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20031010/4333396a/attachment.bin>


More information about the Users mailing list