Hello --

I ran the command syntax that you suggested, and I got an error that indicated 
the nagios user account was not available. To that end, I modified
the account to use the bash command shell. When the command was run again, I 
was able to get the expected output. For good measure, I switched
to the nagios user account, and again ran the command with the same results.

However, even with the bash shell in place for the user account, the error 
message is continuing to appear. What else can I try here?

Thanks.

________________________________
From: Christophe HAEN [mailto:christophe.h...@cern.ch]
Sent: Thursday, October 10, 2013 2:38 PM
To: icinga-users@lists.sourceforge.net
Subject: Re: [icinga-users] Problem with the check_folder_size.sh script

You might want, just to discard permission problems, to try to run it as nagios 
user :
sudo -u nagios /usr/local/nrpe/libexec/check_folder_size.sh 200000 300000 
/CMS/rtp1/0/patient


2013/10/10 Kaplan, Andrew H. 
<ahkap...@partners.org<mailto:ahkap...@partners.org>>
Hello --

I am trying to run the check_folder_size.sh script on one of our servers, but 
the error message that I am receiving is the following:

The filesystem doesnt exist or there is a script error

An example of the folders that I am attempting to monitor is shown below via 
the nrpe.cfg file:

command[check_folder_size1]=/usr/local/nrpe/libexec/check_folder_size.sh 200000 
300000 /CMS/rtp1/0/patient

I am able to run the script manually as the root user. The problem occurs when 
when the Icinga server interacts with the script
via the check_nrpe command. The command syntax on the Icinga server that is 
being used is the following:

define service {
                service_description                      Free Space 
rtp1/0/patient
                check_command                            
check_nrpe!check_folder_size1
                host_name                                <hostname>
                check_period                             24x7
                notification_period                      24x7
                contact_groups                           linux-admins
                event_handler_enabled                    0
                active_checks_enabled                    1
                passive_checks_enabled                   0
                notifications_enabled                    1
                check_freshness                          0
                freshness_threshold                      86400
                use                                              generic-service
}

When installing the script, I made sure to add the entry shown below to the 
visudo file:

nagios ALL=(root) NOPASSWD: /usr/bin/du

The nagios user and group that are on the server in question have the following 
properties:

/etc/passwd     --      nagios:x:1963:1963::/home/nagios:/sbin/nologin
/etc/group       --      nagios:x:1963:

The nologin shell for the nagios user account is meant to prevent unauthorized 
access to the server via the nagios user.

A similar configuration has been implemented on another server using the above 
settings, and there is no problem with the script
on that system.

Does anyone have an idea as to what steps can be done to correct this problem?

Thanks.



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net<mailto:icinga-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/icinga-users




--
Christophe HAEN
CERN PH-LBC 2/R022
Phone : +41 (0)2 27 67 31 25
Mobile : +41 (0)7 64 87 88 57
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to