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

Grafana 5.0 support #24

Open
tunasalat opened this issue Mar 13, 2018 · 14 comments
Open

Grafana 5.0 support #24

tunasalat opened this issue Mar 13, 2018 · 14 comments
Assignees

Comments

@tunasalat
Copy link

Since grafana 5 release, rows have become deprecated:
https://github.com/grafana/grafana/blob/master/CHANGELOG.md#new-dashboard-grid
So, grafcli crashes:

[/remote/host.example.com]> cd dashboard/
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/climb/core.py", line 56, in run
    result = self.execute(*shlex.split(command))
  File "/usr/local/lib/python3.5/dist-packages/climb/core.py", line 79, in execute
    return self._commands.execute(command, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/climb/commands.py", line 26, in execute
    return method(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/grafcli/commands.py", line 40, in cd
    self._resources.list(path)
  File "/usr/local/lib/python3.5/dist-packages/grafcli/resources/resources.py", line 38, in list
    return manager.list(*parts)
  File "/usr/local/lib/python3.5/dist-packages/grafcli/resources/common.py", line 13, in list
    dashboard = self.get(dashboard_name)
  File "/usr/local/lib/python3.5/dist-packages/grafcli/resources/common.py", line 33, in get
    dashboard = self._storage.get(dashboard_name)
  File "/usr/local/lib/python3.5/dist-packages/grafcli/storage/sql.py", line 68, in get
    return Dashboard(source, dashboard_id)
  File "/usr/local/lib/python3.5/dist-packages/grafcli/documents.py", line 95, in __init__
    self._load(source)
  File "/usr/local/lib/python3.5/dist-packages/grafcli/documents.py", line 101, in _load
    for row in source['rows']:
KeyError: 'rows'

Any plans to implement 5.0 support?

@m110
Copy link
Owner

m110 commented Apr 19, 2018

So I've started playing with this and due to some decisions in the grafcli design it turned out into kinda hackish solution.

I've added basic support for rowless dashboard on a new branch: experimental-v5
This will need some testing.

I'm also thinking about re-designing the core code soon with new API in mind.

@towolf
Copy link

towolf commented Jun 1, 2018

@m110 First test, just to edit a dashboard with the vim command, was successful here.

@akamensky
Copy link

It has been almost a year. Still not working with 5.x although Grafana 6.x has already been released. Should this project be declared dead then?

@sdiepend
Copy link

Tried to use this tool to backup all dashboards, but ran into this issue

@m110
Copy link
Owner

m110 commented Mar 20, 2019

I'm currently working on a new release with support for 5.0/6.0. This will come with some major changes, as Grafana evolved since the first version of grafcli.

I will be dropping support for database backends, using only the REST API. There are no "rows" now (well, row is just a type of a panel) and folders were added, so the CLI commands will look a bit different. I'd also like to add support for managing datasources.

@mfuhrmann
Copy link

Would be really cool to get an update 👍

@jorandirkzwager
Copy link

Any updates?

@m110
Copy link
Owner

m110 commented May 17, 2019

I should be able to update the branch with a working version next week. Sorry it takes so long.

@sdiepend
Copy link

Take your time, it's probably all doen in you spare time so...

@zhil
Copy link

zhil commented Jul 16, 2019

I got this error too.
So, I was switched to another tool (php based). Its much more primitive, but it works with Grafana 6 :)
https://github.com/wnasich/grafana_dd

@zhangxingdeppon
Copy link

@m110 was this problem resolved? I met a similar problem, thanks.

@aronneagu
Copy link

Trying to use the backup command and hit the same issue

@hanej
Copy link

hanej commented Mar 15, 2021

Thank you for your work on this. Is this project still active? I was hoping to get backup support for later versions of Grafana.

@hanej
Copy link

hanej commented Mar 15, 2021

I found this project that seems to work well. I really like grafcli but the immediate need is to get this backed up on a daily basis.

https://github.com/ysde/grafana-backup-tool

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