Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Не подключается Zabbix API datasource #50

Closed
mikhailov opened this issue Jul 10, 2015 · 7 comments
Closed

Не подключается Zabbix API datasource #50

mikhailov opened this issue Jul 10, 2015 · 7 comments

Comments

@mikhailov
Copy link

Александр, отличный плагин написал, собирался попробовать и наткнулся на неприятность, Grafana ругается примерно так:

Stack trace:

kb/<@https://monitoring.test.com/grafana/app/app.6e379bdb.js:10:15701
v@https://monitoring.test.com/grafana/app/app.6e379bdb.js:10:14241
o/j@https://monitoring.test.com/grafana/app/app.6e379bdb.js:10:12812
i@https://monitoring.test.com/grafana/app/app.6e379bdb.js:10:29774
j/<@https://monitoring.test.com/grafana/app/app.6e379bdb.js:10:29946
Rb/this.$get</l.prototype.$eval@https://monitoring.test.com/grafana/app/app.6e379bdb.js:12:5064
Rb/this.$get</l.prototype.$digest@https://monitoring.test.com/grafana/app/app.6e379bdb.js:12:3578
Rb/this.$get</l.prototype.$apply@https://monitoring.test.com/grafana/app/app.6e379bdb.js:12:5322
k@https://monitoring.test.com/grafana/app/app.6e379bdb.js:14:3970
_.event.dispatch@https://monitoring.test.com/grafana/app/app.6e379bdb.js:6:1535
_.event.add/q.handle@https://monitoring.test.com/grafana/app/app.6e379bdb.js:5:30407

Исходные данные: свежая Grafana, последний стабильный Zabbix, юзер для доступа настроен и прописан с настройках, логи httpd на Zabbix пустые, так как Grafana даже не может достучаться, спотыкается на JS error, Рекомендации?

@nucleusv
Copy link
Contributor

Девелопер тулс откройте ф12 и скрин запросов и лог консоли покажите

@mikhailov
Copy link
Author

@nucleusv похоже, дурацкий вопрос у меня, в отсутствии заголовков CORS проблема, хотя Zabbix свежайший:

screen shot 2015-07-10 at 5 05 37 pm

Пошел httpd подкручу, хотя на Nginx переведем скоро

@nucleusv
Copy link
Contributor

у вас странное имя страницы АПИ -  jsrpc.php

@nucleusv
Copy link
Contributor

Zabbix API (api_jsonrpc.php) before zabbix 2.4 don't allow cross-domain requests (CORS). And you can get HTTP error 412 (Precondition Failed). To fix it add this code to api_jsonrpc.php immediately after the copyright

@mikhailov
Copy link
Author

спасибо, закрываю тикет

@alexanderzobnin
Copy link
Collaborator

@mikhailov Проблема была в CORS?

@mikhailov
Copy link
Author

@alexanderzobnin нет, в самоподписанном сертификате и в том, что Grafana не умела это сразу показать

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants