NCPA Passive Check Long Running Plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
onegative
Posts: 175
Joined: Tue Feb 17, 2015 12:06 pm

NCPA Passive Check Long Running Plugin

Post by onegative »

G 'Day Support,

I am experiencing an issue with a NCPA Passive check calling a custom plugin that executes a long running process (about 60 to 80 seconds run time)

i.e.
my passive_check cfg entry

[passive checks]
%HOSTNAME%|Plugin-check_bodar_incoming_sftp = plugins/check_bodar_incoming_sftp.sh


my plugin script (check_bodar_incoming_sftp.sh) which requires the use of sudo to execute root python script

#!/bin/bash
# Script used to call sudo and root owned script
/usr/bin/sudo /opt/nagios/bin/check_bodar_incoming_sftp.py


If I execute the plugins script manually I get the expected output and expected exit status.

But allowing the ncpa_passive service to run the exact plugins results in the Status not being set in the GUI. It shows White from the Services list for the host.
svc_list.png
If you click to look at the details of the service it then lists as an Unknown.
svc_detail.png
So my question is: Is there some timing issue that should be considered for long running plugins from a ncpa passive perspective?

As always I appreciate any feedback or suggestions,
Danny
You do not have the required permissions to view the files attached to this post.
Last edited by onegative on Fri Oct 18, 2019 2:43 pm, edited 1 time in total.
onegative
Posts: 175
Joined: Tue Feb 17, 2015 12:06 pm

Re: NCPA Passive Check Long Running Plugin

Post by onegative »

P.S. I have many other examples of this using the exact same method (calling sudo) for ncpa_passive checks that do work and display the proper Status. Even on the same server...
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: NCPA Passive Check Long Running Plugin

Post by mbellerue »

There is a plugin_timeout setting that defaults to 60 seconds. In the ncpa.cfg file, it's under [plugin directives]. Try increasing that to 120 and see if your check processes as expected.
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!
onegative
Posts: 175
Joined: Tue Feb 17, 2015 12:06 pm

Re: NCPA Passive Check Long Running Plugin

Post by onegative »

@mbellerue

That seems to have worked. Thank you for pointing that option out within the ncpa.cfg file.
Fully operational and reporting correct within the GUI.
You can Locked this thread.

And as always thanks for your support,
Danny
Locked