zalando / zmon

Real-time monitoring of critical metrics & KPIs via elegant dashboards, Grafana3 visualizations & more
https://demo.zmon.io/
Other
359 stars 47 forks source link

Exception when updating a grafana dashboard using Zmon Update #35

Closed kabdelrahman closed 6 years ago

kabdelrahman commented 7 years ago

When using Zmon Update, I get an exception at the end of the update command, However the dashboard seems to be updated anyway.

$> zmon graf update <yaml file>                                                                                                  

Updating dashboard XXXXXX ...
 EXCEPTION OCCURRED: 'id'
Traceback (most recent call last):
  File "/usr/local/bin/zmon", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/zmon_cli/main.py", line 9, in main
    cli()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 27, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/zmon_cli/cmds/grafana.py", line 47, in grafana_update
    ok(client.grafana_dashboard_url(dashboard))
  File "/usr/local/lib/python3.6/site-packages/zmon_cli/client.py", line 252, in grafana_dashboard_url
    return self.endpoint(GRAFANA_DASHBOARD_URL, dashboard['id'], base_url=self.base_url)
KeyError: 'id'
mohabusama commented 7 years ago

Issue on zmon-cli https://github.com/zalando-zmon/zmon-cli/issues/56

mohabusama commented 6 years ago

Duplicated in the zmon-cli repo