docker-grafana-graphite icon indicating copy to clipboard operation
docker-grafana-graphite copied to clipboard

Is wizzy working? (export-datasources-and-dashboards (exit status 1; not expected))

Open vonpupp opened this issue 6 years ago • 5 comments

Hi,

I am trying to run this as follows:

docker-compose up

kamon-grafana-dashboard | 2017-10-08 22:08:42,337 INFO success: graphite-webapp entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
kamon-grafana-dashboard | 2017-10-08 22:08:42,337 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
kamon-grafana-dashboard | 2017-10-08 22:08:42,337 INFO success: carbon-cache entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
kamon-grafana-dashboard | 2017-10-08 22:08:56,036 INFO exited: export-datasources-and-dashboards (exit status 1; not expected)
kamon-grafana-dashboard | 2017-10-08 22:08:57,038 INFO spawned: 'export-datasources-and-dashboards' with pid 102
kamon-grafana-dashboard | 2017-10-08 22:08:58,039 INFO success: export-datasources-and-dashboards entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
kamon-grafana-dashboard | 2017-10-08 22:09:11,835 INFO exited: export-datasources-and-dashboards (exit status 1; not expected)
kamon-grafana-dashboard | 2017-10-08 22:09:12,009 INFO spawned: 'export-datasources-and-dashboards' with pid 164
kamon-grafana-dashboard | 2017-10-08 22:09:13,054 INFO success: export-datasources-and-dashboards entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
kamon-grafana-dashboard | 2017-10-08 22:09:26,826 INFO exited: export-datasources-and-dashboards (exit status 1; not expected)
kamon-grafana-dashboard | 2017-10-08 22:09:27,842 INFO spawned: 'export-datasources-and-dashboards' with pid 226
kamon-grafana-dashboard | 2017-10-08 22:09:28,843 INFO success: export-datasources-and-dashboards entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Since it is export-datasources-and-dashboards that seems to fail, I open up the script and saw a wizzy call. So I shell into the container and executed manually the command with the following result:

root@fbb596061171:/# cat /src/export-datasources-and-dashboards.sh 
#!/bin/bash
# sleeping for 10 seconds to let grafana get up and running
sleep 10 && wizzy export datasources && wizzy export dashboards
root@fbb596061171:/# wizzy export datasources
/usr/lib/node_modules/wizzy/src/commands.js:72
			grafana.export(_.drop(commands));
			       ^

TypeError: Cannot read property 'export' of undefined
    at Commands.instructions (/usr/lib/node_modules/wizzy/src/commands.js:72:11)
    at Command.listener (/usr/lib/node_modules/wizzy/node_modules/commander/index.js:300:8)
    at emitOne (events.js:96:13)
    at Command.emit (events.js:188:7)
    at Command.parseArgs (/usr/lib/node_modules/wizzy/node_modules/commander/index.js:637:12)
    at Command.parse (/usr/lib/node_modules/wizzy/node_modules/commander/index.js:457:21)
    at Object.<anonymous> (/usr/lib/node_modules/wizzy/src/index.js:14:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)

If you just type wizzy without arguments it also fails.

Any idea, please?

Thanks a lot.

vonpupp avatar Oct 08 '17 22:10 vonpupp

Having the same issue here. Prevents me from saving dashboards or alerts.

repomaa avatar Dec 19 '17 20:12 repomaa

+1

jotadepicas avatar Jan 02 '18 20:01 jotadepicas

Seeing the same crash:

grafana_1 | 2018-01-29 07:41:43,275 INFO exited: export-datasources-and-dashboards (exit status 1; not expected) grafana_1 | 2018-01-29 07:41:43,796 INFO spawned: 'export-datasources-and-dashboards' with pid 617 grafana_1 | 2018-01-29 07:41:44,835 INFO success: export-datasources-and-dashboards entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

However it does not seem to keep me from using anything. I can create and save dashboards just fine. My "only" problem with this is the log cluttering so far :D

mduft avatar Jan 29 '18 07:01 mduft

This looks like it relates to #116 . @jryberg posted a potential workaround solution but it would be nice to see a real fix.

It looks like relevant code in the main wizzy project for the most part it appears to be behaving as expected - it checks for a non HTTP 200 status and then aborts.

According to the Grafana HTTP API, it returns an HTTP 412 if the dashboard already exists. image

The export-datasources-and-dashboards responds with output:

{"message":"A dashboard with the same name already exists","status":"name-exists"}

randonia avatar Apr 24 '18 01:04 randonia

Is there a workaround for this?

wflanagan avatar May 30 '19 12:05 wflanagan