grafana-wizzy / wizzy

Manage & automate Grafana with easy wizzy
https://grafana-wizzy.com
Apache License 2.0
468 stars 60 forks source link

Error generating clips in v0.5.6 #85

Closed iax7 closed 7 years ago

iax7 commented 7 years ago

I got an error when generating a clip:

wizzy clip dashboard ccms

image

This is my config file:

{
  "config": {
    "grafana": {
      "url": "http://localhost:3000",
      "username": "admin",
      "password": "admin"
    },
    "clip": {
      "render_height": "600",
      "render_width": "800",
      "render_timeout": "60",
      "canvas_width": "800",
      "canvas_height": "600",
      "delay": "2000"
    }
  }
}
utkarshcmu commented 7 years ago

Sure, will look into this today and get back to you asap. Thanks for reporting!

utkarshcmu commented 7 years ago

Change your config file(under conf/wizzy.json) to:

{
    "grafana": {
      "url": "http://localhost:3000",
      "username": "admin",
      "password": "admin"
    },
    "clip": {
      "render_height": "600",
      "render_width": "800",
      "render_timeout": "60",
      "canvas_width": "800",
      "canvas_height": "600",
      "delay": "2000"
    }
}

and then try the clip command. I am able to make clip of a dashboard with this kind of config.

utkarshcmu commented 7 years ago

@iax7 Let me know if this works for you, so that I can close the issue. Thanks!

iax7 commented 7 years ago

I get now this error:

✘ Clip configs not set. Please set all 6 clip config properties stated in README.
utkarshcmu commented 7 years ago

@iax7 Actually your earlier configuration was correct. I pointed you in the wrong direction, sorry about that.

Here is my config:

{
  "config": {
    "grafana": {
      "url": "http://localhost:3000",
      "username": "admin",
      "password": "admin"
    },
    "clip": {
      "render_timeout": "60",
      "render_height": "600",
      "render_width": "800",
      "canvas_width": "800",
      "canvas_height": "600",
      "delay": "2000"
    }
  }
}

wizzy version:

$ wizzy version
0.5.6

Output when I ran the following command:

$ wizzy clip dashboard level-1-dashboard
✔ temp directory created.
Taking 24 snapshots.
✔ Took snapshot 0.
✔ Took snapshot 1.
✔ Took snapshot 2.
✔ Took snapshot 3.
✔ Took snapshot 4.
✔ Took snapshot 5.
✔ Took snapshot 6.
✔ Took snapshot 7.
✔ Took snapshot 8.
✔ Took snapshot 9.
✔ Took snapshot 10.
✔ Took snapshot 11.
✔ Took snapshot 12.
✔ Took snapshot 13.
✔ Took snapshot 14.
✔ Took snapshot 15.
✔ Took snapshot 16.
✔ Took snapshot 17.
✔ Took snapshot 18.
✔ Took snapshot 19.
✔ Took snapshot 20.
✔ Took snapshot 21.
✔ Took snapshot 22.
✔ Took snapshot 23.
✔ Snapshots rendering completed.
Waiting 5 seconds before generating clip.
✔ Successfully created level-1-dashboard clip under clips directory.
Please delete temp directory before creating next clip.

Not sure why you are getting that error!

utkarshcmu commented 7 years ago

there should be two directories(clips and temp) created in your local directory. clips directory should have the gif and you can delete temp directory. If thats not happening then it might be directory creation permission issue.

iax7 commented 7 years ago
 ~/p/grafana   master  clips  ll                                               jue 09 feb 2017 17:31:46 CST
total 8.0K
drwxr-xr-x. 2 iax iax 4.0K feb  9 17:29 ./
drwxr-xr-x. 9 iax iax 4.0K feb  9 17:29 ../
-rw-r--r--. 1 iax iax    0 feb  9 17:29 ccms.gif

It creates the gif but is empty, the temp files are generated correctly:

 ~/p/grafana   master  clips  ll ../temp/                              100ms  jue 09 feb 2017 17:31:47 CST
total 3.0M
drwxr-xr-x. 2 iax iax 4.0K feb  9 17:29 ./
drwxr-xr-x. 9 iax iax 4.0K feb  9 17:29 ../
-rw-r--r--. 1 iax iax  77K feb  9 17:29 a.png
-rw-r--r--. 1 iax iax 120K feb  9 17:29 b.png
-rw-r--r--. 1 iax iax 117K feb  9 17:29 c.png
-rw-r--r--. 1 iax iax 121K feb  9 17:29 d.png
-rw-r--r--. 1 iax iax 125K feb  9 17:29 e.png
-rw-r--r--. 1 iax iax 119K feb  9 17:29 f.png
-rw-r--r--. 1 iax iax 123K feb  9 17:29 g.png
-rw-r--r--. 1 iax iax 132K feb  9 17:29 h.png
-rw-r--r--. 1 iax iax 133K feb  9 17:29 i.png
-rw-r--r--. 1 iax iax 119K feb  9 17:29 j.png
-rw-r--r--. 1 iax iax 128K feb  9 17:29 k.png
-rw-r--r--. 1 iax iax 131K feb  9 17:29 l.png
-rw-r--r--. 1 iax iax 137K feb  9 17:29 m.png
-rw-r--r--. 1 iax iax 125K feb  9 17:29 n.png
-rw-r--r--. 1 iax iax 117K feb  9 17:29 o.png
-rw-r--r--. 1 iax iax 118K feb  9 17:29 p.png
-rw-r--r--. 1 iax iax 122K feb  9 17:29 q.png
-rw-r--r--. 1 iax iax 118K feb  9 17:29 r.png
-rw-r--r--. 1 iax iax 121K feb  9 17:29 s.png
-rw-r--r--. 1 iax iax 113K feb  9 17:29 t.png
-rw-r--r--. 1 iax iax 130K feb  9 17:29 u.png
-rw-r--r--. 1 iax iax 138K feb  9 17:29 v.png
-rw-r--r--. 1 iax iax 128K feb  9 17:29 w.png
-rw-r--r--. 1 iax iax 117K feb  9 17:29 x.png

The error is still happening:

✔ temp directory created.
Taking 24 snapshots.
✔ Took snapshot 0.
✔ Took snapshot 1.
✔ Took snapshot 2.
✔ Took snapshot 3.
✔ Took snapshot 4.
✔ Took snapshot 5.
✔ Took snapshot 6.
✔ Took snapshot 7.
✔ Took snapshot 8.
✔ Took snapshot 9.
✔ Took snapshot 10.
✔ Took snapshot 11.
✔ Took snapshot 12.
✔ Took snapshot 13.
✔ Took snapshot 14.
✔ Took snapshot 15.
✔ Took snapshot 16.
✔ Took snapshot 17.
✔ Took snapshot 18.
✔ Took snapshot 19.
✔ Took snapshot 20.
✔ Took snapshot 21.
✔ Took snapshot 22.
✔ Took snapshot 23.
✔ Snapshots rendering completed.
Waiting 5 seconds before generating clip.
✔ Successfully created ccms clip under clips directory.
Please delete temp directory before creating next clip.
timers.js:327
    throw new TypeError('"callback" argument must be a function');
    ^

TypeError: "callback" argument must be a function
    at exports.setTimeout (timers.js:327:11)
    at ClipSrv.dashboard (/usr/lib/node_modules/wizzy/src/remote/grafana/clipSrv.js:47:2)
    at Grafana.clip (/usr/lib/node_modules/wizzy/src/remote/grafana.js:316:11)
    at Commands.instructions (/usr/lib/node_modules/wizzy/src/commands.js:105:12)
    at Command.listener (/usr/lib/node_modules/wizzy/node_modules/commander/index.js:301:8)
    at emitOne (events.js:96:13)
    at Command.emit (events.js:189:7)
    at Command.parseArgs (/usr/lib/node_modules/wizzy/node_modules/commander/index.js:617:12)
    at Command.parse (/usr/lib/node_modules/wizzy/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/usr/lib/node_modules/wizzy/src/index.js:14:9)
utkarshcmu commented 7 years ago

Looks like there is some issue with timer.js - https://github.com/hybridgroup/cylon-crazyflie/issues/19

utkarshcmu commented 7 years ago

I am going to get this fixed asap!

utkarshcmu commented 7 years ago

Fixed in master branch, the fix should be available in next release!

utkarshcmu commented 7 years ago

@iax Wizzy 0.5.7 is released and i have fixed this issue. Please try using clips with the new version and reopen this issue if the problem still persists.

iax7 commented 7 years ago

is Fixed! thanks!