Bobcares

“Service check timed out after n Seconds” NCPA error – How to fix

by | Apr 13, 2021

Stuck with “Service check timed out after n Seconds” NCPA error? We can help you.

Often our customers using the Nagios XI server report that they get this NCPA error.

Here at Bobcares, we handle requests from our customers to fix this issue as a part of our Server Management Services.

Today let’s see how our Support Techs fix  Service check timed out after n Seconds issue for our customers.

How to fix “Service check timed out after n Seconds”

Following are some of the methods that our Support Engineers use to fix ‘Service check timed out after n Seconds”

:1.  Checking Nagios XI check_xi_ncpa Timeout to fix “Service check timed out after n Seconds”

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.

2. Check NCPA Client Timeout to fix “Service check timed out after n Seconds”

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:

vi /usr/local/ncpa/etc/ncpa.cfg

On Windows we can use the following command:

C:\program file(x86)\nagios\ncpa\etc\nagios.cfg

And search for the plugin_timeout= for altering.

Furthermore, we can set this to a minimum value of the timeout in Nagios XI and increase the plugin_timeout to match it.

3. Check Nagios XI Global Timeout to fix “Service check timed out after n Seconds”

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:

host_check_timeout=30
service_check_timeout=60

4. Finally, click Save Changes to update these settings and then Apply Config via Quick Tools.

 Some basics to know before changing Timeouts

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

[Need assistance? We can help you]

Conclusion

In short, we saw how our Support Engineers fix “Service check timed out after n Seconds” error for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF