REST API does not work
Posted: Fri Feb 02, 2018 8:34 am
Hi all,
we want to use REST API NagiosXI, but probably we don't have something in our installation:
How activate NagiosXI REST API?
Thanks,
System:
we want to use REST API NagiosXI, but probably we don't have something in our installation:
Code: Select all
GET https://<fqdn nagiosXI server>/nagiosxi/api/v1/objects/hostgroup?apikey=<API key>&pretty=1
404: The requested URL /nagiosxi/api/v1/objects/hostgroup was not found on this server.
# tail /var/log/httpd/ssl_error_log
[Fri Feb 02 14:19:39 2018] [error] [client <ip client>] File does not exist: /usr/local/nagiosxi/html/api/v1/objects
# ls -l /usr/local/nagiosxi/html/api/v1/
total 4
-rwxr-x--- 1 nagios nagios 1247 Nov 13 17:20 index.php
GET https://<fqdn nagiosXI server>/nagiosxi/api/v1/index.php?apikey=<API key>&pretty=1
404: NoEndpoint:
# tail /var/log/httpd/ssl_error_log
[Fri Feb 02 14:24:05 2018] [error] [client <ip client>] PHP Notice: Undefined index: request in /usr/local/nagiosxi/html/api/v1/index.php on line 37Thanks,
System:
- Nagios XI Version : 5.4.11
- <fqdn server> 2.6.32-573.3.1.el6.x86_64 x86_64
- Red Hat Enterprise Linux Server release 6.7 (Santiago)
- Gnome is not installed
- PHP Version: 5.3.3
- Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
- Server Name: <fqdn server>
- Server Address: <IP server>
- Server Port: 443
- PHP Timezone: Europe/Rome
- PHP Time: Fri, 02 Feb 2018 14:26:32 +0100
- System Time: Fri, 02 Feb 2018 14:26:32 +0100