NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guyver1
Posts: 27
Joined: Tue Apr 16, 2019 4:43 am

NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Post by Guyver1 »

Hi,

I've just installed the NCPA agent on a RHEL 7 server and configured it as per all my other NCPA agent based servers.

However when doing my initial check i get the following:
[root@nagios libexec]# ./check_ncpa.py -H 192.168.xxx.xxx -t 'notmyrealtoken' -P 5693 -M 'system/agent_version' -v
Connecting to: https://192.168.xxx.xxx:5693/api/system ... en&check=1
An error occurred:HTTP Error 403: FORBIDDEN

I have also tried the web interface for the agent and get the same error:
Forbidden
You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.

When attempting to add port 5693 to the firewall it tells me the firewall is not running so is not an issue:
[root@hostname ~]# firewall-cmd --add-port=5693/tcp --permanent
FirewallD is not running

How do I get this working?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Post by benjaminsmith »

Hello @Guyver1,

Find the ncpa.cfg file and change the following line:

Code: Select all

ip = ::
To:

Code: Select all

ip = 0.0.0.0
Save the changes and re-start the NCPA listener and then test again. Let me know if the issue is resolved for you.

Code: Select all

service ncpa_listener restart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Guyver1
Posts: 27
Joined: Tue Apr 16, 2019 4:43 am

Re: NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Post by Guyver1 »

Amazing! Thank you very much!

I knew it was something simple!

I've added that to my notes.

Cheers.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NCPA Agent on RHEL, HTTP 403 FORBIDDEN

Post by scottwilkerson »

Great!

Locking
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked