ambari-grafana icon indicating copy to clipboard operation
ambari-grafana copied to clipboard

Compatibility with Grafana 3.0 Plugin API

Open krzysztof-indyk opened this issue 9 years ago • 11 comments

Current version is not compatible with Grafana 3.0 Plugin API https://github.com/grafana/grafana/blob/master/public/app/plugins/plugin_api.md

krzysztof-indyk avatar Feb 17 '16 11:02 krzysztof-indyk

This would be a great addition!

syepes avatar Apr 08 '16 09:04 syepes

@u39kun what do you think about this? i started on some of the work but I get an error and I have no idea what I am doing when it comes to JS..

Error: [ng:areq] Argument 'fn' is not a function, got Object http://errors.angularjs.org/1.5.3/ng/areq?p0=fn&p1=not%20a%20function%2C%20got%20Object

bigkraig avatar May 27 '16 01:05 bigkraig

This is my plugin.js

{
  "name": "Ambari",
  "id": "ambari",
  "type": "datasource",

  "staticRoot": ".",

  "partials": {
    "config": "app/plugins/datasource/ambari/partials/config.html"
  },

  "metrics": true,

  "info": {
    "description": "ambari datasource",
    "author": {
      "name": "Yusaku Sako",
      "url": "https://github.com/u39kun"
    },
    "logos": {
      "small": "src/img/simpleJson_logo.svg",
      "large": "src/img/simpleJson_logo.svg"
    },
    "links": [
      {"name": "GitHub", "url": "https://github.com/u39kun/ambari-grafana"},
      {"name": "MIT License", "url": "https://github.com/u39kun/ambari-grafana/blob/master/LICENSE.md"}
    ],
    "version": "1.0.0",
    "updated": "2016-05-26"
  },

  "dependencies": {
    "grafanaVersion": "3.x.x",
    "plugins": [ ]
  }

}

bigkraig avatar May 27 '16 01:05 bigkraig

@u39kun Any update on this issue is appreciated, as you know Grafana 3.x Plugin API is different than 2.x can you please spend sometime for community users to get this addressed.

Thanks..

deepak-kosaraju avatar Jun 08 '16 16:06 deepak-kosaraju

@prajwalrao has done some work on this and got it to work, I believe. I'll ask him to comment.

u39kun avatar Jun 08 '16 16:06 u39kun

@kkdk5535 @u39kun I do have a Grafana datasource plugin working with Ambari (> v2.2.2) & AMS. I'Il create a repo for this by the end of this week and let you know.

prajwalrao avatar Jun 08 '16 16:06 prajwalrao

@u39kun @prajwalrao Thanks to Both.

@prajwalrao We will look forward for your update on this. Thanks for helping community and for your time you contributed for this work.

Have a nice day..

deepak-kosaraju avatar Jun 08 '16 17:06 deepak-kosaraju

@kkdk5535 Here you go - https://github.com/prajwalrao/ambari-metrics-grafana

I've tried it out with the latest version as of today (v3.0.4) of Grafana, and I've had no issues. Let me know if you have any issues. ~ cc @u39kun @krise3k @syepes @bigkraig

prajwalrao avatar Jun 13 '16 23:06 prajwalrao

@prajwalrao trying it out now and I am getting a precision error:

java.lang.Exception: precision should be seconds, minutes or hours

my urls end with "precision="

bigkraig avatar Jun 16 '16 21:06 bigkraig

ignore that, the problem was a result of exporting the dashboard from ambari on grafana 2.x and importing into 3. the json has precision = "", i changed it to default, imported again, all good!

bigkraig avatar Jun 16 '16 21:06 bigkraig

@prajwalrao Thanks for the version of ambari plugin for Grafana 3.x. Since my attention was moved towards some other project I didn't get chance to respond to this thread. I will try and share my feedback also on how its working for us.

deepak-kosaraju avatar Jul 10 '16 00:07 deepak-kosaraju