Giter Site home page Giter Site logo

Comments (29)

nucleusv avatar nucleusv commented on July 28, 2024

Have you specified user and password in json config? Press F12 (Developer Tools) to analyze problem.

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

yea i have specified user name n pwd in json config file.

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

Please, show screenshot of datasource configuration menu

2015-05-19 19-06-49 grafana - home - mozilla firefox

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

Are there any errors in the browser's console? (F12 for development tools and then console tab)

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

Please find the screenshot of datasource config and the console tab (F12 )
grafana1
grafana2

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

Does your web server require authorization?

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

no... i use the same URL and username n pwd to get the zabbix data using api...

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

Look like your web server (zabbix.isus.emc.com) don't allow cross-domain requests from localhost:3000

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

What web server are you using?

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

Alex, no problem in zabbix api page. Diwahars, what version of zabbix do you have?

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

Zabbix 2.2
On May 19, 2015 11:00 PM, "nucleusv" [email protected] wrote:

Alex, no problem in zabbix api page. Diwahars, what version of zabbix do
you have?


Reply to this email directly or view it on GitHub
#17 (comment)
.

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

Look at api_jsonrpc.php

It must look like
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Methods: POST');
header('Access-Control-Max-Age: 1000');

/* THIS STRING ALLOWS OPTIONS TEST QUERY - ADD THIS LINE */
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
return;
}

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

@nucleusv zabbix api blocks cross-origin resource sharing (cross-domain requests)?

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

Yes, in old version. In 2.4 it seems OK, download zabbix sources, and check this, if in old versions no such line
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
return;
}

I think it should be added to install instructions.

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

i have a test server with zabbix2.4.. i tried using that to... but still i get error..

grafanna3

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

Can you test http instead https? May be problem in grafana.

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

it works with http for zabbix2.4, but still same prob exists for zabbix 2.2...

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

Show screenshot with zabbix 2.2 where grafana performs OPTIONS request OR request with errors, have you changed api_jsonrpc.php page ?

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

Have you added headers output

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Methods: POST');
header('Access-Control-Max-Age: 1000');

?

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

I have not yet changed api_jsonrpc page..., but changed https to http.. It
worked for zabbix2.4... Likewise I tried for zabbix 2.2... It didn't
work... Will check by changing the api page...

There is no other way to rectify this error... Rather than changing the api
page??
On May 19, 2015 11:51 PM, "nucleusv" [email protected] wrote:

Show screenshot with zabbix 2.2 where grafana do OPTIONS request OR
request with errors, have you changed api_jsonrpc.php page ?


Reply to this email directly or view it on GitHub
#17 (comment)
.

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

There is no other way to rectify this error... Rather than changing the api
page??

Yes, it is problem in this page

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

https://support.zabbix.com/browse/ZBXNEXT-1377

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

ok...

so i should add these headers is it?
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Methods: POST');
header('Access-Control-Max-Age: 1000');

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

@nucleusv Is this error in zabbix 2.2 only or all version less than 2.4?

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

less than 2.4

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

Ok, I'll describe this in docs.

from grafana-zabbix.

Diwahars avatar Diwahars commented on July 28, 2024

@nucleusv should i add these headers is it?
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Content-Type');
header('Access-Control-Allow-Methods: POST');
header('Access-Control-Max-Age: 1000');

or this one
/* THIS STRING ALLOWS OPTIONS TEST QUERY - ADD THIS LINE */
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
return;
}
?

from grafana-zabbix.

nucleusv avatar nucleusv commented on July 28, 2024

headers and OPTIONS check, replace if there some of these headers

from grafana-zabbix.

alexanderzobnin avatar alexanderzobnin commented on July 28, 2024

Added fix instructions.

from grafana-zabbix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.