Permission Denied on check_nt

Paul Broadwith paul.broadwith at blueivy.co.uk
Thu Jul 19 18:11:22 CEST 2007


Hi,

 

The following command works fine in the terminal both for the nagios
user ('su nagios' from root) and for the root:

 

/usr/lib/nagios/plugins/check_nt -H 192.168.100.20 -p 12489 -v
USEDDISKSPACE -l c -w 80 -c 90

 

Both produce the desired results.

 

Apache log says nothing. Nagios log is complaining about notify-by-email
having permission denied (which I knew about too and was going to tackle
that once I had done this).

 

Nagios is the latest stable version (downloaded yesterday) 2.9.1.el5,
plugins is 1.4.9.-1.el5. NS Client was also downloaded yesterday - 0.2.7
although remember that it's not even getting as far as communicating
with the client at the moment. 

 

Kind regards,

 

Paul Broadwith MBCS

Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified
for 2007

 

Tel.: 0800 612 0601

Windows Messenger: paul.broadwith at blueivy.co.uk

Web: http://www.blueivy.co.uk

Blog: http://blog.blueivy.co.uk

 

From: Valdinger, Stephen (DOV, MSX) [mailto:svalding at doverchem.com] 
Sent: 19 July 2007 16:18
To: Paul Broadwith; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Permission Denied on check_nt

 

Check your permission on the Nagios box. Sounds like the Nagios user
cannot execute the plugin. Does it work fine in the terminal? Use ls and
grep and see what they say. Run the command in the terminal as root and
as nagios and see what the output is. Check your apache logs, and nagios
logs for any pertinent information. What version of Nagios and the
plugins are you running? What version of the NS Client? 

 

 

Stephen Valdinger

MIS Helpdesk Coordinator

330-365-3622

stephen.valdinger at doverchem.com

 

*  WinErr: 079 Mouse not found - A mouse driver has not been installed.
Please click the left mouse button to continue. 

________________________________

From: Paul Broadwith [mailto:paul.broadwith at blueivy.co.uk] 
Sent: Thursday, July 19, 2007 10:05 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Permission Denied on check_nt

 

Hi,

 

Hoping somebody can help me out here.

 

I've installed Nagios on CentOS using the following page
http://www.maxsworld.org/index.php/how-tos/nagios and been through the
permissions sections here
http://nagios.sourceforge.net/docs/2_0/commandfile.html

 

I have two problems now - the first one is with the check_nt command.

 

I have installed the NS Client on the server. The server has an ISA
Firewall on there and I've allowed the connections and am monitoring the
traffic. I've configured the host, services and everything else and they
show up in the Nagios web interface fine. However whenever a check is
done, I get the error Permission Denied in the web interface. No actual
traffic is sent to the server and Nagios is not trying to connect to the
NS Client on the server (Firewall logs show no connections). If I try to
run the command from the linux server command line I get the results
back. I've also done an 'su nagios' and run the command from that user
account and it again works fine. I have a check setup for the local
Nagios server to monitor it's disk space and that is fine. I'm assuming
it's a permissions problem with the plugin or Nagios or something, but
don't know where.

 

Here is the check_nt entry from commands.cfg:

 

define command{

        command_name    check_nt

        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v
$ARG1$ $ARG2$

        }

 

And one of the service entries:

 

 

define service{

        host_name               MYHOST

        use                     server-service-template

        service_description     Drive Space - C:

        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90

        }

 

And the server-service-template entry is:

 

define service {

        name                            server-service-template

 

        contact_groups                  client_monitoring

 

        is_volatile                     0

        max_check_attempts              3

        normal_check_interval           1

        retry_check_interval            1

 

        active_checks_enabled           1

        passive_checks_enabled          1

        check_period                    24x7

 

# leave this unless you know what you are doing

        parallelize_check               1

        obsess_over_service             0

        check_freshness                 0

#       freshness_threshold

 

        flap_detection_enabled          0

        event_handler_enabled           0

#       low_flap_threshold

#       high_flap_threshold

 

        process_perf_data               1

 

        retain_status_information       1

        retain_nonstatus_information    1

 

        notifications_enabled           1

        notification_interval           30

        notification_period             24x7

# w = send notifications on a WARNING state

# u = send notifications on an UNKNOWN state

# c = send notifications on a CRITICAL state

# r = send notifications on recoveries (OK state)

# f = send notifications when the service starts and stops flapping

# n (none) as an option, no service notifications will be sent out

        notification_options            w,u,c,r

 

        contact_groups                  client_monitoring

 

        register                        0

}

 

(as you can see I like to have all of the entries in there, even the
ones that have the same default as I want)

 

The second problem I have is when I try to change the scheduled time for
the next check on a service - the error I get is:

 

Error: Could not stat() command file '/var/log/nagios/rw/nagios.cmd'!

The external command file may be missing, Nagios may not be running,
and/or Nagios may not be checking external commands. 

An error occurred while attempting to commit your command for
processing.

 

Any suggestions to this?

 

I'm liking Nagios, but these problems are stopping me from using it any
further.

 

Kind regards,

 

Paul Broadwith MBCS

Blue Ivy Ltd - Microsoft Small Business Specialist, UK Partner Qualified
for 2007

 

Tel.: 0800 612 0601

Windows Messenger: paul.broadwith at blueivy.co.uk

Web: http://www.blueivy.co.uk

Blog: http://blog.blueivy.co.uk

 

________________________________

Blue Ivy Limited is a limited company registered in Scotland.
Registered company number: SC 221649.  Registered VAT number: GB 774
8460 88.
Registered Office: 67 Kelburn Street, Barrhead, Glasgow, G78 1LD

This message and any associated files is intended only for the use of
nagios-users at lists.sourceforge.net and may contain information that is
confidential, subject to copyright or constitutes a trade secret. If you
are not nagios-users at lists.sourceforge.net you are hereby notified that
any dissemination, copying or distribution of this message, or files
associated with this message, is strictly prohibited. If you have
received this message in error, please notify
paul.broadwith at blueivy.co.uk immediately by replying to the message and
then deleting it from your computer. 

Any views or opinions presented are solely those of the author
paul.broadwith at blueivy.co.uk and do not necessarily represent those of
the company.

________________________________



----------------------------------------------------------------------------------------------------------------------------------------------

Blue Ivy Limited is a limited company registered in Scotland.
Registered company number: SC 221649.  Registered VAT number: GB 774 8460 88.
Registered Office: 67 Kelburn Street, Barrhead, Glasgow, G78 1LD

This message and any associated files is intended only for the use of recipient and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not recipient you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify paul.broadwith at blueivy.co.uk immediately by replying to the message and then deleting it from your computer. 

Any views or opinions presented are solely those of the author paul.broadwith at blueivy.co.uk and do not necessarily represent those of the company.

----------------------------------------------------------------------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20070719/0467e04e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list