NCPA - Service check timed out after n Seconds
This KB article addresses the following NCPA error:
NCPA- Service Check Timeout After n Seconds
The following KB article contains an explanation of how NCPA works and may need to be referenced to completely understand the problem and solution that is provided here:
Troubleshooting The Error
You can increase the timeout on the check, though you will have to alter the check in XI and the plugin timeout in the ncpa.cfg file on the remote host.
Nagios XI check_xi_ncpa Timeout
This timeout is how long the check_xi_ncpa command on the Nagios XI server will wait for a response from the NCPA agent. By default the timeout is not set, thereby defaulting to the plugin timeout or the global timeout.
In the Nagios XI web interface navigate to Configure > Core Config Manager > Commands. This brings up the Commands page, use the Search field to search for ncpa and click Search.
Click the check_xi_ncpa command.
In the Command Line, add -T <time value in seconds> after $HOSTADDRESS$. Ex. -T 120
Save your changes and then click the Apply Configuration button.
NCPA Client Timeout
This timeout is how long the NCPA client on the Nagios XI server will wait for a response from the plugin it executes before returning a result to Nagios XI. You may need to change a setting in the remote host's vi /usr/local/ncpa/etc/ncpa.cfg file depending on how high you set the timeout in Nagios XI. Edit the file with the following command:
When using the vi editor, to make changes press i on the keyboard first to enter insert mode. Press Esc to exit insert mode.
Search for the plugin_timeout= which may need to be altered. Set this, at minimum, to the value of the timeout in Nagios XI. If you do set your timeout in Nagios XI higher, increase the plugin_timeout to match.
Nagios XI Global Timeout
Nagios XI by default has a global timeout for host (30 seconds) and service (60 seconds) check commands. This means if you were to change the check_xi_ncpa command timeout in Nagios XI with the switch -T to 120, Nagios XI will not wait for 120 seconds to pass, the global timeout will stop at 60 seconds.
Click Save Changes to update these settings and then Apply Config via Quick Tools.
A Realistic Discussion On Timeouts
After reading all of that you might think to yourself "I'm going to go and change all the timeouts to 120 seconds". It's not as simple as that, you need to take into account that each layer of timeout needs to take into account the previous layer. If Nagios XI global timeout was set to 120 seconds and the NCPA was plugin_timeout=120 then it may take a whole second before it gets to NCPA, you will need to take that into account, here's an example of the "layers":
For any support related questions please visit the Nagios Support Forums at:
|Posted by: rspielman - Tue, Sep 1, 2020 at 12:45 PM. This article has been viewed 3812 times.|
|Online URL: https://support.nagios.com/kb/article/ncpa-service-check-timed-out-after-n-seconds-872.html|
Powered by PHPKB (Knowledge Base Software)