Page 1 of 1

configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 3:19 pm
by gmills
Hello,

Ok, I'm a little confused. I have Nagios set up and it is working fine, however, until now I am only monitoring Unix/Linux boxes.
I now need to monitor Windows boxes, and having trouble setting it up and getting it working.

my nagios is nagios 4.4.3

I found so many articles to install and configure windows, but, it is not working and the info is misleading I think.

I downloaded the NSClient++ Agent on Windows Machine and the download says NSCP-0.5.2.35-x64.msi
I installed the client with the windows installer.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg shows Things look okay - No serious problems were detected during the pre-flight check

however, I'm getting Critical Error Socket Timeouts
I'm not sure if I have the windows configuration correct. also, I do not understand if NRPE is needed, when I use it, it complains, It doesn't look like the windows services use NRPE ????

define host {

use windows-server ; Inherit default values from a template
host_name CGHCTS000000588 ; The name we're giving to this host
alias MTS IIS ; A longer name associated with the host
address 10.141.16.83 ; IP address of the host
register 1
}
define hostgroup {

hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}

define service {

use generic-service
host_name CGHCTS000000588
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}


It appears this uses check_nt

# 'check_nt' command definition
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}

this suggests it is somewhat working or can talk.
/usr/local/nagios/libexec/check_nrpe -H 10.141.16.83
I (0.5.2.35 2018-01-28) seem to be doing fine...

Help, what am I doing wrong - thank you!!!

Re: configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 3:40 pm
by benjaminsmith
Hello @gmills,

Have you considered using NCPA (Nagios Cross Platform Agent) for Windows? In my opinion, it's easier to get up and running with NCPA.

NCPA Agent Instructions

NSClient can be used either with check_nt or check_nrpe. It looks like check_nrpe is communicating. What happens when you run the following commands (replace IP address and password) from the shell in /usr/local/nagios/libexec/. Which ones return valid results?

Code: Select all

/check_nt -H 10.25.14.10 -p 12489 -s 'Str0ngP@ssw0rd' -v MEMUSE -w 90 -c 95
./check_nrpe -H 10.25.14.10 -c check_memory -a 'warn=used>90%' 'crit=used>95%'

Re: configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 3:59 pm
by gmills
thank you Benjamin!!!

[root@alpcts000001083 libexec]# ./check_nrpe -H 10.141.16.83 -c check_memory -a 'warn=used>90%' 'crit=used>95%'
CHECK_NRPE: Error - Could not connect to 10.141.16.83. Check system logs on 10.141.16.83
[root@alpcts000001083 libexec]# ./check_nt -H 10.141.16.83 -p 12489 -s 'uyY85vCt' -v MEMUSE -w 90 -c 95
CRITICAL - Socket timeout

Benjamin, I've included an attachment, I've tried installing check_nt, check_nrpe, both, ... IDK?

I think I will try the NCPA (Nagios Cross Platform Agent) - give this a try.

Re: configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 4:15 pm
by gmills
Benjamin,

can you please take a look at the attachment? is that what I should download?

Re: configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 4:21 pm
by benjaminsmith
Hello,

On the remote host you'll download and install the NCPA agent for Windows. There's only the EXE 32bit installer available right now.

Now, on the Nagios side you'll need to install the check_ncpa.py plugin. Make sure you set the correct permissions so the Nagios user can run the plugin.

https://www.nagios.org/ncpa/getting-started.php

Re: configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 4:24 pm
by gmills
thanks, I was confused, windows is 64 bit, windows enterprise 16. I'm giving this a try.

Re: configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 4:40 pm
by benjaminsmith
Hi @gmills

Sounds good. Let us know if you have any questions.

Re: configuring a windows server for monitoring

Posted: Tue Sep 17, 2019 5:26 pm
by gmills
Benjamin,

thanks! you were right! it is working now, easily with Nagios Cross Platform Agent, NCPA, excellent!

Re: configuring a windows server for monitoring

Posted: Wed Sep 18, 2019 6:26 am
by scottwilkerson
gmills wrote:Benjamin,

thanks! you were right! it is working now, easily with Nagios Cross Platform Agent, NCPA, excellent!
Excellent!

Locking thread