Comments (18)
Hello,
Same here, I've tried with different GLPi version. Twicking with app token and/or user token : same result.
I've cut and paste the IP address shown in the error message to the API application : same result.
I'm able to manually connect from the Grafana machine (using wget for instance). So I don't thing it could be a IP setup issue.
Any idea ?
Thanks
from glpi_app_grafana.
Grafana on same server than GLPI ?
from glpi_app_grafana.
from glpi_app_grafana.
In configuration in grafana, you had tried in proxy AND direct or only one of both ?
from glpi_app_grafana.
from glpi_app_grafana.
Without CORS configuration, it can't works. So check the CORS config (I added doc for that)
from glpi_app_grafana.
from glpi_app_grafana.
Yes in all cases you need have CORS configured
from glpi_app_grafana.
from glpi_app_grafana.
Check in 'network' tab of you browser (developper tools) and you can have more information about the error
from glpi_app_grafana.
This is what I've found :
grafana_app.ts:59 warning rootScope onAppEvent called without localscope
:3000/api/datasource…oxy/2/initSession:1 Failed to load resource: the server responded with a status of 400 (Bad Request)
2:1 Failed to load https://192.168.209.139/glpi/apirest.php/initSession: Request header field App-Token is not allowed by Access-Control-Allow-Headers in preflight response.
angular.js:12837 GET http://192.168.209.137:3000/api/datasources/proxy/2/initSession 400 (Bad Request)
Doesn't mean things for me :(
from glpi_app_grafana.
App-Token is not allowed by Access-Control-Allow-Headers
so not sure the header you have put in apache configuration is in the right place
from glpi_app_grafana.
Oups, missing a refresh, my mistake, this error was with browser mode (which is not my target).
If I do a connection with server mode I only have this error :
GET http://192.168.209.137:3000/api/datasources/proxy/2/initSession 400 (Bad Request)
from glpi_app_grafana.
I think it's the same problem
from glpi_app_grafana.
Grrr , it wasn't the correct file :(
Modifying the correct one fixed "Request header field App-Token" in browser mode.
It works in browser mode 👍
192.168.209.1 - - [19/Jun/2018:21:14:52 +0200] "OPTIONS /glpi/apirest.php/initSession HTTP/1.1" 200 -
192.168.209.1 - - [19/Jun/2018:21:14:52 +0200] "GET /glpi/apirest.php/initSession HTTP/1.1" 200 46
But on server mode is still stuck with error 400 :
192.168.209.140 - - [19/Jun/2018:21:14:24 +0200] "GET /glpi/apirest.php/initSession HTTP/1.1" 400 140
Do you think it could be worth to stop doing SSL and sniff the packets to see what's going on ?
Many thanks for your help
from glpi_app_grafana.
In server, there is a problem with code in API, you need modify the code in GLPI like in this comment: #10 (comment)
from glpi_app_grafana.
Perfect, it works with server option too 👍 👍 👍
My version was not the same, but the 3 lines solved the issue :
// retrieve ip of client
$this->iptxt = (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) ? $_SERVER["HTTP_X_FORWARDED_FOR"]
: $SERVER["REMOTE_ADDR"]);
$spl = explode(',', $this->iptxt);
if (count($spl) > 1) {
$this->iptxt = $spl[0];
}
$this->ipnum = (strstr($this->iptxt, ':')===false ? ip2long($this->iptxt) : '');
Great, Thanks,
Need to play with the query now :)
from glpi_app_grafana.
Nice ;)
from glpi_app_grafana.
Related Issues (20)
- Can't get any data, queries gets the authentication page as an answer HOT 1
- GLPI API Error Response: Bad Request HOT 2
- Failed to fetch Instantiating with Grafana 8 HOT 4
- incorrect values when using url HOT 11
- Cannot configure api on grafana HOT 1
- erro ao tentar instalar HOT 1
- Can't use mixed datasources to merge data from two glpi instance
- ERROR_SESSION_TOKEN_MISSING
- Not Working with Grafana v8.3.3 and GLPI 9.5.7 HOT 7
- Bad Request Grafana 8.5.1 GLPI 9.5.7 HOT 2
- Plugin is not working/page stops responding
- Not Working with Grafana v9.1.7 and GLPI 10.0.3 HOT 30
- Options manquantes
- Options manquantes HOT 1
- Invalid plugin signature
- Datasource not found HOT 2
- Entities
- Query error - failed to fetch
- Angular is deprecated - please migrate to React
- Working with GLPI 10.0.15 ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glpi_app_grafana.