Page 1 of 1
run custom scripts using NCPA passive
Posted: Mon Jul 23, 2018 7:47 am
by microdata.dk
Hi.
Is it possible to run at custom script (.ps) when using NCPA 2.x in passive mode? I use NagiosXI
I have a .ps script that check the status of last Windows Update, that works i Active mode
Thx
Dennis Vind Nielsen
Re: run custom scripts using NCPA passive
Posted: Mon Jul 23, 2018 9:34 am
by tmcdonald
Plugins really shouldn't know or care whether they are being run as active or passive, so it should work just fine.
Re: run custom scripts using NCPA passive
Posted: Mon Jul 23, 2018 12:27 pm
by microdata.dk
1
Re: run custom scripts using NCPA passive
Posted: Mon Jul 23, 2018 12:28 pm
by microdata.dk
tmcdonald wrote:Plugins really shouldn't know or care whether they are being run as active or passive, so it should work just fine.
But how do you "activate" the script when in passive mode?
In the Active mode I a have er service "check_xi_ncpa.py" that tell the NCPA client to run the script
Re: run custom scripts using NCPA passive
Posted: Mon Jul 23, 2018 2:00 pm
by npolovenko
@microdata.dk, This article should help you set up passive checks.
https://www.nagios.org/ncpa/help/2.1/passive.html
And here's how to generate the "definition" for your passive check:
1. Put your custom script in the Plugins folder:
Code: Select all
C:\Program Files (x86)\Nagios\NCPA\plugins
or
Code: Select all
C:\Program Files\Nagios\NCPA\plugins
Depending on your installation.
2. Type in the ncpa agent IP address in the web browser and add :5693 and then do the following:
Untitled.png
This should generate the passive check definition for you.