On Thu, 8 Feb 2018 08:46:14 +0100 Morten Brekkevold morten.brekkevold@uninett.no wrote:
This is the faulty request which generates the errors: https://nav.uio.no/graphite/render?format=json&from=-5min&until=now
The request does not contain a target.
That's interesting on several levels.
Firstly, the NAV request is obviously botched, but where does it come from? Did NAV generate it, or did something else? You neglected to include the rest of the e-mail sent by Django. Do your NAV webserver logs contain referrer information for the failing request?
Andreas took the discussion off-list, but we found the problem, so here's the executive summary:
Andreas has graphite-web 0.9.16 (or potentially, graphite-api 1.1.3), which apparently processes GET/POST arguments differently from 0.9.12.
A JavaScript component of IP Device Info uses jQuery to fetch data from Graphite, which results in a request using "bracket-syntax" for multi-valued arguments: I.e. it posts the equivalent of:
/graphite/render?target[]=metric.path.1&target[]=metric.path.2
The older graphite-web appears to handle this fine, while the newer only works with something like this:
/graphite/render?target=metric.path.1&target=metric.path.2
So NAV's request ends up with a newer graphite-web returning a 400 BAD REQUEST.
The latter way of making the request works with both graphite-web versions involved, so we've changed the way the requests are issued. The fix [1] will be in the next 4.8 bugfix release.
[1] https://github.com/UNINETT/nav/issues/1664