Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vonpupp opened this issue Oct 8, 2017 · 5 comments

Comments

@vonpupp
Copy link

vonpupp commented Oct 8, 2017

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 vonpupp changed the title I wizzy working? Is wizzy working? (export-datasources-and-dashboards (exit status 1; not expected)) Oct 8, 2017
@repomaa
Copy link

repomaa commented Dec 19, 2017

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

@jotadepicas
Copy link

+1

@mduft
Copy link

mduft commented Jan 29, 2018

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

@randonia
Copy link

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"}

@wflanagan
Copy link

Is there a workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants