We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would expect Grafana Cloud to be able to upload a grafanalib generated dashboard from the button Upload a Dashboard.
Upload a Dashboard
Grafana Cloud reports the error: Old dashboard JSON format and direct the user to Grafana documentation Read about Importing & Sharing with Grafana 2.x or 3.0.
Old dashboard JSON format
With this Ptyhon script:
from grafanalib.core import ( Dashboard, Stat, Target, GridPos, Template, Templating, Time, Repeat ) application = 'backend' statusTemplate = Template(default='', dataSource='Prometheus', name='statusCode', multi=True, query=( f'http_server_requests_seconds_count{{' f'application="{application.upper()}",' f'uri=~"/public/api/v1/.*"' f'}}' ), regex='.*status="(\\d+)".*', ) templateList = [statusTemplate] dashboard = Dashboard( title='Some Dashboard', timezone='', time=Time('now-24h', 'now'), panels=[ Stat( title='STATUS $statusCode', dataSource=None, reduceCalc='lastNotNull', repeat=Repeat(direction='h', variable='statusCode'), targets=[ Target( expr=(f'round(sum(increase(http_server_requests_seconds_count{{' f'status="$statusCode", ' f'application="{application.upper()}", ' f'uri=~"/public/api/v1/.*"' f'}}[$__range:])))') ), ], gridPos=GridPos(h=6, w=12, x=0, y=0), ) ], templating=Templating(list=templateList) ).auto_panel_ids()
With this command line:
generate-dashboard -o grafana_dashboard.json backend.dashboard.py
The JSON dashboard was generated with these versions:
The text was updated successfully, but these errors were encountered:
Note that the genarated JSON is supported by grafana version 7.3.4.
Sorry, something went wrong.
No branches or pull requests
What you expected to happen?
I would expect Grafana Cloud to be able to upload a grafanalib generated dashboard from the button
Upload a Dashboard
.What happened?
Grafana Cloud reports the error:
Old dashboard JSON format
and direct the user to Grafana documentation Read about Importing & Sharing with Grafana 2.x or 3.0.How to reproduce it?
With this Ptyhon script:
With this command line:
The JSON dashboard was generated with these versions:
The text was updated successfully, but these errors were encountered: