Event ID config via NCPA

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sneha.irali
Posts: 141
Joined: Fri Jan 15, 2021 3:56 am

Event ID config via NCPA

Post by sneha.irali »

Hi Team,

There are 2 server on which if i check the evnt ID results by using the ncpa web GUI - it responds. But when I test the same from Nagios console or CLI it gets timed out..
[root@SPSLNAGIOS libexec]# ./check_ncpa.py -H 192.168.16.71 -t 'AMSTKN@123' -M 'logs' -q 'name=Application,severity=WARNING,event_id=1619,application=MSSQLSERVER,message=*'
UNKNOWN: Execution exceeded timeout threshold of 60s

Let me know how do we check on this further.
User avatar
kfanselow
Posts: 254
Joined: Tue Aug 31, 2021 3:25 pm

Re: Event ID config via NCPA

Post by kfanselow »

Hi Sneha.Irali,

The first thing you will probably want to do is verify that your nagiosXI server is listed on the allowed_hosts line of your ncpa.cfg file ( C:\Program Files (x86)\Nagios\NCPA\etc\ ).

The second thing to check is the connectivity from your XI server directly:

Code: Select all

telnet 192.168.16.71 5693
The string "Escape character is '^]'." indicates that you were able to successfully establish a socket connection.

If you are able to establish a socket connection try connecting from the XI server using curl:

Code: Select all

curl -ik https://192.168.16.71:5693/
If these are unsuccessful you will probably want to double check the firewall settings on the target systems.

Thanks and Best Regards,
Keith
sneha.irali
Posts: 141
Joined: Fri Jan 15, 2021 3:56 am

Re: Event ID config via NCPA

Post by sneha.irali »

Event ID works well for other 50 servers but except only 2.

telnet 192.168.16.71 5693
Trying 192.168.16.71...
Connected to 192.168.16.71.
Escape character is '^]'.


[root@SPSLNAGIOS libexec]# curl -ik https://192.168.16.71:5693/
HTTP/1.1 302 FOUND
Content-Type: text/html; charset=utf-8
Content-Length: 219
Location: https://192.168.16.71:5693/login
X-Frame-Options: SAMEORIGIN
Content-Security-Policy: frame-ancestors 'self'
Set-Cookie: session=eyJyZWRpcmVjdCI6Imh0dHBzOi8vMTkyLjE2OC4xNi43MTo1NjkzLyJ9.FHAFvw.QpG83wfMjtUtrU7ebnw-xr9RBxU; Secure; HttpOnly; Path=/
Date: Fri, 12 Nov 2021 14:03:43 GMT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="/login">/login</a>. If not click the link.[root@SPSLNAGIOS libexec]#
User avatar
kfanselow
Posts: 254
Joined: Tue Aug 31, 2021 3:25 pm

Re: Event ID config via NCPA

Post by kfanselow »

Hi sneha.irali,

Excellent - connectivity looks good. So the next step is to figure out either why the check is exceeding the default timeout or what the timeout value should be for your environment. The easiest way to start this process is to adjust and bracket the average timeout value using the -T or --timeout= argument. I would start with 300 seconds ( five minutes ) and then adjust from there. So for example below is your command with the -T 300 arg. added to increase the timeout to five minutes.

Code: Select all

/check_ncpa.py -H 192.168.16.71 -t 'AMSTKN@123' -M 'logs'  -T 300 -q 'name=Application,severity=WARNING,event_id=1619,application=MSSQLSERVER,message=*'
Hope this is useful.

Thanks and Best Regards,
Keith
sneha.irali
Posts: 141
Joined: Fri Jan 15, 2021 3:56 am

Re: Event ID config via NCPA

Post by sneha.irali »

Hi Keith,

this works..!!

/check_ncpa.py -H 192.168.16.71 -t 'AMSTKN@123' -M 'logs' -T 300 -q 'name=Application,severity=WARNING,event_id=1619,application=MSSQLSERVER,message=*'

But can I know the possible reasons why did we have to increase the timeout and also let me know if by default it considers any timeout.
User avatar
kfanselow
Posts: 254
Joined: Tue Aug 31, 2021 3:25 pm

Re: Event ID config via NCPA

Post by kfanselow »

Hi sneha.irali,

In answer to your questions the default timeout is 60 seconds and the query on the remote system is taking longer than that for some reason. What I would recommend you do is experiment with the timeout value and find the smallest time that gives you reliable results. Keep in mind this can vary depending upon things like system load but you should be able to find a number between 60 and 300 that gives you reliable output without the long delays.

Thanks and Best Regards,
Keith
sneha.irali
Posts: 141
Joined: Fri Jan 15, 2021 3:56 am

Re: Event ID config via NCPA

Post by sneha.irali »

I want to know why I dont see the response on the NAgiosXI run check command its blank, attached snap for reference
You do not have the required permissions to view the files attached to this post.
User avatar
kfanselow
Posts: 254
Joined: Tue Aug 31, 2021 3:25 pm

Re: Event ID config via NCPA

Post by kfanselow »

Hi sneha.irali,

With the timeout set to 300 seconds ( five minutes ) it may take up to five minutes for the check to complete. This isn't a problem on the command line but can be a factor when you are ready to define it in XI. This is one of the reasons you want to experiment and find the lowest reliable time for the check to complete. Depending upon what that value is you might have to adjust the timeouts for NCPA and XI. Below is our Knowledge Base article on the subject:

https://support.nagios.com/kb/article/n ... s-872.html

Hope this is useful.

Thanks and Best Regards,
Keith
Locked