Page 1 of 1

NCPA connection issue

Posted: Wed May 27, 2020 10:22 am
by snapon_admin
Last topic was locked, likely due to inactivity. This issue got put on the back burner due to COVID and it being a low priority. Please see thread below for the issue. We have updated the NCPA agent to the latest version and are still having issues.

https://support.nagios.com/forum/viewto ... 4&start=10

Re: NCPA connection issue

Posted: Wed May 27, 2020 4:41 pm
by ssax
What does this show on the remote NCPA host?

For Windows:

Code: Select all

netstat -ano | find "5693"
For Linux:

Code: Select all

netstat -ano | grep 5693

Re: NCPA connection issue

Posted: Wed May 27, 2020 4:45 pm
by tgriep
I have a question, is your desktop on the same network as the XI server?
From what you described in the other post, I would guess that they are different network as the desktop can connect but the XI server shows the port as down.

Verify that there is no firewalls or IDS system that are blocking the access to the NCPA agent.

Another question, does the Windows system have multiple network adapters and is the routing setup for all of the interfaces to respond to the correct networks?

Re: NCPA connection issue

Posted: Thu May 28, 2020 11:50 am
by snapon_admin
What is the windows command for say a CPU check? I'm trying to manually add an NCPA check in for this host so we can tail a log file and find out where it's getting blocked.

Re: NCPA connection issue

Posted: Thu May 28, 2020 12:37 pm
by snapon_admin
Nevermind I think I figured out the command and yeah, it's getting connection refused. We're tailing the logs on our firewalls while running the checks and not seeing anything there. I"ll try to get some of that info from the PC side and get back to you.

Re: NCPA connection issue

Posted: Thu May 28, 2020 1:25 pm
by tgriep
If you are not seeing anything in the firewall logs connecting to port 5693, then is may be blocked somewhere else.

What do you see when you run this command as an administrator on the Windows system?

Code: Select all

netstat -ano | find "5693"

Re: NCPA connection issue

Posted: Fri May 29, 2020 10:28 am
by snapon_admin
We were able to get this sorted out. There was a firewall that we don't manage (it's managed locally) that this perticular PC sits behind that was blocking it. It was put in place before our currecnt LCON started so he was not aware of how locked down it was. Thanks for all of your help with this. I do have one other question, though. With NSClient++ we us an uptime check that was one of the default checks when using the config wizard. Does NCPA have a similar check as well?

Re: NCPA connection issue

Posted: Fri May 29, 2020 2:09 pm
by lmiltchev
I am glad your original issue was resolved!

On your question:
I do have one other question, though. With NSClient++ we us an uptime check that was one of the default checks when using the config wizard. Does NCPA have a similar check as well?
I don't see an uptime check included in the wizard yet. This is something that I believe could be added easily as NCPA has the ability to check uptime under the system API Endpoint. For the time being, you could add a check manually. The command would look something like this:

Example:

Code: Select all

./check_ncpa.py -H x.x.x.x -t mytoken -P 5693 -M system/uptime
OK: Uptime was 45 days 22 minutes 54 seconds | 'uptime'=3889374.12s;;;
You could also use a PS script, that is located on your Windows machine, and call it via check_ncpa.py plugin.

Example script (that could get you started):

Code: Select all

function Get-Uptime {
	$os = Get-WmiObject win32_operatingsystem
	$uptime = (Get-Date) - ($os.ConvertToDateTime($os.lastbootuptime))
	$display = "Uptime: " + $Uptime.Days + " days, " + $Uptime.Hours + " hours, " + $Uptime.Minutes + " minutes"
	Write-Output $display
}

Get-Uptime
Hope this helps.