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
Nagios API URL are not constructed properly
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios API URL are not constructed properly
What version of Fusion are you running? I have not been able to reproduce this
Re: Nagios API URL are not constructed properly
Hi. I'm using latest Nagios Fusion 4.1.7, running from the downloaded ova.
The easiest way to reproduce it is to just fuse a new XI server and check its access logs (check the full image, I've highlighted the issue with red):
I know this bug is only minor and does not affect the data that's being shown in most views, but it is annoying and can lead to unusual bugs if you want to develop your own polling callbacks.
Thanks, Gonzalo
The easiest way to reproduce it is to just fuse a new XI server and check its access logs (check the full image, I've highlighted the issue with red):
I know this bug is only minor and does not affect the data that's being shown in most views, but it is annoying and can lead to unusual bugs if you want to develop your own polling callbacks.
Thanks, Gonzalo
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios API URL are not constructed properly
I understood what you were mentioning but when trying to replicate this I get all &brevity=1 in the logs
Did you add a custom polling callback that could be causing this?
Code: Select all
"GET /nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0&brevity=1 HTTP/1.1" 200 129669
"GET /nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1 HTTP/1.1" 200 67
"GET /nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0&brevity=1 HTTP/1.1" 200 1387730
"GET /nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1 HTTP/1.1" 200 73
"GET /nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0&brevity=1 HTTP/1.1" 200 129660
"GET /nagiosxi/api/v1/objects/hoststatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1 HTTP/1.1" 200 67
"GET /nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:0&brevity=1 HTTP/1.1" 200 1387767
"GET /nagiosxi/api/v1/objects/servicestatus?fusekey=...&outputtype=xml&user=nagiosadmin&records=1000:1000&brevity=1 HTTP/1.1" 200 73
Re: Nagios API URL are not constructed properly
No, I'm using the nagiosfusion-4.1.7-64.ova as-is. I've also tried installing it manually using an Centos 7 appliance (from osboxes.org) and the same thing happens.scottwilkerson wrote: Did you add a custom polling callback that could be causing this?
I will try to record a screen capture video, so that you can check and see if I'm doing anything wrong.
Thanks, Gonzalo
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios API URL are not constructed properly
My initial testing was on a CentOS 6 system where I couldn't re-create the issue, but since your last post I spun up the OVA and can replicate the issue.
This has been send to our development team to look at to be fixed in a future release.
Thanks for working with us on this, I suspect it is a difference in how php handles some functions between versions.
This has been send to our development team to look at to be fixed in a future release.
Thanks for working with us on this, I suspect it is a difference in how php handles some functions between versions.