As noted inline, a default export from Grafana includes the uid/id
which breaks when you re-import it into a different site. Strip them.
Change-Id: I318614b33aed2ece93d44e832bad7907724cb1bc
We are relying on the "slug" field being the same as our "url
friendly" title that we create. For whatever reason the slug field
was deprecated in Grafana v5.0, and now with v8.3.4 it has stopped
working.
We can turn the name/slug into a UID by hashing, and then use this in
the various API calls.
Change-Id: I13d3162c917e094684756e51836d12000621fefa
This simply takes any json files present and loads them into Grafana
directly. The idea is that you can edit the dashboards using the
inbuilt editor, then copy the dashboard JSON and keep it externally
version controlled. No parsing or validation is done on the JSON
files; we are assuming they have not been hand-modified from what
Grafana generates.
Change-Id: I38695aed2404f8b7fc350d949b7a9212498c35cb
Added with dd6582e9cc, we have found
that setting a bool here means the query variable no longer refreshes
at all. Thus it's dangerous to accept it, force it to be an int.
For reference, the values seem to be
0 = never refresh
1 = on load
2 = on timeseries change
Change-Id: Ia96f0166a80ece0b307acdca20eeca045a2e4a75
This has bit-rotted as libraries have updated to Python 3 only.
Switch to hacking; some minor changes to regex-strings is all that is
required.
Drop py27 markers and move to Python 3 only. Update requirements.
Depends-On: https://review.opendev.org/737666
Change-Id: Iabf201965129b3284166e1aedcb9f1c9d6109077
- retro-compatibility with default folder 'General' == 0
- add to config file with folderid key in grafana section
- add to cmd with --grafana-folderid
Change-Id: Iebfc5613f4c622d3d49d2f34df77ad3695f6b046
I was trying to figure out how to do multiple target calculations with
hidden targets. I didn't see this explicitly tested for, so add it.
Change-Id: Ibbbb2810dd531e792f11c07946c21829fcdbe0a1
the following patch will allow us to use datasource type in template schema.
Change-Id: I15cce5f8f97d1837b94eaa7067d7ebe8e449f8f4
Signed-off-by: Eldad Marciano <emarcian@redhat.com>
Allow custom templated vars. Custom templated vars are similiar to
interval templated vars in that they have "options" however they can be
multi-selected vs just a singular selection as with an interval var.
Change-Id: Ic89c5d192f87890da950a9d2d5f9bc4a96a3e174
This allows graphs tool tips to be limited by a decimal count.
Also fix forgotten validation on decimals setting specific to legends.
Change-Id: I5840b0081dbb17ead0c49fa7d6d6ba1a2e82bb7c
Default is 6h it seems. This change allows adjusting the default
to/from range in the time filter.
Change-Id: I567b9cc5cd8c753f852066c9e6868dd0f1b30b60
This will allow the use of GrafYaml called from Ansible without
deploying a GrafYaml config file. With Ansible we can use the template
module to deploy a jinja2 templated GrafYaml dashboard for more
flexibility.
Change-Id: I61a7142c3177681681dcbfe5c889f4c3d59f8ec4
This change adds support for datasource option to:
* graph panel
* singlestat panel
* templating
This enables the user to use other datasource than the default datasource
for graph/singlestat panels and templating. It is useful when more
than one datasource are available in Grafana.
Change-Id: I2e81a2dc4658c530bf82c4b349e2991dad348b01
Help messages mention support for multiple config paths separated by colons.
Yet this feature is not implemented. This change implements it.
Change-Id: Ieb99cba98c9cf775765eacd4ebadfbccfa815a65
This commit adds the ability to configure the options in Time Range panel: time override, time shift and hide time override info.
Change-Id: I1d8c527ef1a377de6e34b94621f3060706356008
This performs some significant coercion because without it, the
interval template type, which should be very easy to use, would
require a substantial amount of yaml boilerplate.
Change-Id: I66ffe944af1b6794089dc536bfd99a1adf5d268e
A cool feature grafana has is the ability to template dashboards with
variables. This code now provides that ability to the user.
Change-Id: Ib2f565e3d39523105b2c07d29d5257494a8bae67
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This is important for stacked graphs so that the tooltip can show
individual, rather than cumulative values (which makes the most
sense for our node graphs).
Also, sort the elements in the schema. I think keeping them all
in order makes more sense than required/optional sections.
Change-Id: Ie542dc4d0e151a00e84cc970c2cfa8c02377d7bf