UNKNOWN: An error occured connecting to API. (Connection err

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: UNKNOWN: An error occured connecting to API. (Connection

Post by preethu.d »

Hi Perry,

It shows active (exited). i have attached the screenshot.

For the below command, do you want to check this from remote host or from Nagios server ?

"yourhostaddresshere" is it Nagios IP or remote host IP ?

Can you please explain.

/usr/local/nagios/libexec/check_ncpa.py -H yourhostaddresshere -P 5693 -t yourtokenhere -M 'disk/logical/|boot/used_percent' -w 80 -c 90

Regards,
Preethu
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: UNKNOWN: An error occured connecting to API. (Connection

Post by pbroste »

Hello @preethu.d

Thanks for following up with the screenshot and details.

Appears that the 'ncap_listener' is complaining about running as daemon, and it appears that the ncpa agent is installed in a non-default directory? How was the 'ncpa agent' installed? Typically we see in '/usr/local/ncpa/....'

Let's first list some python stuff:

Code: Select all

which python
Then;

Code: Select all

ls -ls /usr/bin/python*
Instead of launching the 'ncpa_listener' as a daemon we will go ahead and run as process. See if it complains:

Code: Select all

/usr/local/ncpa/ncpa_listener --start -n &
(your path may differ)
Then;

Code: Select all

/usr/local/ncpa/ncpa_listener --status
(your path may differ)

To find the 'ncpa_listener' running process:

Code: Select all

ps -aux | grep -Ei 'ncpa'
Please let us know how things look,
Perry
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: UNKNOWN: An error occured connecting to API. (Connection

Post by preethu.d »

Hi Perry,

I have executed the steps, attached the screenshot. Please check.

Regards,
Preethu
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: UNKNOWN: An error occured connecting to API. (Connection

Post by pbroste »

Hello @preethu.d

Thanks for following up, I did not catch this earlier, but a colleague pointed out that this was an issue with ipv6 integration and is fixed in the latest stable agent version - 2.3.1.

Found here: https://www.nagios.org/ncpa/#downloads

Thanks,
Perry
preethu.d
Posts: 109
Joined: Wed Nov 25, 2020 11:32 pm

Re: UNKNOWN: An error occured connecting to API. (Connection

Post by preethu.d »

Hi Perry,

I installed latest agent and it is working now.
Thanks for the help.
You can close this thread.

Regards,
Preethu
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: UNKNOWN: An error occured connecting to API. (Connection

Post by pbroste »

Hello @preethu.d

Excellent, please let us know if you need anything further. Locking.

Thanks,
Perry
Locked