All checks, except PING, not responding on windows servers

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

All checks, except PING, not responding on windows servers

Post by Nighthawkz »

Please bare with me as i'm still learning to navigate my way around Nagios!

I have 2 windows server that were already set and being monitored for CPU/Memory/Disk space etc checks. They are set up identical to each other except the one is located on-site, the other is at our DR site (if that matters)

I wanted to add a new adhoc powershell script to check something on the servers. So I defined this check in the nrpecheck.cfg file as follows

Code: Select all

define service{
        use                     generic-service
        host_name               test,test2
        service_description     TLs check
        check_command           check_nrpe!TLSprotocol
        check_interval          60
        }
went to the windows server, Added the line to the custom.ini file on both servers:

Code: Select all

TLSprotocol = cmd /c echo scripts\\TLSprotocol.ps1; exit($lastexitcode) | powershell.exe -command-
put the script in the path c:\programfiles\NSCLient++\scripts

Restarted the NSClients, then reloaded the Nagios cor. I've done this previously and never had a problem.

This time however...

My new script was timing out on both servers no matter the time out interval. All previously set up checks on server "test2" also flagged with timeout warnings.

I removed all changes to both servers, and the new defined service from nagios and restarted the services. "test" returned to normal "test2" still timed out.

In addition, Any attempt to manually run a check off the nagiso cor server

such as

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H test2 -c alias_disk 
returns a connection refused by host. With the exception of a ping and check_nt

At this point I'm lost and I'm starting to think this is probably not a nagios specific problem, but I wanted to rule that out first!

Any help or points in the right direction would be appreciated.

Regards
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: All checks, except PING, not responding on windows serve

Post by npolovenko »

Hello, @Nighthawkz .
It could be that NSClient on Server 2 shut down the service because of some config issues. Can you open "Services" menu on the server 2 and look for NSClient++? What's the status of that service? Also, go ahead and right-click it and choose restart. And take a look at the nsclient.log file on the second server. There might be some useful info on whats going on.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Nighthawkz
Posts: 27
Joined: Fri Oct 20, 2017 7:05 am

Re: All checks, except PING, not responding on windows serve

Post by Nighthawkz »

Hi

apologies for the delay!

Tt turned out a rogue servcie was preventing the client on teh windows server from shutting down, even though it reported it shut down successfully - so when i was trying to call a check from nagios it was being denied - because the rogue service was "getting in the way"

("Get-Service nrpe" showed 2 instances - but could only show information for one , the new instance)

restarting the box was the only way to kill the rogue service. After that it worked fine

thank you for reply though!
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: All checks, except PING, not responding on windows serve

Post by npolovenko »

@Nighthawkz, I'm glad you figured this out. Closing this thread as resolved.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked