grafana / kairosdb-datasource

Data source plugin for KairosDB
Apache License 2.0
30 stars 62 forks source link

Plugin doesn't install #4

Closed zachm closed 8 years ago

zachm commented 8 years ago

Hi all, I'm trying out the new Grafana and trying to make it work with the KairosDB plugin. It doesn't seem to install correctly, even following the stated instructions. I've opened this issue here rather than in Grafana, per the instructions stated there, but I'm happy to move it if you'd prefer.

The failure comes when trying to create a new chart: the editor partial does not load. I was able to add a new datasource for KairosDB after installation with no issue; just composing charts seems to be broken.

My methodology for installing looks like this. Grafana is already happily running at this point.

root ~$ mkdir -p /var/lib/grafana/plugins
root ~$ cd /var/lib/grafana/plugins
root /var/lib/grafana/plugins$ git clone https://github.com/grafana/datasource-plugin-kairosdb.git
root /var/lib/grafana/plugins$ ls -lah datasource-plugin-kairosdb/
total 76K
drwxr-xr-x 6 root    root    4.0K Mar 16 19:34 ./
drwxr-xr-x 3 grafana grafana 4.0K Mar 16 19:34 ../
-rw-r--r-- 1 root    root     14K Mar 16 19:34 datasource.js
drwxr-xr-x 8 root    root    4.0K Mar 16 19:34 .git/
drwxr-xr-x 2 root    root    4.0K Mar 16 19:34 img/
-rw-r--r-- 1 root    root     12K Mar 16 19:34 LICENSE
-rw-r--r-- 1 root    root     515 Mar 16 19:34 module.js
drwxr-xr-x 2 root    root    4.0K Mar 16 19:34 partials/
-rw-r--r-- 1 root    root     797 Mar 16 19:34 plugin.json
-rw-r--r-- 1 root    root     12K Mar 16 19:34 query_ctrl.js
-rw-r--r-- 1 root    root    1.7K Mar 16 19:34 README.md
drwxr-xr-x 2 root    root    4.0K Mar 16 19:34 specs/

root /var/lib/grafana/plugins$ sudo service grafana-server restart

From the Grafana log file, I think this is the smoking gun. It says it's successfully registered the plugin and added the route and so on, but then the editor partial 404s!

2016/03/16 19:34:55 [I] Received signal terminated. shutting down
2016/03/16 19:34:56 [I] Starting Grafana
2016/03/16 19:34:56 [I] Version: 3.0.0-pre1, Commit: v2.6.0-1462-ga08809f, Build date: 2016-03-16 08:30:08 -0700 PDT
2016/03/16 19:34:56 [I] Configuration Info
Config files:
  [0]: /usr/share/grafana/conf/defaults.ini
  [1]: /etc/grafana/grafana.ini
Command lines overrides:
  [0]: default.paths.data=/var/lib/grafana
  [1]: default.paths.logs=/var/log/grafana
  [2]: default.paths.plugins=/var/lib/grafana/plugins
Paths:
  home: /usr/share/grafana
  data: /var/lib/grafana
  logs: /var/log/grafana
  plugins: /var/lib/grafana/plugins

2016/03/16 19:34:56 [I] Database: mysql
2016/03/16 19:34:56 [I] Migrator: Starting DB migration
2016/03/16 19:34:56 [I] Login: Ldap enabled, reading config file: /etc/grafana/ldap.toml
2016/03/16 19:34:56 [I] Plugins: Scan starting
2016/03/16 19:34:56 [I] Plugins: Registering plugin KairosDB
2016/03/16 19:34:56 [I] Plugins: Adding route /public/plugins/kairosdb-datasource -> /var/lib/grafana/plugins/datasource-plugin-kairosdb
2016/03/16 19:34:56 [I] Listen: https://0.0.0.0:3000
2016/03/16 19:35:21 [I] Completed 10.255.50.75 ztm "GET /public/plugins/kairosdb/partials/query.editor.html HTTP/1.1" 404 Not Found 6161 bytes in 24504us

Other details:

abhagupta commented 8 years ago

Hi, I am getting the same issue. I have built the plugin by cloning the kairosdb-datasource repo manually in grafana/grafana/data/plugins/ directory . I get the following message:

2016/03/21 12:41:19 [I] Migrator: Starting DB migration
2016/03/21 12:41:19 [I] Plugins: Scan starting
2016/03/21 12:41:19 [I] Plugins: Registering plugin KairosDB
2016/03/21 12:41:19 [I] Plugins: Adding route /public/plugins/kairosdb-datasource -> data/plugins/kairosdb-datasource
2016/03/21 12:41:19 [I] Listen: http://0.0.0.0:3000
2016/03/21 12:42:09 [I] Completed 127.0.0.1 admin "GET /public/plugins/kairosdb/partials/query.editor.html HTTP/1.1" 404 Not Found 6680 bytes in 1568us

Clearly, there is some mismatch in how directories are mapped. Thanks

Details: MAC OSX 10.9.5 Grafana version 2.6

justmedude commented 8 years ago

Was this solved with https://github.com/grafana/kairosdb-datasource/commit/73199379e1c32587d432ebece8df37262790e486 ?

bergquist commented 8 years ago

Should have been solved by https://github.com/grafana/kairosdb-datasource/commit/73199379e1c32587d432ebece8df37262790e486