NCPA and windows Passive checks over NRDP

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.
gmills
Posts: 114
Joined: Wed Jun 12, 2019 2:08 pm

NCPA and windows Passive checks over NRDP

Post by gmills »

Hello, and thank you in advance!

my Nagios Core 4.4.3 monitoring server is Linux platform. I need to issue passive checks on a Windows machine.
I am using the NCPA agent, with NRDP for passive checks.

Q1. how do you set up such monitoring on the Windows box using NCPA/NRDP ? I can't find any instructions/configurations to add plugin on NCPA on Windows?
Q2. All the plugins available I see for such purpose use NSClient for passive tests, do I need to use NSClient or can I accomplish this with NCPA?
Q3. if I can use NRDP, I want to use the Check_Filecount or Check_Files plugins, do I need to install NRDP on my Nagios monitoring server?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA and windows Passive checks over NRDP

Post by mbellerue »

A1. Adding plugins to NCPA in Windows is much the same as it is in Linux. In the location where you installed NCPA, there is a plugins directory. Just put the plugins that you need to run in that directory. When you call them with the check_ncpa.py plugin on the Nagios machine, you will use -M plugins/plugin_name to call that plugin.

Active check example,

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H hostname -t SecretToken -M plugins/my_powershell_plugin.ps1 -a '-argument1 argument1value -argument2 argument2value'
Passive check example,

Code: Select all

%HOSTNAME%|ServiceCheckName = plugins/my_powershell_plugin.ps1/-argument1/argument1value/-argument2/argument2/value
Often times people have a harder time grasping the passive check configuration, so I will link to documentation below.

A2. Do you have an example of these plugins? If you can give me an example, I can try it out and make sure it works with NCPA. Basically as long as it provides the typical Nagios-parsable output, it should work just fine.

A3. Yes, NRDP is the Nagios Remote Data Processor. This gets intalled to your Nagios server, and is accessed at http://yourNagiosIP/nrdp. NCPA will send passive results to this URL, as defined in your ncpa.cfg file.

Here is some documentation that will help you along.

Install NRDP in Nagios Core
https://support.nagios.com/kb/article/n ... e-602.html

NCPA passive checks
https://www.nagios.org/ncpa/help/2.1/passive.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
gmills
Posts: 114
Joined: Wed Jun 12, 2019 2:08 pm

Re: NCPA and windows Passive checks over NRDP

Post by gmills »

hey mbellerue, thank you so much!!!

Hey, yeah, I will use the Active check example you provided, I've done this before on Linux, I understand this. and thanks for info!!!

please find the plugins attached. and THANKS!

please remove the .txt on attached files
Attachments
check_filesize_r.vbs.txt
check_filesize_r.vbs
(4.89 KiB) Downloaded 171 times
check_files.vbs.txt
Check_files.vbs
(11.25 KiB) Downloaded 167 times
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA and windows Passive checks over NRDP

Post by mbellerue »

They seem to work just fine. Here's my result.

Code: Select all

root@weylandxi:/usr/local/nagios/libexec# ./check_ncpa.py -H 192.168.145.90 -t ASecretToken -M plugins/check_files.vbs -a '-p C:\Monitoring\ReadHere\ -w 5 -c 7'
OK: 1 files were matched.|count=1
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
gmills
Posts: 114
Joined: Wed Jun 12, 2019 2:08 pm

Re: NCPA and windows Passive checks over NRDP

Post by gmills »

mbellerue,

can't show the appreciation I have for you! thank you so much! this is GREAT NEWS!

I will give it a shot, actually already did, however, trying to resolve a VBScript engine issue now so to execute the plugin... LOL always something.

but thank you!!!!
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA and windows Passive checks over NRDP

Post by mbellerue »

You're welcome! Good luck with the engine issue! Just a quick tip, if you need to alter how cscript.exe calls VBScripts, like with a special command line switch or something, you can make that change permanent in the ncpa.cfg file. Down at the bottom of the file are definitions on how files with different extensions are executed. The default for VBScripts is .vbs = cscript $plugin_name $plugin_args //NoLogo
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
gmills
Posts: 114
Joined: Wed Jun 12, 2019 2:08 pm

Re: NCPA and windows Passive checks over NRDP

Post by gmills »

very nice! you're excellent my friend! thank you
once I get this VBScript thing in, I'll let you know how this works, I am confident it will work just fine.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA and windows Passive checks over NRDP

Post by mbellerue »

Excellent! We will keep this thread open, and wait to hear back.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
gmills
Posts: 114
Joined: Wed Jun 12, 2019 2:08 pm

Re: NCPA and windows Passive checks over NRDP

Post by gmills »

thanks for waiting ...

unfortunately, I am at the mercy of other teams to do this, and it requires a reboot :).

I should be able to let you know end of day today or tomorrow.

thank you!!!
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA and windows Passive checks over NRDP

Post by mbellerue »

Okay, no worries. It doesn't hurt to keep the thread open, so no rush.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked