GithubHelp home page GithubHelp logo

krylon360 / grafana-zabbix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grafana/grafana-zabbix

0.0 3.0 0.0 111 KB

Zabbix API datasource for Grafana dashboard

JavaScript 72.57% HTML 27.43%

grafana-zabbix's Introduction

grafana-zabbix

Zabbix API datasource for Grafana dashboard

Display your Zabbix data directly in Grafana dashboards!

alt tag

Useful metric editor with host group and application filtering:

alt tag

Installation

Grafana 1.9.x

Download latest 1.x.x release and unpack into <your grafana installation>/plugins/datasource/. Then edit Grafana config.js:

  • Add dependencies

    plugins: {
      panels: [],
      dependencies: ['datasource/zabbix/datasource', 'datasource/zabbix/queryCtrl'],
    }
    
  • Add datasource and setup your Zabbix API url, username and password

    datasources: {
      ...
      },
      zabbix: {
        type: 'ZabbixAPIDatasource',
        url: 'http://www.zabbix.org/zabbix/api_jsonrpc.php',
        username: 'guest',
        password: ''
      }
    },
    

Grafana 2.0.x

Download source code from master branch and put zabbix directory into <your grafana-2 installation>/public/app/plugins/datasource/.

  • Edit plugin.json (located in zabbix directory) and set your username and password

    {
      "pluginType": "datasource",
      "name": "Zabbix",
    
      "type": "zabbix",
      "serviceName": "ZabbixAPIDatasource",
    
      "module": "plugins/datasource/zabbix/datasource",
    
      "partials": {
        "config": "app/plugins/datasource/zabbix/partials/config.html",
        "query": "app/plugins/datasource/zabbix/partials/query.editor.html",
        "annotations": "app/plugins/datasource/zabbix/partials/annotations.editor.html"
      },
    
      "username": "guest",
      "password": "",
    
      "metrics": true,
      "annotations": true
    }
    
    
  • Restart grafana server.

  • Add zabbix datasource in Grafana's "Data Sources" menu (see Data Sources docs for more info) and setup your Zabbix API url.

  • Important! Change Access to direct!

2015-05-18 12-46-03 grafana - zabbix org - mozilla firefox

Note for Zabbix 2.2 or less

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

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

if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
	return;
}

before

require_once dirname(__FILE__).'/include/func.inc.php';
require_once dirname(__FILE__).'/include/classes/core/CHttpRequest.php';

Full fix listing. For more info see zabbix issues ZBXNEXT-1377 and ZBX-8459.

Troubleshooting

See Grafana troubleshooting for general connection issues. If you have a problem with Zabbix datasource, you should open a support issue. Before you do that please search the existing closed or open issues.

grafana-zabbix's People

Contributors

alexanderzobnin avatar nucleusv avatar

Watchers

Bryce Walter avatar James Cloos avatar  avatar

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.