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.
If you click to look at the details of the service it then lists as an Unknown.
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
NCPA Passive Check Long Running Plugin
NCPA Passive Check Long Running Plugin
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.
Re: NCPA Passive Check Long Running Plugin
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...
Re: NCPA Passive Check Long Running Plugin
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA Passive Check Long Running Plugin
@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
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