Nagios API URL are not constructed properly
Posted: Tue Sep 24, 2019 2:05 pm
Hi.
We have detected that some URLs that fusion uses to poll XI servers are wrong
/nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0?brevity=1
/nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1
/nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:2000&brevity=1
/nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0?brevity=1
/nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1
/nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:2000&brevity=1
As it can be seen, what's marked in bold is probably wrong (it should be an ampersand instead of a question mark), so right now the brevity argument is ignored for the first 1000 host/servicestatus. The other requests (starting from the record 1000) are fine and don't have that bug.
Thanks, Gonzalo
We have detected that some URLs that fusion uses to poll XI servers are wrong
/nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0?brevity=1
/nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1
/nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:2000&brevity=1
/nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0?brevity=1
/nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1
/nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:2000&brevity=1
As it can be seen, what's marked in bold is probably wrong (it should be an ampersand instead of a question mark), so right now the brevity argument is ignored for the first 1000 host/servicestatus. The other requests (starting from the record 1000) are fine and don't have that bug.
Thanks, Gonzalo
