NCPA - Configuring Passive Check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

NCPA - Configuring Passive Check

Post by comfone »

Hi
I'm a Nagios XI and NCPA newbie.
I would like to conifgure a NCPA passive check.
We are using Nagios XI 5.2.3 and NPCA 1.8.1.
Plugin used (https://exchange.nagios.org/directory/P ... ll/details)
When I run the plugin check_windows_updates.ps1 as https://localhost:5693/api/agent/plugin ... pdates.ps1 I get the result below:
{
"value": {
"returncode": 2,
"stdout": "Updates: 11 critical, 0 optional\nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3124000) \nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3108664) \nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3109560) \nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3110329) \nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3121918) \nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3121212) \nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3124001) \nCumulative Security Update for Internet Explorer 11 for Windows Server 2008 R2 for x64-based Systems (KB3124275) \nSecurity Update for Windows Server 2008 R2 x64 Edition (KB3123479) \nWindows Malicious Software Removal Tool x64 - January 2016 (KB890830) \nDefinition Update for Microsoft Endpoint Protection - KB2461484 (Definition 1.213.2668.0)"
}
}


But I can't make it this output via NRDP to Nagios XI.
Thank you in advance for your help.
Last edited by comfone on Thu Jan 14, 2016 2:39 am, edited 1 time in total.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: NCPA - Configuring Passive Check

Post by jolson »

I recommend you hit up the API of your windows host and navigate to the following location: https://windowsserver:5693/api/agent/plugin

Does your plugin appear in the API? If so, that's good - your command definition looks a little off, it should _likely_ be configured as follows:
%HOSTNAME%|WinUpdates = /agent/plugin/check_windows_updates.ps1

Most things in NCPA will be referenced using the API - let me know if the above helps! Thanks!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NCPA - Configuring Passive Check

Post by lmiltchev »

Have you tried using any other powershell scripts as passive checks? The script requires passing arguments:

Code: Select all

.ps1 = powershell -ExecutionPolicy Bypass -File $plugin_name $plugin_args
but your check is defined with no args:

Code: Select all

%HOSTNAME%|WinUpdates = check_windows_updates.ps1
I am not sure if this is the problem but we will try to recreate the issue in-house and get back to you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
comfone
Posts: 127
Joined: Fri May 01, 2015 3:28 am

Re: NCPA - Configuring Passive Check

Post by comfone »

Hi jolson
It works now.
My command definition was wrong.
After having changed it the way you recommended it worked.
Thank you. :)
Locked