Comments (55)
Hi there,
For Apache
Add the following line inside either the <Directory>
, <Location>
, <Files>
or <VirtualHost>
sections of your server config (usually located in a *.conf file, such as httpd.conf
or apache.conf
), or within a .htaccess
file :
<IfModule headers_module>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE"
Header set Access-Control-Allow-Credentials "true"
Header set Access-Control-Allow-Headers "Origin,Content-Type,Accept,Authorization,App-Token,Session-Token"
</IfModule>
Regards
from glpi_app_grafana.
The config seems good, but are you sure the module headers_module
is installed and loaded?
You have the IfModule
so perhaps it's that
from glpi_app_grafana.
Not unactive it :p
if put the active to no automatically (so without manual modification), you have a big problem :(
from glpi_app_grafana.
Ah? how do you installed it? (it will be more easier when be published, so in very few days)
from glpi_app_grafana.
I copied the folder glpi_app_grafana in /var/lib/grafana/plugins .
from glpi_app_grafana.
You need define the user token
related to the account in GLPI.
from glpi_app_grafana.
Yes, of course. this data is provided
from glpi_app_grafana.
In GLPI, you have right allow the IP of your grafana in the API ?
Perhaps try use access direct
instead proxy
What version of grafana you use? I have developped on grafana 4
from glpi_app_grafana.
from glpi_app_grafana.
in ipv4 address range
you must set it, try use something like 0.0.0.1 - 254.254.254.254
to allow all IP ;)
from glpi_app_grafana.
no =( , I pointed out the IP grafana
the same error
HTTP Error
Bad Request
from glpi_app_grafana.
Address range, you must specify the first IP and the last IP, not the netmask :D
from glpi_app_grafana.
HTTP Error
Bad Request
http://192.168.80.19/**apirest.php** right ?
from glpi_app_grafana.
the URL is right with GLPI 9.1.x...
Perhaps see your webserver logs
from glpi_app_grafana.
In the web server when connecting from grafana reports the following
[26/Jun/2017:15:53:30 +0300] "GET /apirest.php/initSession HTTP/1.1" 400 184 "http://grafana.domain:3000/datasources/edit/5" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
192.168.80.30 - - [26/Jun/2017:15:53:36 +0300] "GET /apirest.php/initSession HTTP/1.1" 400 184 "http://grafana.domain:3000/datasources/edit/5" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
192.168.80.30 - - [26/Jun/2017:15:53:40 +0300] "GET /apirest.php/initSession HTTP/1.1" 400 184 "http://grafana.domain:3000/datasources/edit/5" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
from glpi_app_grafana.
I mean logs for GLPI, not Grafana ;)
from glpi_app_grafana.
I see the error, I'm working on a fix ;)
from glpi_app_grafana.
So no it works :p fine
from glpi_app_grafana.
from glpi_app_grafana.
I have a problem with my glpi (dev version not up-to-date), so now it works on last grfana and on GLPI 9.1 and dev (9.2), so I think you have a configuration problem somewhere.... perhaps allow headers in you webserver deliver GLPI
from glpi_app_grafana.
from glpi_app_grafana.
9.1.x works, so 9.1.4 works too :p
from glpi_app_grafana.
but I have not worked =(
from glpi_app_grafana.
192.168.80.30 - - [27/Jun/2017:17:51:39 +0300] "GET /apirest.php/initSession HTTP/1.1" 400 184 "http://grafana.hub.domain:3000/datasources/edit/5" "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"
log on the web server glpi
`192.168.80.30 - this is the address where the message (from the server grafana)
from glpi_app_grafana.
Perhaps your webserver not allow CORS, it's required to work
from glpi_app_grafana.
I don't know what to do to make it work
setting CORS done, but not working.
from glpi_app_grafana.
See the API page, http://yourglpi_url/apirest.php and you have all information at the end
from glpi_app_grafana.
Hi there,
I am running GLPI 9.1.4 with Apache 2.4.10 on Debian 8 from a side, and Grafana 4.4.3 with Apache on Debian 9 on another side.
I can't get your dashboard working with my current configuration. I looked at apirest.php, especially at the end, and no information about cors or apache headers.
My problem is probably linked with #3 but I can't find an issue to it.
Could you post a webserver conf example pls ?
Thanks !
from glpi_app_grafana.
For nginx:
server {
listen 80;
location / {
root /usr/local/www/nginx;
index index.php index.html index.htm;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/nginx-dist;
}
more_set_headers 'Access-Control-Allow-Origin: *';
more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE';
more_set_headers 'Access-Control-Allow-Credentials: true';
more_set_headers 'Access-Control-Allow-Headers: Origin,Content-Type,Accept,Authorization,App-Token,Session-Token';
location /api {
rewrite ^/api/(.*)$ /apirest.php/$1 last;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ [^/]\.php(/|$) {
client_max_body_size 20M;
root html;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param HTTP_REFERER $http_referer;
fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name;
include fastcgi_params;
fastcgi_param SERVER_NAME $host;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
}
}
from glpi_app_grafana.
Thanks ;)
from glpi_app_grafana.
I always get this error message
GLPI 9.2
Debian 9 - 64x
PHP 7.0.19-1
Apache/2.4.25
from glpi_app_grafana.
Open the web developper
part of your browser and in network part, wee the url of your GLPI called by grafana
from glpi_app_grafana.
Do I need to edit any files? How should I proceed - Apache/2.4.25
from glpi_app_grafana.
See #1 (comment)
with this modification, you need too have in httpd.conf the AllowOverride All
to allow the use of the .htaccess
from glpi_app_grafana.
Problem continues :'(
Even with version 9.1.4 of GLPI and Apache Server
from glpi_app_grafana.
from glpi_app_grafana.
Insert lines in the file
#vim /etc/apache2/sites-enabled/000-default.conf
<IfModule headers_module>
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET, HEAD, POST, OPTIONS, PUT, DELETE"
Header set Access-Control-Allow-Credentials "true"
Header set Access-Control-Allow-Headers "Origin,Content-Type,Accept,Authorization,App-Token,Session-Token,Access-Control-Request-Headers"
</IfModule>
Loaded module on apache
#sudo a2enmod headers
Restart service Apache
#sudo service apache2 restart
from glpi_app_grafana.
Very good news ^^
from glpi_app_grafana.
Hello,
In spite of your explanations, I modified the set of configuration files but I still have the same error message.
In live mode it gives this:
,
The conf file is the follower (centos distribution for the GLPI and a debian for the grafana)
I also have an error message when I put in proxy mode:
while I have GLPI I have indicated my ip
I thank you for the valuable help you can give me. Have a good day
PS:
Excuse me if there are spelling mistakes, I'm french
from glpi_app_grafana.
In GLPI, in menu Setup > General, in tab API, you need modify the range IP allowed to access to GLPI. The message say, your IP not allowed (by default only 127.0.0.1 allowed).
from glpi_app_grafana.
Thank you for the speed of the answer but I indicated the range of address without result
Ci dessous un exemple de configuration
from glpi_app_grafana.
Seems ok, to be sure, the app_token is not the same for full access from localhost and mon glpi2 ? if yes, you will have problem, so perhaps try disable them
from glpi_app_grafana.
My problem is the same with @siccbr , But in my inspection of code i see this it. Anyone can help me?
angular.js:12759 Mixed Content: The page at 'https://monitor.sumicity.net.br/datasources/edit/18' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://10.99.1.121/apirest.php/initSession'. This request has been blocked; the content must be served over HTTPS.
from glpi_app_grafana.
Seems your grafana in https and your GLPI api in http or invert (not sure). you can't mix both, so put all in http or all in https
from glpi_app_grafana.
Thanks @ddurieux ! i changed my GLPI for 'https' and that's all right! Sucess!
I connected in my GLPI with Grafana
from glpi_app_grafana.
nice ^^ enjoy now ;)
from glpi_app_grafana.
I included a valid certificate for Https (443) but, the GLPI API dont receive information, with error sync.
Please, look the error in image attached
from glpi_app_grafana.
from glpi_app_grafana.
Any news?
from glpi_app_grafana.
I close, if required, open a new issue ;)
from glpi_app_grafana.
Hi, my integration between grafana and GLPI is working, but when I starts the integration, the glpi user changes his status to: Active = no at GLPI and consequently the conection stops . Have you alredy see this problem? Tks
from glpi_app_grafana.
Thanks @ddurieux. Could you pass me how I change this configuration to manual?
from glpi_app_grafana.
good night
I'm having trouble setting up glpi and grafana
is returning the following error
Cross-Origin Request Blocked: add right headers in your apache/nginx like 'App-Token' and 'Session-Token'
I'm using Grafana v5.4.3 (6539180) and GLPI 9.3.3 - on Centos7 server and httpd
I've already altered httpd.conf as directed, but I still get the message, any tips on what to do?
from glpi_app_grafana.
See messages of this topic, there is information. If not works, check webserver logs to see if you have errors
from glpi_app_grafana.
You have a 401, so check the web server logs / GLPI logs
from glpi_app_grafana.
Related Issues (20)
- Error Bad Request
- 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
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.