Page 1 of 2

NCPA agent issue

Posted: Sun May 03, 2020 8:32 am
by keerthi.seetharaman
Hi Team,

Good Day.

We have one solaris sparc server and the OS version is Oracle solaris 11.4. Below is the output:-

abc# uname -a
SunOS abc 5.11 11.4.19.3.0 sun4v sparc sun4v
abc# cat /etc/os-release
NAME="Oracle Solaris"
PRETTY_NAME="Oracle Solaris 11.4"
CPE_NAME="cpe:/o:oracle:solaris:11:4"
ID=solaris
VERSION=11.4
VERSION_ID=11.4
BUILD_ID=11.4.19.0.1.3.0
HOME_URL="https://www.oracle.com/solaris/"
SUPPORT_URL="https://support.oracle.com/"
abc#

So i downloaded the agent from https://www.nagios.org/ncpa/#downloads and the agent that i downloaded is oracle solaris 11.x and the pkg-sparc. Installed it on the server.

Restarted the service after updating the ncpa.cfg with the correct community string.

Checked the output and found that the ncpa listener and passive is online.

abc# svcs -a | grep -i ncpa
online 15:54:04 svc:/site/ncpa_listener:default
online 15:54:17 svc:/site/ncpa_passive:default
abc#

Did a telnet from our Nagios XI server on port 5693 and found that the telnet is happening fine.

[linux@abc ~]$ telnet 10.14.x.x 5693
Trying 10.14.x.x...
Connected to 10.14.x.x.
Escape character is '^]'.
^CConnection closed by foreign host.
[linux@abc ~]$

But when i a trying to configure it via console it is throwing an error. Attached is the screenshot.

Can you please help me fixing the issue and adding the server under monitoring in Nagios XI.

Let me know in case if any more details are required.

Regards,
Keerthi Prashanth Seetharaman

Re: NCPA agent issue

Posted: Mon May 04, 2020 12:01 pm
by keerthi.seetharaman
Anyone can please help me urgently?

Re: NCPA agent issue

Posted: Mon May 04, 2020 12:24 pm
by ssax
I apologize, we were closed, you can see our hours here:

https://www.nagios.com/contact/

Posts/Tickets are answered in the order received.

Does it work from the CLI of the XI server?
- Change X.X.X.X and YOURTOKEN

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H X.X.X.X -t 'YOURTOKEN' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
I believe this is a bug in your version of the NCPA wizard though, please go to Admin > Manage Config Wizards:
- Click the Check for Updates button
- Install the Updates

Then test and it should be resolved.

Re: NCPA agent issue

Posted: Mon May 04, 2020 7:37 pm
by keerthi.seetharaman
Thanks for the reply.
We do not have internet connection provided from client end to do an update.But yes we can check the command that you have provided.

Output after running from CLI is as below:-
[linux@redhat libexec]$ ./check_ncpa.py -H 10.14.xx.xx -t 'test' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
UNKNOWN: An error occured connecting to API. (HTTP error: '500 INTERNAL SERVER ERROR')
[linux@redhat libexec]$

Let me know in case if any more details are required.

Re: NCPA agent issue

Posted: Tue May 05, 2020 1:05 pm
by ssax
Download the attached zip file (don't extract):

Then go to Admin > Configuration Wizards:
- Click the Browser button and select the zip file
- Click the Upload & Install button

Test the NCPA wizard again against this system.

If that doesn't resolve it, send the output of this command (only after updating the wizard):

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -V

Re: NCPA agent issue

Posted: Tue May 05, 2020 8:30 pm
by keerthi.seetharaman
Sure we will do that.

But one info is that hopefully, it does not affect any other server that are under monitoring due to this.

Regards,
Keerthi Prashanth S

Re: NCPA agent issue

Posted: Wed May 06, 2020 3:56 pm
by ssax
Take the attached zip file, extract it, and put the file on your server somewhere (don't replace the current plugin), then run this command against it and see if it works:

Code: Select all

python check_ncpa.py -H 10.14.xx.xx -t 'test' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
Then we'll know if that resolves it.

Re: NCPA agent issue

Posted: Wed May 06, 2020 9:06 pm
by keerthi.seetharaman
Thanks for your quick response.

So I need to copy this file in my Nagios XI server and test it. Right?

Re: NCPA agent issue

Posted: Thu May 07, 2020 4:32 pm
by ssax
Yes, correct.

Re: NCPA agent issue

Posted: Tue Jun 02, 2020 2:38 am
by keerthi.seetharaman
Sorry for the delay response.

Checked but having the same issue.
[redhat@abc ~]$ python check_ncpa.py -H 10.xx.xxx.xx -t 'test' -P 5693 -M cpu/percent -w 20 -c 40 -q 'aggregate=avg'
UNKNOWN: An error occured connecting to API. (HTTP error: '500 INTERNAL SERVER ERROR')

File is copied on desktop and executed from desktop itself.