Connecting NRPE_NT and NSClient++

Travis Llewellyn travisll at comfedcu.org
Tue Jun 13 21:10:55 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Tim,

I would drop nrpe_nt on the Windows server because NSClient++ has its own built in nrpe client. On the linux box you can use either check_nt or check_nrpe.

I use check_nrpe only I do not use check_nt for anything.

Here is an example that I am using both on the Windows machine and the Linux box.


Services..........

define  service {
        hostgroup_name                  branch_servers
        service_description             C Drive
        is_volatile                     0
        check_command                   CheckDriveSize!C:!50%!75%
        max_check_attempts              3
        normal_check_interval           2
        retry_check_interval            1
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    24x7
        parallelize_check               1
        obsess_over_service             1
        check_freshness                 0
        event_handler_enabled           1
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        contact_groups                  nt-admins
        notification_interval           240
        notification_period             24x7
        notification_options            w,u,c,r
        notifications_enabled           1
        register                        1
        }       

define  service {
        hostgroup_name                  branch_servers
        service_description             CPU
        is_volatile                     0
        check_command                   check_ncs_cpu!75!85
        max_check_attempts              3
        normal_check_interval           2
        retry_check_interval            1
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    24x7
        parallelize_check               1
        obsess_over_service             1
        check_freshness                 0
        event_handler_enabled           1
        flap_detection_enabled          1
        process_perf_data               1
        retain_status_information       1
        retain_nonstatus_information    1
        contact_groups                  nt-admins
        notification_interval           240
        notification_period             24x7
        notification_options            w,u,c,r
        notifications_enabled           1
        register                        1
        }       
End Services ............


Check Commands............

define  command {
        command_name    CheckDriveSize
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckDriveSize -a Drive=$ARG1$ ShowAll MaxWarn=$ARG2$ MaxCrit=$ARG3$
        }

define  command {
        command_name    check_ncs_cpu
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c checkCPU -a warn=$ARG1$ crit=$ARG2$ time=60m time=30m time=5m
        }      

End Commands.......

Windows Configuration ......
I did not need to change much of this...


Nsc.ini
[modules]
;# NSCLIENT++ MODULES
;# A list with DLLs to load at startup.
;  You will need to enable some of these for NSClient++ to work.
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
; *                                                               *
; * N O T I C E ! ! ! - Y O U   H A V E   T O   E D I T   T H I S *
; *                                                               *
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
;
; CheckWMI IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS!
;CheckWMI.dll
;
; RemoteConfiguration IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS!
;RemoteConfiguration.dll

[Settings]
;# OBFUSCATED PASSWORD
;  This is the same as the password option but here you can store the password in an obfuscated manner.
;  *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the 
;  password. Its just a bit harder to do it at first glance.
;obfuscated_password=Jw0KAUUdXlAAUwASDAAB
;
;# PASSWORD
;  This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly.
;password=secret-password
;
;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons.
;  If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password).
;allowed_hosts=127.0.0.1
;
;# USE THIS FILE
;  Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1 
;  the registry will be used instead.
use_file=1

[log]
;# LOG DEBUG
;  Set to 1 if you want debug message printed in the log file (debug messages are always printed to stdout when run with -test)
;debug=1
;
;# LOG FILE
;  The file to print log statements to
;file=NSC.log
;
;# LOG DATE MASK
;  The format to for the date/time part of the log entry written to file.
;date_mask=%Y-%m-%d %H:%M:%S


[NSClient]
;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon.
;  If you leave this blank the global version will be used instead.
;allowed_hosts=
;
;# NSCLIENT PORT NUMBER
;  This is the port the NSClientListener.dll will listen to.
;port=12489
;
;# BIND TO ADDRESS
;  Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
;  Leaving this blank will bind to all avalible IP adresses.
;bind_to_address=


[Check System]
;# CPU BUFFER SIZE
;  Can be anything ranging from 1s (for 1 second) to 10w for 10 weeks. Notice that a larger buffer will waste memory 
;  so don't use a larger buffer then you need (ie. the longest check you do +1).
CPUBufferSize=2h
;
;# CHECK RESOLUTION
;  The resolution to check values (currently only CPU).
;  The value is entered in 1/10:th of a second and the default is 10 (which means ones every second)
;CheckResolution=10

[NRPE]
;# NRPE PORT NUMBER
;  This is the port the NRPEListener.dll will listen to.
port=5666
;

;# COMMAND TIMEOUT
;  This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
command_timeout=60
;

;# COMMAND ARGUMENT PROCESSING
;  This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=1
;

;# COMMAND ALLOW NASTY META CHARS
;  This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
;allow_nasty_meta_chars=0

;# ALLOWED HOST ADDRESSES
;  This is a comma-delimited list of IP address of hosts that are allowed to talk to NRPE deamon.
;  If you leave this blank the global version will be used instead.
allowed_hosts=10.1.9.29

End Windows.......

I had to download an older version of nsclient++ to get the checksystem.dll I am not sure why they did not include it with the newer version.
 









Travis Llewellyn
Network Administrator
Communication Federal Credit Union
travisll at comfedcu.org

- -------------------------------------------------------------------------
2 Timothy 2:3 Suffer hardship with me, as a good soldier of Christ Jesus.

- -----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Tim Wilson
Posted At: Tuesday, June 13, 2006 1:05 PM
Posted To: Nagios Lists
Conversation: [Nagios-users] Connecting NRPE_NT and NSClient++
Subject: [Nagios-users] Connecting NRPE_NT and NSClient++

Hi all,

We're in the process of setting up monitoring of our Windows servers  
here, and I'm having trouble wrapping my brain around the  
relationship between NRPE_NT and NSClient++. I've got both installed  
on a Windows server and running as services. I can run a basic  
'check_nrpe' from our Linux server (the nagios box) to NRPE_NT and  
get a response from the Windows machine, but I'm stuck trying to get  
NRPE_NT to use one of the built-in NSClient++ checks. It's not clear  
how to get NRPE_NT to use one of the NSClient++ modules.

Does anyone have an example they could share?

On a related note, does anyone know why NSClient++ doesn't have a  
module called "CheckSystem.dll"? It's one of the ones listed on the  
wiki (http://nscplus.medin.name/index.php/CheckCommands), but it  
wasn't in the zip file I downloaded.

Thanks.

- -Tim

- -- 
Tim Wilson
Twin Cities, Minnesota, USA
Educational technology guy, Linux and OS X fan, Grad. student, Daddy
mailto: wilson at visi.com   aim: tis270   blog: http://technosavvy.org




_______________________________________________
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


-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.0.6 (Build 6060)

iQEVAwUBRI8Nu6kF3FdG31XhAQjDfAgAh2l252ku2pAQgxl2W7ov2Uy1skZEOOZm
zUZ2d9Zee9Nk2sWe3vAOIySATHzZrsdfMkbmmakvYdzX3s26ka3EsGAaXUo/A4Js
bZyEx8zmdrlWPeqhpcAz8XixgwDMEBewA3ygJj2ZPJRi5P3tsQyb4IMox/XWDBEi
66M/XBEUizhgEAVOSBo0nMzGl+iPrnjH4WUVTdIz0uUS1ZoILKSO0zoRKpNIKzEf
E165nVxkRs4Kcv3fgCksJiUzN8iVqcX2OW9IoK0tZM8+N1N0ijvtQphvrQGFjP31
vcAjQvG290aVCtKR0IHtellT2WY8pL9WEMNQPZ69xNYsdgkikFZ3yw==
=kKAO
-----END PGP SIGNATURE-----


-----------------------------------------------------------------
This e-mail and the files transmitted with it are the property
of the sender and/or its affiliates, are confidential, and are
intended solely for use of the individual or entity to whom
this e-mail is addressed. If you are not one of the named
recipient(s) or otherwise have reason to believe that you have
received this message in error, please notify the sender by
replying to the e-mail you received and delete this message
from your computer immediately. Any other use, retention,
dissemination, forwarding, printing, or copying of this e-mail
is strictly prohibited.

_______________________________________________
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