Red Hat 7.4
I have a strange problem.
Object API working for other command except ServiceStatus, StateHistory on the same server.
It just drops to command line after about 3 seconds.
The command picked straight from Object API help.
API is from an admin user
Code: Select all
This works for all other 6 instances, off course with different IP and API key.
[nagios@nagiosprodxi1 scripts]$/usr/bin/curl -v -XGET 'http://10.17.19.234/nagiosxi/api/v1/objects/statehistory&search=&reportperiod=last24hours&startdate=&enddate=&hostgroup=&servicegroup=&statetype=both&?apikey=n3UYgnsqnfJX84rBNqRG3qbbi2WpjFaZX4XdqJW8fG5mZPd4v4JRua26bXPtSfs6&outputtype=xml'
* About to connect() to 10.17.19.234 port 80 (#0)
* Trying 10.17.19.234... connected
* Connected to 10.17.19.234 (10.17.19.234) port 80 (#0)
> GET /nagiosxi/api/v1/objects/statehistory&search=&reportperiod=last24hours&startdate=&enddate=&hostgroup=&servicegroup=&statetype=both&?apikey=n3UYgnsqnfJX84rBNqRG3qbbi2WpjFaZX4XdqJW8fG5mZPd4v4JRua26bXPtSfs6&outputtype=xml HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.17.19.234
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Date: Tue, 04 May 2021 08:45:59 GMT
< Server: Apache/2.2.15 (Red Hat)
< X-Powered-By: PHP/5.3.3
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
< Content-Length: 0
< Connection: close
< Content-Type: application/xml
<
* Closing connection #0
[nagios@nagiosprodxi1 scripts]$
[nagios@nagiosprodxi3 ~]$ curl -v -XGET "http://10.17.19.234/nagiosxi/api/v1/objects/statehistory?apikey=n3UYgnsqnfJX84rBNqRG3qbbi2WpjFaZX4XdqJW8fG5mZPd4v4JRua26bXPtSfs6&pretty=1"
* About to connect() to 10.17.19.234 port 80 (#0)
* Trying 10.17.19.234... connected
* Connected to 10.17.19.234 (10.17.19.234) port 80 (#0)
> GET /nagiosxi/api/v1/objects/statehistory?apikey=n3UYgnsqnfJX84rBNqRG3qbbi2WpjFaZX4XdqJW8fG5mZPd4v4JRua26bXPtSfs6&pretty=1 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.17.19.234
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 500 Internal Server Error
< Date: Tue, 04 May 2021 08:39:12 GMT
< Server: Apache/2.2.15 (Red Hat)
< X-Powered-By: PHP/5.3.3
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
< Content-Length: 0
< Connection: close
< Content-Type: application/json
<
* Closing connection #0
[nagios@nagiosprodxi3 ~]$