Are you facing Service check timed out after n Seconds NCPA error?
This guide is for you.
Sometimes our customers using the Nagios XI server report that they get this NCPA error.
This is generally as a result of timeout issues.
In this context, we shall look into methods to resolve this NCPA error.
We can see various types of time outs and the method to fix them:
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.
We can fix this type of timeout using the following steps:
1. In the Nagios XI web interface, navigate to Configure
2. Then take Core Config Manager and go to Commands.
3. In the Commands page, use the Search field to search for ncpa and click Search.
4. After that, click the check_xi_ncpa command.
5. Now we can change the timeout in Nagios XI with the switch -T in the check_xi_ncpa command.
6. In the Command Line, add -T <time value in seconds> after $HOSTADDRESS$. Ex. -T 120
7. Finally, save the changes and then click the Apply Configuration button.
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.
Changing the settings in the remote host's /usr/local/ncpa/etc/ncpa.cfg file depending on how high we set the timeout in Nagios XI will fix this issue.
We can edit the file following command:
On Windows we can use the following command:
And search for the plugin_timeout= for altering.
We can set this, at a minimum value of the timeout in Nagios XI and increase the plugin_timeout to match it.
Nagios XI, by default, has a global timeout for host (30 seconds) and service (60 seconds) check commands.
This means if we have 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.
To adjust the global timeout we can do the following:
1. First, navigate to Configure and take Core Config Manager
2. Then go to CCM Admin and take Core Configs.
3. In the Core Configs page we can see that by default the General [nagios.cfg] tab is selected.
Following are the two directives to change:
4. Finally, click Save Changes to update these settings and then Apply Config via Quick Tools.
Generally, we may get a thought of changing all the timeouts to 120 seconds. However, it is not as simple as that, we need to take into account that each layer of timeout needs to take into account the previous layer.
If the 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.
Here is an example of the "layers" we have to consider before changing:
1. Nagios XI Global Timeout 120
2. check_xi_ncpa timeout on Nagios XI server 119
3. plugin_timeout= on NCPA Client 118