mirror of
https://github.com/grafana/grafana.git
synced 2025-12-21 12:04:45 +08:00
Compare commits
153 Commits
sriram/pos
...
v8.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
914fcedb72 | ||
|
|
9d6491be4f | ||
|
|
e4a85fb951 | ||
|
|
57b7c16bc9 | ||
|
|
892d9a2258 | ||
|
|
739cac1ea0 | ||
|
|
0f53eab992 | ||
|
|
7f64f3b773 | ||
|
|
dec2433a61 | ||
|
|
5c8ddbabd9 | ||
|
|
20f746a1d8 | ||
|
|
30933fbb3a | ||
|
|
d246e600b8 | ||
|
|
e13cd9f676 | ||
|
|
90dedf4f50 | ||
|
|
70dfe4f942 | ||
|
|
dead7e1a1f | ||
|
|
83416f911c | ||
|
|
edf4702d61 | ||
|
|
5044317310 | ||
|
|
0ca6910f55 | ||
|
|
66ae92abe9 | ||
|
|
cd17f65a05 | ||
|
|
b25038df2e | ||
|
|
1c38b70f68 | ||
|
|
88aec5dff9 | ||
|
|
a0cfdec52e | ||
|
|
8ad3ab4082 | ||
|
|
15d94f467d | ||
|
|
787a862fda | ||
|
|
4044cc9aeb | ||
|
|
03f54577a5 | ||
|
|
4710572d2a | ||
|
|
ce0771efea | ||
|
|
b5960313fb | ||
|
|
b35fac5905 | ||
|
|
04e6df314e | ||
|
|
f587d9f78a | ||
|
|
e0c0eff3a2 | ||
|
|
df959ea102 | ||
|
|
934c446bf4 | ||
|
|
2504f5f719 | ||
|
|
8d74cc3576 | ||
|
|
492575a169 | ||
|
|
654abf9f7f | ||
|
|
2616882005 | ||
|
|
2742a461f3 | ||
|
|
37f5946b8b | ||
|
|
085d67f82d | ||
|
|
8c4ee0cfdd | ||
|
|
8a2744440e | ||
|
|
897af93f5a | ||
|
|
0d8d861b5b | ||
|
|
5bf9a6f649 | ||
|
|
58605aa8de | ||
|
|
fb3302351c | ||
|
|
049351ec5d | ||
|
|
03cd416d9e | ||
|
|
d5600b5854 | ||
|
|
bbfd4c7406 | ||
|
|
d91b6f9c67 | ||
|
|
53140c5b50 | ||
|
|
4f45b44a71 | ||
|
|
aab276315e | ||
|
|
5477b25488 | ||
|
|
3e437fb3be | ||
|
|
5412a903b1 | ||
|
|
26b0ee5dcb | ||
|
|
71255a387c | ||
|
|
5d382b60c3 | ||
|
|
3fb72ba295 | ||
|
|
5bfe95499e | ||
|
|
0b0962ea13 | ||
|
|
c648189d87 | ||
|
|
6c8d6a1bbb | ||
|
|
38a93f1a97 | ||
|
|
97397fb8f9 | ||
|
|
527de60b71 | ||
|
|
4aa8740595 | ||
|
|
e8c9179f1a | ||
|
|
5c3dfaa1bc | ||
|
|
fa19fa298d | ||
|
|
01a53c349a | ||
|
|
dfdb745e36 | ||
|
|
f59b10384b | ||
|
|
c1afc4deac | ||
|
|
2e2e6c4920 | ||
|
|
5ab8b3a765 | ||
|
|
1a80ea3b05 | ||
|
|
df6223024f | ||
|
|
0baba05ed5 | ||
|
|
5e74062b4b | ||
|
|
61df5b04b3 | ||
|
|
2f262db612 | ||
|
|
dcbf9ba7af | ||
|
|
4319a934e9 | ||
|
|
ad308524bc | ||
|
|
f9acdff906 | ||
|
|
d637d5d746 | ||
|
|
33ebb859bd | ||
|
|
f169300669 | ||
|
|
45eb4a0adf | ||
|
|
772ef1626f | ||
|
|
33c6628c6a | ||
|
|
1b14ed6e2a | ||
|
|
e741cef8be | ||
|
|
67b8ea6df2 | ||
|
|
e85d45b0c2 | ||
|
|
85ab6d10bf | ||
|
|
5d4d5bf296 | ||
|
|
0f426e7a8c | ||
|
|
80945956aa | ||
|
|
8608a1f9c3 | ||
|
|
9ef25eced1 | ||
|
|
27d61b524a | ||
|
|
f9fb2a4e59 | ||
|
|
a69b3ea212 | ||
|
|
57ad07ae76 | ||
|
|
c782f3031a | ||
|
|
56693672ad | ||
|
|
fcd0c382b6 | ||
|
|
272f850fb2 | ||
|
|
e36664bae8 | ||
|
|
69c1626f8f | ||
|
|
3d5adeb620 | ||
|
|
339fc9f15a | ||
|
|
a9da6b8175 | ||
|
|
3d4a5ce8fa | ||
|
|
66a91bb55b | ||
|
|
4ab201e4b5 | ||
|
|
984e477d00 | ||
|
|
782d661710 | ||
|
|
5e0900609b | ||
|
|
b6efbd6b28 | ||
|
|
9027846b91 | ||
|
|
3dd2abbda7 | ||
|
|
81043a763e | ||
|
|
0838146d16 | ||
|
|
ed00b3cf50 | ||
|
|
8cfc96fa61 | ||
|
|
bc1aa104a2 | ||
|
|
f8ab11bd11 | ||
|
|
c708c92593 | ||
|
|
cdd89d2945 | ||
|
|
fd81b1a9e4 | ||
|
|
94023f10a3 | ||
|
|
a6ce53136c | ||
|
|
b4b13f8113 | ||
|
|
591d789f38 | ||
|
|
fe082e2210 | ||
|
|
3140f630c1 | ||
|
|
b7b5a59437 | ||
|
|
64c575c115 |
1761
.drone.yml
1761
.drone.yml
File diff suppressed because it is too large
Load Diff
@@ -7,3 +7,4 @@ data
|
|||||||
dist
|
dist
|
||||||
e2e/tmp
|
e2e/tmp
|
||||||
public/lib/monaco
|
public/lib/monaco
|
||||||
|
deployment_tools_config.json
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -149,3 +149,5 @@ compilation-stats.json
|
|||||||
|
|
||||||
# auto generated Go files
|
# auto generated Go files
|
||||||
*_gen.go
|
*_gen.go
|
||||||
|
|
||||||
|
deployment_tools_config.json
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ var config = {
|
|||||||
chromeLaunchConfig: {
|
chromeLaunchConfig: {
|
||||||
args: ['--no-sandbox'],
|
args: ['--no-sandbox'],
|
||||||
},
|
},
|
||||||
|
hideElements: '#updateVersion',
|
||||||
},
|
},
|
||||||
|
|
||||||
urls: [
|
urls: [
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ var config = {
|
|||||||
chromeLaunchConfig: {
|
chromeLaunchConfig: {
|
||||||
args: ['--no-sandbox'],
|
args: ['--no-sandbox'],
|
||||||
},
|
},
|
||||||
|
hideElements: '#updateVersion',
|
||||||
},
|
},
|
||||||
|
|
||||||
urls: [
|
urls: [
|
||||||
|
|||||||
158
CHANGELOG.md
158
CHANGELOG.md
@@ -1,3 +1,152 @@
|
|||||||
|
<!-- 8.3.0-beta2 START -->
|
||||||
|
|
||||||
|
# 8.3.0-beta2 (2021-11-25)
|
||||||
|
|
||||||
|
### Features and enhancements
|
||||||
|
|
||||||
|
- **Alerting:** Create DatasourceError alert if evaluation returns error. [#41869](https://github.com/grafana/grafana/pull/41869), [@gerobinson](https://github.com/gerobinson)
|
||||||
|
- **Alerting:** Make Unified Alerting enabled by default for those who do not use legacy alerting. [#42200](https://github.com/grafana/grafana/pull/42200), [@armandgrillet](https://github.com/armandgrillet)
|
||||||
|
- **Alerting:** Support mute timings configuration through the api for the embedded alert manager. [#41533](https://github.com/grafana/grafana/pull/41533), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||||
|
- **CloudWatch:** Add missing AWS/Events metrics. [#42164](https://github.com/grafana/grafana/pull/42164), [@n2N8Z](https://github.com/n2N8Z)
|
||||||
|
- **Docs:** Add easier to find deprecation notices to certain data sources and to the changelog. [#41938](https://github.com/grafana/grafana/pull/41938), [@gabor](https://github.com/gabor)
|
||||||
|
- **Plugins Catalog:** Enable install controls based on the pluginAdminEnabled flag. [#41686](https://github.com/grafana/grafana/pull/41686), [@leventebalogh](https://github.com/leventebalogh)
|
||||||
|
- **Query caching:** Increase max_value_mb default to 10. (Enterprise)
|
||||||
|
- **Table:** Add space between values for the DefaultCell. [#42246](https://github.com/grafana/grafana/pull/42246), [@kirederik](https://github.com/kirederik)
|
||||||
|
- **Table:** Add space between values on JSONViewCell. [#42156](https://github.com/grafana/grafana/pull/42156), [@kirederik](https://github.com/kirederik)
|
||||||
|
- **Tracing:** Make query editors available in dashboard for Tempo and Zipkin. [#41974](https://github.com/grafana/grafana/pull/41974), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
- **AccessControl:** Renamed `orgs` roles, removed `fixed:orgs:reader` introduced in beta1. [#42049](https://github.com/grafana/grafana/pull/42049), [@gamab](https://github.com/gamab)
|
||||||
|
- **Azure Monitor:** Add trap focus for modals in grafana/ui and other small a11y fixes for Azure Monitor. [#41449](https://github.com/grafana/grafana/pull/41449), [@sarahzinger](https://github.com/sarahzinger)
|
||||||
|
- **CodeEditor:** Prevent suggestions from being clipped. [#42120](https://github.com/grafana/grafana/pull/42120), [@kaydelaney](https://github.com/kaydelaney)
|
||||||
|
- **Dashboard:** Fix cache timeout persistence. [#42204](https://github.com/grafana/grafana/pull/42204), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **Datasource:** Fix stable sort order of query responses. [#41868](https://github.com/grafana/grafana/pull/41868), [@marefr](https://github.com/marefr)
|
||||||
|
- **Explore:** Fix error in query history when removing last item. [#42179](https://github.com/grafana/grafana/pull/42179), [@gabor](https://github.com/gabor)
|
||||||
|
- **Logs:** Fix requesting of older logs when flipped order. [#41966](https://github.com/grafana/grafana/pull/41966), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **Prometheus:** Fix running of health check query based on access mode. [#42189](https://github.com/grafana/grafana/pull/42189), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **TextPanel:** Fix suggestions for existing panels. [#42195](https://github.com/grafana/grafana/pull/42195), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **Tracing:** Fix incorrect indentations due to reoccurring spanIDs. [#41919](https://github.com/grafana/grafana/pull/41919), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **Tracing:** Show start time of trace with milliseconds precision. [#42132](https://github.com/grafana/grafana/pull/42132), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **Variables:** Make renamed or missing variable section expandable. [#41964](https://github.com/grafana/grafana/pull/41964), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
|
||||||
|
### Grafana 8 Alerting enabled by default for installations that do not use legacy alerting
|
||||||
|
|
||||||
|
Starting with Grafana v8.3.0, if you have **not** explicitly disabled unified alerting and **do not** have legacy alerts set up you are automatically "migrated" to Grafana 8 Alerting.
|
||||||
|
|
||||||
|
A migration **from legacy to Grafana 8 Alerting** will never incur a data loss, as the previous data is kept around for rollback purposes. However, going from **Grafana 8 Alerting to legacy alerting** will delete all the data created for Grafana 8 Alerting. It is recommended that you **backup your database** before attempting a migration between systems.
|
||||||
|
|
||||||
|
If unclear, please verify the table below:
|
||||||
|
|
||||||
|
| `[alerting][enabled]` | `[unified_alerting][enabled]` | With Existing Legacy Alerts | Result |
|
||||||
|
| --------------------- | ----------------------------- | --------------------------- | ------------------ |
|
||||||
|
| `true` | `true` | N/A | Error |
|
||||||
|
| `true` | `false` | N/A | Legacy Alerting |
|
||||||
|
| `true` | not set | Yes | Legacy Alerting |
|
||||||
|
| `true` | not set | No | Grafana 8 Alerting |
|
||||||
|
| not set | `true` | N/A | Grafana 8 Alerting |
|
||||||
|
| not set | `false` | N/A | Legacy Alerting |
|
||||||
|
| not set | not set | Yes | Legacy Alerting |
|
||||||
|
| not set | not set | No | Grafana 8 Alerting |
|
||||||
|
| `false` | `true` | N/A | Grafana 8 Alerting |
|
||||||
|
| `false` | `false` | N/A | Alerting disabled |
|
||||||
|
| `false` | not set | N/A | Grafana 8 Alerting |
|
||||||
|
|
||||||
|
N/A in the "With Existing Legacy Alerts" column means that it does not matter if you have legacy alerts or not.
|
||||||
|
Issue [#42200](https://github.com/grafana/grafana/issues/42200)
|
||||||
|
|
||||||
|
### Keep Last State for "If execution error or timeout" when upgrading to Grafana 8 alerting
|
||||||
|
|
||||||
|
In Grafana 8.3.0-beta2 we changed how alert rules that use `Keep Last State` for `If execution error or timeout` are upgraded from Legacy Alerting to Grafana 8 alerting. In 8.3.0-beta1 and earlier, alert rules with `Keep Last State` for `If execution error or timeout` were changed to `Alerting` when upgrading from Legacy Alerting to Grafana 8 alerting. However, in 8.3.0-beta2 these alert rules are now upgraded to a new option called `Error`. With this option, on encountering an error evaluating an alert rule, Grafana creates a special alert called `DatasourceError` with the `rule_uid` and `ref_id` as labels and an annotation called `Error` with the error message. Issue [#41869](https://github.com/grafana/grafana/issues/41869)
|
||||||
|
|
||||||
|
### Deprecations
|
||||||
|
|
||||||
|
The access mode "browser" is deprecated in the following data sources and will be removed in a later release:
|
||||||
|
|
||||||
|
- Prometheus
|
||||||
|
- InfluxDB
|
||||||
|
- Elasticsearch Issue [#41938](https://github.com/grafana/grafana/issues/41938)
|
||||||
|
|
||||||
|
### Plugin development fixes & changes
|
||||||
|
|
||||||
|
- **Select:** Select menus now properly scroll during keyboard navigation. [#41917](https://github.com/grafana/grafana/pull/41917), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
|
||||||
|
<!-- 8.3.0-beta2 END -->
|
||||||
|
<!-- 8.3.0-beta1 START -->
|
||||||
|
|
||||||
|
# 8.3.0-beta1 (2021-11-18)
|
||||||
|
|
||||||
|
### Features and enhancements
|
||||||
|
|
||||||
|
- **AccessControl:** Apply fine-grained access control to licensing. (Enterprise)
|
||||||
|
- **Alerting:** Add UI for contact point testing with custom annotations and labels. [#40491](https://github.com/grafana/grafana/pull/40491), [@nathanrodman](https://github.com/nathanrodman)
|
||||||
|
- **Alerting:** Make alert state indicator in panel header work with Grafana 8 alerts. [#38713](https://github.com/grafana/grafana/pull/38713), [@domasx2](https://github.com/domasx2)
|
||||||
|
- **Alerting:** Option for Discord notifier to use webhook name. [#40463](https://github.com/grafana/grafana/pull/40463), [@Skyebold](https://github.com/Skyebold)
|
||||||
|
- **Annotations:** Deprecate AnnotationsSrv. [#39631](https://github.com/grafana/grafana/pull/39631), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **Auditing:** Add audit logs for unified alerting endpoints. (Enterprise)
|
||||||
|
- **Auditing:** Add endpoints (plugins, datasources, library elements). (Enterprise)
|
||||||
|
- **Auth:** Omit all base64 paddings in JWT tokens for the JWT auth. [#35602](https://github.com/grafana/grafana/pull/35602), [@gillg](https://github.com/gillg)
|
||||||
|
- **Azure Monitor:** Clean up fields when editing Metrics. [#41762](https://github.com/grafana/grafana/pull/41762), [@andresmgot](https://github.com/andresmgot)
|
||||||
|
- **AzureMonitor:** Add new starter dashboards. [#39876](https://github.com/grafana/grafana/pull/39876), [@jcolladokuri](https://github.com/jcolladokuri)
|
||||||
|
- **AzureMonitor:** Add starter dashboard for app monitoring with Application Insights. [#40725](https://github.com/grafana/grafana/pull/40725), [@jcolladokuri](https://github.com/jcolladokuri)
|
||||||
|
- **Barchart/Time series:** Allow x axis label. [#41142](https://github.com/grafana/grafana/pull/41142), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||||
|
- **CLI:** Improve error handling for installing plugins. [#41257](https://github.com/grafana/grafana/pull/41257), [@marefr](https://github.com/marefr)
|
||||||
|
- **CloudMonitoring:** Migrate to use backend plugin SDK contracts. [#38650](https://github.com/grafana/grafana/pull/38650), [@idafurjes](https://github.com/idafurjes)
|
||||||
|
- **CloudWatch Logs:** Add retry strategy for hitting max concurrent queries. [#39290](https://github.com/grafana/grafana/pull/39290), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **CloudWatch:** Add AWS RoboMaker metrics and dimension. [#41450](https://github.com/grafana/grafana/pull/41450), [@ilyastoli](https://github.com/ilyastoli)
|
||||||
|
- **CloudWatch:** Add AWS Transfer metrics and dimension. [#41168](https://github.com/grafana/grafana/pull/41168), [@ilyastoli](https://github.com/ilyastoli)
|
||||||
|
- **Dashboard:** replace datasource name with a reference object. [#33817](https://github.com/grafana/grafana/pull/33817), [@ryantxu](https://github.com/ryantxu)
|
||||||
|
- **Dashboards:** Show logs on time series when hovering. [#40110](https://github.com/grafana/grafana/pull/40110), [@ryantxu](https://github.com/ryantxu)
|
||||||
|
- **Elasticsearch:** Add support for Elasticsearch 8.0 (Beta). [#41729](https://github.com/grafana/grafana/pull/41729), [@Elfo404](https://github.com/Elfo404)
|
||||||
|
- **Elasticsearch:** Add time zone setting to Date Histogram aggregation. [#40882](https://github.com/grafana/grafana/pull/40882), [@Elfo404](https://github.com/Elfo404)
|
||||||
|
- **Elasticsearch:** Enable full range log volume histogram. [#41202](https://github.com/grafana/grafana/pull/41202), [@ifrost](https://github.com/ifrost)
|
||||||
|
- **Elasticsearch:** Full range logs volume. [#40700](https://github.com/grafana/grafana/pull/40700), [@ifrost](https://github.com/ifrost)
|
||||||
|
- **Explore:** Allow changing the graph type. [#40522](https://github.com/grafana/grafana/pull/40522), [@gabor](https://github.com/gabor)
|
||||||
|
- **Explore:** Show ANSI colors when highlighting matched words in the logs panel. [#40971](https://github.com/grafana/grafana/pull/40971), [@oliverfrye](https://github.com/oliverfrye)
|
||||||
|
- **Graph(old) panel:** Listen to events from Time series panel. [#41033](https://github.com/grafana/grafana/pull/41033), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||||
|
- **Import:** Load gcom dashboards from URL. [#41799](https://github.com/grafana/grafana/pull/41799), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **LibraryPanels:** Improves export and import of library panels between orgs. [#39214](https://github.com/grafana/grafana/pull/39214), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **OAuth:** Support PKCE. [#39948](https://github.com/grafana/grafana/pull/39948), [@sakjur](https://github.com/sakjur)
|
||||||
|
- **Panel edit:** Overrides now highlight correctly when searching. [#41684](https://github.com/grafana/grafana/pull/41684), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **PanelEdit:** Display drag indicators on draggable sections. [#41711](https://github.com/grafana/grafana/pull/41711), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **Plugins:** Refactor Plugin Management. [#40477](https://github.com/grafana/grafana/pull/40477), [@wbrowne](https://github.com/wbrowne)
|
||||||
|
- **Prometheus:** Add custom query parameters when creating PromLink url. [#41213](https://github.com/grafana/grafana/pull/41213), [@Ian-Yy](https://github.com/Ian-Yy)
|
||||||
|
- **Prometheus:** Remove limits on metrics, labels, and values in Metrics Browser. [#40660](https://github.com/grafana/grafana/pull/40660), [@autoric](https://github.com/autoric)
|
||||||
|
- **StateTimeline:** Share cursor with rest of the panels. [#41038](https://github.com/grafana/grafana/pull/41038), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||||
|
- **Tempo:** Add error details when json upload fails. [#41803](https://github.com/grafana/grafana/pull/41803), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Tempo:** Add filtering for service graph query. [#41162](https://github.com/grafana/grafana/pull/41162), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Tempo:** Add links to nodes in Service Graph pointing to Prometheus metrics. [#41135](https://github.com/grafana/grafana/pull/41135), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Time series/Bar chart panel:** Add ability to sort series via legend. [#40226](https://github.com/grafana/grafana/pull/40226), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||||
|
- **TimeSeries:** Allow multiple axes for the same unit. [#41635](https://github.com/grafana/grafana/pull/41635), [@dprokop](https://github.com/dprokop)
|
||||||
|
- **TraceView:** Allow span links defined on dataFrame. [#40563](https://github.com/grafana/grafana/pull/40563), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Transformations:** Support a rows mode in labels to fields. [#41020](https://github.com/grafana/grafana/pull/41020), [@ryantxu](https://github.com/ryantxu)
|
||||||
|
- **ValueMappings:** Don't apply field config defaults to time fields. [#41132](https://github.com/grafana/grafana/pull/41132), [@torkelo](https://github.com/torkelo)
|
||||||
|
- **Variables:** Only update panels that are impacted by variable change. [#39420](https://github.com/grafana/grafana/pull/39420), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
- **API:** Fix dashboard quota limit for imports. [#41495](https://github.com/grafana/grafana/pull/41495), [@yangkb09](https://github.com/yangkb09)
|
||||||
|
- **Alerting:** Fix rule editor issues with Azure Monitor data source. [#41317](https://github.com/grafana/grafana/pull/41317), [@domasx2](https://github.com/domasx2)
|
||||||
|
- **Azure monitor:** Make sure alert rule editor is not enabled when template variables are being used. [#41335](https://github.com/grafana/grafana/pull/41335), [@sunker](https://github.com/sunker)
|
||||||
|
- **CloudMonitoring:** Fix annotation queries. [#41529](https://github.com/grafana/grafana/pull/41529), [@sunker](https://github.com/sunker)
|
||||||
|
- **CodeEditor:** Trigger the latest getSuggestions() passed to CodeEditor. [#40544](https://github.com/grafana/grafana/pull/40544), [@DukeManh](https://github.com/DukeManh)
|
||||||
|
- **Dashboard:** Remove the current panel from the list of options in the Dashboard datasource. [#41826](https://github.com/grafana/grafana/pull/41826), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **Encryption:** Fix decrypting secrets in alerting migration. [#41061](https://github.com/grafana/grafana/pull/41061), [@undef1nd](https://github.com/undef1nd)
|
||||||
|
- **InfluxDB:** Fix corner case where index is too large in ALIAS field. [#41562](https://github.com/grafana/grafana/pull/41562), [@gabor](https://github.com/gabor)
|
||||||
|
- **NavBar:** Order App plugins alphabetically. [#40078](https://github.com/grafana/grafana/pull/40078), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **NodeGraph:** Fix zooming sensitivity on touchpads. [#40718](https://github.com/grafana/grafana/pull/40718), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Plugins:** Add OAuth pass-through logic to api/ds/query endpoint. [#41352](https://github.com/grafana/grafana/pull/41352), [@wbrowne](https://github.com/wbrowne)
|
||||||
|
- **Snapshots:** Fix panel inspector for snapshot data. [#41530](https://github.com/grafana/grafana/pull/41530), [@joshhunt](https://github.com/joshhunt)
|
||||||
|
- **Tempo:** Fix basic auth password reset on adding tag. [#41808](https://github.com/grafana/grafana/pull/41808), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **ValueMapping:** Fixes issue with regex mappings. [#41515](https://github.com/grafana/grafana/pull/41515), [@mcdee](https://github.com/mcdee)
|
||||||
|
|
||||||
|
### Plugin development fixes & changes
|
||||||
|
|
||||||
|
- **grafana/ui:** Enable slider marks display. [#41275](https://github.com/grafana/grafana/pull/41275), [@dprokop](https://github.com/dprokop)
|
||||||
|
|
||||||
|
<!-- 8.3.0-beta1 END -->
|
||||||
<!-- 8.2.5 START -->
|
<!-- 8.2.5 START -->
|
||||||
|
|
||||||
# 8.2.5 (2021-11-18)
|
# 8.2.5 (2021-11-18)
|
||||||
@@ -5,6 +154,7 @@
|
|||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
- **Alerting:** Fix a bug where the metric in the evaluation string was not correctly populated. [#41731](https://github.com/grafana/grafana/pull/41731), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
- **Alerting:** Fix a bug where the metric in the evaluation string was not correctly populated. [#41731](https://github.com/grafana/grafana/pull/41731), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||||
|
- **Alerting:** Fix no data behaviour in Legacy Alerting for alert rules using the AND operator. [#41305](https://github.com/grafana/grafana/pull/41305), [@gerobinson](https://github.com/gerobinson)
|
||||||
- **CloudMonitoring:** Ignore min and max aggregation in MQL queries. [#41302](https://github.com/grafana/grafana/pull/41302), [@sunker](https://github.com/sunker)
|
- **CloudMonitoring:** Ignore min and max aggregation in MQL queries. [#41302](https://github.com/grafana/grafana/pull/41302), [@sunker](https://github.com/sunker)
|
||||||
- **Dashboards:** 'Copy' is no longer added to new dashboard titles. [#41344](https://github.com/grafana/grafana/pull/41344), [@joshhunt](https://github.com/joshhunt)
|
- **Dashboards:** 'Copy' is no longer added to new dashboard titles. [#41344](https://github.com/grafana/grafana/pull/41344), [@joshhunt](https://github.com/joshhunt)
|
||||||
- **DataProxy:** Fix overriding response body when response is a WebSocket upgrade. [#41364](https://github.com/grafana/grafana/pull/41364), [@marefr](https://github.com/marefr)
|
- **DataProxy:** Fix overriding response body when response is a WebSocket upgrade. [#41364](https://github.com/grafana/grafana/pull/41364), [@marefr](https://github.com/marefr)
|
||||||
@@ -15,6 +165,14 @@
|
|||||||
- **Tempo:** Fix validation of float durations. [#41400](https://github.com/grafana/grafana/pull/41400), [@ivanahuckova](https://github.com/ivanahuckova)
|
- **Tempo:** Fix validation of float durations. [#41400](https://github.com/grafana/grafana/pull/41400), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
- **Tracing:** Correct tags for each span are shown. [#41473](https://github.com/grafana/grafana/pull/41473), [@ivanahuckova](https://github.com/ivanahuckova)
|
- **Tracing:** Correct tags for each span are shown. [#41473](https://github.com/grafana/grafana/pull/41473), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
|
||||||
|
### Fix No Data behaviour in Legacy Alerting
|
||||||
|
|
||||||
|
In Grafana 8.2.5 and later, this change fixes a bug in the evaluation of alert rules when using the AND operator to compare two or more conditions. In Grafana 8.2.4 and earlier such alert rules would evaluate to `OK` if at least one, but not all, conditions returned no data. This change fixes that bug such that in Grafana 8.2.5 these alert rules now evaluate to `No Data`.
|
||||||
|
|
||||||
|
If an alert should evaluate to `OK` when one or all conditions return `No Data` then this can be done via changing `If no data or all values are null` to `OK`. However, this will not preserve the old behaviour in 8.2.4 where an alert will be `OK` if at least one, but not all, conditions return no data and then `No Data` if all conditions return `No Data`. Issue [#41305](https://github.com/grafana/grafana/issues/41305)
|
||||||
|
|
||||||
<!-- 8.2.5 END -->
|
<!-- 8.2.5 END -->
|
||||||
<!-- 8.2.4 START -->
|
<!-- 8.2.4 START -->
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ COPY emails emails
|
|||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM golang:1.17.0-alpine3.14 as go-builder
|
FROM golang:1.17.3-alpine3.14 as go-builder
|
||||||
|
|
||||||
RUN apk add --no-cache gcc g++ make
|
RUN apk add --no-cache gcc g++ make
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ RUN go mod verify
|
|||||||
RUN make build-go
|
RUN make build-go
|
||||||
|
|
||||||
# Final stage
|
# Final stage
|
||||||
FROM alpine:3.14.2
|
FROM alpine:3.14.3
|
||||||
|
|
||||||
LABEL maintainer="Grafana team <hello@grafana.com>"
|
LABEL maintainer="Grafana team <hello@grafana.com>"
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ COPY emails emails
|
|||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM golang:1.17.0 AS go-builder
|
FROM golang:1.17.3 AS go-builder
|
||||||
|
|
||||||
WORKDIR /src/grafana
|
WORKDIR /src/grafana
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -158,7 +158,7 @@ gen-ts:
|
|||||||
# you modify starlark files.
|
# you modify starlark files.
|
||||||
drone: $(DRONE)
|
drone: $(DRONE)
|
||||||
$(DRONE) starlark --format
|
$(DRONE) starlark --format
|
||||||
$(DRONE) lint .drone.yml
|
$(DRONE) lint .drone.yml --trusted
|
||||||
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
|
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
|
||||||
|
|
||||||
help: ## Display this help.
|
help: ## Display this help.
|
||||||
|
|||||||
@@ -228,9 +228,12 @@ admin_password = admin
|
|||||||
# used for signing
|
# used for signing
|
||||||
secret_key = SW2YcwTIb9zpOOhoPsMm
|
secret_key = SW2YcwTIb9zpOOhoPsMm
|
||||||
|
|
||||||
# key provider used for envelope encryption, default to static value specified by secret_key
|
# current key provider used for envelope encryption, default to static value specified by secret_key
|
||||||
encryption_provider = secretKey
|
encryption_provider = secretKey
|
||||||
|
|
||||||
|
# list of configured key providers, space separated (Enterprise only): e.g., awskms.v1 azurekv.v1
|
||||||
|
available_encryption_providers =
|
||||||
|
|
||||||
# disable gravatar profile images
|
# disable gravatar profile images
|
||||||
disable_gravatar = false
|
disable_gravatar = false
|
||||||
|
|
||||||
@@ -735,8 +738,8 @@ global_alert_rule = -1
|
|||||||
|
|
||||||
#################################### Unified Alerting ####################
|
#################################### Unified Alerting ####################
|
||||||
[unified_alerting]
|
[unified_alerting]
|
||||||
# Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.
|
# Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed when switching. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
|
||||||
enabled = false
|
enabled =
|
||||||
|
|
||||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||||
disabled_orgs =
|
disabled_orgs =
|
||||||
@@ -790,8 +793,8 @@ min_interval = 10s
|
|||||||
|
|
||||||
#################################### Alerting ############################
|
#################################### Alerting ############################
|
||||||
[alerting]
|
[alerting]
|
||||||
# Disable legacy alerting engine & UI features
|
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
|
||||||
enabled = true
|
enabled =
|
||||||
|
|
||||||
# Makes it possible to turn off alert execution but alerting UI is visible
|
# Makes it possible to turn off alert execution but alerting UI is visible
|
||||||
execute_alerts = true
|
execute_alerts = true
|
||||||
@@ -968,7 +971,7 @@ enable_alpha = false
|
|||||||
app_tls_skip_verify_insecure = false
|
app_tls_skip_verify_insecure = false
|
||||||
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
|
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
|
||||||
allow_loading_unsigned_plugins =
|
allow_loading_unsigned_plugins =
|
||||||
# Enable or disable installing plugins directly from within Grafana.
|
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
|
||||||
plugin_admin_enabled = true
|
plugin_admin_enabled = true
|
||||||
plugin_admin_external_manage_enabled = false
|
plugin_admin_external_manage_enabled = false
|
||||||
plugin_catalog_url = https://grafana.com/grafana/plugins/
|
plugin_catalog_url = https://grafana.com/grafana/plugins/
|
||||||
@@ -1040,12 +1043,14 @@ rendering_chrome_bin =
|
|||||||
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
|
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
|
||||||
rendering_mode =
|
rendering_mode =
|
||||||
|
|
||||||
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
||||||
# and will cluster using browser instances.
|
# and will cluster using browser instances.
|
||||||
# Mode 'context' will cluster using incognito pages.
|
# Mode 'context' will cluster using incognito pages.
|
||||||
rendering_clustering_mode =
|
rendering_clustering_mode =
|
||||||
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
|
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
|
||||||
rendering_clustering_max_concurrency =
|
rendering_clustering_max_concurrency =
|
||||||
|
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
|
||||||
|
rendering_clustering_timeout =
|
||||||
|
|
||||||
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
||||||
rendering_viewport_max_width =
|
rendering_viewport_max_width =
|
||||||
|
|||||||
@@ -222,9 +222,12 @@
|
|||||||
# used for signing
|
# used for signing
|
||||||
;secret_key = SW2YcwTIb9zpOOhoPsMm
|
;secret_key = SW2YcwTIb9zpOOhoPsMm
|
||||||
|
|
||||||
# key provider used for envelope encryption, default to static value specified by secret_key
|
# current key provider used for envelope encryption, default to static value specified by secret_key
|
||||||
;encryption_provider = secretKey
|
;encryption_provider = secretKey
|
||||||
|
|
||||||
|
# list of configured key providers, space separated (Enterprise only): e.g., awskms.v1 azurekv.v1
|
||||||
|
;available_encryption_providers =
|
||||||
|
|
||||||
# disable gravatar profile images
|
# disable gravatar profile images
|
||||||
;disable_gravatar = false
|
;disable_gravatar = false
|
||||||
|
|
||||||
@@ -713,7 +716,7 @@
|
|||||||
#################################### Unified Alerting ####################
|
#################################### Unified Alerting ####################
|
||||||
[unified_alerting]
|
[unified_alerting]
|
||||||
#Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.```
|
#Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.```
|
||||||
;enabled = false
|
;enabled = true
|
||||||
|
|
||||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||||
;disabled_orgs =
|
;disabled_orgs =
|
||||||
@@ -768,7 +771,7 @@
|
|||||||
#################################### Alerting ############################
|
#################################### Alerting ############################
|
||||||
[alerting]
|
[alerting]
|
||||||
# Disable legacy alerting engine & UI features
|
# Disable legacy alerting engine & UI features
|
||||||
;enabled = true
|
;enabled = false
|
||||||
|
|
||||||
# Makes it possible to turn off alert execution but alerting UI is visible
|
# Makes it possible to turn off alert execution but alerting UI is visible
|
||||||
;execute_alerts = true
|
;execute_alerts = true
|
||||||
@@ -941,7 +944,7 @@
|
|||||||
;app_tls_skip_verify_insecure = false
|
;app_tls_skip_verify_insecure = false
|
||||||
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
|
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
|
||||||
;allow_loading_unsigned_plugins =
|
;allow_loading_unsigned_plugins =
|
||||||
# Enable or disable installing plugins directly from within Grafana.
|
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
|
||||||
;plugin_admin_enabled = false
|
;plugin_admin_enabled = false
|
||||||
;plugin_admin_external_manage_enabled = false
|
;plugin_admin_external_manage_enabled = false
|
||||||
;plugin_catalog_url = https://grafana.com/grafana/plugins/
|
;plugin_catalog_url = https://grafana.com/grafana/plugins/
|
||||||
@@ -1012,12 +1015,14 @@
|
|||||||
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
|
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
|
||||||
;rendering_mode =
|
;rendering_mode =
|
||||||
|
|
||||||
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
||||||
# and will cluster using browser instances.
|
# and will cluster using browser instances.
|
||||||
# Mode 'context' will cluster using incognito pages.
|
# Mode 'context' will cluster using incognito pages.
|
||||||
;rendering_clustering_mode =
|
;rendering_clustering_mode =
|
||||||
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
|
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
|
||||||
;rendering_clustering_max_concurrency =
|
;rendering_clustering_max_concurrency =
|
||||||
|
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
|
||||||
|
;rendering_clustering_timeout =
|
||||||
|
|
||||||
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
||||||
;rendering_viewport_max_width =
|
;rendering_viewport_max_width =
|
||||||
|
|||||||
@@ -2054,6 +2054,18 @@
|
|||||||
"value": 0
|
"value": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matcher": {
|
||||||
|
"id": "byName",
|
||||||
|
"options": "value"
|
||||||
|
},
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": "custom.fillOpacity",
|
||||||
|
"value": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,522 +1,481 @@
|
|||||||
{
|
{
|
||||||
"annotations": {
|
"annotations": {
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"builtIn": 1,
|
"builtIn": 1,
|
||||||
"datasource": "-- Grafana --",
|
"datasource": "-- Grafana --",
|
||||||
"enable": true,
|
"enable": true,
|
||||||
"hide": true,
|
"hide": true,
|
||||||
"iconColor": "rgba(0, 211, 255, 1)",
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
"name": "Annotations & Alerts",
|
"name": "Annotations & Alerts",
|
||||||
"target": {
|
"target": {
|
||||||
"limit": 100,
|
"limit": 100,
|
||||||
"matchAny": false,
|
"matchAny": false,
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"type": "dashboard"
|
|
||||||
},
|
|
||||||
"type": "dashboard"
|
"type": "dashboard"
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"editable": true,
|
|
||||||
"fiscalYearStartMonth": 0,
|
|
||||||
"graphTooltip": 2,
|
|
||||||
"id": 319,
|
|
||||||
"links": [],
|
|
||||||
"liveNow": false,
|
|
||||||
"panels": [
|
|
||||||
{
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 0,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"viz": false
|
|
||||||
},
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineStyle": {
|
|
||||||
"dash": [
|
|
||||||
10,
|
|
||||||
10
|
|
||||||
],
|
|
||||||
"fill": "dash"
|
|
||||||
},
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "never",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "currencyUSD"
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "sma"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "color",
|
|
||||||
"value": {
|
|
||||||
"fixedColor": "orange",
|
|
||||||
"mode": "fixed"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.lineWidth",
|
|
||||||
"value": 5
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.lineStyle",
|
|
||||||
"value": {
|
|
||||||
"dash": [
|
|
||||||
0,
|
|
||||||
20
|
|
||||||
],
|
|
||||||
"fill": "dot"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "bolup"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "custom.fillBelowTo",
|
|
||||||
"value": "boldn"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "custom.fillOpacity",
|
|
||||||
"value": 8
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "color",
|
|
||||||
"value": {
|
|
||||||
"fixedColor": "blue",
|
|
||||||
"mode": "fixed"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"gridPos": {
|
"type": "dashboard"
|
||||||
"h": 16,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 2,
|
|
||||||
"options": {
|
|
||||||
"colorStrategy": "open-close",
|
|
||||||
"colors": {
|
|
||||||
"down": "red",
|
|
||||||
"up": "green"
|
|
||||||
},
|
|
||||||
"fields": {},
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom"
|
|
||||||
},
|
|
||||||
"mode": "candles+volume",
|
|
||||||
"candleStyle": "candles"
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"csvFileName": "ohlc_dogecoin.csv",
|
|
||||||
"refId": "A",
|
|
||||||
"scenarioId": "csv_file"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Price & Volume",
|
|
||||||
"type": "candlestick"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 0,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"viz": false
|
|
||||||
},
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "auto",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "currencyUSD"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 20,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 0
|
|
||||||
},
|
|
||||||
"id": 7,
|
|
||||||
"options": {
|
|
||||||
"colorStrategy": "close-close",
|
|
||||||
"colors": {
|
|
||||||
"down": "red",
|
|
||||||
"up": "green"
|
|
||||||
},
|
|
||||||
"fields": {},
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom"
|
|
||||||
},
|
|
||||||
"mode": "candles",
|
|
||||||
"candleStyle": "candles"
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"csvFileName": "ohlc_dogecoin.csv",
|
|
||||||
"refId": "A",
|
|
||||||
"scenarioId": "csv_file"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Price Only, Hollow Candles",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "filterFieldsByName",
|
|
||||||
"options": {
|
|
||||||
"include": {
|
|
||||||
"names": [
|
|
||||||
"time",
|
|
||||||
"open",
|
|
||||||
"high",
|
|
||||||
"low",
|
|
||||||
"close"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "candlestick"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 0,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"viz": false
|
|
||||||
},
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "auto",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "currencyUSD"
|
|
||||||
},
|
|
||||||
"overrides": []
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 10,
|
|
||||||
"w": 12,
|
|
||||||
"x": 0,
|
|
||||||
"y": 16
|
|
||||||
},
|
|
||||||
"id": 6,
|
|
||||||
"options": {
|
|
||||||
"colorStrategy": "open-close",
|
|
||||||
"colors": {
|
|
||||||
"down": "red",
|
|
||||||
"up": "blue"
|
|
||||||
},
|
|
||||||
"fields": { },
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom"
|
|
||||||
},
|
|
||||||
"mode": "candles",
|
|
||||||
"candleStyle": "ohlcbars"
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"csvFileName": "ohlc_dogecoin.csv",
|
|
||||||
"refId": "A",
|
|
||||||
"scenarioId": "csv_file"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Price Only, OHLC Bars",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "filterFieldsByName",
|
|
||||||
"options": {
|
|
||||||
"include": {
|
|
||||||
"names": [
|
|
||||||
"time",
|
|
||||||
"open",
|
|
||||||
"high",
|
|
||||||
"low",
|
|
||||||
"close"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "candlestick"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"fieldConfig": {
|
|
||||||
"defaults": {
|
|
||||||
"color": {
|
|
||||||
"mode": "palette-classic"
|
|
||||||
},
|
|
||||||
"custom": {
|
|
||||||
"axisLabel": "",
|
|
||||||
"axisPlacement": "auto",
|
|
||||||
"barAlignment": 0,
|
|
||||||
"drawStyle": "line",
|
|
||||||
"fillOpacity": 100,
|
|
||||||
"gradientMode": "none",
|
|
||||||
"hideFrom": {
|
|
||||||
"legend": false,
|
|
||||||
"tooltip": false,
|
|
||||||
"viz": false
|
|
||||||
},
|
|
||||||
"lineInterpolation": "linear",
|
|
||||||
"lineWidth": 1,
|
|
||||||
"pointSize": 5,
|
|
||||||
"scaleDistribution": {
|
|
||||||
"type": "linear"
|
|
||||||
},
|
|
||||||
"showPoints": "auto",
|
|
||||||
"spanNulls": false,
|
|
||||||
"stacking": {
|
|
||||||
"group": "A",
|
|
||||||
"mode": "none"
|
|
||||||
},
|
|
||||||
"thresholdsStyle": {
|
|
||||||
"mode": "off"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mappings": [],
|
|
||||||
"thresholds": {
|
|
||||||
"mode": "absolute",
|
|
||||||
"steps": [
|
|
||||||
{
|
|
||||||
"color": "green"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"color": "red",
|
|
||||||
"value": 80
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"unit": "currencyUSD"
|
|
||||||
},
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "open"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "custom.hideFrom",
|
|
||||||
"value": {
|
|
||||||
"legend": true,
|
|
||||||
"tooltip": true,
|
|
||||||
"viz": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"matcher": {
|
|
||||||
"id": "byName",
|
|
||||||
"options": "close"
|
|
||||||
},
|
|
||||||
"properties": [
|
|
||||||
{
|
|
||||||
"id": "custom.hideFrom",
|
|
||||||
"value": {
|
|
||||||
"legend": true,
|
|
||||||
"tooltip": true,
|
|
||||||
"viz": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"gridPos": {
|
|
||||||
"h": 6,
|
|
||||||
"w": 12,
|
|
||||||
"x": 12,
|
|
||||||
"y": 20
|
|
||||||
},
|
|
||||||
"id": 4,
|
|
||||||
"options": {
|
|
||||||
"colorStrategy": "open-close",
|
|
||||||
"colors": {
|
|
||||||
"down": "red",
|
|
||||||
"up": "yellow"
|
|
||||||
},
|
|
||||||
"fields": {},
|
|
||||||
"legend": {
|
|
||||||
"calcs": [],
|
|
||||||
"displayMode": "list",
|
|
||||||
"placement": "bottom"
|
|
||||||
},
|
|
||||||
"mode": "volume",
|
|
||||||
"candleStyle": "candles"
|
|
||||||
},
|
|
||||||
"targets": [
|
|
||||||
{
|
|
||||||
"csvFileName": "ohlc_dogecoin.csv",
|
|
||||||
"refId": "A",
|
|
||||||
"scenarioId": "csv_file"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"title": "Volume Only, Alt Colors, 100% Opacity",
|
|
||||||
"transformations": [
|
|
||||||
{
|
|
||||||
"id": "filterFieldsByName",
|
|
||||||
"options": {
|
|
||||||
"include": {
|
|
||||||
"names": [
|
|
||||||
"time",
|
|
||||||
"volume",
|
|
||||||
"open",
|
|
||||||
"close"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"type": "candlestick"
|
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"refresh": false,
|
},
|
||||||
"schemaVersion": 33,
|
"editable": true,
|
||||||
"style": "dark",
|
"fiscalYearStartMonth": 0,
|
||||||
"tags": [
|
"graphTooltip": 2,
|
||||||
"gdev",
|
"links": [],
|
||||||
"panel-tests",
|
"liveNow": false,
|
||||||
"graph-ng"
|
"panels": [
|
||||||
],
|
{
|
||||||
"templating": {
|
"fieldConfig": {
|
||||||
"list": []
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 0,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineStyle": {
|
||||||
|
"dash": [
|
||||||
|
10,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"fill": "dash"
|
||||||
|
},
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "never",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "currencyUSD"
|
||||||
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"matcher": {
|
||||||
|
"id": "byName",
|
||||||
|
"options": "sma"
|
||||||
|
},
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": "color",
|
||||||
|
"value": {
|
||||||
|
"fixedColor": "orange",
|
||||||
|
"mode": "fixed"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "custom.lineWidth",
|
||||||
|
"value": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "custom.lineStyle",
|
||||||
|
"value": {
|
||||||
|
"dash": [
|
||||||
|
0,
|
||||||
|
20
|
||||||
|
],
|
||||||
|
"fill": "dot"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matcher": {
|
||||||
|
"id": "byName",
|
||||||
|
"options": "bolup"
|
||||||
|
},
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": "custom.fillBelowTo",
|
||||||
|
"value": "boldn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "custom.fillOpacity",
|
||||||
|
"value": 8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "color",
|
||||||
|
"value": {
|
||||||
|
"fixedColor": "blue",
|
||||||
|
"mode": "fixed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 16,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 2,
|
||||||
|
"options": {
|
||||||
|
"candleStyle": "candles",
|
||||||
|
"colorStrategy": "open-close",
|
||||||
|
"colors": {
|
||||||
|
"down": "red",
|
||||||
|
"up": "green"
|
||||||
|
},
|
||||||
|
"fields": {},
|
||||||
|
"includeAllFields": true,
|
||||||
|
"legend": {
|
||||||
|
"calcs": [],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom"
|
||||||
|
},
|
||||||
|
"mode": "candles+volume"
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"csvFileName": "ohlc_dogecoin.csv",
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Price & Volume",
|
||||||
|
"type": "candlestick"
|
||||||
},
|
},
|
||||||
"time": {
|
{
|
||||||
"from": "2021-07-13T22:13:30.740Z",
|
"fieldConfig": {
|
||||||
"to": "2021-07-13T22:46:18.921Z"
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 0,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "auto",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "currencyUSD"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 20,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 7,
|
||||||
|
"options": {
|
||||||
|
"candleStyle": "candles",
|
||||||
|
"colorStrategy": "close-close",
|
||||||
|
"colors": {
|
||||||
|
"down": "red",
|
||||||
|
"up": "green"
|
||||||
|
},
|
||||||
|
"fields": {},
|
||||||
|
"includeAllFields": false,
|
||||||
|
"legend": {
|
||||||
|
"calcs": [],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom"
|
||||||
|
},
|
||||||
|
"mode": "candles"
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"csvFileName": "ohlc_dogecoin.csv",
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Price Only, Hollow Candles",
|
||||||
|
"transformations": [],
|
||||||
|
"type": "candlestick"
|
||||||
},
|
},
|
||||||
"timepicker": {},
|
{
|
||||||
"timezone": "",
|
"fieldConfig": {
|
||||||
"title": "Candlestick",
|
"defaults": {
|
||||||
"uid": "MP-Di9F7k",
|
"color": {
|
||||||
"version": 7,
|
"mode": "palette-classic"
|
||||||
"weekStart": ""
|
},
|
||||||
}
|
"custom": {
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 0,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "auto",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "currencyUSD"
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 10,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 16
|
||||||
|
},
|
||||||
|
"id": 6,
|
||||||
|
"options": {
|
||||||
|
"candleStyle": "ohlcbars",
|
||||||
|
"colorStrategy": "open-close",
|
||||||
|
"colors": {
|
||||||
|
"down": "red",
|
||||||
|
"up": "blue"
|
||||||
|
},
|
||||||
|
"fields": {},
|
||||||
|
"includeAllFields": false,
|
||||||
|
"legend": {
|
||||||
|
"calcs": [],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom"
|
||||||
|
},
|
||||||
|
"mode": "candles"
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"csvFileName": "ohlc_dogecoin.csv",
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Price Only, OHLC Bars",
|
||||||
|
"transformations": [],
|
||||||
|
"type": "candlestick"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
},
|
||||||
|
"custom": {
|
||||||
|
"axisLabel": "",
|
||||||
|
"axisPlacement": "auto",
|
||||||
|
"barAlignment": 0,
|
||||||
|
"drawStyle": "line",
|
||||||
|
"fillOpacity": 100,
|
||||||
|
"gradientMode": "none",
|
||||||
|
"hideFrom": {
|
||||||
|
"legend": false,
|
||||||
|
"tooltip": false,
|
||||||
|
"viz": false
|
||||||
|
},
|
||||||
|
"lineInterpolation": "linear",
|
||||||
|
"lineWidth": 1,
|
||||||
|
"pointSize": 5,
|
||||||
|
"scaleDistribution": {
|
||||||
|
"type": "linear"
|
||||||
|
},
|
||||||
|
"showPoints": "auto",
|
||||||
|
"spanNulls": false,
|
||||||
|
"stacking": {
|
||||||
|
"group": "A",
|
||||||
|
"mode": "none"
|
||||||
|
},
|
||||||
|
"thresholdsStyle": {
|
||||||
|
"mode": "off"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"unit": "currencyUSD"
|
||||||
|
},
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"matcher": {
|
||||||
|
"id": "byName",
|
||||||
|
"options": "open"
|
||||||
|
},
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": "custom.hideFrom",
|
||||||
|
"value": {
|
||||||
|
"legend": true,
|
||||||
|
"tooltip": true,
|
||||||
|
"viz": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matcher": {
|
||||||
|
"id": "byName",
|
||||||
|
"options": "close"
|
||||||
|
},
|
||||||
|
"properties": [
|
||||||
|
{
|
||||||
|
"id": "custom.hideFrom",
|
||||||
|
"value": {
|
||||||
|
"legend": true,
|
||||||
|
"tooltip": true,
|
||||||
|
"viz": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 6,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 20
|
||||||
|
},
|
||||||
|
"id": 4,
|
||||||
|
"options": {
|
||||||
|
"candleStyle": "candles",
|
||||||
|
"colorStrategy": "open-close",
|
||||||
|
"colors": {
|
||||||
|
"down": "red",
|
||||||
|
"up": "yellow"
|
||||||
|
},
|
||||||
|
"fields": {},
|
||||||
|
"includeAllFields": false,
|
||||||
|
"legend": {
|
||||||
|
"calcs": [],
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "bottom"
|
||||||
|
},
|
||||||
|
"mode": "volume"
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"csvFileName": "ohlc_dogecoin.csv",
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Volume Only, Alt Colors, 100% Opacity",
|
||||||
|
"transformations": [],
|
||||||
|
"type": "candlestick"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"refresh": false,
|
||||||
|
"schemaVersion": 33,
|
||||||
|
"style": "dark",
|
||||||
|
"tags": [
|
||||||
|
"gdev",
|
||||||
|
"panel-tests",
|
||||||
|
"graph-ng"
|
||||||
|
],
|
||||||
|
"templating": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "2021-07-13T22:13:30.740Z",
|
||||||
|
"to": "2021-07-13T22:46:18.921Z"
|
||||||
|
},
|
||||||
|
"timepicker": {},
|
||||||
|
"timezone": "",
|
||||||
|
"title": "Candlestick",
|
||||||
|
"uid": "MP-Di9F7k",
|
||||||
|
"version": 2,
|
||||||
|
"weekStart": ""
|
||||||
|
}
|
||||||
|
|||||||
436
devenv/dev-dashboards/panel-geomap/geomap_multi-layers.json
Normal file
436
devenv/dev-dashboards/panel-geomap/geomap_multi-layers.json
Normal file
@@ -0,0 +1,436 @@
|
|||||||
|
{
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"builtIn": 1,
|
||||||
|
"datasource": "-- Grafana --",
|
||||||
|
"enable": true,
|
||||||
|
"hide": true,
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"name": "Annotations & Alerts",
|
||||||
|
"target": {
|
||||||
|
"limit": 100,
|
||||||
|
"matchAny": false,
|
||||||
|
"tags": [],
|
||||||
|
"type": "dashboard"
|
||||||
|
},
|
||||||
|
"type": "dashboard"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"editable": true,
|
||||||
|
"fiscalYearStartMonth": 0,
|
||||||
|
"graphTooltip": 0,
|
||||||
|
"id": 157,
|
||||||
|
"links": [],
|
||||||
|
"liveNow": false,
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": 20
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 22,
|
||||||
|
"w": 12,
|
||||||
|
"x": 0,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 2,
|
||||||
|
"options": {
|
||||||
|
"basemap": {
|
||||||
|
"config": {},
|
||||||
|
"name": "Layer 0",
|
||||||
|
"type": "default"
|
||||||
|
},
|
||||||
|
"controls": {
|
||||||
|
"mouseWheelZoom": true,
|
||||||
|
"showAttribution": true,
|
||||||
|
"showDebug": false,
|
||||||
|
"showScale": false,
|
||||||
|
"showZoom": true
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"check": {
|
||||||
|
"operation": "eq",
|
||||||
|
"property": "name",
|
||||||
|
"value": "Greenland"
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"color": {
|
||||||
|
"fixed": "light-blue"
|
||||||
|
},
|
||||||
|
"opacity": 0.4,
|
||||||
|
"rotation": {
|
||||||
|
"fixed": 0,
|
||||||
|
"max": 360,
|
||||||
|
"min": -360,
|
||||||
|
"mode": "mod"
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"fixed": 5,
|
||||||
|
"max": 15,
|
||||||
|
"min": 2
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"fixed": "img/icons/marker/circle.svg",
|
||||||
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"textConfig": {
|
||||||
|
"fontSize": 12,
|
||||||
|
"offsetX": 0,
|
||||||
|
"offsetY": 0,
|
||||||
|
"textAlign": "center",
|
||||||
|
"textBaseline": "middle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"check": {
|
||||||
|
"operation": "eq",
|
||||||
|
"property": "name",
|
||||||
|
"value": "Antarctica"
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"color": {
|
||||||
|
"fixed": "#FCE2DE"
|
||||||
|
},
|
||||||
|
"opacity": 0.4,
|
||||||
|
"rotation": {
|
||||||
|
"fixed": 0,
|
||||||
|
"max": 360,
|
||||||
|
"min": -360,
|
||||||
|
"mode": "mod"
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"fixed": 5,
|
||||||
|
"max": 15,
|
||||||
|
"min": 2
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"fixed": "img/icons/marker/circle.svg",
|
||||||
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"textConfig": {
|
||||||
|
"fontSize": 12,
|
||||||
|
"offsetX": 0,
|
||||||
|
"offsetY": 0,
|
||||||
|
"textAlign": "center",
|
||||||
|
"textBaseline": "middle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"check": {
|
||||||
|
"operation": "eq",
|
||||||
|
"property": "name",
|
||||||
|
"value": "Canada"
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"color": {
|
||||||
|
"fixed": "#37872D"
|
||||||
|
},
|
||||||
|
"opacity": 0.4,
|
||||||
|
"rotation": {
|
||||||
|
"fixed": 0,
|
||||||
|
"max": 360,
|
||||||
|
"min": -360,
|
||||||
|
"mode": "mod"
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"fixed": 5,
|
||||||
|
"max": 15,
|
||||||
|
"min": 2
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"fixed": "img/icons/marker/circle.svg",
|
||||||
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"textConfig": {
|
||||||
|
"fontSize": 12,
|
||||||
|
"offsetX": 0,
|
||||||
|
"offsetY": 0,
|
||||||
|
"textAlign": "center",
|
||||||
|
"textBaseline": "middle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"check": {
|
||||||
|
"operation": "eq",
|
||||||
|
"property": "name",
|
||||||
|
"value": "Mexico"
|
||||||
|
},
|
||||||
|
"style": {
|
||||||
|
"color": {
|
||||||
|
"fixed": "#1F60C4"
|
||||||
|
},
|
||||||
|
"opacity": 0.4,
|
||||||
|
"rotation": {
|
||||||
|
"fixed": 0,
|
||||||
|
"max": 360,
|
||||||
|
"min": -360,
|
||||||
|
"mode": "mod"
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"fixed": 5,
|
||||||
|
"max": 15,
|
||||||
|
"min": 2
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"fixed": "img/icons/marker/circle.svg",
|
||||||
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"textConfig": {
|
||||||
|
"fontSize": 12,
|
||||||
|
"offsetX": 0,
|
||||||
|
"offsetY": 0,
|
||||||
|
"textAlign": "center",
|
||||||
|
"textBaseline": "middle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"src": "public/maps/countries.geojson",
|
||||||
|
"style": {
|
||||||
|
"color": {
|
||||||
|
"fixed": "dark-green"
|
||||||
|
},
|
||||||
|
"opacity": 0.1,
|
||||||
|
"rotation": {
|
||||||
|
"fixed": 0,
|
||||||
|
"max": 360,
|
||||||
|
"min": -360,
|
||||||
|
"mode": "mod"
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"fixed": 5,
|
||||||
|
"max": 15,
|
||||||
|
"min": 2
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"fixed": "img/icons/marker/circle.svg",
|
||||||
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"textConfig": {
|
||||||
|
"fontSize": 12,
|
||||||
|
"offsetX": 0,
|
||||||
|
"offsetY": 0,
|
||||||
|
"textAlign": "center",
|
||||||
|
"textBaseline": "middle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "Countries",
|
||||||
|
"type": "geojson"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"showLegend": true,
|
||||||
|
"style": {
|
||||||
|
"color": {
|
||||||
|
"fixed": "dark-blue"
|
||||||
|
},
|
||||||
|
"opacity": 0.4,
|
||||||
|
"rotation": {
|
||||||
|
"fixed": 0,
|
||||||
|
"max": 360,
|
||||||
|
"min": -360,
|
||||||
|
"mode": "mod"
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"fixed": 5,
|
||||||
|
"max": 15,
|
||||||
|
"min": 2
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"fixed": "img/icons/marker/square.svg",
|
||||||
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"field": "Count",
|
||||||
|
"fixed": "",
|
||||||
|
"mode": "field"
|
||||||
|
},
|
||||||
|
"textConfig": {
|
||||||
|
"fontSize": 16,
|
||||||
|
"offsetX": 10,
|
||||||
|
"offsetY": 10,
|
||||||
|
"textAlign": "center",
|
||||||
|
"textBaseline": "middle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"location": {
|
||||||
|
"mode": "auto"
|
||||||
|
},
|
||||||
|
"name": "Flights",
|
||||||
|
"type": "markers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"view": {
|
||||||
|
"id": "coords",
|
||||||
|
"lat": 42.826559,
|
||||||
|
"lon": -96.868893,
|
||||||
|
"zoom": 3.58
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.3.0-pre",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"csvFileName": "flight_info_by_state.csv",
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Multi layers",
|
||||||
|
"type": "geomap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"color": {
|
||||||
|
"mode": "thresholds"
|
||||||
|
},
|
||||||
|
"mappings": [],
|
||||||
|
"thresholds": {
|
||||||
|
"mode": "absolute",
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"color": "green",
|
||||||
|
"value": 20
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"color": "red",
|
||||||
|
"value": 80
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 22,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 0
|
||||||
|
},
|
||||||
|
"id": 3,
|
||||||
|
"options": {
|
||||||
|
"basemap": {
|
||||||
|
"config": {},
|
||||||
|
"name": "Layer 0",
|
||||||
|
"type": "default"
|
||||||
|
},
|
||||||
|
"controls": {
|
||||||
|
"mouseWheelZoom": true,
|
||||||
|
"showAttribution": true,
|
||||||
|
"showDebug": false,
|
||||||
|
"showScale": false,
|
||||||
|
"showZoom": true
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{
|
||||||
|
"config": {
|
||||||
|
"showLegend": true,
|
||||||
|
"style": {
|
||||||
|
"color": {
|
||||||
|
"fixed": "dark-green"
|
||||||
|
},
|
||||||
|
"opacity": 0.7,
|
||||||
|
"rotation": {
|
||||||
|
"field": "Lng",
|
||||||
|
"fixed": 0,
|
||||||
|
"max": 360,
|
||||||
|
"min": -360,
|
||||||
|
"mode": "mod"
|
||||||
|
},
|
||||||
|
"size": {
|
||||||
|
"fixed": 10,
|
||||||
|
"max": 15,
|
||||||
|
"min": 2
|
||||||
|
},
|
||||||
|
"symbol": {
|
||||||
|
"fixed": "img/icons/marker/plane.svg",
|
||||||
|
"mode": "fixed"
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"field": "Lng",
|
||||||
|
"fixed": "",
|
||||||
|
"mode": "field"
|
||||||
|
},
|
||||||
|
"textConfig": {
|
||||||
|
"fontSize": 12,
|
||||||
|
"offsetX": 0,
|
||||||
|
"offsetY": 18,
|
||||||
|
"textAlign": "center",
|
||||||
|
"textBaseline": "middle"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"name": "Layer 2",
|
||||||
|
"type": "markers"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"view": {
|
||||||
|
"id": "coords",
|
||||||
|
"lat": 42.826559,
|
||||||
|
"lon": -96.868893,
|
||||||
|
"zoom": 3.58
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pluginVersion": "8.3.0-pre",
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"csvFileName": "flight_info_by_state.csv",
|
||||||
|
"refId": "A",
|
||||||
|
"scenarioId": "csv_file"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Markers",
|
||||||
|
"type": "geomap"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"schemaVersion": 33,
|
||||||
|
"style": "dark",
|
||||||
|
"tags": [
|
||||||
|
"gdev",
|
||||||
|
"geomap",
|
||||||
|
"panel-tests"
|
||||||
|
],
|
||||||
|
"templating": {
|
||||||
|
"list": []
|
||||||
|
},
|
||||||
|
"time": {
|
||||||
|
"from": "now-6h",
|
||||||
|
"to": "now"
|
||||||
|
},
|
||||||
|
"timepicker": {},
|
||||||
|
"timezone": "",
|
||||||
|
"title": "Panel Tests - Geomap Multi Layers",
|
||||||
|
"uid": "2jFpEvp7z",
|
||||||
|
"version": 8,
|
||||||
|
"weekStart": ""
|
||||||
|
}
|
||||||
@@ -1426,6 +1426,10 @@
|
|||||||
"fixedColor": "blue",
|
"fixedColor": "blue",
|
||||||
"mode": "fixed"
|
"mode": "fixed"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "custom.fillOpacity",
|
||||||
|
"value": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1582,7 +1582,7 @@ We do _not_ recommend using this option. For more information, refer to [Plugin
|
|||||||
|
|
||||||
### plugin_admin_enabled
|
### plugin_admin_enabled
|
||||||
|
|
||||||
Available to Grafana administrators only, the plugin admin app is set to `true` by default. Set it to `false` to disable the app.
|
Available to Grafana administrators only, enables installing / uninstalling / updating plugins directly from the Grafana UI. Set to `true` by default. Setting it to `false` will hide the install / uninstall / update controls.
|
||||||
|
|
||||||
For more information, refer to [Plugin catalog]({{< relref "../plugins/catalog.md" >}}).
|
For more information, refer to [Plugin catalog]({{< relref "../plugins/catalog.md" >}}).
|
||||||
|
|
||||||
@@ -1711,13 +1711,19 @@ Mode `reusable` will have one browser instance and will create a new incognito p
|
|||||||
|
|
||||||
### rendering_clustering_mode
|
### rendering_clustering_mode
|
||||||
|
|
||||||
When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is `browser` and will cluster using browser instances.
|
When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is `browser` and will cluster using browser instances.
|
||||||
|
|
||||||
Mode `context` will cluster using incognito pages.
|
Mode `context` will cluster using incognito pages.
|
||||||
|
|
||||||
### rendering_clustering_max_concurrency
|
### rendering_clustering_max_concurrency
|
||||||
|
|
||||||
When rendering_mode = clustered you can define the maximum number of browser instances/incognito pages that can execute concurrently.
|
When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is `5`.
|
||||||
|
|
||||||
|
### rendering_clustering_timeout
|
||||||
|
|
||||||
|
> **Note**: Available in grafana-image-renderer v3.3.0 and later versions.
|
||||||
|
|
||||||
|
When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
|
||||||
|
|
||||||
### rendering_viewport_max_width
|
### rendering_viewport_max_width
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
+++
|
||||||
|
title = "Database encryption (Enterprise)"
|
||||||
|
description = "Grafana Enterprise database encryption"
|
||||||
|
keywords = ["grafana", "enterprise", "database", "encryption", "documentation"]
|
||||||
|
aliases = [""]
|
||||||
|
weight = 440
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Grafana Enterprise database encryption
|
||||||
|
|
||||||
|
If you are using Grafana Enterprise, you can change Grafana’s cryptographic mode of operation from AES-CFB to AES-GCM, and integrate with a key management system (KMS) provider.
|
||||||
|
|
||||||
|
## Changing your encryption mode to AES-GCM
|
||||||
|
|
||||||
|
Grafana encrypts secrets using Advanced Encryption Standard in Cipher
|
||||||
|
FeedBack mode (AES-CFB). You might prefer to use AES in Galois/Counter
|
||||||
|
Mode (AES-GCM) instead, to meet your company’s security requirements or
|
||||||
|
in order to maintain consistency with other services.
|
||||||
|
|
||||||
|
To change your encryption mode, update the `algorithm` value in the
|
||||||
|
`[security.encryption]` section of your Grafana configuration file.
|
||||||
|
For details, refer to Enterprise configuration.
|
||||||
15
docs/sources/administration/database-encryption.md
Normal file
15
docs/sources/administration/database-encryption.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
+++
|
||||||
|
title = "Database encryption"
|
||||||
|
description = "Grafana database encryption"
|
||||||
|
keywords = ["grafana", "database", "encryption", "documentation"]
|
||||||
|
aliases = [""]
|
||||||
|
weight = 450
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Grafana database encryption
|
||||||
|
|
||||||
|
Grafana’s database contains secrets, which are used to query data sources, send alert notifications and perform other functions within Grafana.
|
||||||
|
|
||||||
|
Grafana encrypts these secrets before they are written to the database, by using a symmetric-key encryption algorithm called Advanced Encryption Standard (AES), and using a [secret key]({{< relref "../administration/configuration/#secret_key" >}}) that you can change when you configure a new Grafana instance.
|
||||||
|
|
||||||
|
You can also use envelope encryption, which complements a KMS integration by adding a layer of indirection to the encryption process.
|
||||||
@@ -23,3 +23,4 @@ Before you begin using Grafana 8 alerting, we recommend that you familiarize you
|
|||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
- The Grafana 8 alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch rules from other supported data sources.
|
- The Grafana 8 alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch rules from other supported data sources.
|
||||||
|
- Our aim is to support the latest two [minor](https://semver.org/) versions of both Prometheus and Alertmanager, older versions might work without any guarantees. As an example, if the current Prometheus version is `2.31.1`, we would support `>= 2.29.0`.
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Use the classic condition expression to create a rule that triggers a single ale
|
|||||||
|
|
||||||
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
|
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
|
||||||
|
|
||||||
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data]({{< relref "../fundamentals/grafana-managed-numeric-rule.md" >}})).
|
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data]({{< relref "../fundamentals/evaluate-grafana-alerts.md#alerting-on-numeric-data-1" >}})).
|
||||||
- Add a `Math` expression with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not fire, or a positive number if it should fire. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other.
|
- Add a `Math` expression with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not fire, or a positive number if it should fire. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other.
|
||||||
|
|
||||||

|

|
||||||
@@ -63,13 +63,14 @@ For more information, see [expressions documentation]({{< relref "../../../panel
|
|||||||
|
|
||||||
Configure alerting behavior in the absence of data using information in the following tables.
|
Configure alerting behavior in the absence of data using information in the following tables.
|
||||||
|
|
||||||
| No Data Option | Description |
|
| No Data Option | Description |
|
||||||
| -------------- | ----------------------------------------------------------------------------------------------------- |
|
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| No Data | Set alert state to `NoData` and rule state to `Normal` (notifications are not sent on NoData states). |
|
| No Data | Create a new alert `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||||
| Alerting | Set alert rule state to `Alerting`. |
|
| Alerting | Set alert rule state to `Alerting`. |
|
||||||
| Ok | Set alert rule state to `Normal`. |
|
| Ok | Set alert rule state to `Normal`. |
|
||||||
|
|
||||||
| Error or timeout option | Description |
|
| Error or timeout option | Description |
|
||||||
| ----------------------- | ---------------------------------- |
|
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| Alerting | Set alert rule state to `Alerting` |
|
| Alerting | Set alert rule state to `Alerting` |
|
||||||
| OK | Set alert rule state to `Normal` |
|
| OK | Set alert rule state to `Normal` |
|
||||||
|
| Error | Create a new alert `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||||
|
|||||||
@@ -8,48 +8,23 @@ weight = 200
|
|||||||
|
|
||||||
# AWS CloudWatch data source
|
# AWS CloudWatch data source
|
||||||
|
|
||||||
Grafana ships with built-in support for CloudWatch. Add it as a data source, then you are ready to build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs.
|
Grafana ships with built-in support for CloudWatch. This topic describes queries, templates, variables, and other configuration specific to the CloudWatch data source. For instructions on how to add a data source to Grafana, refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}). Only users with the organization admin role can add data sources.
|
||||||
|
|
||||||
This topic describes queries, templates, variables, and other configuration specific to the CloudWatch data source. For instructions on how to add a data source to Grafana, refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}). Only users with the organization admin role can add data sources.
|
Once you have added the Cloudwatch data source, you can build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs.
|
||||||
|
|
||||||
> **Note:** If you are having issues setting up the data source and Grafana is returning undescriptive errors, then check the log file located in /var/log/grafana/grafana.log).
|
> **Note:** For troubleshooting issues when setting up the Cloudwatch data source, check the `/var/log/grafana/grafana.log` file.
|
||||||
|
|
||||||
## Cloudwatch settings
|
## Configure the CloudWatch data source
|
||||||
|
|
||||||
To access data source settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the AWS Cloudwatch data source.
|
To access data source settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the AWS Cloudwatch data source.
|
||||||
|
|
||||||
| Name | Description |
|
|
||||||
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
|
||||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
|
||||||
| `Default Region` | Used in query editor to set region (can be changed on per query basis) |
|
|
||||||
| `Custom Metrics namespace` | Specify the CloudWatch namespace of Custom metrics |
|
|
||||||
| `Auth Provider` | Specify the provider to get credentials. |
|
|
||||||
| `Credentials` profile name | Specify the name of the profile to use (if you use `~/.aws/credentials` file), leave blank for default. |
|
|
||||||
| `Assume Role Arn` | Specify the ARN of the role to assume |
|
|
||||||
| `External ID` | If you are assuming a role in another account, that has been created with an external ID, specify the external ID here. |
|
|
||||||
|
|
||||||
### X-Ray trace links
|
|
||||||
|
|
||||||
Link an X-Ray data source in the "X-Ray trace link" section of the configuration page to automatically add links in your logs when the log contains `@xrayTraceId` field.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
The data source select will contain only existing data source instances of type X-Ray so in order to use this feature you need to have existing X-Ray data source already configured, see [X-Ray docs](https://grafana.com/grafana/plugins/grafana-x-ray-datasource/) for details.
|
|
||||||
|
|
||||||
The X-Ray link will then appear in the log details section which is accessible by clicking on the log row either in Explore or in dashboard [Logs panel]({{< relref "../../visualizations/logs-panel.md" >}}). To log the `@xrayTraceId` in your logs see the [AWS X-Ray documentation](https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-services.html). To provide the field to Grafana your log queries also have to contain the `@xrayTraceId` field, for example using query `fields @message, @xrayTraceId`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Authentication
|
|
||||||
|
|
||||||
For authentication options and configuration details, see [AWS authentication]({{< relref "aws-authentication.md" >}}) topic.
|
For authentication options and configuration details, see [AWS authentication]({{< relref "aws-authentication.md" >}}) topic.
|
||||||
|
|
||||||
## IAM policies
|
### CloudWatch specific data source configuration
|
||||||
|
|
||||||
Grafana needs permissions granted via IAM to be able to read CloudWatch metrics
|
#### IAM policies
|
||||||
and EC2 tags/instances/regions. You can attach these permissions to IAM roles and
|
|
||||||
utilize Grafana's built-in support for assuming roles.
|
Grafana needs permissions granted via IAM to be able to read CloudWatch metrics and EC2 tags/instances/regions/alarms. You can attach these permissions to the IAM role or IAM user configured in the previous step.
|
||||||
|
|
||||||
Here is a minimal policy example:
|
Here is a minimal policy example:
|
||||||
|
|
||||||
@@ -100,30 +75,53 @@ Here is a minimal policy example:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using the Query Editor
|
#### Namespaces of Custom Metrics
|
||||||
|
|
||||||
|
Grafana is not able to load custom namespaces through the GetMetricData API. If you still want your custom metrics to show up in the fields in the query editor, you can specify the names of the namespaces containing the custom metrics in the _Namespaces of Custom Metrics_ field. The field accepts a multiple namespaces, separated by a comma.
|
||||||
|
|
||||||
|
#### X-Ray trace links
|
||||||
|
|
||||||
|
Link an X-Ray data source in the "X-Ray trace link" section of the configuration page to automatically add links in your logs when the log contains `@xrayTraceId` field.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The data source select will contain only existing data source instances of type X-Ray so in order to use this feature you need to have existing X-Ray data source already configured, see [X-Ray docs](https://grafana.com/grafana/plugins/grafana-x-ray-datasource/) for details.
|
||||||
|
|
||||||
|
The X-Ray link will then appear in the log details section which is accessible by clicking on the log row either in Explore or in dashboard [Logs panel]({{< relref "../../visualizations/logs-panel.md" >}}). To log the `@xrayTraceId` in your logs see the [AWS X-Ray documentation](https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-services.html). To provide the field to Grafana your log queries also have to contain the `@xrayTraceId` field, for example using query `fields @message, @xrayTraceId`.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## CloudWatch query editor
|
||||||
|
|
||||||
The CloudWatch data source can query data from both CloudWatch metrics and CloudWatch Logs APIs, each with its own specialized query editor. You select which API you want to query with using the query mode switch on top of the editor.
|
The CloudWatch data source can query data from both CloudWatch metrics and CloudWatch Logs APIs, each with its own specialized query editor. You select which API you want to query with using the query mode switch on top of the editor.
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/v70/cloudwatch-metrics-query-field.png" max-width="800px" class="docs-image--left" caption="CloudWatch metrics query field" >}}
|

|
||||||
{{< figure src="/static/img/docs/v70/cloudwatch-logs-query-field.png" max-width="800px" class="docs-image--right" caption="CloudWatch Logs query field" >}}
|
|
||||||
|
|
||||||
## Using the Metric Query Editor
|
### Metrics query editor
|
||||||
|
|
||||||
To create a valid query, you need to specify the namespace, metric name and at least one statistic. If `Match Exact` is enabled, you also need to specify all the dimensions of the metric you’re querying, so that the [metric schema](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html) matches exactly. If `Match Exact` is off, you can specify any number of dimensions by which you’d like to filter. Up to 100 metrics matching your filter criteria will be returned.
|
The metrics query editor allows you to build two types of queries - **Metric Search** and **Metric Query**.
|
||||||
|
|
||||||
### Dynamic queries using dimension wildcards
|
#### Using the Metric Search option
|
||||||
|
|
||||||
|
To create a valid Metric Search query specify the namespace, metric name and at least one statistic.
|
||||||
|
|
||||||
|
If `Match Exact` is enabled, you also need to specify all the dimensions of the metric you’re querying, so that the [metric schema](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html) matches exactly. If `Match Exact` is disabled, you can specify any number of dimensions by which you’d like to filter. Up to 100 metrics matching your filter criteria will be returned.
|
||||||
|
|
||||||
|
##### Dynamic queries using dimension wildcards
|
||||||
|
|
||||||
You can monitor a dynamic list of metrics by using the asterisk (\*) wildcard for one or more dimension values.
|
You can monitor a dynamic list of metrics by using the asterisk (\*) wildcard for one or more dimension values.
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/v65/cloudwatch-dimension-wildcard.png" max-width="800px" class="docs-image--right" caption="CloudWatch dimension wildcard" >}}
|

|
||||||
|
|
||||||
In this example, the query returns all metrics in the namespace `AWS/EC2` with a metric name of `CPUUtilization` and ANY value for the `InstanceId` dimension are queried. This can help you monitor metrics for AWS resources, like EC2 instances or containers. For example, when new instances are created as part of an auto scaling event, they will automatically appear in the graph without needing to track the new instance IDs. This capability is currently limited to retrieving up to 100 metrics.
|
In this example, the query returns all metrics in the namespace `AWS/EC2` with a metric name of `CPUUtilization` and ANY value for the `InstanceId` dimension are queried. This can help you monitor metrics for AWS resources, like EC2 instances or containers. When new instances are created as part of an auto scaling event, they will automatically appear in the graph without you having to track the new instance IDs. This capability is currently limited to retrieving up to 100 metrics.
|
||||||
|
|
||||||
Click on `Show Query Preview` to see the search expression that is automatically built to support wildcards. To learn more about search expressions, visit the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html). By default, the search expression is defined in such a way that the queried metrics must match the defined dimension names exactly. This means that in the example only metrics with exactly one dimension with name ‘InstanceId’ will be returned.
|
You can expand the [Query inspector](https://grafana.com/docs/grafana/latest/panels/queries/#query-inspector-button) button and click `Meta Data` to see the search expression that is automatically built to support wildcards. To learn more about search expressions, visit the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html). By default, the search expression is defined in such a way that the queried metrics must match the defined dimension names exactly. This means that in the example only metrics with exactly one dimension with the name ‘InstanceId’ will be returned.
|
||||||
|
|
||||||
You can untoggle `Match Exact` to include metrics that have other dimensions defined. Disabling `Match Exact` also creates a search expression even if you don’t use wildcards. We simply search for any metric that matches at least the namespace, metric name, and all defined dimensions.
|

|
||||||
|
|
||||||
### Multi-value template variables
|
You can disable `Match Exact` to include metrics that have other dimensions defined. Disabling `Match Exact` also creates a search expression even if you don’t use wildcards. We simply search for any metric that matches at least the namespace, metric name, and all defined dimensions.
|
||||||
|
|
||||||
|
##### Multi-value template variables
|
||||||
|
|
||||||
When defining dimension values based on multi-valued template variables, a search expression is used to query for the matching metrics. This enables the use of multiple template variables in one query and also allows you to use template variables for queries that have the `Match Exact` option disabled.
|
When defining dimension values based on multi-valued template variables, a search expression is used to query for the matching metrics. This enables the use of multiple template variables in one query and also allows you to use template variables for queries that have the `Match Exact` option disabled.
|
||||||
|
|
||||||
@@ -131,7 +129,7 @@ Search expressions are currently limited to 1024 characters, so your query may f
|
|||||||
|
|
||||||
The use of multi-valued template variables is only supported for dimension values. Using multi-valued template variables for `Region`, `Namespace`, or `Metric Name` is not supported.
|
The use of multi-valued template variables is only supported for dimension values. Using multi-valued template variables for `Region`, `Namespace`, or `Metric Name` is not supported.
|
||||||
|
|
||||||
### Metric math expressions
|
##### Metric math expressions
|
||||||
|
|
||||||
You can create new time series metrics by operating on top of CloudWatch metrics using mathematical functions. Arithmetic operators, unary subtraction and other functions are supported and can be applied to CloudWatch metrics. More details on the available functions can be found on [AWS Metric Math](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html)
|
You can create new time series metrics by operating on top of CloudWatch metrics using mathematical functions. Arithmetic operators, unary subtraction and other functions are supported and can be applied to CloudWatch metrics. More details on the available functions can be found on [AWS Metric Math](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html)
|
||||||
|
|
||||||
@@ -139,13 +137,7 @@ As an example, if you want to apply arithmetic operations on a metric, you can d
|
|||||||
|
|
||||||
Please note that in the case you use the expression field to reference another query, like `queryA * 2`, it will not be possible to create an alert rule based on that query.
|
Please note that in the case you use the expression field to reference another query, like `queryA * 2`, it will not be possible to create an alert rule based on that query.
|
||||||
|
|
||||||
### Period
|
##### Deep linking from Grafana panels to the CloudWatch console
|
||||||
|
|
||||||
A period is the length of time associated with a specific Amazon CloudWatch statistic. Periods are defined in numbers of seconds, and valid values for period are 1, 5, 10, 30, or any multiple of 60.
|
|
||||||
|
|
||||||
If the period field is left blank or set to `auto`, then it calculates automatically based on the time range and [cloudwatch's retention policy](https://aws.amazon.com/about-aws/whats-new/2016/11/cloudwatch-extends-metrics-retention-and-new-user-interface/). The formula used is `time range in seconds / 2000`, and then it snaps to the next higher value in an array of predefined periods `[60, 300, 900, 3600, 21600, 86400]` after removing periods based on retention. By clicking `Show Query Preview` in the query editor, you can see what period Grafana used.
|
|
||||||
|
|
||||||
### Deep linking from Grafana panels to the CloudWatch console
|
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/v65/cloudwatch-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch deep linking" >}}
|
{{< figure src="/static/img/docs/v65/cloudwatch-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch deep linking" >}}
|
||||||
|
|
||||||
@@ -153,257 +145,140 @@ Left clicking a time series in the panel shows a context menu with a link to `Vi
|
|||||||
|
|
||||||
This feature is not available for metrics that are based on metric math expressions.
|
This feature is not available for metrics that are based on metric math expressions.
|
||||||
|
|
||||||
## Using the Logs Query Editor
|
### Using the Metric Query option
|
||||||
|
|
||||||
To query CloudWatch Logs, select the region and up to 20 log groups which you want to query. Use the main input area to write your query in [CloudWatch Logs Query Language](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html)
|
> **Note:** This query option is available in Grafana 8.3 and higher versions only.
|
||||||
|
|
||||||
|
Metrics Query in the CloudWatch plugin is what is referred to as **Metric Insights** in the AWS console. It's a fast, flexible, SQL-based query engine that enables you to identify trends and patterns across millions of operational metrics in real time. It uses a dialect of SQL. The query syntax is as follows.
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
SELECT FUNCTION(MetricName)
|
||||||
|
FROM Namespace | SCHEMA(...)
|
||||||
|
[ WHERE labelKey OPERATOR labelValue [AND|...]]
|
||||||
|
[ GROUP BY labelKey [, ...]]
|
||||||
|
[ ORDER BY FUNCTION() [DESC | ASC] ]
|
||||||
|
[ LIMIT number]
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
The following table provides basic explanation of the query keywords. For details about the Metrics Insights syntax, refer to the [AWS documentation](https://docs.aws.amazon.com/console/cloudwatch/metricsinsights-syntax).
|
||||||
|
|
||||||
|
| Keyword | Description |
|
||||||
|
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `FUNCTION` | Required. Specifies the aggregate function to use, and also specifies the name of the metric that is to be queried. Valid values are AVG, COUNT, MAX, MIN, and SUM |
|
||||||
|
| `MetricName` | Required. For example, `CPUUtilization`. |
|
||||||
|
| `FROM` | Required. Specifies the source of the metric. You can specify either the metric namespace that contains the metric that is to be queried, or a SCHEMA table function. Some namespace examples are 1`AWS/EC2`, `AWS/Lambda`. |
|
||||||
|
| `SCHEMA` | Optional. Allows you to narrow down the query results to only the metrics that is an exact match or to metrics that do noy match. |
|
||||||
|
| `WHERE` | Optional. Filters the results to only those metrics that match your specified expression. For example, `WHERE InstanceType != 'c3.4xlarge'`. |
|
||||||
|
| `GROUP BY` | Optional. Groups the query results into multiple time series. For example, `GROUP BY ServiceName`. |
|
||||||
|
| `ORDER BY` | Optional. Specifies the order of time series that are returned. Options are `ASC`, `DESC`. |
|
||||||
|
| `LIMIT` | Optional. Limits the number of time series returned. |
|
||||||
|
|
||||||
|
For information about limits for the Metrics Insights, please refer to the [AWS documentation](https://docs.aws.amazon.com/console/cloudwatch/metricsinsights).
|
||||||
|
|
||||||
|
**Builder mode**
|
||||||
|
|
||||||
|
To create a query in Builder mode:
|
||||||
|
|
||||||
|
1. Browse and select a metric namespace, metric name, filter, group, and order options using information from the table above.
|
||||||
|
1. For each of these options, choose from the list of possible options.
|
||||||
|
|
||||||
|
Grafana automatically constructs a SQL query based on your selections.
|
||||||
|
|
||||||
|
**Code mode**
|
||||||
|
|
||||||
|
To create a query in the Code mode:
|
||||||
|
|
||||||
|
1. Write your SQL query.
|
||||||
|
1. To run the query, click the **Run query** above the code editor.
|
||||||
|
|
||||||
|
The code editor has a built in autocomplete feature that gives suggestions for keywords, aggregations, namespaces, metrics, labels and label values. The suggestions are shown when hitting space, comma or dollar character. You can also use the keyboard combination CTRL+Space.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> **Note:** Usage of template variables in the code editor might interfere the autocompletion.
|
||||||
|
|
||||||
|
### Common metric query editor fields
|
||||||
|
|
||||||
|
At the bottom of the metric query editor, you'll find three fields that are common to both _Metric Search_ and _Metric Query_.
|
||||||
|
|
||||||
|
#### Id
|
||||||
|
|
||||||
|
The GetMetricData API requires that all queries have a unique ID. Use this field to specify an ID of choice. The ID can include numbers, letters, and underscore, and must start with a lowercase letter. If no ID is specified, grafana will generate an ID using the following pattern `query[refId of the current query row]`, e.g `queryA` for the first query row in the panel editor.
|
||||||
|
|
||||||
|
The ID can be used to reference queries in Metric Math expressions.
|
||||||
|
|
||||||
|
#### Period
|
||||||
|
|
||||||
|
A period is the length of time associated with a specific Amazon CloudWatch statistic. Periods are defined in numbers of seconds, and valid values for period are 1, 5, 10, 30, or any multiple of 60.
|
||||||
|
|
||||||
|
If the period field is left blank or set to `auto`, then it calculates automatically based on the time range and [cloudwatch's retention policy](https://aws.amazon.com/about-aws/whats-new/2016/11/cloudwatch-extends-metrics-retention-and-new-user-interface/). The formula used is `time range in seconds / 2000`, and then it snaps to the next higher value in an array of predefined periods `[60, 300, 900, 3600, 21600, 86400]` after removing periods based on retention. By clicking `Show Query Preview` in the query editor, you can see what period Grafana used.
|
||||||
|
|
||||||
|
#### Alias
|
||||||
|
|
||||||
|
The alias field allows you to override the default name of the metric legend.
|
||||||
|
|
||||||
|
##### Alias patterns
|
||||||
|
|
||||||
|
| Alias Pattern | Description | Example Result |
|
||||||
|
| ---------------------- | ------------------------------------------------------------- | ---------------- |
|
||||||
|
| `{{region}}` | returns the region | `us-east-1` |
|
||||||
|
| `{{period}}` | returns the period | `3000` |
|
||||||
|
| `{{metric}}` | returns the metric | `CPUUtilization` |
|
||||||
|
| `{{label}}` | returns the label returned by the API (only in Metric Search) | `i-01343` |
|
||||||
|
| `{{namespace}}` | returns the namespace (only in Metric Search) | `AWS/EC2` |
|
||||||
|
| `{{stat}}` | returns the statistic (only in Metric Search) | `Average` |
|
||||||
|
| `{{[dimension name]}}` | returns the dimension name (only in Metric Search) | `i-01343` |
|
||||||
|
|
||||||
|
## Using the Logs query editor
|
||||||
|
|
||||||
|
To query CloudWatch Logs:
|
||||||
|
|
||||||
|
1. Select the region and up to 20 log groups which you want to query.
|
||||||
|
1. Use the main input area to write your query in [CloudWatch Logs Query Language](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
|
||||||
|
|
||||||
You can also write queries returning time series data by using the [`stats` command](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_Insights-Visualizing-Log-Data.html). When making `stats` queries in Explore, you have to make sure you are in Metrics Explore mode.
|
You can also write queries returning time series data by using the [`stats` command](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_Insights-Visualizing-Log-Data.html). When making `stats` queries in Explore, you have to make sure you are in Metrics Explore mode.
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/v70/explore-mode-switcher.png" max-width="500px" class="docs-image--right" caption="Explore mode switcher" >}}
|
{{< figure src="/static/img/docs/v70/explore-mode-switcher.png" max-width="500px" class="docs-image--right" caption="Explore mode switcher" >}}
|
||||||
|
|
||||||
To the right of the query input field is a CloudWatch Logs Insights link that opens the CloudWatch Logs Insights console with your query. You can continue exploration there if necessary.
|
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
|
|
||||||
|
|
||||||
### Using template variables
|
|
||||||
|
|
||||||
The CloudWatch data source supports use of template variables in queries.
|
|
||||||
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../variables/_index.md" >}}) documentation.
|
|
||||||
|
|
||||||
### Deep linking from Grafana panels to the CloudWatch console
|
### Deep linking from Grafana panels to the CloudWatch console
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
|
{{< figure src="/static/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
|
||||||
If you'd like to view your query in the CloudWatch Logs Insights console, simply click the `CloudWatch Logs Insights` button next to the query editor.
|
If you'd like to view your query in the CloudWatch Logs Insights console, simply click the `CloudWatch Logs Insights` button next to the query editor.
|
||||||
If you're not currently logged in to the CloudWatch console, the link will forward you to the login page. The provided link is valid for any account but will only display the right metrics if you're logged in to the account that corresponds to the selected data source in Grafana.
|
If you're not currently logged in to the CloudWatch console, the link will forward you to the login page. The provided link is valid for any account but will only display the right metrics if you're logged in to the account that corresponds to the selected data source in Grafana.
|
||||||
|
|
||||||
### Alerting
|
## Alerting
|
||||||
|
|
||||||
Since CloudWatch Logs queries can return numeric data, for example through the use of the `stats` command, alerts are supported.
|
Since CloudWatch Logs queries can return numeric data, for example through the use of the `stats` command, alerts are supported.
|
||||||
For more information on Grafana alerts, refer to [Alerting]({{< relref "../../alerting/_index.md" >}}) documentation.
|
For more information on Grafana alerts, refer to [Alerting]({{< relref "../../alerting/_index.md" >}}) documentation.
|
||||||
|
|
||||||
## Curated dashboards
|
## Configure CloudWatch with grafana.ini
|
||||||
|
|
||||||
The updated CloudWatch data source ships with pre-configured dashboards for five of the most popular AWS services:
|
The Grafana [configuration]({{< relref "../../administration/configuration.md#aws" >}}) file includes an `AWS` section where you can customize the data source.
|
||||||
|
|
||||||
- Amazon Elastic Compute Cloud `Amazon EC2`,
|
| Configuration option | Description |
|
||||||
- Amazon Elastic Block Store `Amazon EBS`,
|
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
- AWS Lambda `AWS Lambda`,
|
| `allowed_auth_providers` | Specifies which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_IAM_role (EC2 IAM role). |
|
||||||
- Amazon CloudWatch Logs `Amazon CloudWatch Logs`, and
|
| `assume_role_enabled` | Allows you to disable `assume role (ARN)` in the CloudWatch data source. By default, assume role (ARN) is enabled for OSS Grafana. |
|
||||||
- Amazon Relational Database Service `Amazon RDS`.
|
| `list_metrics_page_limit` | When a custom namespace is specified in the query editor, the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) is used to populate the _Metrics_ field and the _Dimension_ fields. The API is paginated and returns up to 500 results per page. The CloudWatch data source also limits the number of pages to 500. However, you can change this limit using the `list_metrics_page_limit` variable in the [grafana configuration file](https://grafana.com/docs/grafana/latest/administration/configuration/#aws). |
|
||||||
|
|
||||||
To import the pre-configured dashboards, go to the configuration page of your CloudWatch data source and click on the `Dashboards` tab. Click `Import` for the dashboard you would like to use. To customize the dashboard, we recommend saving the dashboard under a different name, because otherwise the dashboard will be overwritten when a new version of the dashboard is released.
|
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/v65/cloudwatch-dashboard-import.png" caption="CloudWatch dashboard import" >}}
|
|
||||||
|
|
||||||
## Templated queries
|
|
||||||
|
|
||||||
Instead of hard-coding server, application, and sensor names in your metric queries, you can use variables. The variables are listed as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the display of data in your dashboard.
|
|
||||||
|
|
||||||
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../variables/_index.md" >}}) documentation.
|
|
||||||
|
|
||||||
### Query variable
|
|
||||||
|
|
||||||
The CloudWatch data source provides the following queries that you can specify in the `Query` field in the Variable edit view. They allow you to fill a variable's options list with things like `region`, `namespaces`, `metric names` and `dimension keys/values`.
|
|
||||||
|
|
||||||
In place of `region` you can specify `default` to use the default region configured in the data source for the query,
|
|
||||||
e.g. `metrics(AWS/DynamoDB, default)` or `dimension_values(default, ..., ..., ...)`.
|
|
||||||
|
|
||||||
Read more about the available dimensions in the [CloudWatch Metrics and Dimensions Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html).
|
|
||||||
|
|
||||||
| Name | Description |
|
|
||||||
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `regions()` | Returns a list of all AWS regions |
|
|
||||||
| `namespaces()` | Returns a list of namespaces CloudWatch support. |
|
|
||||||
| `metrics(namespace, [region])` | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics) |
|
|
||||||
| `dimension_keys(namespace)` | Returns a list of dimension keys in the namespace. |
|
|
||||||
| `dimension_values(region, namespace, metric, dimension_key, [filters])` | Returns a list of dimension values matching the specified `region`, `namespace`, `metric`, `dimension_key` or you can use dimension `filters` to get more specific result as well. |
|
|
||||||
| `ebs_volume_ids(region, instance_id)` | Returns a list of volume ids matching the specified `region`, `instance_id`. |
|
|
||||||
| `ec2_instance_attribute(region, attribute_name, filters)` | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`. |
|
|
||||||
| `resource_arns(region, resource_type, tags)` | Returns a list of ARNs matching the specified `region`, `resource_type` and `tags`. |
|
|
||||||
| `statistics()` | Returns a list of all the standard statistics |
|
|
||||||
|
|
||||||
For details about the metrics CloudWatch provides, please refer to the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
|
|
||||||
|
|
||||||
#### Examples templated queries
|
|
||||||
|
|
||||||
Example dimension queries which will return list of resources for individual AWS Services:
|
|
||||||
|
|
||||||
| Query | Service |
|
|
||||||
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------- |
|
|
||||||
| `dimension_values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)` | ELB |
|
|
||||||
| `dimension_values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)` | ElastiCache |
|
|
||||||
| `dimension_values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)` | RedShift |
|
|
||||||
| `dimension_values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)` | RDS |
|
|
||||||
| `dimension_values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)` | S3 |
|
|
||||||
| `dimension_values(us-east-1,CWAgent,disk_used_percent,device,{"InstanceId":"$instance_id"})` | CloudWatch Agent |
|
|
||||||
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | ELB |
|
|
||||||
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"Component":["$service"],"Environment":["$environment"]})` | ELB |
|
|
||||||
| `resource_arns(eu-west-1,ec2:instance,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | EC2 |
|
|
||||||
|
|
||||||
## ec2_instance_attribute examples
|
|
||||||
|
|
||||||
### JSON filters
|
|
||||||
|
|
||||||
The `ec2_instance_attribute` query takes `filters` in JSON format.
|
|
||||||
You can specify [pre-defined filters of ec2:DescribeInstances](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html).
|
|
||||||
Note that the actual filtering takes place on Amazon's servers, not in Grafana.
|
|
||||||
|
|
||||||
Filters syntax:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
{ "filter_name1": [ "filter_value1" ], "filter_name2": [ "filter_value2" ] }
|
|
||||||
```
|
|
||||||
|
|
||||||
Example `ec2_instance_attribute()` query
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
ec2_instance_attribute(us - east - 1, InstanceId, { 'tag:Environment': ['production'] });
|
|
||||||
```
|
|
||||||
|
|
||||||
### Selecting attributes
|
|
||||||
|
|
||||||
Only 1 attribute per instance can be returned. Any flat attribute can be selected (i.e. if the attribute has a single value and isn't an object or array). Below is a list of available flat attributes:
|
|
||||||
|
|
||||||
- `AmiLaunchIndex`
|
|
||||||
- `Architecture`
|
|
||||||
- `ClientToken`
|
|
||||||
- `EbsOptimized`
|
|
||||||
- `EnaSupport`
|
|
||||||
- `Hypervisor`
|
|
||||||
- `IamInstanceProfile`
|
|
||||||
- `ImageId`
|
|
||||||
- `InstanceId`
|
|
||||||
- `InstanceLifecycle`
|
|
||||||
- `InstanceType`
|
|
||||||
- `KernelId`
|
|
||||||
- `KeyName`
|
|
||||||
- `LaunchTime`
|
|
||||||
- `Platform`
|
|
||||||
- `PrivateDnsName`
|
|
||||||
- `PrivateIpAddress`
|
|
||||||
- `PublicDnsName`
|
|
||||||
- `PublicIpAddress`
|
|
||||||
- `RamdiskId`
|
|
||||||
- `RootDeviceName`
|
|
||||||
- `RootDeviceType`
|
|
||||||
- `SourceDestCheck`
|
|
||||||
- `SpotInstanceRequestId`
|
|
||||||
- `SriovNetSupport`
|
|
||||||
- `SubnetId`
|
|
||||||
- `VirtualizationType`
|
|
||||||
- `VpcId`
|
|
||||||
|
|
||||||
Tags can be selected by prepending the tag name with `Tags.`
|
|
||||||
|
|
||||||
Example `ec2_instance_attribute()` query
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
ec2_instance_attribute(us - east - 1, Tags.Name, { 'tag:Team': ['sysops'] });
|
|
||||||
```
|
|
||||||
|
|
||||||
## Using JSON format template variables
|
|
||||||
|
|
||||||
Some queries accept filters in JSON format and Grafana supports the conversion of template variables to JSON.
|
|
||||||
|
|
||||||
If `env = 'production', 'staging'`, following query will return ARNs of EC2 instances which `Environment` tag is `production` or `staging`.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
resource_arns(us-east-1, ec2:instance, {"Environment":${env:json}})
|
|
||||||
```
|
|
||||||
|
|
||||||
## Pricing
|
## Pricing
|
||||||
|
|
||||||
The Amazon CloudWatch data source for Grafana uses the `ListMetrics` and `GetMetricData` CloudWatch API calls to list and retrieve metrics.
|
The Amazon CloudWatch data source for Grafana uses the `ListMetrics` and `GetMetricData` CloudWatch API calls to list and retrieve metrics.
|
||||||
Pricing for CloudWatch Logs is based on the amount of data ingested, archived, and analyzed via CloudWatch Logs Insights queries.
|
Pricing for CloudWatch Logs is based on the amount of data ingested, archived, and analyzed via CloudWatch Logs Insights queries.
|
||||||
Please see the [CloudWatch pricing page](https://aws.amazon.com/cloudwatch/pricing/) for more details.
|
Every time you pick a dimension in the query editor Grafana will issue a ListMetrics request. Whenever you make a change to the queries in the query editor, one new request to GetMetricData will be issued.
|
||||||
|
|
||||||
Every time you pick a dimension in the query editor Grafana will issue a ListMetrics request.
|
In Grafana version 6.5 or higher, all API requests to GetMetricStatistics have been replaced with calls to GetMetricData to provide better support for CloudWatch metric math and enables the automatic generation of search expressions when using wildcards or disabling the `Match Exact` option. While GetMetricStatistics qualified for the CloudWatch API free tier, this is not the case for GetMetricData calls.
|
||||||
Whenever you make a change to the queries in the query editor, one new request to GetMetricData will be issued.
|
|
||||||
|
|
||||||
Please note that for Grafana version 6.5 or higher, all API requests to GetMetricStatistics have been replaced with calls to GetMetricData. This change enables better support for CloudWatch metric math and enables the automatic generation of search expressions when using wildcards or disabling the `Match Exact` option. While GetMetricStatistics qualified for the CloudWatch API free tier, this is not the case for GetMetricData calls. For more information, please refer to the [CloudWatch pricing page](https://aws.amazon.com/cloudwatch/pricing/).
|
For more information, please refer to the [CloudWatch pricing page](https://aws.amazon.com/cloudwatch/pricing/).
|
||||||
|
|
||||||
## Service quotas
|
## Service quotas
|
||||||
|
|
||||||
AWS defines quotas, or limits, for resources, actions, and items in your AWS account. Depending on the number of queries in your dashboard and the number of users accessing the dashboard, you may reach the usage limits for various CloudWatch and CloudWatch Logs resources. Note that quotas are defined per account and per region. If you're using multiple regions or have set up more than one CloudWatch data source to query against multiple accounts, you need to request a quota increase for each account and each region in which you hit the limit.
|
AWS defines quotas, or limits, for resources, actions, and items in your AWS account. Depending on the number of queries in your dashboard and the number of users accessing the dashboard, you may reach the usage limits for various CloudWatch and CloudWatch Logs resources. Note that quotas are defined per account and per region. If you're using multiple regions or have set up more than one CloudWatch data source to query against multiple accounts, you need to request a quota increase for each account and each region in which you hit the limit.
|
||||||
|
|
||||||
To request a quota increase, visit the [AWS Service Quotas console](https://console.aws.amazon.com/servicequotas/home?r#!/services/monitoring/quotas/L-5E141212).
|
To request a quota increase, visit the [AWS Service Quotas console](https://console.aws.amazon.com/servicequotas/home?r#!/services/monitoring/quotas/L-5E141212). For more information, refer to the AWS documentation for [Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) and [CloudWatch limits](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_limits.html).
|
||||||
|
|
||||||
Please see the AWS documentation for [Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) and [CloudWatch limits](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_limits.html) for more information.
|
|
||||||
|
|
||||||
## Configure the data source with grafana.ini
|
|
||||||
|
|
||||||
The Grafana [configuration]({{< relref "../../administration/configuration.md#aws" >}}) file includes an `AWS` section where you can customize the data source.
|
|
||||||
|
|
||||||
### allowed_auth_providers
|
|
||||||
|
|
||||||
Specify which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_IAM_role (EC2 IAM role).
|
|
||||||
|
|
||||||
### assume_role_enabled
|
|
||||||
|
|
||||||
Allows you to disable `assume role (ARN)` in the CloudWatch data source. By default, assume role (ARN) is enabled for OSS Grafana.
|
|
||||||
|
|
||||||
### list_metrics_page_limit
|
|
||||||
|
|
||||||
When a custom namespace is specified in the query editor, the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) is used to populate the _Metrics_ field and the _Dimension_ fields. The API is paginated and returns up to 500 results per page. The CloudWatch data source also limits the number of pages to 500. However, you can change this limit using the `list_metrics_page_limit` variable in the [grafana configuration file](https://grafana.com/docs/grafana/latest/administration/configuration/#aws).
|
|
||||||
|
|
||||||
## Configure the data source with provisioning
|
|
||||||
|
|
||||||
You can configure the CloudWatch data source by customizing configuration files in Grafana's provisioning system. To know more about provisioning and learn about available configuration options, refer to the [Provisioning Grafana]({{< relref "../../administration/provisioning/#datasources" >}}) topic.
|
|
||||||
|
|
||||||
Here are some provisioning examples for this data source.
|
|
||||||
|
|
||||||
### Using AWS SDK (default)
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: 1
|
|
||||||
datasources:
|
|
||||||
- name: CloudWatch
|
|
||||||
type: cloudwatch
|
|
||||||
jsonData:
|
|
||||||
authType: default
|
|
||||||
defaultRegion: eu-west-2
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using credentials' profile name (non-default)
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: 1
|
|
||||||
|
|
||||||
datasources:
|
|
||||||
- name: CloudWatch
|
|
||||||
type: cloudwatch
|
|
||||||
jsonData:
|
|
||||||
authType: credentials
|
|
||||||
defaultRegion: eu-west-2
|
|
||||||
customMetricsNamespaces: 'CWAgent,CustomNameSpace'
|
|
||||||
profile: secondary
|
|
||||||
```
|
|
||||||
|
|
||||||
### Using `accessKey` and `secretKey`
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: 1
|
|
||||||
|
|
||||||
datasources:
|
|
||||||
- name: CloudWatch
|
|
||||||
type: cloudwatch
|
|
||||||
jsonData:
|
|
||||||
authType: keys
|
|
||||||
defaultRegion: eu-west-2
|
|
||||||
secureJsonData:
|
|
||||||
accessKey: '<your access key>'
|
|
||||||
secretKey: '<your secret key>'
|
|
||||||
```
|
|
||||||
|
|
||||||
### Using AWS SDK Default and ARN of IAM Role to Assume
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
apiVersion: 1
|
|
||||||
datasources:
|
|
||||||
- name: CloudWatch
|
|
||||||
type: cloudwatch
|
|
||||||
jsonData:
|
|
||||||
authType: default
|
|
||||||
assumeRoleArn: arn:aws:iam::123456789012:root
|
|
||||||
defaultRegion: eu-west-2
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ title = "Authentication"
|
|||||||
description = "AWS authentication"
|
description = "AWS authentication"
|
||||||
keywords = ["grafana", "aws", "authentication"]
|
keywords = ["grafana", "aws", "authentication"]
|
||||||
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||||
weight = 205
|
weight = 05
|
||||||
+++
|
+++
|
||||||
|
|
||||||
# AWS authentication
|
# AWS authentication
|
||||||
@@ -12,6 +12,14 @@ Requests from a Grafana plugin to AWS are made on behalf of an IAM role or an IA
|
|||||||
|
|
||||||
All requests to AWS APIs are performed on the server side by the Grafana backend using the official AWS SDK.
|
All requests to AWS APIs are performed on the server side by the Grafana backend using the official AWS SDK.
|
||||||
|
|
||||||
|
This topic has the following sections:
|
||||||
|
|
||||||
|
- [Authentication methods](#authentication-methods)
|
||||||
|
- [Assuming a role](#assuming-a-role)
|
||||||
|
- [Endpoint](#endpoint)
|
||||||
|
- [AWS credentials file](#aws-credentials-file)
|
||||||
|
- [EKS IAM roles for service accounts](#eks-iam-roles-for-service-accounts)
|
||||||
|
|
||||||
## Authentication methods
|
## Authentication methods
|
||||||
|
|
||||||
You can use one of the following authentication methods. Currently, `AWS SDK Default`, `Credentials file` and `Access and secret key` are enabled by default in open source Grafana. You can enable/disable them if necessary if you have server configuration access. For more information, refer to [allowed_auth_providers]({{< relref "../../administration/configuration.md#allowed_auth_providers" >}}) documentation.
|
You can use one of the following authentication methods. Currently, `AWS SDK Default`, `Credentials file` and `Access and secret key` are enabled by default in open source Grafana. You can enable/disable them if necessary if you have server configuration access. For more information, refer to [allowed_auth_providers]({{< relref "../../administration/configuration.md#allowed_auth_providers" >}}) documentation.
|
||||||
@@ -36,18 +44,7 @@ If you are assuming a role in another account that was created with an external
|
|||||||
|
|
||||||
## Endpoint
|
## Endpoint
|
||||||
|
|
||||||
The `Endpoint` field allows you to specify a custom endpoint URL that overrides the default generated endpoint for the CloudWatch API. Leave this field blank if you want to use the default generated endpoint. For more information on why and how to use Service endpoints, refer to the [AWS service endpoints documentation](https://docs.aws.amazon.com/general/latest/gr/rande.html).
|
The `Endpoint` field allows you to specify a custom endpoint URL that overrides the default generated endpoint for the AWS service API. Leave this field blank if you want to use the default generated endpoint. For more information on why and how to use Service endpoints, refer to the [AWS service endpoints documentation](https://docs.aws.amazon.com/general/latest/gr/rande.html).
|
||||||
|
|
||||||
## EKS IAM roles for service accounts
|
|
||||||
|
|
||||||
The Grafana process in the container runs as user 472 (called "grafana"). When Kubernetes mounts your projected credentials, they will by default only be available to the root user. To allow user 472 to access the credentials (and avoid falling back to the IAM role attached to the EC2 instance), you need to provide a [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for your pod.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
securityContext:
|
|
||||||
fsGroup: 472
|
|
||||||
runAsUser: 472
|
|
||||||
runAsGroup: 472
|
|
||||||
```
|
|
||||||
|
|
||||||
## AWS credentials file
|
## AWS credentials file
|
||||||
|
|
||||||
@@ -63,3 +60,14 @@ aws_access_key_id = asdsadasdasdasd
|
|||||||
aws_secret_access_key = dasdasdsadasdasdasdsa
|
aws_secret_access_key = dasdasdsadasdasdasdsa
|
||||||
region = us-west-2
|
region = us-west-2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## EKS IAM roles for service accounts
|
||||||
|
|
||||||
|
The Grafana process in the container runs as user 472 (called "grafana"). When Kubernetes mounts your projected credentials, they will by default only be available to the root user. To allow user 472 to access the credentials (and avoid falling back to the IAM role attached to the EC2 instance), you need to provide a [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for your pod.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 472
|
||||||
|
runAsUser: 472
|
||||||
|
runAsGroup: 472
|
||||||
|
```
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
+++
|
||||||
|
title = "Curated CloudWatch dashboards"
|
||||||
|
description = "Guide for using AWS CloudWatch in Grafana"
|
||||||
|
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
|
||||||
|
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||||
|
weight = 15
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Curated CloudWatch dashboards
|
||||||
|
|
||||||
|
The updated CloudWatch data source ships with pre-configured dashboards for five of the most popular AWS services:
|
||||||
|
|
||||||
|
- Amazon Elastic Compute Cloud `Amazon EC2`,
|
||||||
|
- Amazon Elastic Block Store `Amazon EBS`,
|
||||||
|
- AWS Lambda `AWS Lambda`,
|
||||||
|
- Amazon CloudWatch Logs `Amazon CloudWatch Logs`, and
|
||||||
|
- Amazon Relational Database Service `Amazon RDS`.
|
||||||
|
|
||||||
|
To import curatedd dashboards:
|
||||||
|
|
||||||
|
1. On the configuration page of your CloudWatch data source, click the **Dashboards** tab.
|
||||||
|
|
||||||
|
1. Click **Import** for the dashboard you would like to use.
|
||||||
|
|
||||||
|
In case you want to customize a dashboard, we recommend that you save it under a different name. Otherwise the dashboard will be overwritten when a new version of the dashboard is released.
|
||||||
|
|
||||||
|
{{< figure src="/static/img/docs/v65/cloudwatch-dashboard-import.png" caption="CloudWatch dashboard import" >}}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
+++
|
||||||
|
title = "Provision CloudWatch"
|
||||||
|
description = "Guide for provisioning CloudWatch"
|
||||||
|
weight = 400
|
||||||
|
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Provision CloudWatch data source
|
||||||
|
|
||||||
|
You can configure the CloudWatch data source by customizing configuration files in Grafana's provisioning system. To know more about provisioning and learn about available configuration options, refer to the [Provisioning Grafana]({{< relref "../../administration/provisioning/#datasources" >}}) topic.
|
||||||
|
|
||||||
|
Here are some provisioning examples for this data source.
|
||||||
|
|
||||||
|
## Using AWS SDK (default)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: 1
|
||||||
|
datasources:
|
||||||
|
- name: CloudWatch
|
||||||
|
type: cloudwatch
|
||||||
|
jsonData:
|
||||||
|
authType: default
|
||||||
|
defaultRegion: eu-west-2
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using credentials' profile name (non-default)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: CloudWatch
|
||||||
|
type: cloudwatch
|
||||||
|
jsonData:
|
||||||
|
authType: credentials
|
||||||
|
defaultRegion: eu-west-2
|
||||||
|
customMetricsNamespaces: 'CWAgent,CustomNameSpace'
|
||||||
|
profile: secondary
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using accessKey and secretKey
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: 1
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
- name: CloudWatch
|
||||||
|
type: cloudwatch
|
||||||
|
jsonData:
|
||||||
|
authType: keys
|
||||||
|
defaultRegion: eu-west-2
|
||||||
|
secureJsonData:
|
||||||
|
accessKey: '<your access key>'
|
||||||
|
secretKey: '<your secret key>'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using AWS SDK Default and ARN of IAM Role to Assume
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: 1
|
||||||
|
datasources:
|
||||||
|
- name: CloudWatch
|
||||||
|
type: cloudwatch
|
||||||
|
jsonData:
|
||||||
|
authType: default
|
||||||
|
assumeRoleArn: arn:aws:iam::123456789012:root
|
||||||
|
defaultRegion: eu-west-2
|
||||||
|
```
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
+++
|
||||||
|
title = "Template variables in CloudWatch query"
|
||||||
|
description = "Template variables in CloudWatch queryh"
|
||||||
|
weight = 10
|
||||||
|
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Using template variables in CloudWatch queries
|
||||||
|
|
||||||
|
Instead of hard-coding server, application, and sensor names in your metric queries, you can use variables. The variables are listed as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the display of data in your dashboard.
|
||||||
|
|
||||||
|
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../variables/_index.md" >}}) documentation.
|
||||||
|
|
||||||
|
## Query variable
|
||||||
|
|
||||||
|
The CloudWatch data source provides the following queries that you can specify in the `Query` field in the Variable edit view. They allow you to fill a variable's options list with things like `region`, `namespaces`, `metric names` and `dimension keys/values`.
|
||||||
|
|
||||||
|
In place of `region` you can specify `default` to use the default region configured in the data source for the query,
|
||||||
|
e.g. `metrics(AWS/DynamoDB, default)` or `dimension_values(default, ..., ..., ...)`.
|
||||||
|
|
||||||
|
Read more about the available dimensions in the [CloudWatch Metrics and Dimensions Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html).
|
||||||
|
|
||||||
|
| Name | Description |
|
||||||
|
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `regions()` | Returns a list of all AWS regions |
|
||||||
|
| `namespaces()` | Returns a list of namespaces CloudWatch support. |
|
||||||
|
| `metrics(namespace, [region])` | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics) |
|
||||||
|
| `dimension_keys(namespace)` | Returns a list of dimension keys in the namespace. |
|
||||||
|
| `dimension_values(region, namespace, metric, dimension_key, [filters])` | Returns a list of dimension values matching the specified `region`, `namespace`, `metric`, `dimension_key` or you can use dimension `filters` to get more specific result as well. |
|
||||||
|
| `ebs_volume_ids(region, instance_id)` | Returns a list of volume ids matching the specified `region`, `instance_id`. |
|
||||||
|
| `ec2_instance_attribute(region, attribute_name, filters)` | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`. |
|
||||||
|
| `resource_arns(region, resource_type, tags)` | Returns a list of ARNs matching the specified `region`, `resource_type` and `tags`. |
|
||||||
|
| `statistics()` | Returns a list of all the standard statistics |
|
||||||
|
|
||||||
|
For details about the metrics CloudWatch provides, please refer to the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
|
||||||
|
|
||||||
|
## Example of templated queries
|
||||||
|
|
||||||
|
Here is an example of the dimension queries which will return list of resources for individual AWS Services:
|
||||||
|
|
||||||
|
| Query | Service |
|
||||||
|
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------- |
|
||||||
|
| `dimension_values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)` | ELB |
|
||||||
|
| `dimension_values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)` | ElastiCache |
|
||||||
|
| `dimension_values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)` | RedShift |
|
||||||
|
| `dimension_values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)` | RDS |
|
||||||
|
| `dimension_values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)` | S3 |
|
||||||
|
| `dimension_values(us-east-1,CWAgent,disk_used_percent,device,{"InstanceId":"$instance_id"})` | CloudWatch Agent |
|
||||||
|
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | ELB |
|
||||||
|
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"Component":["$service"],"Environment":["$environment"]})` | ELB |
|
||||||
|
| `resource_arns(eu-west-1,ec2:instance,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | EC2 |
|
||||||
|
|
||||||
|
## Using JSON format template variables
|
||||||
|
|
||||||
|
Some queries accept filters in JSON format and Grafana supports the conversion of template variables to JSON.
|
||||||
|
|
||||||
|
If `env = 'production', 'staging'`, following query will return ARNs of EC2 instances which `Environment` tag is `production` or `staging`.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
resource_arns(us-east-1, ec2:instance, {"Environment":${env:json}})
|
||||||
|
```
|
||||||
|
|
||||||
|
## ec2_instance_attribute examples
|
||||||
|
|
||||||
|
### JSON filters
|
||||||
|
|
||||||
|
The `ec2_instance_attribute` query takes `filters` in JSON format.
|
||||||
|
You can specify [pre-defined filters of ec2:DescribeInstances](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html).
|
||||||
|
Note that the actual filtering takes place on Amazon's servers, not in Grafana.
|
||||||
|
|
||||||
|
Filters syntax:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{ "filter_name1": [ "filter_value1" ], "filter_name2": [ "filter_value2" ] }
|
||||||
|
```
|
||||||
|
|
||||||
|
Example `ec2_instance_attribute()` query
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
ec2_instance_attribute(us - east - 1, InstanceId, { 'tag:Environment': ['production'] });
|
||||||
|
```
|
||||||
|
|
||||||
|
### Selecting attributes
|
||||||
|
|
||||||
|
Only 1 attribute per instance can be returned. Any flat attribute can be selected (i.e. if the attribute has a single value and isn't an object or array). Below is a list of available flat attributes:
|
||||||
|
|
||||||
|
- `AmiLaunchIndex`
|
||||||
|
- `Architecture`
|
||||||
|
- `ClientToken`
|
||||||
|
- `EbsOptimized`
|
||||||
|
- `EnaSupport`
|
||||||
|
- `Hypervisor`
|
||||||
|
- `IamInstanceProfile`
|
||||||
|
- `ImageId`
|
||||||
|
- `InstanceId`
|
||||||
|
- `InstanceLifecycle`
|
||||||
|
- `InstanceType`
|
||||||
|
- `KernelId`
|
||||||
|
- `KeyName`
|
||||||
|
- `LaunchTime`
|
||||||
|
- `Platform`
|
||||||
|
- `PrivateDnsName`
|
||||||
|
- `PrivateIpAddress`
|
||||||
|
- `PublicDnsName`
|
||||||
|
- `PublicIpAddress`
|
||||||
|
- `RamdiskId`
|
||||||
|
- `RootDeviceName`
|
||||||
|
- `RootDeviceType`
|
||||||
|
- `SourceDestCheck`
|
||||||
|
- `SpotInstanceRequestId`
|
||||||
|
- `SriovNetSupport`
|
||||||
|
- `SubnetId`
|
||||||
|
- `VirtualizationType`
|
||||||
|
- `VpcId`
|
||||||
|
|
||||||
|
Tags can be selected by prepending the tag name with `Tags.`
|
||||||
|
|
||||||
|
Example `ec2_instance_attribute()` query
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
ec2_instance_attribute(us - east - 1, Tags.Name, { 'tag:Team': ['sysops'] });
|
||||||
|
```
|
||||||
@@ -20,12 +20,12 @@ visualize logs or metrics stored in Elasticsearch. You can also annotate your gr
|
|||||||
|
|
||||||
> **Note:** If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
|
> **Note:** If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||||
| `Url` | The HTTP protocol, IP, and port of your Elasticsearch server. |
|
| `Url` | The HTTP protocol, IP, and port of your Elasticsearch server. |
|
||||||
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
|
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. **Note**: Browser (direct) access is deprecated and will be removed in a future release. |
|
||||||
|
|
||||||
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
|
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.
|
||||||
|
|
||||||
|
|||||||
@@ -27,21 +27,19 @@ InfluxDB data source options differ depending on which [query language](#query-l
|
|||||||
|
|
||||||
These options apply if you are using the InfluxQL query language. If you are using Flux, refer to [Flux support in Grafana]({{< relref "influxdb-flux.md" >}}).
|
These options apply if you are using the InfluxQL query language. If you are using Flux, refer to [Flux support in Grafana]({{< relref "influxdb-flux.md" >}}).
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
| --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. We recommend something like `InfluxDB-InfluxQL`. |
|
| `Name` | The data source name. This is how you refer to the data source in panels and queries. We recommend something like `InfluxDB-InfluxQL`. |
|
||||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||||
| `URL` | The HTTP protocol, IP address and port of your InfluxDB API. InfluxDB API port is by default 8086. |
|
| `URL` | The HTTP protocol, IP address and port of your InfluxDB API. InfluxDB API port is by default 8086. |
|
||||||
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
|
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. **Note**: Browser (direct) access is deprecated and will be removed in a future release. |
|
||||||
|
| `Allowed cookies` | Cookies that will be forwarded to the data source. All other cookies will be deleted. |
|
||||||
**Note**: Browser access is deprecated and will be removed in a future release.
|
| `Database` | The ID of the bucket you want to query from, copied from the [Buckets page](https://docs.influxdata.com/influxdb/v2.0/organizations/buckets/view-buckets/) of the InfluxDB UI. |
|
||||||
`Allowed cookies`| Cookies that will be forwarded to the data source. All other cookies will be deleted.
|
| `User` | The username you use to sign into InfluxDB. |
|
||||||
`Database` | The ID of the bucket you want to query from, copied from the [Buckets page](https://docs.influxdata.com/influxdb/v2.0/organizations/buckets/view-buckets/) of the InfluxDB UI.
|
| `Password` | The token you use to query the bucket above, copied from the [Tokens page](https://docs.influxdata.com/influxdb/v2.0/security/tokens/view-tokens/) of the InfluxDB UI. |
|
||||||
`User` | The username you use to sign into InfluxDB.
|
| `HTTP mode` | How to query the database (`GET` or `POST` HTTP verb). The `POST` verb allows heavy queries that would return an error using the `GET` verb. Default is `GET`. |
|
||||||
`Password` | The token you use to query the bucket above, copied from the [Tokens page](https://docs.influxdata.com/influxdb/v2.0/security/tokens/view-tokens/) of the InfluxDB UI.
|
| `Min time interval` | (Optional) Refer to [Min time interval]({{< relref "#min-time-interval" >}}). |
|
||||||
`HTTP mode` | How to query the database (`GET` or `POST` HTTP verb). The `POST` verb allows heavy queries that would return an error using the `GET` verb. Default is `GET`.
|
| `Max series` | (Optional) Limits the number of series/tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have lots of small time series and not all are shown. Defaults to 1000. |
|
||||||
`Min time interval` | (Optional) Refer to [Min time interval]({{< relref "#min-time-interval" >}}).
|
|
||||||
`Max series`| (Optional) Limits the number of series/tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have lots of small time series and not all are shown. Defaults to 1000.
|
|
||||||
|
|
||||||
### Flux
|
### Flux
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
|
|||||||
- **Filter by Trace ID -** Toggle to append the trace ID to the Loki query.
|
- **Filter by Trace ID -** Toggle to append the trace ID to the Loki query.
|
||||||
- **Filter by Span ID -** Toggle to append the span ID to the Loki query.
|
- **Filter by Span ID -** Toggle to append the span ID to the Loki query.
|
||||||
|
|
||||||

|
{{< figure src="/static/img/docs/explore/traces-to-logs-settings-8-2.png" class="docs-image--no-shadow" caption="Screenshot of the trace to logs settings" >}}
|
||||||
|
|
||||||
### Node Graph
|
### Node Graph
|
||||||
|
|
||||||
@@ -49,18 +49,16 @@ This is a configuration for the beta Node Graph visualization. The Node Graph is
|
|||||||
You can query and display traces from Tempo via [Explore]({{< relref "../explore/_index.md" >}}).
|
You can query and display traces from Tempo via [Explore]({{< relref "../explore/_index.md" >}}).
|
||||||
You can search for traces if you set up the trace to logs setting in the data source configuration page. To find traces to visualize, use the [Loki query editor]({{< relref "loki.md#loki-query-editor" >}}). To get search results, you must have [derived fields]({{< relref "loki.md#derived-fields" >}}) configured, which point to this data source.
|
You can search for traces if you set up the trace to logs setting in the data source configuration page. To find traces to visualize, use the [Loki query editor]({{< relref "loki.md#loki-query-editor" >}}). To get search results, you must have [derived fields]({{< relref "loki.md#derived-fields" >}}) configured, which point to this data source.
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/tempo/query-editor-search.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo query editor showing the search tab" >}}
|
{{< figure src="/static/img/docs/tempo/query-editor-search.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo query editor showing the search tab" >}}
|
||||||
|
|
||||||
To query a particular trace, select the **TraceID** query type, and then put the ID into the Trace ID field.
|
To query a particular trace, select the **TraceID** query type, and then put the ID into the Trace ID field.
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo TraceID query type" >}}
|
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo TraceID query type" >}}
|
||||||
|
|
||||||
## Upload JSON trace file
|
## Upload JSON trace file
|
||||||
|
|
||||||
You can upload a JSON file that contains a single trace to visualize it. If the file has multiple traces then the first trace is used for visualization.
|
You can upload a JSON file that contains a single trace to visualize it. If the file has multiple traces then the first trace is used for visualization.
|
||||||
|
|
||||||
{{< figure src="/static/img/docs/explore/tempo-upload-json.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo data source in explore with upload selected" >}}
|
|
||||||
|
|
||||||
Here is an example JSON:
|
Here is an example JSON:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@@ -76,9 +76,9 @@ Learn more about Grafana options and packages.
|
|||||||
|
|
||||||
#### Typescript
|
#### Typescript
|
||||||
|
|
||||||
- [Grafana Data]({{< relref "../../packages_api/data/_index.md" >}})
|
- Grafana Data
|
||||||
- [Grafana Runtime]({{< relref "../../packages_api/runtime/_index.md" >}})
|
- Grafana Runtime
|
||||||
- [Grafana UI]({{< relref "../../packages_api/ui/_index.md" >}})
|
- Grafana UI
|
||||||
|
|
||||||
#### Go
|
#### Go
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ The query editor for Explore is similar to the query editor for the data source
|
|||||||
.setExploreQueryField(ExploreQueryEditor);
|
.setExploreQueryField(ExploreQueryEditor);
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Add a [QueryField]({{< relref "../../packages_api/ui/queryfield.md" >}}) to `ExploreQueryEditor`.
|
1. Add a `QueryField` to `ExploreQueryEditor`.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { QueryField } from '@grafana/ui';
|
import { QueryField } from '@grafana/ui';
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Grafana provides a couple of helper functions to interpolate variables in a stri
|
|||||||
|
|
||||||
## Interpolate variables in panel plugins
|
## Interpolate variables in panel plugins
|
||||||
|
|
||||||
For panels, the [replaceVariables]({{< relref "../../packages_api/data/panelprops.md#replacevariables-property" >}}) function is available in the [PanelProps]({{< relref "../../packages_api/data/panelprops.md" >}}).
|
For panels, the `replaceVariables` function is available in the PanelProps.
|
||||||
|
|
||||||
Add `replaceVariables` to the argument list, and pass it a user-defined template string.
|
Add `replaceVariables` to the argument list, and pass it a user-defined template string.
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ export const SimplePanel: React.FC<Props> = ({ options, data, width, height, rep
|
|||||||
|
|
||||||
## Interpolate variables in data source plugins
|
## Interpolate variables in data source plugins
|
||||||
|
|
||||||
For data sources, you need to use the [getTemplateSrv]({{< relref "../../packages_api/runtime/gettemplatesrv.md" >}}), which returns an instance of [TemplateSrv]({{< relref "../../packages_api/runtime/templatesrv.md" >}}).
|
For data sources, you need to use the getTemplateSrv, which returns an instance of TemplateSrv.
|
||||||
|
|
||||||
1. Import `getTemplateSrv` from the `runtime` package.
|
1. Import `getTemplateSrv` from the `runtime` package.
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ For more information on the available variable formats, refer to [Advanced varia
|
|||||||
|
|
||||||
## Set a variable from your plugin
|
## Set a variable from your plugin
|
||||||
|
|
||||||
Not only can you read the value of a variable, you can also update the variable from your plugin. Use [LocationSrv.update()]({{< relref "../../packages_api/runtime/locationsrv.md/#update-method" >}}) to update a variable using query parameters.
|
Not only can you read the value of a variable, you can also update the variable from your plugin. Use LocationSrv.update()
|
||||||
|
|
||||||
The following example shows how to update a variable called `service`.
|
The following example shows how to update a variable called `service`.
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ export interface MyVariableQuery {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
For a data source to support query variables, you must override the [`metricFindQuery`]({{< relref "../../packages_api/data/datasourceapi.md#metricfindquery-method" >}}) in your `DataSourceApi` class. `metricFindQuery` returns an array of [`MetricFindValue`]({{< relref "../../packages_api/data/metricfindvalue.md" >}}) which has a single property, `text`:
|
For a data source to support query variables, you must override the `metricFindQuery` in your `DataSourceApi` class. `metricFindQuery` returns an array of `MetricFindValue` which has a single property, `text`:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
async metricFindQuery(query: MyVariableQuery, options?: any) {
|
async metricFindQuery(query: MyVariableQuery, options?: any) {
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const frame = new MutableDataFrame({
|
|||||||
|
|
||||||
To help filter log lines, many log systems let you query logs based on metadata, or _labels_.
|
To help filter log lines, many log systems let you query logs based on metadata, or _labels_.
|
||||||
|
|
||||||
You can add labels to a stream of logs by setting the [labels](../../packages_api/data/field.md#labels-property) property on the [Field]({{< relref "../../packages_api/data/field.md" >}}).
|
You can add labels to a stream of logs by setting the labels property on the Field.
|
||||||
|
|
||||||
**Example**:
|
**Example**:
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ title = "Working with data frames"
|
|||||||
|
|
||||||
The data frame is a columnar data structure which allows efficient querying of large amounts of data. Since data frames are a central concept when developing plugins for Grafana, in this guide we'll look at some ways you can use them.
|
The data frame is a columnar data structure which allows efficient querying of large amounts of data. Since data frames are a central concept when developing plugins for Grafana, in this guide we'll look at some ways you can use them.
|
||||||
|
|
||||||
The [DataFrame]({{< relref "../../packages_api/data/dataframe.md" >}}) interface contains a `name` and an array of `fields` where each field contains the name, type, and the values for the field.
|
The DataFrame interface contains a `name` and an array of `fields` where each field contains the name, type, and the values for the field.
|
||||||
|
|
||||||
> **Note:** If you're looking to migrate an existing plugin to use the data frame format, refer to [Migrate to data frames]({{< relref "migration-guide.md#migrate-to-data-frames" >}}).
|
> **Note:** If you're looking to migrate an existing plugin to use the data frame format, refer to [Migrate to data frames]({{< relref "migration-guide.md#migrate-to-data-frames" >}}).
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ The [DataFrame]({{< relref "../../packages_api/data/dataframe.md" >}}) interface
|
|||||||
|
|
||||||
If you build a data source plugin, then you'll most likely want to convert a response from an external API to a data frame. Let's look at how to create a data frame.
|
If you build a data source plugin, then you'll most likely want to convert a response from an external API to a data frame. Let's look at how to create a data frame.
|
||||||
|
|
||||||
Let's start with creating a simple data frame that represents a time series. The easiest way to create a data frame is to use the [toDataFrame]({{< relref "../../packages_api/data/todataframe.md" >}}) function.
|
Let's start with creating a simple data frame that represents a time series. The easiest way to create a data frame is to use the toDataFrame function.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
// Need to be of the same length.
|
// Need to be of the same length.
|
||||||
@@ -78,7 +78,7 @@ for (let i = 0; i < frame.length; i++) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively, you can use the [DataFrameView]({{< relref "../../packages_api/data/dataframeview.md" >}}), which gives you an array of objects that contain a property for each field in the frame.
|
Alternatively, you can use the DataFrameView, which gives you an array of objects that contain a property for each field in the frame.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
const view = new DataFrameView(frame);
|
const view = new DataFrameView(frame);
|
||||||
@@ -113,7 +113,7 @@ return (
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
To apply field options to the name of a field, use [getFieldDisplayName]({{< relref "../../packages_api/data/getfielddisplayname.md" >}}).
|
To apply field options to the name of a field, use getFieldDisplayName.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
const valueField = frame.fields.find((field) => field.type === FieldType.number);
|
const valueField = frame.fields.find((field) => field.type === FieldType.number);
|
||||||
|
|||||||
@@ -21,18 +21,23 @@ Fine-grained access control considers a) _who_ has an access (`identity`), and b
|
|||||||
|
|
||||||
You can grant, change, or revoke access to _users_ (`identity`). When an authenticated user tries to access a Grafana resource, the authorization system checks the required fine-grained permissions for the resource and determines whether or not the action is allowed. Refer to [Fine-grained permissions]({{< relref "./permissions.md" >}}) for a complete list of available permissions.
|
You can grant, change, or revoke access to _users_ (`identity`). When an authenticated user tries to access a Grafana resource, the authorization system checks the required fine-grained permissions for the resource and determines whether or not the action is allowed. Refer to [Fine-grained permissions]({{< relref "./permissions.md" >}}) for a complete list of available permissions.
|
||||||
|
|
||||||
To grant or revoke access to your users, create or remove built-in role assignments. For more information, refer to [Built-in role assignments]({{< relref "./roles.md#built-in-role-assignments" >}}).
|
Refer to [Assign roles]({{< relref "./roles.md#assign-roles" >}}) to learn about grant or revoke access to your users.
|
||||||
|
|
||||||
## Resources with fine-grained permissions
|
## Resources with fine-grained permissions
|
||||||
|
|
||||||
Fine-grained access control is currently available for [Reporting]({{< relref "../reporting.md" >}}) and [Managing Users]({{< relref "../../manage-users/_index.md" >}}).
|
Fine-grained access control is available for the following capabilities:
|
||||||
To learn more about specific endpoints where you can use access control, refer to [Permissions]({{< relref "./permissions.md" >}}) and to the relevant API guide:
|
|
||||||
|
|
||||||
- [Fine-grained access control API]({{< relref "../../http_api/access_control.md" >}})
|
- [Use Explore mode]({{< relref "../../explore/_index.md" >}})
|
||||||
- [Admin API]({{< relref "../../http_api/admin.md" >}})
|
- [Manage users]({{< relref "../../manage-users/_index.md" >}})
|
||||||
- [Organization API]({{< relref "../../http_api/org.md" >}})
|
- [Manage LDAP authentication]({{< relref "../../auth/ldap/_index.md" >}})
|
||||||
- [Reporting API]({{< relref "../../http_api/reporting.md" >}})
|
- [Manage data sources]({{< relref "../../datasources/_index.md" >}})
|
||||||
- [User API]({{< relref "../../http_api/user.md" >}})
|
- [Manage data source permissions]({{< relref "../datasource_permissions.md" >}})
|
||||||
|
- [Manage a Grafana Enterprise license]({{< relref "../license/_index.md" >}})
|
||||||
|
- [Provision Grafana]({{< relref "../../administration/provisioning/_index.md" >}})
|
||||||
|
- [Manage reports]({{< relref "../reporting.md" >}})
|
||||||
|
- [View server information]({{< relref "../../administration/view-server/_index.md" >}})
|
||||||
|
|
||||||
|
To learn about specific endpoints where you can use fine-grained access control, refer to [Permissions]({{< relref "./permissions.md" >}}) and to the relevant [API]({{< relref "../../http_api/_index.md" >}}) documentation.
|
||||||
|
|
||||||
## Enable fine-grained access control
|
## Enable fine-grained access control
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ The reference information that follows complements conceptual information about
|
|||||||
|
|
||||||
| Fixed roles | Permissions | Descriptions |
|
| Fixed roles | Permissions | Descriptions |
|
||||||
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `fixed:roles:reader` | `roles:read`<br>`roles:list`<br>`roles.builtin:list` | Read all access control roles and built-in role assignments. |
|
| `fixed:roles:reader` | `roles:read`<br>`roles:list`<br>`users.roles:list`<br>`users.permissions:list`<br>`roles.builtin:list` | Read all access control roles, roles and permissions assigned to users and built-in role assignments. |
|
||||||
| `fixed:roles:writer` | All permissions from `fixed:roles:reader` and <br>`roles:write`<br>`roles:delete`<br>`roles.builtin:add`<br>`roles.builtin:remove` | Create, read, update, or delete all roles and built-in role assignments. |
|
| `fixed:roles:writer` | All permissions from `fixed:roles:reader` and <br>`roles:write`<br>`roles:delete`<br>`users.roles:add`<br>`users.roles:remove`<br>`roles.builtin:add`<br>`roles.builtin:remove` | Create, read, update, or delete all roles, assign or unassign roles to users and built-in role assignments. |
|
||||||
| `fixed:reports:reader` | `reports:read`<br>`reports:send`<br>`reports.settings:read` | Read all reports and shared report settings. |
|
| `fixed:reports:reader` | `reports:read`<br>`reports:send`<br>`reports.settings:read` | Read all reports and shared report settings. |
|
||||||
| `fixed:reports:writer` | All permissions from `fixed:reports:reader` and <br>`reports.admin:write`<br>`reports:delete`<br>`reports.settings:write` | Create, read, update, or delete all reports and shared report settings. |
|
| `fixed:reports:writer` | All permissions from `fixed:reports:reader` and <br>`reports.admin:write`<br>`reports:delete`<br>`reports.settings:write` | Create, read, update, or delete all reports and shared report settings. |
|
||||||
| `fixed:users:reader` | `users:read`<br>`users.quotas:list`<br>`users.authtoken:list`<br>`users.teams:read` | Read all users and their information, such as team memberships, authentication tokens, and quotas. |
|
| `fixed:users:reader` | `users:read`<br>`users.quotas:list`<br>`users.authtoken:list`<br>`users.teams:read` | Read all users and their information, such as team memberships, authentication tokens, and quotas. |
|
||||||
@@ -35,16 +35,16 @@ The reference information that follows complements conceptual information about
|
|||||||
| `fixed:licensing:reader` | `licensing:read`<br>`licensing.reports:read` | Read licensing information and licensing reports. |
|
| `fixed:licensing:reader` | `licensing:read`<br>`licensing.reports:read` | Read licensing information and licensing reports. |
|
||||||
| `fixed:licensing:writer` | All permissions from `fixed:licensing:viewer` and <br>`licensing:update`<br>`licensing:delete` | Read licensing information and licensing reports, update and delete the license token. |
|
| `fixed:licensing:writer` | All permissions from `fixed:licensing:viewer` and <br>`licensing:update`<br>`licensing:delete` | Read licensing information and licensing reports, update and delete the license token. |
|
||||||
| `fixed:provisioning:writer` | `provisioning:reload` | Reload provisioning. |
|
| `fixed:provisioning:writer` | `provisioning:reload` | Reload provisioning. |
|
||||||
| `fixed:orgs:reader` | `orgs:read`<br>`orgs.quotas:read` | Read the organization and its quotas. |
|
| `fixed:organization:reader` | `orgs:read`<br>`orgs.quotas:read` | Read an organization and its quotas. |
|
||||||
| `fixed:orgs:writer` | All permissions from `fixed:orgs:reader` and <br> `orgs:write`<br>`orgs:delete`<br>`orgs.quotas:write` | Create, read, write, or delete an organization. Read or write its quotas. |
|
| `fixed:organization:writer` | All permissions from `fixed:organization:reader` and <br> `orgs:write`<br>`orgs.preferences:read`<br>`orgs.preferences:write` | Read an organization, its quotas, or its preferences. Update organization properties, or its preferences. |
|
||||||
| `fixed:current.org:reader` | `orgs:read`<br>`orgs.quotas:read` | Read the current organization, such as its ID, name, address, or quotas. |
|
| `fixed:organization:maintainer` | All permissions from `fixed:organization:reader` and <br> `orgs:write`<br>`orgs:create`<br>`orgs:delete`<br>`orgs.quotas:write` | Create, read, write, or delete an organization. Read or write its quotas. This role needs to be assigned globally. |
|
||||||
| `fixed:current.org:writer` | All permissions from `fixed:current.orgs:reader` and <br> `orgs:write`<br>`orgs.quotas:write`<br>`orgs.preferences:read`<br>`orgs.preferences:write` | Read the current organization, its quotas, or its preferences. Update the current organization properties, or its preferences. |
|
| |
|
||||||
|
|
||||||
## Default built-in role assignments
|
## Default built-in role assignments
|
||||||
|
|
||||||
| Built-in role | Associated role | Description |
|
| Built-in role | Associated role | Description |
|
||||||
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| Grafana Admin | `fixed:roles:reader`<br>`fixed:roles:writer`<br>`fixed:users:reader`<br>`fixed:users:writer`<br>`fixed:org.users:reader`<br>`fixed:org.users:writer`<br>`fixed:ldap:reader`<br>`fixed:ldap:writer`<br>`fixed:stats:reader`<br>`fixed:settings:reader`<br>`fixed:settings:writer`<br>`fixed:provisioning:writer`<br>`fixed:orgs:reader`<br>`fixed:orgs:writer`<br>`fixed:licensing:reader`<br>`fixed:licensing:writer` | Default [Grafana server administrator]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}) assignments. |
|
| Grafana Admin | `fixed:roles:reader`<br>`fixed:roles:writer`<br>`fixed:users:reader`<br>`fixed:users:writer`<br>`fixed:org.users:reader`<br>`fixed:org.users:writer`<br>`fixed:ldap:reader`<br>`fixed:ldap:writer`<br>`fixed:stats:reader`<br>`fixed:settings:reader`<br>`fixed:settings:writer`<br>`fixed:provisioning:writer`<br>`fixed:organization:reader`<br>`fixed:organization:maintainer`<br>`fixed:licensing:reader`<br>`fixed:licensing:writer` | Default [Grafana server administrator]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}) assignments. |
|
||||||
| Admin | `fixed:reports:reader`<br>`fixed:reports:writer`<br>`fixed:datasources:reader`<br>`fixed:datasources:writer`<br>`fixed:current.org:writer`<br>`fixed:datasources.permissions:reader`<br>`fixed:datasources.permissions:writer`<br> | Default [Grafana organization administrator]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
|
| Admin | `fixed:reports:reader`<br>`fixed:reports:writer`<br>`fixed:datasources:reader`<br>`fixed:datasources:writer`<br>`fixed:organization:writer`<br>`fixed:datasources.permissions:reader`<br>`fixed:datasources.permissions:writer`<br> | Default [Grafana organization administrator]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
|
||||||
| Editor | `fixed:datasources:explorer` | Default [Editor]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
|
| Editor | `fixed:datasources:explorer` | Default [Editor]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
|
||||||
| Viewer | `fixed:datasources:id:reader` | Default [Viewer]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
|
| Viewer | `fixed:datasources:id:reader`<br>`fixed:organization:reader` | Default [Viewer]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
+++
|
||||||
|
title = "Manage role assignments"
|
||||||
|
description = ""
|
||||||
|
keywords = ["grafana", "fine-grained-access-control", "roles", "permissions", "enterprise"]
|
||||||
|
weight = 115
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Manage role assignments
|
||||||
|
|
||||||
|
To grant or revoke access to your users, you can assign [Roles]({{< relref "../roles.md" >}}) to users, [Organization roles]({{< relref "../../../permissions/organization_roles.md" >}}) and [Grafana Server Admin]({{< relref "../../../permissions/_index.md#grafana-server-admin-role" >}}) role.
|
||||||
|
|
||||||
|
The following pages provide more information on how to manage role assignments:
|
||||||
|
|
||||||
|
- [Manage user role assignments]({{< relref "manage-user-role-assignments.md" >}}).
|
||||||
|
- [Manage role assignments to Organization roles and Grafana Server Admin role]({{< relref "manage-built-in-role-assignments.md" >}}).
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
+++
|
||||||
|
title = "Manage built-in role assignments"
|
||||||
|
description = "Manage built-in role assignments"
|
||||||
|
keywords = ["grafana", "fine-grained-access-control", "roles", "permissions", "fine-grained-access-control-usage", "enterprise"]
|
||||||
|
weight = 210
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Built-in role assignments
|
||||||
|
|
||||||
|
To control what your users can access or not, you can assign or unassign [Custom roles]({{< ref "#custom-roles" >}}) or [Fixed roles]({{< ref "#fixed-roles" >}}) to the existing [Organization roles]({{< relref "../../../permissions/organization_roles.md" >}}) or to [Grafana Server Admin]({{< relref "../../../permissions/_index.md#grafana-server-admin-role" >}}) role.
|
||||||
|
These assignments are called built-in role assignments.
|
||||||
|
|
||||||
|
During startup, Grafana will create default assignments for you. When you make any changes to the built-on role assignments, Grafana will take them into account and won’t overwrite during next start.
|
||||||
|
|
||||||
|
For more information, refer to [Fine-grained access control references]({{< relref "../fine-grained-access-control-references.md#default-built-in-role-assignments" >}}).
|
||||||
|
|
||||||
|
# Manage built-in role assignments
|
||||||
|
|
||||||
|
You can create or remove built-in role assignments using [Fine-grained access control API]({{< relref "../../../http_api/access_control.md#create-and-remove-built-in-role-assignments" >}}) or using [Grafana Provisioning]({{< relref "../provisioning.md#manage-default-built-in-role-assignments" >}}).
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
+++
|
||||||
|
title = "Manage user role assignments"
|
||||||
|
description = "Manage user role assignments"
|
||||||
|
keywords = ["grafana", "fine-grained-access-control", "roles", "permissions", "fine-grained-access-control-usage", "enterprise"]
|
||||||
|
weight = 200
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Manage user role assignments
|
||||||
|
|
||||||
|
There are two ways to assign roles directly to users: in the UI using the role picker, and using the API.
|
||||||
|
|
||||||
|
## Manage users' roles within a specific Organization using the role picker
|
||||||
|
|
||||||
|
In order to assign roles to a user within a specific Organization using the role picker, you must have a user account with one of the following:
|
||||||
|
|
||||||
|
- The Admin built-in role.
|
||||||
|
- The Server Admin role.
|
||||||
|
- The fixed role `fixed:permissions:writer`, [assigned for the given Organization]({{< relref "../roles/#scope-of-assignments" >}}).
|
||||||
|
- A custom role with `users.roles:add` and `users.roles:remove` permissions.
|
||||||
|
|
||||||
|
You must also have the permissions granted by the roles that you want to assign or revoke.
|
||||||
|
|
||||||
|
Steps:
|
||||||
|
|
||||||
|
1. Navigate to the Users Configuration page by hovering over **Configuration** (the gear icon) in the left navigation menu and selecting **Users**.
|
||||||
|
1. Click on the **Role** column in the row for the user whose role you would like to edit.
|
||||||
|
1. Deselect one or more selected roles that you would like to remove from that user.
|
||||||
|
1. Select one or more roles that you would like to assign to that user.
|
||||||
|
1. Click the **Apply** button to apply the selected roles to that user.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The user's permissions will update immediately, and the UI will reflect their new permissions the next time they reload their browser or visit a new page.
|
||||||
|
|
||||||
|
**Note**: The roles that you select will be assigned only within the given Organization. For example, if you grant the user the "Data source editor" role while you are in the main Organization, then that user will be able to edit data source in the main Organization but not in others.
|
||||||
|
|
||||||
|
## Manage users' roles in multiple Organizations using the role picker
|
||||||
|
|
||||||
|
In order to assign roles across multiple Organizations to a user using the role picker, you must have a user account with one of the following:
|
||||||
|
|
||||||
|
- The Server Admin built-in role
|
||||||
|
- The fixed role `fixed:permissions:writer`, [assigned globally]({{< relref "../roles/#scope-of-assignments" >}}).
|
||||||
|
- A custom role with `users.roles:add` and `users.roles:remove` permissions, [assigned globally]({{< relref "../roles/#scope-of-assignments" >}}).
|
||||||
|
|
||||||
|
You must also have the permissions granted by the roles that you want to assign or revoke within the Organization in which you're making changes.
|
||||||
|
|
||||||
|
Steps:
|
||||||
|
|
||||||
|
1. Navigate to the Users Admin page by hovering over **Server Admin** (the shield icon) in the left navigation menu and selecting **Users**.
|
||||||
|
1. Click on a user row to edit that user's roles.
|
||||||
|
1. Under the **Organizations** header, you will see a list of roles assigned to that user within each of their Organizations. Click on the roles in an organization to open the role picker.
|
||||||
|
1. Deselect one or more selected roles that you would like to remove from that user.
|
||||||
|
1. Select one or more roles that you would like to assign to that user.
|
||||||
|
1. Click the **Apply** button to apply the selected roles to that user.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The user's permissions will update immediately, and the UI will reflect their new permissions the next time they reload their browser or visit a new page.
|
||||||
|
|
||||||
|
**Note**: The roles that you select will be assigned only within one Organization. For example, if you grant the user the "Data source editor" role in the row for the main Organization, then that user will be able to edit data source in the main Organization but not in others.
|
||||||
|
|
||||||
|
## Manage users' roles via API
|
||||||
|
|
||||||
|
To manage user role assignment via API, refer to the [fine-grained access control HTTP API docs]({{< relref "../../../http_api/access_control.md#create-and-remove-user-role-assignments" >}}).
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
title = "Permissions"
|
title = "Permissions"
|
||||||
description = "Understand fine-grained access control permissions"
|
description = "Understand fine-grained access control permissions"
|
||||||
keywords = ["grafana", "fine-grained access-control", "roles", "permissions", "enterprise"]
|
keywords = ["grafana", "fine-grained access-control", "roles", "permissions", "enterprise"]
|
||||||
weight = 115
|
weight = 110
|
||||||
+++
|
+++
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
@@ -54,6 +54,10 @@ The following list contains fine-grained access control actions.
|
|||||||
| `users:logout` | `global:users:*` <br> `global:users:id:*` | Sign out a user. |
|
| `users:logout` | `global:users:*` <br> `global:users:id:*` | Sign out a user. |
|
||||||
| `users.quotas:list` | `global:users:*` <br> `global:users:id:*` | List a user’s quotas. |
|
| `users.quotas:list` | `global:users:*` <br> `global:users:id:*` | List a user’s quotas. |
|
||||||
| `users.quotas:update` | `global:users:*` <br> `global:users:id:*` | Update a user’s quotas. |
|
| `users.quotas:update` | `global:users:*` <br> `global:users:id:*` | Update a user’s quotas. |
|
||||||
|
| `users.roles:list` | `users:*` | List roles assigned directly to a user. |
|
||||||
|
| `users.roles:add` | `permissions:delegate` | Assign a role to a user. |
|
||||||
|
| `users.roles:remove` | `permissions:delegate` | Unassign a role from a auser. |
|
||||||
|
| `users.permissions:list` | `users:*` | List permissions of a user. |
|
||||||
| `org.users:read` | `users:*` <br> `users:id:*` | Get user profiles within an organization. |
|
| `org.users:read` | `users:*` <br> `users:id:*` | Get user profiles within an organization. |
|
||||||
| `org.users:add` | `users:*` | Add a user to an organization. |
|
| `org.users:add` | `users:*` | Add a user to an organization. |
|
||||||
| `org.users:remove` | `users:*` <br> `users:id:*` | Remove a user from an organization. |
|
| `org.users:remove` | `users:*` <br> `users:id:*` | Remove a user from an organization. |
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ You can create, update, and delete custom roles, as well as create and remove bu
|
|||||||
|
|
||||||
To create or update custom roles, you can add a list of `roles` in the configuration.
|
To create or update custom roles, you can add a list of `roles` in the configuration.
|
||||||
|
|
||||||
Every role has a [version]({{< relref "./roles.md#custom-roles" >}}) number. For each role you update, you must remember to increment it, otherwise changes won't be accounted for.
|
Every role has a [version]({{< relref "./roles.md#custom-roles" >}}) number. For each role you update, you must remember to increment it, otherwise changes won't be applied.
|
||||||
|
|
||||||
When you update a role, the existing role inside Grafana is altered to be exactly what is specified in the YAML file, including permissions.
|
When you update a role, the existing role inside Grafana is altered to be exactly what is specified in the YAML file, including permissions.
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,14 @@ Role names must be unique within an organization.
|
|||||||
|
|
||||||
Roles with names prefixed by `fixed:` are fixed roles created by Grafana and cannot be created or modified by users.
|
Roles with names prefixed by `fixed:` are fixed roles created by Grafana and cannot be created or modified by users.
|
||||||
|
|
||||||
|
### Display name
|
||||||
|
|
||||||
|
A role's display name is intended as a human friendly identifier for the role, helping users understand the purpose of a role. The display name of the role is displayed in the role picker in the UI.
|
||||||
|
|
||||||
|
### Group
|
||||||
|
|
||||||
|
A role's group is used to organize roles in the role picker in the UI.
|
||||||
|
|
||||||
### Role version
|
### Role version
|
||||||
|
|
||||||
The version of a role is a positive integer which defines the current version of the role. When updating a role, you can either omit the version field to increment the previous value by 1 or set a new version which must be strictly larger than the previous version for the update to succeed.
|
The version of a role is a positive integer which defines the current version of the role. When updating a role, you can either omit the version field to increment the previous value by 1 or set a new version which must be strictly larger than the previous version for the update to succeed.
|
||||||
@@ -67,20 +75,13 @@ If a Grafana Server Admin wants to delegate that privilege to other users, they
|
|||||||
|
|
||||||
Note that you won't be able to create, update or delete a custom role with permissions which you yourself do not have. For example, if the only permission you have is a `users:create`, you won't be able to create a role with other permissions.
|
Note that you won't be able to create, update or delete a custom role with permissions which you yourself do not have. For example, if the only permission you have is a `users:create`, you won't be able to create a role with other permissions.
|
||||||
|
|
||||||
## Built-in role assignments
|
## Assign roles
|
||||||
|
|
||||||
To control what your users can access or not, you can assign or unassign [Custom roles]({{< ref "#custom-roles" >}}) or [Fixed roles]({{< ref "#fixed-roles" >}}) to the existing [Organization roles]({{< relref "../../permissions/organization_roles.md" >}}) or to [Grafana Server Admin]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}) role.
|
[Custom roles]({{< ref "#custom-roles" >}}) and [Fixed roles]({{< ref "#fixed-roles" >}}) can be assigned to users, the existing [Organization roles]({{< relref "../../permissions/organization_roles.md" >}}) and to [Grafana Server Admin]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}) role.
|
||||||
These assignments are called built-in role assignments.
|
|
||||||
|
|
||||||
During startup, Grafana will create default assignments for you. When you make any changes to the built-on role assignments, Grafana will take them into account and won’t overwrite during next start.
|
Visit [Manage role assignments]({{< relref "manage-role-assignments/_index.md" >}}) page for more details.
|
||||||
|
|
||||||
For more information, refer to [Fine-grained access control references]({{< relref "./fine-grained-access-control-references.md#default-built-in-role-assignments" >}}).
|
|
||||||
|
|
||||||
## Create and remove built-in role assignments
|
|
||||||
|
|
||||||
You can create or remove built-in role assignments using [Fine-grained access control API]({{< relref "../../http_api/access_control.md" >}}) or using [Grafana Provisioning]({{< relref "./provisioning" >}}).
|
|
||||||
|
|
||||||
### Scope of assignments
|
### Scope of assignments
|
||||||
|
|
||||||
A built-in role assignment can be either _global_ or _organization local_. _Global_ assignments are not mapped to any specific organization and will be applied to all organizations, whereas _organization local_ assignments are only applied for that specific organization.
|
A role assignment can be either _global_ or _organization local_. _Global_ assignments are not mapped to any specific organization and will be applied to all organizations, whereas _organization local_ assignments are only applied for that specific organization.
|
||||||
You can only create _organization local_ assignments for _organization local_ roles.
|
You can only create _organization local_ assignments for _organization local_ roles.
|
||||||
|
|||||||
@@ -132,6 +132,10 @@ Example response:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Manage roles granted directly to users
|
||||||
|
|
||||||
|
To learn about granting roles to users, refer to [Manage user role assignments]({{< relref "manage-role-assignments/manage-user-role-assignments.md" >}}) page.
|
||||||
|
|
||||||
## Create your first custom role
|
## Create your first custom role
|
||||||
|
|
||||||
You can create your custom role by either using an [HTTP API]({{< relref "../../http_api/access_control.md#create-a-new-custom-role" >}}) or by using [Grafana provisioning]({{< relref "./provisioning.md" >}}).
|
You can create your custom role by either using an [HTTP API]({{< relref "../../http_api/access_control.md#create-a-new-custom-role" >}}) or by using [Grafana provisioning]({{< relref "./provisioning.md" >}}).
|
||||||
|
|||||||
@@ -181,6 +181,14 @@ external group.
|
|||||||
| Restore old dashboard version | `{"action": "restore", "resources": [{"type": "dashboard"}]}` |
|
| Restore old dashboard version | `{"action": "restore", "resources": [{"type": "dashboard"}]}` |
|
||||||
| Delete dashboard | `{"action": "delete", "resources": [{"type": "dashboard"}]}` |
|
| Delete dashboard | `{"action": "delete", "resources": [{"type": "dashboard"}]}` |
|
||||||
|
|
||||||
|
#### Library elements management
|
||||||
|
|
||||||
|
| Action | Distinguishing fields |
|
||||||
|
| ---------------------- | ------------------------------------------------------------------ |
|
||||||
|
| Create library element | `{"action": "create", "resources": [{"type": "library-element"}]}` |
|
||||||
|
| Update library element | `{"action": "update", "resources": [{"type": "library-element"}]}` |
|
||||||
|
| Delete library element | `{"action": "delete", "resources": [{"type": "library-element"}]}` |
|
||||||
|
|
||||||
#### Data sources management
|
#### Data sources management
|
||||||
|
|
||||||
| Action | Distinguishing fields |
|
| Action | Distinguishing fields |
|
||||||
@@ -192,11 +200,37 @@ external group.
|
|||||||
| Disable permissions for datasource | `{"action": "disable-permissions", "resources": [{"type": "datasource"}]}` |
|
| Disable permissions for datasource | `{"action": "disable-permissions", "resources": [{"type": "datasource"}]}` |
|
||||||
| Grant datasource permission to role, team, or user | `{"action": "create", "resources": [{"type": "datasource"}, {"type": "dspermission"}]}`\* |
|
| Grant datasource permission to role, team, or user | `{"action": "create", "resources": [{"type": "datasource"}, {"type": "dspermission"}]}`\* |
|
||||||
| Remove datasource permission | `{"action": "delete", "resources": [{"type": "datasource"}, {"type": "dspermission"}]}` |
|
| Remove datasource permission | `{"action": "delete", "resources": [{"type": "datasource"}, {"type": "dspermission"}]}` |
|
||||||
|
| Enable caching for datasource | `{"action": "enable-cache", "resources": [{"type": "datasource"}]}` |
|
||||||
|
| Disable caching for datasource | `{"action": "disable-cache", "resources": [{"type": "datasource"}]}` |
|
||||||
|
| Update datasource caching configuration | `{"action": "update", "resources": [{"type": "datasource"}]}` |
|
||||||
|
|
||||||
\* `resources` may also contain a third item with `"type":` set to `"user"` or `"team"`.
|
\* `resources` may also contain a third item with `"type":` set to `"user"` or `"team"`.
|
||||||
|
|
||||||
#### Alerts and notification channels management
|
#### Alerts and notification channels management
|
||||||
|
|
||||||
|
| Action | Distinguishing fields |
|
||||||
|
| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
|
||||||
|
| Save alert manager configuration | `{"action": "update", "requestUri": "/api/alertmanager/RECIPIENT/config/api/v1/alerts"}` |
|
||||||
|
| Reset alert manager configuration | `{"action": "delete", "requestUri": "/api/alertmanager/RECIPIENT/config/api/v1/alerts"}` |
|
||||||
|
| Create silence | `{"action": "create", "requestUri": "/api/alertmanager/RECIPIENT/api/v2/silences"}` |
|
||||||
|
| Delete silence | `{"action": "delete", "requestUri": "/api/alertmanager/RECIPIENT/api/v2/silences/SILENCE-ID"}` |
|
||||||
|
| Create alert | `{"action": "create", "requestUri": "/api/ruler/RECIPIENT/api/v2/alerts"}` |
|
||||||
|
| Create or update rule group | `{"action": "create-update", "requestUri": "/api/ruler/RECIPIENT/api/v1/rules/NAMESPACE"}` |
|
||||||
|
| Delete rule group | `{"action": "delete", "requestUri": "/api/ruler/RECIPIENT/api/v1/rules/NAMESPACE/GROUP-NAME"}` |
|
||||||
|
| Delete namespace | `{"action": "delete", "requestUri": "/api/ruler/RECIPIENT/api/v1/rules/NAMESPACE"}` |
|
||||||
|
| Test Grafana managed receivers | `{"action": "test", "requestUri": "/api/alertmanager/RECIPIENT/config/api/v1/receivers/test"}` |
|
||||||
|
| Create or update the NGalert configuration of the user's organization | `{"action": "create-update", "requestUri": "/api/v1/ngalert/admin_config"}` |
|
||||||
|
| Delete the NGalert configuration of the user's organization | `{"action": "delete", "requestUri": "/api/v1/ngalert/admin_config"}` |
|
||||||
|
|
||||||
|
Where the following:
|
||||||
|
|
||||||
|
- `RECIPIENT` is `grafana` for requests handled by Grafana or the numeric data source ID for requests forwarded to a data source.
|
||||||
|
- `NAMESPACE` is the string identifier for the rules namespace.
|
||||||
|
- `GROUP-NAME` is the string identifier for the rules group.
|
||||||
|
- `SILENCE-ID` is the ID of the affected silence.
|
||||||
|
|
||||||
|
The following legacy alerting actions are still supported:
|
||||||
|
|
||||||
| Action | Distinguishing fields |
|
| Action | Distinguishing fields |
|
||||||
| --------------------------------- | --------------------------------------------------------------------- |
|
| --------------------------------- | --------------------------------------------------------------------- |
|
||||||
| Test alert rule | `{"action": "test", "resources": [{"type": "panel"}]}` |
|
| Test alert rule | `{"action": "test", "resources": [{"type": "panel"}]}` |
|
||||||
@@ -235,13 +269,6 @@ external group.
|
|||||||
|
|
||||||
#### Provisioning
|
#### Provisioning
|
||||||
|
|
||||||
"resources": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"type": "api-key"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
| Action | Distinguishing fields |
|
| Action | Distinguishing fields |
|
||||||
| -------------------------------- | ------------------------------------------ |
|
| -------------------------------- | ------------------------------------------ |
|
||||||
| Reload provisioned dashboards | `{"action": "provisioning-dashboards"}` |
|
| Reload provisioned dashboards | `{"action": "provisioning-dashboards"}` |
|
||||||
@@ -249,6 +276,13 @@ external group.
|
|||||||
| Reload provisioned plugins | `{"action": "provisioning-plugins"}` |
|
| Reload provisioned plugins | `{"action": "provisioning-plugins"}` |
|
||||||
| Reload provisioned notifications | `{"action": "provisioning-notifications"}` |
|
| Reload provisioned notifications | `{"action": "provisioning-notifications"}` |
|
||||||
|
|
||||||
|
#### Plugins management
|
||||||
|
|
||||||
|
| Action | Distinguishing fields |
|
||||||
|
| ---------------- | ------------------------- |
|
||||||
|
| Install plugin | `{"action": "install"}` |
|
||||||
|
| Uninstall plugin | `{"action": "uninstall"}` |
|
||||||
|
|
||||||
#### Miscellaneous
|
#### Miscellaneous
|
||||||
|
|
||||||
| Action | Distinguishing fields |
|
| Action | Distinguishing fields |
|
||||||
|
|||||||
15
docs/sources/enterprise/kms-integration/_index.md
Normal file
15
docs/sources/enterprise/kms-integration/_index.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
+++
|
||||||
|
title = "KMS integration"
|
||||||
|
description = ""
|
||||||
|
keywords = ["grafana", "kms", "key management system integration"]
|
||||||
|
weight = 1200
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Key management systems (KMSs)
|
||||||
|
|
||||||
|
You can choose to encrypt secrets stored in the Grafana database using a key from a KMS, which is a secure central storage location that is designed to help you to create and manage cryptographic keys and control their use across many services. When you integrate with a KMS, Grafana does not directly store your encryption key. Instead, Grafana stores KMS credentials and the identifier of the key, which Grafana uses to encrypt the database.
|
||||||
|
|
||||||
|
Grafana integrates with the following key management systems:
|
||||||
|
|
||||||
|
- AWS KMS
|
||||||
|
- Azure Key Vault
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
+++
|
||||||
|
title = "AMS KMS"
|
||||||
|
description = "Using AWS KMS to encrypt database secrets"
|
||||||
|
keywords = ["grafana", "AWS KMS integration"]
|
||||||
|
weight = 3
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Using AWS KMS to encrypt database secrets
|
||||||
|
|
||||||
|
You can use an encryption key from AWS Key Management Service to encrypt secrets in the Grafana database.
|
||||||
|
|
||||||
|
**Prerequisites:**
|
||||||
|
|
||||||
|
- An AWS account with permission to view and create KMS keys and programmatic credentials to access those keys
|
||||||
|
- Access to the Grafana [configuration]({{< relref "../../administration/configuration/#config-file-locations" >}}) file
|
||||||
|
|
||||||
|
1. Create a symmetric API key either from the AWS Management Console or by using the AWS KMS API.
|
||||||
|
<br><br>For detailed instructions, refer to [Creating keys](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html).
|
||||||
|
|
||||||
|
2. Retrieve the Key ID.
|
||||||
|
<br><br>In AWS terms, this can be a key ID, a key ARN (Amazon Resource Name), an alias name, or an alias ARN. For more information about how to retrieve a key ID from AWS, refer to [Finding the key ID and key ARN](https://docs.aws.amazon.com/kms/latest/developerguide/find-cmk-id-arn.html).
|
||||||
|
|
||||||
|
3. Create a [programmatic credential](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys) (access key ID and secret access key), which has permission to view the key that you created.
|
||||||
|
<br><br>In AWS, you can control access to your KMS keys by using [key policies](https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html), [IAM policies](https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html), and [grants](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html). You can also create [temporary credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html), which must provide a session token along with an access key ID and a secret access key.
|
||||||
|
|
||||||
|
4. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/envelope-encryption.md" >}}).
|
||||||
|
5. Add your AWS KMS details to the Grafana configuration file; depending on your operating system, it is usually named `grafana.ini`:
|
||||||
|
<br><br>a. Add a new section to the configuration file, with a name in the format of `[security.encryption.awskms.<KEY-NAME>]`, where `<KEY-NAME>` is any name that uniquely identifies this key among other provider keys.
|
||||||
|
<br><br>b. Fill in the section with the following values:
|
||||||
|
<br>
|
||||||
|
|
||||||
|
- `key_id`: a reference to a key stored in the KMS. This can be a key ID, a key Amazon Resource Name (ARN), an alias name, or an alias ARN. If you are using an alias, use the prefix `alias/`. To specify a KMS key in a different AWS account, use its ARN or alias. For more information about how to retrieve a key ID from AWS, refer to [Finding the key ID and key ARN](https://docs.aws.amazon.com/kms/latest/developerguide/find-cmk-id-arn.html).<br>
|
||||||
|
| `key_id` option | Example value |
|
||||||
|
| --- | --- |
|
||||||
|
| Key ID | `1234abcd-12ab-34cd-56ef-1234567890ab` |
|
||||||
|
| Key ARN | `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab` |
|
||||||
|
| Alias name | `alias/ExampleAlias` |
|
||||||
|
| Alias ARN | `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias` |
|
||||||
|
|
||||||
|
- `access_key_id`: The AWS Access Key ID that you previously generated.
|
||||||
|
- `secret_access_key`: The AWS Secret Access Key you previously generated.
|
||||||
|
- `token`: (Optional) An AWS Session Token, which you must provide if you created temporary credentials.
|
||||||
|
- `region`: The AWS region where you created the KMS key. The region is contained in the key’s ARN. For example: `arn:aws:kms:*us-east-2*:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
|
||||||
|
|
||||||
|
An example of an AWS KMS provider section in the `grafana.ini` file is as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
# AWS key management service provider setup
|
||||||
|
;[security.encryption.awskms.example-encryption-key]
|
||||||
|
# Reference to a KMS key - either key ID, key ARN, alias name, or ARN
|
||||||
|
;key_id = 1234abcd-12ab-34cd-56ef-1234567890ab
|
||||||
|
# AWS access key ID
|
||||||
|
;access_key_id = AKIAIOSFODNN7EXAMPLE
|
||||||
|
# AWS secret access key
|
||||||
|
;secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
|
||||||
|
# AWS session token, optional
|
||||||
|
;token = AQoDYXdzEJr...<REMAINDER OF SECURITY TOKEN>
|
||||||
|
# AWS region, for example eu-north-1
|
||||||
|
;region = eu-north-1
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Update the `[security]` section of the `grafana.ini` configuration file with the new Encryption Provider key that you created:
|
||||||
|
|
||||||
|
```
|
||||||
|
[security]
|
||||||
|
# previous encryption key, used for legacy alerts, decrypting existing secrets or used as default provider when external providers are not configured
|
||||||
|
secret_key = AaaaAaaa
|
||||||
|
# encryption provider key in the format <PROVIDER>.<KEY_NAME>
|
||||||
|
encryption_provider = awskms.example-encryption-key
|
||||||
|
# list of configured key providers, space separated
|
||||||
|
available_encryption_providers = awskms.example-encryption-key
|
||||||
|
```
|
||||||
|
|
||||||
|
**> Note:** The encryption key that is stored in the `secret_key` field is still used by Grafana’s legacy alerting system to encrypt secrets, for decrypting existing secrets, or it is used as the default provider when external providers are not configured. Do not change or remove that value when adding a new KMS provider.
|
||||||
|
|
||||||
|
7. [Restart Grafana](https://grafana.com/docs/grafana/latest/installation/restart-grafana/).
|
||||||
|
|
||||||
|
8. (Optional) From the command line and the root directory of Grafana, re-encrypt all of the secrets within the Grafana database with the new key using the following command:
|
||||||
|
|
||||||
|
`grafana-cli admin secrets-migration re-encrypt`
|
||||||
|
|
||||||
|
If you do not re-encrypt existing secrets, then they will remain encrypted by the previous encryption key. Users will still be able to access them.
|
||||||
|
|
||||||
|
**> Note:** This process could take a few minutes to complete, depending on the number of secrets (such as data sources or alert notification channels) in your database. Users might experience errors while this process is running, and alert notifications might not be sent.
|
||||||
|
|
||||||
|
**> Note:** If you are updating this encryption key during the initial setup of Grafana before any data sources, alert notification channels, or dashboards have been created, then this step is not necessary because there are no secrets in Grafana to migrate.
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
+++
|
||||||
|
title = "Azure Key Vault"
|
||||||
|
description = "Using Azure Key Vault to encrypt database secrets"
|
||||||
|
keywords = ["grafana", "Azure key vault"]
|
||||||
|
weight = 2
|
||||||
|
+++
|
||||||
|
|
||||||
|
# Using Azure Key Vault to encrypt database secrets
|
||||||
|
|
||||||
|
You can use an encryption key from Azure Key Vault to encrypt secrets in the Grafana database.
|
||||||
|
|
||||||
|
**Prerequisites:**
|
||||||
|
|
||||||
|
- An Azure account with permission to view and create Key Vault keys and programmatic credentials to access those keys
|
||||||
|
- Access to the Grafana [configuration]({{< relref "../../administration/configuration/#config-file-locations" >}}) file
|
||||||
|
|
||||||
|
1. [Create a vault](https://docs.microsoft.com/en-us/azure/key-vault/general/quick-create-portal#create-a-vault).
|
||||||
|
|
||||||
|
2. Create a key in the **Key Vault** with the name that you want by using **RSA** as the type and `2048` as the size with encrypt and decrypt permissions.
|
||||||
|
|
||||||
|
3. [Register an application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app#register-an-application) and generate a client secret for it.
|
||||||
|
|
||||||
|
4. [Assign a Key Vault access policy](https://docs.microsoft.com/en-us/azure/key-vault/general/assign-access-policy?tabs=azure-portal) for the key vault that you created:
|
||||||
|
|
||||||
|
5. In the Key Permissions section, set encrypt and decrypt permissions, and click **Save**.
|
||||||
|
|
||||||
|
6. From within Grafana, turn on [envelope encryption]({{< relref "../../administration/envelope-encryption.md" >}}).
|
||||||
|
|
||||||
|
7. Add your Azure Key Vault details to the Grafana configuration file; depending on your operating system, is usually named `grafana.ini`:
|
||||||
|
<br><br>a. Add a new section to the configuration file, with a name in the format of `[security.encryption.azurekv.<KEY-NAME>]`, where `<KEY-NAME>` is any name that uniquely identifies this key among other provider keys.
|
||||||
|
<br><br>b. Fill in the section with the following values:
|
||||||
|
<br>
|
||||||
|
|
||||||
|
- `tenant_id`: the **Directory ID** (tenant) from the application that you registered.
|
||||||
|
- `client_id`: the **Application ID** (client) from the application that you registered.
|
||||||
|
- `client_secret`: the VALUE of the secret that you generated in your app. (Don't use the Secret ID).
|
||||||
|
- `key_id`: the key name that you created in the key vault.
|
||||||
|
- `vault_uri`: the URL of your key vault.
|
||||||
|
|
||||||
|
An example of an Azure Key Vault provider section in the `grafana.ini` file is as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
# Azure Key Vault provider setup
|
||||||
|
;[security.encryption.azurekv.example-encryption-key]
|
||||||
|
# Azure Application directory ID (tenant)
|
||||||
|
tenant_id = 1234abcd-12ab-34cd-56ef-1234567890ab
|
||||||
|
# Azure Application application ID (client).
|
||||||
|
client_id = 1356dfgh-12ab-34cd-56ef-3322114455cc
|
||||||
|
# Azure Application client secret.
|
||||||
|
client_secret = FbE4X~4Jq45ERKxx823Aheb9plBjQqHHe81Sc
|
||||||
|
# Azure Key Vault key name.
|
||||||
|
key_id = mysecretkey
|
||||||
|
# Azure Key Vault uri.
|
||||||
|
vault_uri = https://my-vault-name.vault.azure.net
|
||||||
|
```
|
||||||
|
|
||||||
|
8. Update the `[security]` section of the `grafana.ini` configuration file with the new Encryption Provider key that you created:
|
||||||
|
|
||||||
|
```
|
||||||
|
[security]
|
||||||
|
# previous encryption key, used for legacy alerts, decrypting existing secrets or used as default provider when external providers are not configured
|
||||||
|
secret_key = AaaaAaaa
|
||||||
|
# encryption provider key in the format <PROVIDER>.<KEY-NAME>
|
||||||
|
encryption_provider = azurekv.example-encryption-key
|
||||||
|
# list of configured key providers, space separated
|
||||||
|
available_encryption_providers = azurekv.example-encryption-key
|
||||||
|
```
|
||||||
|
|
||||||
|
**> Note:** The encryption key stored in the `secret_key` field is still used by Grafana’s legacy alerting system to encrypt secrets. Do not change or remove that value.
|
||||||
|
|
||||||
|
9. [Restart Grafana](https://grafana.com/docs/grafana/latest/installation/restart-grafana/).
|
||||||
|
|
||||||
|
10. (Optional) From the command line and the root directory of Grafana Enterprise, re-encrypt all of the secrets within the Grafana database with the new key using the following command:
|
||||||
|
|
||||||
|
`grafana-cli admin secrets-migration re-encrypt`
|
||||||
|
|
||||||
|
If you do not re-encrypt existing secrets, then they will remain encrypted by the previous encryption key. Users will still be able to access them.
|
||||||
|
|
||||||
|
**> Note:** This process could take a few minutes to complete, depending on the number of secrets (such as data sources or alert notification channels) in your database. Users might experience errors while this process is running, and alert notifications might not be sent.
|
||||||
|
|
||||||
|
**> Note:** If you are updating this encryption key during the initial setup of Grafana before any data sources, alert notification channels, or dashboards have been created, then this step is not necessary because there are no secrets in Grafana to migrate.
|
||||||
@@ -86,23 +86,27 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
#### Status codes
|
#### Status codes
|
||||||
|
|
||||||
| Code | Description |
|
| Code | Description |
|
||||||
| ---- | -------------------------------------------------------------------- |
|
| ---- | -------------------------------------------------------------------- |
|
||||||
| 200 | Global and organization local roles are returned. |
|
| 200 | Global and organization local roles are returned. |
|
||||||
| 403 | Access denied |
|
| 403 | Access denied |
|
||||||
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
### Get a role
|
### Get a role
|
||||||
|
|
||||||
|
`GET /api/access-control/roles/:uid`
|
||||||
|
|
||||||
Get a role for the given UID.
|
Get a role for the given UID.
|
||||||
|
|
||||||
Get a role for the given UID.
|
#### Required permissions
|
||||||
|
|
||||||
#### Required permissions
|
| Action | Scope |
|
||||||
|
| ---------- | -------- |
|
||||||
| Action | Scope |
|
| roles:read | roles:\* |
|
||||||
| ---------- | -------- |
|
|
||||||
| roles:read | roles:\* |
|
#### Example request
|
||||||
|
|
||||||
|
```http
|
||||||
|
GET /api/access-control/roles/PYnDO3rMk
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
```
|
```
|
||||||
@@ -141,27 +145,59 @@ HTTP/1.1 200 OK
|
|||||||
#### Example request
|
#### Example request
|
||||||
|
|
||||||
```http
|
```http
|
||||||
|
POST /api/access-control/roles
|
||||||
#### Example request
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
```http
|
|
||||||
POST /api/access-control/roles
|
{
|
||||||
|
"version": 1,
|
||||||
"uid": "jZrmlLCGka",
|
"uid": "jZrmlLCGka",
|
||||||
"name": "custom:delete:roles",
|
"name": "custom:delete:roles",
|
||||||
|
"description": "My custom role which gives users permissions to delete roles",
|
||||||
{
|
"group":"My Group",
|
||||||
"version": 1,
|
"displayName": "My Custom Role",
|
||||||
"uid": "jZrmlLCGka",
|
"global": false,
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
"global": true,
|
"action": "roles:delete",
|
||||||
"permissions": [
|
"scope": "permissions:delegate"
|
||||||
{
|
}
|
||||||
"action": "roles:delete",
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### JSON body schema
|
||||||
|
|
||||||
|
| Field Name | Date Type | Required | Description |
|
||||||
|
| ----------- | ---------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| uid | string | No | UID of the role. If not present, the UID will be automatically created for you and returned in response. Refer to the [Custom roles]({{< relref "../enterprise/access-control/roles.md#custom-roles" >}}) for more information. |
|
||||||
|
| global | boolean | No | A flag indicating if the role is global or not. If set to `false`, the default org ID of the authenticated user will be used from the request. Refer to the [Role scopes]({{< relref "../enterprise/access-control/roles.md#role-scopes" >}}) for more information. |
|
||||||
|
| version | number | No | Version of the role. If not present, version 0 will be assigned to the role and returned in the response. Refer to the [Custom roles]({{< relref "../enterprise/access-control/roles.md#custom-roles" >}}) for more information. |
|
||||||
|
| name | string | Yes | Name of the role. Refer to [Custom roles]({{< relref "../enterprise/access-control/roles.md#custom-roles" >}}) for more information. |
|
||||||
|
| description | string | No | Description of the role. |
|
||||||
|
| displayName | string | No | Display name of the role, visible in the UI. |
|
||||||
|
| group | string | No | The group name the role belongs to. |
|
||||||
|
| permissions | Permission | No | If not present, the role will be created without any permissions. |
|
||||||
|
|
||||||
|
**Permission**
|
||||||
|
|
||||||
|
| Field Name | Data Type | Required | Description |
|
||||||
|
| ---------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| action | string | Yes | Refer to [Permissions]({{< relref "../enterprise/access-control/permissions.md" >}}) for full list of available actions. |
|
||||||
|
| scope | string | No | If not present, no scope will be mapped to the permission. Refer to [Permissions]({{< relref "../enterprise/access-control/permissions.md#scope-definitions" >}}) for full list of available scopes. |
|
||||||
|
|
||||||
|
#### Example response
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
#### Status codes
|
#### Status codes
|
||||||
]
|
|
||||||
}
|
| Code | Description |
|
||||||
|
| ---- | ---------------------------------------------------------------------------------- |
|
||||||
| 200 | Role is updated. |
|
| 200 | Role is updated. |
|
||||||
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
||||||
| 403 | Access denied |
|
| 403 | Access denied |
|
||||||
@@ -170,7 +206,7 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
### Update a custom role
|
### Update a custom role
|
||||||
|
|
||||||
`PUT /api/access-control/roles/:uid`
|
`PUT /api/access-control/roles/:uid`
|
||||||
| version | number | No | Version of the role. If not present, version 0 will be assigned to the role and returned in the response. Refer to the [Custom roles]({{< relref "../enterprise/access-control/roles.md#custom-roles" >}}) for more information. |
|
|
||||||
Update the role with the given UID, and it's permissions with the given UID. The operation is idempotent and all permissions of the role will be replaced with what is in the request. You would need to increment the version of the role with each update, otherwise the request will fail.
|
Update the role with the given UID, and it's permissions with the given UID. The operation is idempotent and all permissions of the role will be replaced with what is in the request. You would need to increment the version of the role with each update, otherwise the request will fail.
|
||||||
|
|
||||||
#### Required permissions
|
#### Required permissions
|
||||||
@@ -200,7 +236,9 @@ Content-Type: application/json
|
|||||||
{
|
{
|
||||||
"action": "roles:delete",
|
"action": "roles:delete",
|
||||||
"scope": "permissions:delegate"
|
"scope": "permissions:delegate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "roles:write",
|
||||||
"scope": "permissions:delegate"
|
"scope": "permissions:delegate"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -219,6 +257,8 @@ Content-Type: application/json
|
|||||||
| permissions | List of Permissions | No | The full list of permissions the role should have after the update. |
|
| permissions | List of Permissions | No | The full list of permissions the role should have after the update. |
|
||||||
|
|
||||||
**Permission**
|
**Permission**
|
||||||
|
|
||||||
|
| Field Name | Data Type | Required | Description |
|
||||||
| ---------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| action | string | Yes | Refer to [Permissions]({{< relref "../enterprise/access-control/permissions.md" >}}) for full list of available actions. |
|
| action | string | Yes | Refer to [Permissions]({{< relref "../enterprise/access-control/permissions.md" >}}) for full list of available actions. |
|
||||||
| scope | string | No | If not present, no scope will be mapped to the permission. Refer to [Permissions]({{< relref "../enterprise/access-control/permissions.md#scope-definitions" >}}) for full list of available scopes. |
|
| scope | string | No | If not present, no scope will be mapped to the permission. Refer to [Permissions]({{< relref "../enterprise/access-control/permissions.md#scope-definitions" >}}) for full list of available scopes. |
|
||||||
@@ -239,7 +279,9 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
||||||
| 403 | Access denied |
|
| 403 | Access denied |
|
||||||
| 404 | Role was not found to update. |
|
| 404 | Role was not found to update. |
|
||||||
#### JSON body schema
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
|
### Delete a custom role
|
||||||
|
|
||||||
`DELETE /api/access-control/roles/:uid?force=false`
|
`DELETE /api/access-control/roles/:uid?force=false`
|
||||||
|
|
||||||
@@ -288,7 +330,9 @@ Content-Type: application/json
|
|||||||
|
|
||||||
### List roles assigned to a user
|
### List roles assigned to a user
|
||||||
|
|
||||||
#### Example request
|
`GET /api/access-control/users/:userId/roles`
|
||||||
|
|
||||||
|
Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.
|
||||||
|
|
||||||
#### Required permissions
|
#### Required permissions
|
||||||
|
|
||||||
@@ -309,6 +353,8 @@ Content-Type: application/json
|
|||||||
HTTP/1.1 200 OK
|
HTTP/1.1 200 OK
|
||||||
Content-Type: application/json; charset=UTF-8
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
#### Status codes
|
#### Status codes
|
||||||
|
|
||||||
| Code | Description |
|
| Code | Description |
|
||||||
@@ -329,6 +375,8 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
| ---------------------- | -------------------- |
|
| ---------------------- | -------------------- |
|
||||||
| users.permissions:list | users:id:`<user ID>` |
|
| users.permissions:list | users:id:`<user ID>` |
|
||||||
|
|
||||||
|
#### Example request
|
||||||
|
|
||||||
```http
|
```http
|
||||||
GET /api/access-control/users/1/permissions
|
GET /api/access-control/users/1/permissions
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
@@ -345,7 +393,7 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
#### Status codes
|
#### Status codes
|
||||||
|
|
||||||
| Code | Description |
|
| Code | Description |
|
||||||
HTTP/1.1 200 OK
|
| ---- | -------------------------------------------------------------------- |
|
||||||
| 200 | Set of assigned permissions is returned. |
|
| 200 | Set of assigned permissions is returned. |
|
||||||
| 403 | Access denied. |
|
| 403 | Access denied. |
|
||||||
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
@@ -377,7 +425,7 @@ For example, if a user does not have required permissions for creating users, th
|
|||||||
|
|
||||||
{
|
{
|
||||||
"global": false,
|
"global": false,
|
||||||
Accept: application/json
|
"roleUid": "XvHQJq57z"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -407,6 +455,275 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
|
|
||||||
## Remove a user role assignment
|
## Remove a user role assignment
|
||||||
|
|
||||||
|
`DELETE /api/access-control/users/:userId/roles/:roleUID`
|
||||||
|
|
||||||
|
Revoke a role from a user.
|
||||||
|
|
||||||
|
For bulk updates consider
|
||||||
|
[Set user role assignments]({{< ref "#set-user-role-assignments" >}}).
|
||||||
|
|
||||||
|
#### Required permissions
|
||||||
|
|
||||||
|
`permission:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has.
|
||||||
|
For example, if a user does not have required permissions for creating users, they won't be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| ------------------ | -------------------- |
|
||||||
|
| users.roles:remove | permissions:delegate |
|
||||||
|
|
||||||
|
#### Query parameters
|
||||||
|
|
||||||
|
| Param | Type | Required | Description |
|
||||||
|
| ------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| global | boolean | No | A flag indicating if the assignment is global or not. If set to `false`, the default org ID of the authenticated user will be used from the request to remove assignment. |
|
||||||
|
|
||||||
|
#### Example request
|
||||||
|
|
||||||
|
```http
|
||||||
|
DELETE /api/access-control/users/1/roles/AFUXBHKnk
|
||||||
|
Accept: application/json
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example response
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Status codes
|
||||||
|
|
||||||
|
| Code | Description |
|
||||||
|
| ---- | -------------------------------------------------------------------- |
|
||||||
|
| 200 | Role is unassigned. |
|
||||||
|
| 403 | Access denied. |
|
||||||
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
|
### Set user role assignments
|
||||||
|
|
||||||
|
`PUT /api/access-control/users/:userId/roles`
|
||||||
|
|
||||||
|
Update the user's role assignments to match the provided set of UIDs.
|
||||||
|
This will remove any assigned roles that aren't in the request and add
|
||||||
|
roles that are in the set but are not already assigned to the user.
|
||||||
|
|
||||||
|
If you want to add or remove a single role, consider using
|
||||||
|
[Add a user role assignment]({{< ref "#add-a-user-role-assignment" >}}) or
|
||||||
|
[Remove a user role assignment]({{< ref "#remove-a-user-role-assignment" >}})
|
||||||
|
instead.
|
||||||
|
|
||||||
|
#### Required permissions
|
||||||
|
|
||||||
|
`permission:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has.
|
||||||
|
For example, if a user does not have required permissions for creating users, they won't be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| ------------------ | -------------------- |
|
||||||
|
| users.roles:add | permissions:delegate |
|
||||||
|
| users.roles:remove | permissions:delegate |
|
||||||
|
|
||||||
|
#### Example request
|
||||||
|
|
||||||
|
```http
|
||||||
|
PUT /api/access-control/users/1/roles
|
||||||
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"global": false,
|
||||||
|
"roleUids": [
|
||||||
|
"ZiHQJq5nk",
|
||||||
|
"GzNQ1357k"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### JSON body schema
|
||||||
|
|
||||||
|
| Field Name | Date Type | Required | Description |
|
||||||
|
| ---------- | --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| global | boolean | No | A flag indicating if the assignment is global or not. If set to `false`, the default org ID of the authenticated user will be used from the request. |
|
||||||
|
| roleUids | list | Yes | List of role UIDs. |
|
||||||
|
|
||||||
|
#### Example response
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Status codes
|
||||||
|
|
||||||
|
| Code | Description |
|
||||||
|
| ---- | -------------------------------------------------------------------- |
|
||||||
|
| 200 | Roles have been assigned. |
|
||||||
|
| 403 | Access denied. |
|
||||||
|
| 404 | Role not found. |
|
||||||
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
|
## Create and remove built-in role assignments
|
||||||
|
|
||||||
|
API set allows to create or remove [built-in role assignments]({{< relref "../enterprise/access-control/roles.md#built-in-role-assignments" >}}) and list current assignments.
|
||||||
|
|
||||||
|
### Get all built-in role assignments
|
||||||
|
|
||||||
|
`GET /api/access-control/builtin-roles`
|
||||||
|
|
||||||
|
Gets all built-in role assignments.
|
||||||
|
|
||||||
|
#### Required permissions
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| ------------------ | -------- |
|
||||||
|
| roles.builtin:list | roles:\* |
|
||||||
|
|
||||||
|
#### Example request
|
||||||
|
|
||||||
|
```http
|
||||||
|
GET /api/access-control/builtin-roles
|
||||||
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Example response
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Status codes
|
||||||
|
|
||||||
|
| Code | Description |
|
||||||
|
| ---- | -------------------------------------------------------------------- |
|
||||||
|
| 200 | Built-in role assignments are returned. |
|
||||||
|
| 403 | Access denied |
|
||||||
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
|
### Create a built-in role assignment
|
||||||
|
|
||||||
|
`POST /api/access-control/builtin-roles`
|
||||||
|
|
||||||
|
Creates a new built-in role assignment.
|
||||||
|
|
||||||
|
#### Required permissions
|
||||||
|
|
||||||
|
`permission:delegate` scope ensures that users can only create built-in role assignments with the roles which have same, or a subset of permissions which the user has.
|
||||||
|
For example, if a user does not have required permissions for creating users, they won't be able to create a built-in role assignment which will allow to do that. This is done to prevent escalation of privileges.
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| ----------------- | -------------------- |
|
||||||
|
| roles.builtin:add | permissions:delegate |
|
||||||
|
|
||||||
|
#### Example request
|
||||||
|
|
||||||
|
```http
|
||||||
|
POST /api/access-control/builtin-roles
|
||||||
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
{
|
||||||
|
"roleUid": "LPMGN99Mk",
|
||||||
|
"builtinRole": "Grafana Admin",
|
||||||
|
"global": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### JSON body schema
|
||||||
|
|
||||||
|
| Field Name | Date Type | Required | Description |
|
||||||
|
| ----------- | --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| roleUid | string | Yes | UID of the role. |
|
||||||
|
| builtinRole | boolean | Yes | Can be one of `Viewer`, `Editor`, `Admin` or `Grafana Admin`. |
|
||||||
|
| global | boolean | No | A flag indicating if the assignment is global or not. If set to `false`, the default org ID of the authenticated user will be used from the request to create organization local assignment. Refer to the [Built-in role assignments]({{< relref "../enterprise/access-control/roles.md#built-in-role-assignments" >}}) for more information. |
|
||||||
|
|
||||||
|
#### Example response
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Status codes
|
||||||
|
|
||||||
|
| Code | Description |
|
||||||
|
| ---- | ---------------------------------------------------------------------------------- |
|
||||||
|
| 200 | Role was assigned to built-in role. |
|
||||||
|
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
||||||
|
| 403 | Access denied |
|
||||||
|
| 404 | Role not found |
|
||||||
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
|
### Remove a built-in role assignment
|
||||||
|
|
||||||
|
`DELETE /api/access-control/builtin-roles/:builtinRole/roles/:roleUID`
|
||||||
|
|
||||||
|
Deletes a built-in role assignment (for one of _Viewer_, _Editor_, _Admin_, or _Grafana Admin_) to the role with the provided UID.
|
||||||
|
|
||||||
|
#### Required permissions
|
||||||
|
|
||||||
|
`permission:delegate` scope ensures that users can only remove built-in role assignments with the roles which have same, or a subset of permissions which the user has.
|
||||||
|
For example, if a user does not have required permissions for creating users, they won't be able to remove a built-in role assignment which allows to do that.
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| -------------------- | -------------------- |
|
||||||
|
| roles.builtin:remove | permissions:delegate |
|
||||||
|
|
||||||
|
#### Example request
|
||||||
|
|
||||||
|
```http
|
||||||
|
DELETE /api/access-control/builtin-roles/Grafana%20Admin/roles/LPMGN99Mk?global=false
|
||||||
|
Accept: application/json
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Query parameters
|
||||||
|
|
||||||
|
| Param | Type | Required | Description |
|
||||||
|
| ------ | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| global | boolean | No | A flag indicating if the assignment is global or not. If set to `false`, the default org ID of the authenticated user will be used from the request to remove assignment. Refer to the [Built-in role assignments]({{< relref "../enterprise/access-control/roles.md#built-in-role-assignments" >}}) for more information. |
|
||||||
|
|
||||||
|
#### Example response
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Status codes
|
||||||
|
|
||||||
|
| Code | Description |
|
||||||
|
| ---- | ---------------------------------------------------------------------------------- |
|
||||||
|
| 200 | Role was unassigned from built-in role. |
|
||||||
|
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
||||||
|
| 403 | Access denied |
|
||||||
|
| 404 | Role not found. |
|
||||||
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
|
#### Example response
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200 OK
|
||||||
|
Content-Type: application/json; charset=UTF-8
|
||||||
|
|
||||||
|
{
|
||||||
|
"message": "User roles have been updated."
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Status codes
|
||||||
|
|
||||||
|
| Code | Description |
|
||||||
|
| ---- | -------------------------------------------------------------------- |
|
||||||
|
| 200 | Roles have been assigned. |
|
||||||
|
| 403 | Access denied. |
|
||||||
|
| 404 | Role not found. |
|
||||||
|
| 500 | Unexpected error. Refer to body and/or server logs for more details. |
|
||||||
|
|
||||||
## Create and remove built-in role assignments
|
## Create and remove built-in role assignments
|
||||||
|
|
||||||
API set allows to create or remove [built-in role assignments]({{< relref "../enterprise/access-control/roles.md#built-in-role-assignments" >}}) and list current assignments.
|
API set allows to create or remove [built-in role assignments]({{< relref "../enterprise/access-control/roles.md#built-in-role-assignments" >}}) and list current assignments.
|
||||||
@@ -444,7 +761,7 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
"uid": "qQui_LCMk",
|
"uid": "qQui_LCMk",
|
||||||
"name": "fixed:users:org:edit",
|
"name": "fixed:users:org:edit",
|
||||||
"description": "",
|
"description": "",
|
||||||
HTTP/1.1 200 OK
|
"global": false,
|
||||||
"updated": "2021-05-13T16:24:26+02:00",
|
"updated": "2021-05-13T16:24:26+02:00",
|
||||||
"created": "2021-05-13T16:24:26+02:00"
|
"created": "2021-05-13T16:24:26+02:00"
|
||||||
},
|
},
|
||||||
@@ -453,7 +770,7 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
"uid": "PeXmlYjMk",
|
"uid": "PeXmlYjMk",
|
||||||
"name": "fixed:users:org:read",
|
"name": "fixed:users:org:read",
|
||||||
"description": "",
|
"description": "",
|
||||||
| 200 | Role was unassigned from built-in role. |
|
"global": false,
|
||||||
"updated": "2021-05-13T16:24:26+02:00",
|
"updated": "2021-05-13T16:24:26+02:00",
|
||||||
"created": "2021-05-13T16:24:26+02:00"
|
"created": "2021-05-13T16:24:26+02:00"
|
||||||
}
|
}
|
||||||
@@ -464,7 +781,7 @@ Content-Type: application/json; charset=UTF-8
|
|||||||
"uid": "qQui_LCMk",
|
"uid": "qQui_LCMk",
|
||||||
"name": "fixed:users:org:edit",
|
"name": "fixed:users:org:edit",
|
||||||
"description": "",
|
"description": "",
|
||||||
"global": true,
|
"global": false,
|
||||||
"updated": "2021-05-13T16:24:26+02:00",
|
"updated": "2021-05-13T16:24:26+02:00",
|
||||||
"created": "2021-05-13T16:24:26+02:00"
|
"created": "2021-05-13T16:24:26+02:00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,14 @@ the admin of all organizations API only works with basic authentication, see [Ad
|
|||||||
|
|
||||||
`GET /api/org/`
|
`GET /api/org/`
|
||||||
|
|
||||||
|
#### Required permissions
|
||||||
|
|
||||||
|
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| --------- | ----- |
|
||||||
|
| orgs:read | N/A |
|
||||||
|
|
||||||
**Example Request**:
|
**Example Request**:
|
||||||
|
|
||||||
```http
|
```http
|
||||||
@@ -94,6 +102,14 @@ Accessible to users with org admin role, admin in any folder or admin of any tea
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Example Response**:
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
### Updates the given user
|
### Updates the given user
|
||||||
|
|
||||||
@@ -186,6 +202,14 @@ Content-Type: application/json
|
|||||||
|
|
||||||
### Add a new user to the current organization
|
### Add a new user to the current organization
|
||||||
|
|
||||||
|
`POST /api/org/users`
|
||||||
|
|
||||||
|
Adds a global user to the current organization.
|
||||||
|
|
||||||
|
#### Required permissions
|
||||||
|
|
||||||
|
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||||
|
|
||||||
| Action | Scope |
|
| Action | Scope |
|
||||||
| ------------- | -------- |
|
| ------------- | -------- |
|
||||||
| org.users:add | users:\* |
|
| org.users:add | users:\* |
|
||||||
@@ -259,6 +283,14 @@ is called `admin` and has permission to use this API).
|
|||||||
| Action | Scope | Note |
|
| Action | Scope | Note |
|
||||||
| --------- | ----- | ------------------------------ |
|
| --------- | ----- | ------------------------------ |
|
||||||
| orgs:read | N/A | Needs to be assigned globally. |
|
| orgs:read | N/A | Needs to be assigned globally. |
|
||||||
|
|
||||||
|
**Example Request**:
|
||||||
|
|
||||||
|
```http
|
||||||
|
GET /api/orgs/name/Main%20Org%2E HTTP/1.1
|
||||||
|
Accept: application/json
|
||||||
|
Content-Type: application/json
|
||||||
|
```
|
||||||
|
|
||||||
**Example Response**:
|
**Example Response**:
|
||||||
|
|
||||||
@@ -293,6 +325,14 @@ Content-Type: application/json
|
|||||||
|
|
||||||
Note: The api will work in the following two ways
|
Note: The api will work in the following two ways
|
||||||
|
|
||||||
|
1. Need to set GF_USERS_ALLOW_ORG_CREATE=true
|
||||||
|
2. Set the config value users.allow_org_create to true in ini file
|
||||||
|
|
||||||
|
**Example Response**:
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -327,6 +367,14 @@ Content-Type: application/json
|
|||||||
|
|
||||||
```http
|
```http
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update Organization
|
||||||
|
|
||||||
|
`PUT /api/orgs/:orgId`
|
||||||
|
|
||||||
Update Organization, fields _Address 1_, _Address 2_, _City_ are not implemented yet.
|
Update Organization, fields _Address 1_, _Address 2_, _City_ are not implemented yet.
|
||||||
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
||||||
|
|
||||||
@@ -362,6 +410,14 @@ Content-Type: application/json
|
|||||||
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
Only works with Basic Authentication (username and password), see [introduction](#admin-organizations-api).
|
||||||
|
|
||||||
#### Required permissions
|
#### Required permissions
|
||||||
|
|
||||||
|
See note in the [introduction]({{< ref "#organization-api" >}}) for an explanation.
|
||||||
|
|
||||||
|
| Action | Scope |
|
||||||
|
| ----------- | ----- |
|
||||||
|
| orgs:delete | N/A |
|
||||||
|
|
||||||
|
**Example Request**:
|
||||||
|
|
||||||
```http
|
```http
|
||||||
DELETE /api/orgs/1 HTTP/1.1
|
DELETE /api/orgs/1 HTTP/1.1
|
||||||
@@ -396,6 +452,14 @@ Content-Type: application/json
|
|||||||
GET /api/orgs/1/users HTTP/1.1
|
GET /api/orgs/1/users HTTP/1.1
|
||||||
Accept: application/json
|
Accept: application/json
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: The api will only work when you pass the admin name and password
|
||||||
|
to the request HTTP URL, like http://admin:admin@localhost:3000/api/orgs/1/users
|
||||||
|
|
||||||
|
**Example Response**:
|
||||||
|
|
||||||
|
```http
|
||||||
HTTP/1.1 200
|
HTTP/1.1 200
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
[
|
[
|
||||||
@@ -423,6 +487,14 @@ Content-Type: application/json
|
|||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Example Response**:
|
||||||
|
|
||||||
|
```http
|
||||||
|
HTTP/1.1 200
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
### Update Users in Organization
|
### Update Users in Organization
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ RENDERING_MODE=default
|
|||||||
|
|
||||||
#### Clustered
|
#### Clustered
|
||||||
|
|
||||||
With the `clustered` mode, you can configure how many browser instances or incognito pages can execute concurrently. Default is `browser` and will ensure a maximum amount of browser instances can execute concurrently. Mode `context` will ensure a maximum amount of incognito pages can execute concurrently. You can also configure the maximum concurrency allowed, which per default is `5`.
|
With the `clustered` mode, you can configure how many browser instances or incognito pages can execute concurrently. Default is `browser` and will ensure a maximum amount of browser instances can execute concurrently. Mode `context` will ensure a maximum amount of incognito pages can execute concurrently. You can also configure the maximum concurrency allowed, which per default is `5`, and the maximum duration of a rendering request, which per default is `30` seconds.
|
||||||
|
|
||||||
Using a cluster of incognito pages is more performant and consumes less CPU and memory than a cluster of browsers. However, if one page crashes it can bring down the entire browser with it (making all the rendering requests happening at the same time fail). Also, each page isn't guaranteed to be totally clean (cookies and storage might bleed-through as seen [here](https://bugs.chromium.org/p/chromium/issues/detail?id=754576)).
|
Using a cluster of incognito pages is more performant and consumes less CPU and memory than a cluster of browsers. However, if one page crashes it can bring down the entire browser with it (making all the rendering requests happening at the same time fail). Also, each page isn't guaranteed to be totally clean (cookies and storage might bleed-through as seen [here](https://bugs.chromium.org/p/chromium/issues/detail?id=754576)).
|
||||||
|
|
||||||
@@ -80,6 +80,7 @@ Using a cluster of incognito pages is more performant and consumes less CPU and
|
|||||||
RENDERING_MODE=clustered
|
RENDERING_MODE=clustered
|
||||||
RENDERING_CLUSTERING_MODE=browser
|
RENDERING_CLUSTERING_MODE=browser
|
||||||
RENDERING_CLUSTERING_MAX_CONCURRENCY=5
|
RENDERING_CLUSTERING_MAX_CONCURRENCY=5
|
||||||
|
RENDERING_CLUSTERING_TIMEOUT=30
|
||||||
```
|
```
|
||||||
|
|
||||||
```json
|
```json
|
||||||
@@ -88,7 +89,8 @@ RENDERING_CLUSTERING_MAX_CONCURRENCY=5
|
|||||||
"mode": "clustered",
|
"mode": "clustered",
|
||||||
"clustering": {
|
"clustering": {
|
||||||
"mode": "browser",
|
"mode": "browser",
|
||||||
"maxConcurrency": 5
|
"maxConcurrency": 5,
|
||||||
|
"timeout": 30
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -347,10 +347,10 @@ This transformation changes the field type of the specified field.
|
|||||||
- **Numeric -** attempts to make the values numbers
|
- **Numeric -** attempts to make the values numbers
|
||||||
- **String -** will make the values strings
|
- **String -** will make the values strings
|
||||||
- **Time -** attempts to parse the values as time
|
- **Time -** attempts to parse the values as time
|
||||||
- Will show an option to specify a DateFormat as input by a string like yyyy-mm-dd or DD MM YYYY hh:mm:ss
|
- Will show an option to specify a DateFormat for the input field like yyyy-mm-dd or DD MM YYYY hh:mm:ss
|
||||||
- **Boolean -** will make the values booleans
|
- **Boolean -** will make the values booleans
|
||||||
|
|
||||||
For example the following query could be modified by selecting the time field, as Time, and Date Format as YYYY.
|
For example the following query could be modified by selecting the time field, as Time, and Input format as YYYY.
|
||||||
|
|
||||||
| Time | Mark | Value |
|
| Time | Mark | Value |
|
||||||
| ---------- | ----- | ----- |
|
| ---------- | ----- | ----- |
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ The Plugin catalog allows you to browse and manage plugins from within Grafana.
|
|||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Before you can use the Plugin catalog, you must enable it in the Grafana [configuration]({{< relref "../administration/configuration.md#plugin_admin_enabled" >}}) file.
|
In order to be able to install / uninstall / update plugins using plugin catalog, you must enable it via the `plugin_admin_enabled` flag in the [configuration]({{< relref "../administration/configuration.md#plugin_admin_enabled" >}}) file.
|
||||||
Before following the steps below, make sure you are logged in as a Grafana administrator.
|
Before following the steps below, make sure you are logged in as a Grafana administrator.
|
||||||
|
|
||||||
<a id="#plugin-catalog-entry"></a>
|
<a id="#plugin-catalog-entry"></a>
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ weight = 10000
|
|||||||
Here you can find detailed release notes that list everything that is included in every release as well as notices
|
Here you can find detailed release notes that list everything that is included in every release as well as notices
|
||||||
about deprecations, breaking changes as well as changes that relate to plugin development.
|
about deprecations, breaking changes as well as changes that relate to plugin development.
|
||||||
|
|
||||||
|
- [Release notes for 8.3.0-beta2]({{< relref "release-notes-8-3-0-beta2" >}})
|
||||||
|
- [Release notes for 8.3.0-beta1]({{< relref "release-notes-8-3-0-beta1" >}})
|
||||||
|
- [Release notes for 8.2.5]({{< relref "release-notes-8-2-5" >}})
|
||||||
- [Release notes for 8.2.4]({{< relref "release-notes-8-2-4" >}})
|
- [Release notes for 8.2.4]({{< relref "release-notes-8-2-4" >}})
|
||||||
- [Release notes for 8.2.3]({{< relref "release-notes-8-2-3" >}})
|
- [Release notes for 8.2.3]({{< relref "release-notes-8-2-3" >}})
|
||||||
- [Release notes for 8.2.2]({{< relref "release-notes-8-2-2" >}})
|
- [Release notes for 8.2.2]({{< relref "release-notes-8-2-2" >}})
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ list = false
|
|||||||
### Bug fixes
|
### Bug fixes
|
||||||
|
|
||||||
- **Alerting:** Fix a bug where the metric in the evaluation string was not correctly populated. [#41731](https://github.com/grafana/grafana/pull/41731), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
- **Alerting:** Fix a bug where the metric in the evaluation string was not correctly populated. [#41731](https://github.com/grafana/grafana/pull/41731), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||||
|
- **Alerting:** Fix no data behaviour in Legacy Alerting for alert rules using the AND operator. [#41305](https://github.com/grafana/grafana/pull/41305), [@gerobinson](https://github.com/gerobinson)
|
||||||
- **CloudMonitoring:** Ignore min and max aggregation in MQL queries. [#41302](https://github.com/grafana/grafana/pull/41302), [@sunker](https://github.com/sunker)
|
- **CloudMonitoring:** Ignore min and max aggregation in MQL queries. [#41302](https://github.com/grafana/grafana/pull/41302), [@sunker](https://github.com/sunker)
|
||||||
- **Dashboards:** 'Copy' is no longer added to new dashboard titles. [#41344](https://github.com/grafana/grafana/pull/41344), [@joshhunt](https://github.com/joshhunt)
|
- **Dashboards:** 'Copy' is no longer added to new dashboard titles. [#41344](https://github.com/grafana/grafana/pull/41344), [@joshhunt](https://github.com/joshhunt)
|
||||||
- **DataProxy:** Fix overriding response body when response is a WebSocket upgrade. [#41364](https://github.com/grafana/grafana/pull/41364), [@marefr](https://github.com/marefr)
|
- **DataProxy:** Fix overriding response body when response is a WebSocket upgrade. [#41364](https://github.com/grafana/grafana/pull/41364), [@marefr](https://github.com/marefr)
|
||||||
@@ -20,3 +21,11 @@ list = false
|
|||||||
- **Plugins:** Ensure consistent plugin settings list response. [#41346](https://github.com/grafana/grafana/pull/41346), [@wbrowne](https://github.com/wbrowne)
|
- **Plugins:** Ensure consistent plugin settings list response. [#41346](https://github.com/grafana/grafana/pull/41346), [@wbrowne](https://github.com/wbrowne)
|
||||||
- **Tempo:** Fix validation of float durations. [#41400](https://github.com/grafana/grafana/pull/41400), [@ivanahuckova](https://github.com/ivanahuckova)
|
- **Tempo:** Fix validation of float durations. [#41400](https://github.com/grafana/grafana/pull/41400), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
- **Tracing:** Correct tags for each span are shown. [#41473](https://github.com/grafana/grafana/pull/41473), [@ivanahuckova](https://github.com/ivanahuckova)
|
- **Tracing:** Correct tags for each span are shown. [#41473](https://github.com/grafana/grafana/pull/41473), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
|
||||||
|
### Fix No Data behaviour in Legacy Alerting
|
||||||
|
|
||||||
|
In Grafana 8.2.5 and later, this change fixes a bug in the evaluation of alert rules when using the AND operator to compare two or more conditions. In Grafana 8.2.4 and earlier such alert rules would evaluate to `OK` if at least one, but not all, conditions returned no data. This change fixes that bug such that in Grafana 8.2.5 these alert rules now evaluate to `No Data`.
|
||||||
|
|
||||||
|
If an alert should evaluate to `OK` when one or all conditions return `No Data` then this can be done via changing `If no data or all values are null` to `OK`. However, this will not preserve the old behaviour in 8.2.4 where an alert will be `OK` if at least one, but not all, conditions return no data and then `No Data` if all conditions return `No Data`. Issue [#41305](https://github.com/grafana/grafana/issues/41305)
|
||||||
|
|||||||
77
docs/sources/release-notes/release-notes-8-3-0-beta1.md
Normal file
77
docs/sources/release-notes/release-notes-8-3-0-beta1.md
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
+++
|
||||||
|
title = "Release notes for Grafana 8.3.0-beta1"
|
||||||
|
[_build]
|
||||||
|
list = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
<!-- Auto generated by update changelog github action -->
|
||||||
|
|
||||||
|
# Release notes for Grafana 8.3.0-beta1
|
||||||
|
|
||||||
|
### Features and enhancements
|
||||||
|
|
||||||
|
- **AccessControl:** Apply fine-grained access control to licensing. (Enterprise)
|
||||||
|
- **Alerting:** Add UI for contact point testing with custom annotations and labels. [#40491](https://github.com/grafana/grafana/pull/40491), [@nathanrodman](https://github.com/nathanrodman)
|
||||||
|
- **Alerting:** Make alert state indicator in panel header work with Grafana 8 alerts. [#38713](https://github.com/grafana/grafana/pull/38713), [@domasx2](https://github.com/domasx2)
|
||||||
|
- **Alerting:** Option for Discord notifier to use webhook name. [#40463](https://github.com/grafana/grafana/pull/40463), [@Skyebold](https://github.com/Skyebold)
|
||||||
|
- **Annotations:** Deprecate AnnotationsSrv. [#39631](https://github.com/grafana/grafana/pull/39631), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **Auditing:** Add audit logs for unified alerting endpoints. (Enterprise)
|
||||||
|
- **Auditing:** Add endpoints (plugins, datasources, library elements). (Enterprise)
|
||||||
|
- **Auth:** Omit all base64 paddings in JWT tokens for the JWT auth. [#35602](https://github.com/grafana/grafana/pull/35602), [@gillg](https://github.com/gillg)
|
||||||
|
- **Azure Monitor:** Clean up fields when editing Metrics. [#41762](https://github.com/grafana/grafana/pull/41762), [@andresmgot](https://github.com/andresmgot)
|
||||||
|
- **AzureMonitor:** Add new starter dashboards. [#39876](https://github.com/grafana/grafana/pull/39876), [@jcolladokuri](https://github.com/jcolladokuri)
|
||||||
|
- **AzureMonitor:** Add starter dashboard for app monitoring with Application Insights. [#40725](https://github.com/grafana/grafana/pull/40725), [@jcolladokuri](https://github.com/jcolladokuri)
|
||||||
|
- **Barchart/Time series:** Allow x axis label. [#41142](https://github.com/grafana/grafana/pull/41142), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||||
|
- **CLI:** Improve error handling for installing plugins. [#41257](https://github.com/grafana/grafana/pull/41257), [@marefr](https://github.com/marefr)
|
||||||
|
- **CloudMonitoring:** Migrate to use backend plugin SDK contracts. [#38650](https://github.com/grafana/grafana/pull/38650), [@idafurjes](https://github.com/idafurjes)
|
||||||
|
- **CloudWatch Logs:** Add retry strategy for hitting max concurrent queries. [#39290](https://github.com/grafana/grafana/pull/39290), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **CloudWatch:** Add AWS RoboMaker metrics and dimension. [#41450](https://github.com/grafana/grafana/pull/41450), [@ilyastoli](https://github.com/ilyastoli)
|
||||||
|
- **CloudWatch:** Add AWS Transfer metrics and dimension. [#41168](https://github.com/grafana/grafana/pull/41168), [@ilyastoli](https://github.com/ilyastoli)
|
||||||
|
- **Dashboard:** replace datasource name with a reference object. [#33817](https://github.com/grafana/grafana/pull/33817), [@ryantxu](https://github.com/ryantxu)
|
||||||
|
- **Dashboards:** Show logs on time series when hovering. [#40110](https://github.com/grafana/grafana/pull/40110), [@ryantxu](https://github.com/ryantxu)
|
||||||
|
- **Elasticsearch:** Add support for Elasticsearch 8.0 (Beta). [#41729](https://github.com/grafana/grafana/pull/41729), [@Elfo404](https://github.com/Elfo404)
|
||||||
|
- **Elasticsearch:** Add time zone setting to Date Histogram aggregation. [#40882](https://github.com/grafana/grafana/pull/40882), [@Elfo404](https://github.com/Elfo404)
|
||||||
|
- **Elasticsearch:** Enable full range log volume histogram. [#41202](https://github.com/grafana/grafana/pull/41202), [@ifrost](https://github.com/ifrost)
|
||||||
|
- **Elasticsearch:** Full range logs volume. [#40700](https://github.com/grafana/grafana/pull/40700), [@ifrost](https://github.com/ifrost)
|
||||||
|
- **Explore:** Allow changing the graph type. [#40522](https://github.com/grafana/grafana/pull/40522), [@gabor](https://github.com/gabor)
|
||||||
|
- **Explore:** Show ANSI colors when highlighting matched words in the logs panel. [#40971](https://github.com/grafana/grafana/pull/40971), [@oliverfrye](https://github.com/oliverfrye)
|
||||||
|
- **Graph(old) panel:** Listen to events from Time series panel. [#41033](https://github.com/grafana/grafana/pull/41033), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||||
|
- **Import:** Load gcom dashboards from URL. [#41799](https://github.com/grafana/grafana/pull/41799), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **LibraryPanels:** Improves export and import of library panels between orgs. [#39214](https://github.com/grafana/grafana/pull/39214), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **OAuth:** Support PKCE. [#39948](https://github.com/grafana/grafana/pull/39948), [@sakjur](https://github.com/sakjur)
|
||||||
|
- **Panel edit:** Overrides now highlight correctly when searching. [#41684](https://github.com/grafana/grafana/pull/41684), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **PanelEdit:** Display drag indicators on draggable sections. [#41711](https://github.com/grafana/grafana/pull/41711), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **Plugins:** Refactor Plugin Management. [#40477](https://github.com/grafana/grafana/pull/40477), [@wbrowne](https://github.com/wbrowne)
|
||||||
|
- **Prometheus:** Add custom query parameters when creating PromLink url. [#41213](https://github.com/grafana/grafana/pull/41213), [@Ian-Yy](https://github.com/Ian-Yy)
|
||||||
|
- **Prometheus:** Remove limits on metrics, labels, and values in Metrics Browser. [#40660](https://github.com/grafana/grafana/pull/40660), [@autoric](https://github.com/autoric)
|
||||||
|
- **StateTimeline:** Share cursor with rest of the panels. [#41038](https://github.com/grafana/grafana/pull/41038), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||||
|
- **Tempo:** Add error details when json upload fails. [#41803](https://github.com/grafana/grafana/pull/41803), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Tempo:** Add filtering for service graph query. [#41162](https://github.com/grafana/grafana/pull/41162), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Tempo:** Add links to nodes in Service Graph pointing to Prometheus metrics. [#41135](https://github.com/grafana/grafana/pull/41135), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Time series/Bar chart panel:** Add ability to sort series via legend. [#40226](https://github.com/grafana/grafana/pull/40226), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||||
|
- **TimeSeries:** Allow multiple axes for the same unit. [#41635](https://github.com/grafana/grafana/pull/41635), [@dprokop](https://github.com/dprokop)
|
||||||
|
- **TraceView:** Allow span links defined on dataFrame. [#40563](https://github.com/grafana/grafana/pull/40563), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Transformations:** Support a rows mode in labels to fields. [#41020](https://github.com/grafana/grafana/pull/41020), [@ryantxu](https://github.com/ryantxu)
|
||||||
|
- **ValueMappings:** Don't apply field config defaults to time fields. [#41132](https://github.com/grafana/grafana/pull/41132), [@torkelo](https://github.com/torkelo)
|
||||||
|
- **Variables:** Only update panels that are impacted by variable change. [#39420](https://github.com/grafana/grafana/pull/39420), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
- **API:** Fix dashboard quota limit for imports. [#41495](https://github.com/grafana/grafana/pull/41495), [@yangkb09](https://github.com/yangkb09)
|
||||||
|
- **Alerting:** Fix rule editor issues with Azure Monitor data source. [#41317](https://github.com/grafana/grafana/pull/41317), [@domasx2](https://github.com/domasx2)
|
||||||
|
- **Azure monitor:** Make sure alert rule editor is not enabled when template variables are being used. [#41335](https://github.com/grafana/grafana/pull/41335), [@sunker](https://github.com/sunker)
|
||||||
|
- **CloudMonitoring:** Fix annotation queries. [#41529](https://github.com/grafana/grafana/pull/41529), [@sunker](https://github.com/sunker)
|
||||||
|
- **CodeEditor:** Trigger the latest getSuggestions() passed to CodeEditor. [#40544](https://github.com/grafana/grafana/pull/40544), [@DukeManh](https://github.com/DukeManh)
|
||||||
|
- **Dashboard:** Remove the current panel from the list of options in the Dashboard datasource. [#41826](https://github.com/grafana/grafana/pull/41826), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **Encryption:** Fix decrypting secrets in alerting migration. [#41061](https://github.com/grafana/grafana/pull/41061), [@undef1nd](https://github.com/undef1nd)
|
||||||
|
- **InfluxDB:** Fix corner case where index is too large in ALIAS field. [#41562](https://github.com/grafana/grafana/pull/41562), [@gabor](https://github.com/gabor)
|
||||||
|
- **NavBar:** Order App plugins alphabetically. [#40078](https://github.com/grafana/grafana/pull/40078), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
|
- **NodeGraph:** Fix zooming sensitivity on touchpads. [#40718](https://github.com/grafana/grafana/pull/40718), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **Plugins:** Add OAuth pass-through logic to api/ds/query endpoint. [#41352](https://github.com/grafana/grafana/pull/41352), [@wbrowne](https://github.com/wbrowne)
|
||||||
|
- **Snapshots:** Fix panel inspector for snapshot data. [#41530](https://github.com/grafana/grafana/pull/41530), [@joshhunt](https://github.com/joshhunt)
|
||||||
|
- **Tempo:** Fix basic auth password reset on adding tag. [#41808](https://github.com/grafana/grafana/pull/41808), [@aocenas](https://github.com/aocenas)
|
||||||
|
- **ValueMapping:** Fixes issue with regex mappings. [#41515](https://github.com/grafana/grafana/pull/41515), [@mcdee](https://github.com/mcdee)
|
||||||
|
|
||||||
|
### Plugin development fixes & changes
|
||||||
|
|
||||||
|
- **grafana/ui:** Enable slider marks display. [#41275](https://github.com/grafana/grafana/pull/41275), [@dprokop](https://github.com/dprokop)
|
||||||
80
docs/sources/release-notes/release-notes-8-3-0-beta2.md
Normal file
80
docs/sources/release-notes/release-notes-8-3-0-beta2.md
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
+++
|
||||||
|
title = "Release notes for Grafana 8.3.0-beta2"
|
||||||
|
[_build]
|
||||||
|
list = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
<!-- Auto generated by update changelog github action -->
|
||||||
|
|
||||||
|
# Release notes for Grafana 8.3.0-beta2
|
||||||
|
|
||||||
|
### Features and enhancements
|
||||||
|
|
||||||
|
- **Alerting:** Create DatasourceError alert if evaluation returns error. [#41869](https://github.com/grafana/grafana/pull/41869), [@gerobinson](https://github.com/gerobinson)
|
||||||
|
- **Alerting:** Make Unified Alerting enabled by default for those who do not use legacy alerting. [#42200](https://github.com/grafana/grafana/pull/42200), [@armandgrillet](https://github.com/armandgrillet)
|
||||||
|
- **Alerting:** Support mute timings configuration through the api for the embedded alert manager. [#41533](https://github.com/grafana/grafana/pull/41533), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||||
|
- **CloudWatch:** Add missing AWS/Events metrics. [#42164](https://github.com/grafana/grafana/pull/42164), [@n2N8Z](https://github.com/n2N8Z)
|
||||||
|
- **Docs:** Add easier to find deprecation notices to certain data sources and to the changelog. [#41938](https://github.com/grafana/grafana/pull/41938), [@gabor](https://github.com/gabor)
|
||||||
|
- **Plugins Catalog:** Enable install controls based on the pluginAdminEnabled flag. [#41686](https://github.com/grafana/grafana/pull/41686), [@leventebalogh](https://github.com/leventebalogh)
|
||||||
|
- **Query caching:** Increase max_value_mb default to 10. (Enterprise)
|
||||||
|
- **Table:** Add space between values for the DefaultCell. [#42246](https://github.com/grafana/grafana/pull/42246), [@kirederik](https://github.com/kirederik)
|
||||||
|
- **Table:** Add space between values on JSONViewCell. [#42156](https://github.com/grafana/grafana/pull/42156), [@kirederik](https://github.com/kirederik)
|
||||||
|
- **Tracing:** Make query editors available in dashboard for Tempo and Zipkin. [#41974](https://github.com/grafana/grafana/pull/41974), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
|
||||||
|
### Bug fixes
|
||||||
|
|
||||||
|
- **AccessControl:** Renamed `orgs` roles, removed `fixed:orgs:reader` introduced in beta1. [#42049](https://github.com/grafana/grafana/pull/42049), [@gamab](https://github.com/gamab)
|
||||||
|
- **Azure Monitor:** Add trap focus for modals in grafana/ui and other small a11y fixes for Azure Monitor. [#41449](https://github.com/grafana/grafana/pull/41449), [@sarahzinger](https://github.com/sarahzinger)
|
||||||
|
- **CodeEditor:** Prevent suggestions from being clipped. [#42120](https://github.com/grafana/grafana/pull/42120), [@kaydelaney](https://github.com/kaydelaney)
|
||||||
|
- **Dashboard:** Fix cache timeout persistence. [#42204](https://github.com/grafana/grafana/pull/42204), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **Datasource:** Fix stable sort order of query responses. [#41868](https://github.com/grafana/grafana/pull/41868), [@marefr](https://github.com/marefr)
|
||||||
|
- **Explore:** Fix error in query history when removing last item. [#42179](https://github.com/grafana/grafana/pull/42179), [@gabor](https://github.com/gabor)
|
||||||
|
- **Logs:** Fix requesting of older logs when flipped order. [#41966](https://github.com/grafana/grafana/pull/41966), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **Prometheus:** Fix running of health check query based on access mode. [#42189](https://github.com/grafana/grafana/pull/42189), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **TextPanel:** Fix suggestions for existing panels. [#42195](https://github.com/grafana/grafana/pull/42195), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
- **Tracing:** Fix incorrect indentations due to reoccurring spanIDs. [#41919](https://github.com/grafana/grafana/pull/41919), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **Tracing:** Show start time of trace with milliseconds precision. [#42132](https://github.com/grafana/grafana/pull/42132), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||||
|
- **Variables:** Make renamed or missing variable section expandable. [#41964](https://github.com/grafana/grafana/pull/41964), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||||
|
|
||||||
|
### Breaking changes
|
||||||
|
|
||||||
|
### Grafana 8 Alerting enabled by default for installations that do not use legacy alerting
|
||||||
|
|
||||||
|
Starting with Grafana v8.3.0, if you have **not** explicitly disabled unified alerting and **do not** have legacy alerts set up you are automatically "migrated" to Grafana 8 Alerting.
|
||||||
|
|
||||||
|
A migration **from legacy to Grafana 8 Alerting** will never incur a data loss, as the previous data is kept around for rollback purposes. However, going from **Grafana 8 Alerting to legacy alerting** will delete all the data created for Grafana 8 Alerting. It is recommended that you **backup your database** before attempting a migration between systems.
|
||||||
|
|
||||||
|
If unclear, please verify the table below:
|
||||||
|
|
||||||
|
| `[alerting][enabled]` | `[unified_alerting][enabled]` | With Existing Legacy Alerts | Result |
|
||||||
|
| --------------------- | ----------------------------- | --------------------------- | ------------------ |
|
||||||
|
| `true` | `true` | N/A | Error |
|
||||||
|
| `true` | `false` | N/A | Legacy Alerting |
|
||||||
|
| `true` | not set | Yes | Legacy Alerting |
|
||||||
|
| `true` | not set | No | Grafana 8 Alerting |
|
||||||
|
| not set | `true` | N/A | Grafana 8 Alerting |
|
||||||
|
| not set | `false` | N/A | Legacy Alerting |
|
||||||
|
| not set | not set | Yes | Legacy Alerting |
|
||||||
|
| not set | not set | No | Grafana 8 Alerting |
|
||||||
|
| `false` | `true` | N/A | Grafana 8 Alerting |
|
||||||
|
| `false` | `false` | N/A | Alerting disabled |
|
||||||
|
| `false` | not set | N/A | Grafana 8 Alerting |
|
||||||
|
|
||||||
|
N/A in the "With Existing Legacy Alerts" column means that it does not matter if you have legacy alerts or not.
|
||||||
|
Issue [#42200](https://github.com/grafana/grafana/issues/42200)
|
||||||
|
|
||||||
|
### Keep Last State for "If execution error or timeout" when upgrading to Grafana 8 alerting
|
||||||
|
|
||||||
|
In Grafana 8.3.0-beta2 we changed how alert rules that use `Keep Last State` for `If execution error or timeout` are upgraded from Legacy Alerting to Grafana 8 alerting. In 8.3.0-beta1 and earlier, alert rules with `Keep Last State` for `If execution error or timeout` were changed to `Alerting` when upgrading from Legacy Alerting to Grafana 8 alerting. However, in 8.3.0-beta2 these alert rules are now upgraded to a new option called `Error`. With this option, on encountering an error evaluating an alert rule, Grafana creates a special alert called `DatasourceError` with the `rule_uid` and `ref_id` as labels and an annotation called `Error` with the error message. Issue [#41869](https://github.com/grafana/grafana/issues/41869)
|
||||||
|
|
||||||
|
### Deprecations
|
||||||
|
|
||||||
|
The access mode "browser" is deprecated in the following data sources and will be removed in a later release:
|
||||||
|
|
||||||
|
- Prometheus
|
||||||
|
- InfluxDB
|
||||||
|
- Elasticsearch Issue [#41938](https://github.com/grafana/grafana/issues/41938)
|
||||||
|
|
||||||
|
### Plugin development fixes & changes
|
||||||
|
|
||||||
|
- **Select:** Select menus now properly scroll during keyboard navigation. [#41917](https://github.com/grafana/grafana/pull/41917), [@ashharrison90](https://github.com/ashharrison90)
|
||||||
@@ -12,6 +12,100 @@ The Geomap panel visualization allows you to view and customize the world map us
|
|||||||
|
|
||||||
{{< figure src="/static/img/docs/geomap-panel/geomap-example-8-1-0.png" max-width="1200px" caption="Geomap panel" >}}
|
{{< figure src="/static/img/docs/geomap-panel/geomap-example-8-1-0.png" max-width="1200px" caption="Geomap panel" >}}
|
||||||
|
|
||||||
|
## Map View
|
||||||
|
|
||||||
|
The map view controls the initial view of the map when the dashboard loads.
|
||||||
|
|
||||||
|
### Initial View
|
||||||
|
|
||||||
|
The initial view configures how the GeoMap panel renders when the panel is first loaded.
|
||||||
|
|
||||||
|
- **View** sets the center for the map when the panel first loads.
|
||||||
|
- **Latitude** (available when the **View** mode is _Coordinates_)
|
||||||
|
- **Longitude** (available when the **View** mode is _Coordinates_)
|
||||||
|
- **Zoom** sets the initial zoom level for the GeoMap panel.
|
||||||
|
|
||||||
|
## Data layer
|
||||||
|
|
||||||
|
The Geomap visualization supports multiple Data Layers. Each data layer determines how you visualize geospatial data on top of the base map.
|
||||||
|
|
||||||
|
### Layer Types
|
||||||
|
|
||||||
|
There are four-layer types to choose from in the Geomap visualization.
|
||||||
|
|
||||||
|
- **Marker** renders a marker at each data point.
|
||||||
|
- **Heatmap** visualizes a heatmap of the data.
|
||||||
|
- **GeoJSON** renders static data from a geojson file.
|
||||||
|
|
||||||
|
### Layer Controls
|
||||||
|
|
||||||
|
The layer controls allow you to create layers, change their name, reorder and delete layers.
|
||||||
|
|
||||||
|
- **Add layer** creates an additional, configurable data layer for the Geomap visualization. When you add a layer, you are prompted to select a layer type. You can change the layer type at any point during panel configuration. See the **Layer Types** section above for details on each layer type.
|
||||||
|
- The layer controls allow you to rename, delete, and reorder the layers of the panel.
|
||||||
|
- **Edit layer name (pencil icon)** renames the layer.
|
||||||
|
- **Trash Bin** deletes the layer.
|
||||||
|
- **Reorder (six dots/grab handle)** allows you to change the layer order. Data on higher layers will appear above data on lower layers. The panel will update the layer order as you drag and drop to help simplify choosing a layer order.
|
||||||
|
|
||||||
|
You can add multiple layers of data to a single Geomap panel in order to create rich, detailed visualizations.
|
||||||
|
|
||||||
|
### Location
|
||||||
|
|
||||||
|
The Geomap panel needs a source of geographical data. This data comes from a database query, and there are four mapping options for your data.
|
||||||
|
|
||||||
|
- **Auto** automatically searches for location data. Use this option when your query is based on one of the following names for data fields.
|
||||||
|
- geohash: “geohash”
|
||||||
|
- latitude: “latitude”, “lat”
|
||||||
|
- longitude: “longitude”, “lng”, “lon”
|
||||||
|
- lookup: “lookup”
|
||||||
|
- **Coords** specifies that your query holds coordinate data. You will get prompted to select numeric data fields for latitude and longitude from your database query.
|
||||||
|
- **Geohash** specifies that your query holds geohash data. You will get prompted to select a string data field for the geohash from your database query.
|
||||||
|
- **Lookup** specifies that your query holds location name data that needs to be mapped to a value. You will get prompted to select the lookup field from your database query and a gazetteer. The gazetteer is the directory that is used to map your queried data to a geographical point.
|
||||||
|
|
||||||
|
### Markers layer
|
||||||
|
|
||||||
|
The markers layer allows you to display data points as different marker shapes such as circles, squares, triangles, stars, and more.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- **Marker Color** configures the color of the marker. The default `Fixed size` keeps all points a single color. There is an alternate option to have multiple colors depending on the data point values and the threshold set at the `Thresholds` section.
|
||||||
|
- **Marker Size** configures the size of the marker. Default is `Fixed size`, making all marker size the same regardless of the data points. However, there is also an option to scale the circles to the corresponding data points. `Min` and `Max` marker size has to be set such that the Marker layer can scale within this range.
|
||||||
|
- **Marker Shape** allows you to choose the shape, icon, or graphic to aid in providing additional visual context to your data. Choose from assets that are included with Grafana such as simple shapes or the Unicon library. You can also specify a URL containing an image asset. The image must be a scalable vector graphic (SVG).
|
||||||
|
- **Fill opacity** configures the transparency of each marker.
|
||||||
|
|
||||||
|
### Heatmap layer
|
||||||
|
|
||||||
|
The heatmap layer clusters various data points to visualize locations with different densities.
|
||||||
|
To add a heatmap layer:
|
||||||
|
|
||||||
|
Click on the drop-down menu under Data Layer and choose `Heatmap`.
|
||||||
|
|
||||||
|
Similar to `Markers`, you are prompted with various options to determine which data points to visualize and how.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
- **Weight values** configure the intensity of the heatmap clusters. `Fixed value` keeps a constant weight value throughout all data points. This value should be in the range of 0~1. Similar to Markers, there is an alternate option in the drop-down to automatically scale the weight values depending on data values.
|
||||||
|
- **Radius** configures the size of the heatmap clusters.
|
||||||
|
- **Blur** configures the amount of blur on each cluster.
|
||||||
|
|
||||||
|
### GeoJSON layer
|
||||||
|
|
||||||
|
The GeoJSON layer allows you to select and load a static GeoJSON file from the filesystem.
|
||||||
|
|
||||||
|
- **GeoJSON URL** provides a choice of GeoJSON files that ship with Grafana.
|
||||||
|
- **Default Style** controls which styles to apply when no rules above match.
|
||||||
|
- **Color** configures the color of the default style
|
||||||
|
- **Opacity** configures the default opacity
|
||||||
|
- **Style Rules** apply styles based on feature properties
|
||||||
|
- **Rule** allows you to select a _feature_, _condition_, and _value_ from the GeoJSON file in order to define a rule. The trash bin icon can be used to delete the current rule.
|
||||||
|
- **Color** configures the color of the style for the current rule
|
||||||
|
- **Opacity** configures the transparency level for the current rule
|
||||||
|
- **Add style rule** creates additional style rules.
|
||||||
|
|
||||||
## Base layer
|
## Base layer
|
||||||
|
|
||||||
The base layer loads in a blank world map from the tile server to the Grafana panel. Several base layer options are available each with specific configuration options to style the base map. The default base layer is CartoDB base map. Custom default base layers can be defined in the `.ini` configuration file.
|
The base layer loads in a blank world map from the tile server to the Grafana panel. Several base layer options are available each with specific configuration options to style the base map. The default base layer is CartoDB base map. Custom default base layers can be defined in the `.ini` configuration file.
|
||||||
@@ -80,56 +174,3 @@ default_baselayer_config = `{
|
|||||||
```
|
```
|
||||||
|
|
||||||
`enable_custom_baselayers` allows you to enable or disable custom open source base maps that are already implemented. The default is `true`.
|
`enable_custom_baselayers` allows you to enable or disable custom open source base maps that are already implemented. The default is `true`.
|
||||||
|
|
||||||
## Data layer
|
|
||||||
|
|
||||||
The data layer in the Geomap plugin determines how you visualize geospatial data on top of the base map.
|
|
||||||
|
|
||||||
### Location
|
|
||||||
|
|
||||||
The Geomap panel needs a source of geographical data. This data comes from a database query, and there are four mapping options for your data.
|
|
||||||
|
|
||||||
- **Auto** automatically searches for location data. Use this option when your query is based on one of the following names for data fields.
|
|
||||||
- geohash: “geohash”
|
|
||||||
- latitude: “latitude”, “lat”
|
|
||||||
- longitude: “longitude”, “lng”, “lon”
|
|
||||||
- lookup: “lookup”
|
|
||||||
- **Coords** specifies that your query holds coordinate data. You will get prompted to select numeric data fields for latitude and longitude from your database query.
|
|
||||||
- **Geohash** specifies that your query holds geohash data. You will get prompted to select a string data field for the geohash from your database query.
|
|
||||||
- **Lookup** specifies that your query holds location name data that needs to be mapped to a value. You will get prompted to select the lookup field from your database query and a gazetteer. The gazetteer is the directory that is used to map your queried data to a geographical point.
|
|
||||||
|
|
||||||
### Markers layer
|
|
||||||
|
|
||||||
The markers layer allows you to display data points as different marker shapes such as circle, squares, triangles, stars, and more.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **Marker Color** configures the color of the marker. The default `Fixed size` keeps all points a single color. There is an alternate option to have multiple colors depending on the data point values and the threshold set at the `Thresholds` section.
|
|
||||||
- **Marker Size** configures the size of the marker. Default is `Fixed size`, making all marker size the same regardless of the data points. However, there is also an option to scale the circles to the corresponding data points. `Min` and `Max` marker size has to be set such that the Marker layer can scale within these range.
|
|
||||||
- **Marker Shape** provides you with the flexibility to visualize the data points differently.
|
|
||||||
- Circle
|
|
||||||
- Square
|
|
||||||
- Triangle
|
|
||||||
- Star
|
|
||||||
- Cross
|
|
||||||
- X
|
|
||||||
- **Fill opacity** configures the transparency of each marker.
|
|
||||||
|
|
||||||
### Heatmap layer
|
|
||||||
|
|
||||||
The heatmap layer clusters various data points to visualize locations with different densities.
|
|
||||||
To add a heatmap layer:
|
|
||||||
|
|
||||||
Click on the drop-down menu under Data Layer and choose `Heatmap`.
|
|
||||||
|
|
||||||
Similar to `Markers`, you are prompted with various options to determine which data points to visualize and how.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- **Weight values** configures the intensity of the heatmap clusters. `Fixed value` keeps a constant weight value throughout all data points. This value should be in the range of 0~1. Similar to Markers, there is an alternate option in the drop-down to automatically scale the weight values depending on data values.
|
|
||||||
- **Radius** configures the size of the heatmap clusters.
|
|
||||||
- **Blur** configures the amount of blur on each cluster.
|
|
||||||
|
|||||||
69
docs/sources/whatsnew/whats-new-in-v8-3.md
Normal file
69
docs/sources/whatsnew/whats-new-in-v8-3.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
+++
|
||||||
|
title = "What's new in Grafana v8.3"
|
||||||
|
description = "Feature and improvement highlights for Grafana v8.3"
|
||||||
|
keywords = ["grafana", "new", "documentation", "8.3", "release notes"]
|
||||||
|
weight = -33
|
||||||
|
aliases = ["/docs/grafana/latest/guides/whats-new-in-v8-3/"]
|
||||||
|
[_build]
|
||||||
|
list = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
# What’s new in Grafana v8.3
|
||||||
|
|
||||||
|
Grafana 8.3 is an exciting release for Grafana Labs. This release includes the new Candlestick Panel, a new visualization suggestions engine and, for enterprise users, Recorded Queries.
|
||||||
|
|
||||||
|
For Open Source users it also marks the first time Grafana Alerting, formerly unified alerting, is enabled by default for new Grafana installations. Grafana Alerting in 8.3 is the flexible, single pane of glass for all your alerts. Included in this release is expanded provisioning support for notifiers, contact points, and alert rules, alongside auditing and fine-grained access control for our Enterprise customers.
|
||||||
|
|
||||||
|
We’ve summarized what’s new in the release here, but you might also be interested in the announcement blog post as well. If you’d like all the details you can check out the complete [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md).
|
||||||
|
|
||||||
|
# Grafana OSS
|
||||||
|
|
||||||
|
## Accessibility
|
||||||
|
|
||||||
|
We’ve continued to make progress on improving Grafana’s accessibility. In Grafana 8.3 we’ve updated the main menu with improved keyboard navigation. We’ve also improved Grafana’s behavior when navigating through elements with the tab key (tab stops) and finished our work to make Grafana’s viewer roles compatible with assistive technologies such as screen readers. You can read our accessibility statement here and reach out to us with accessibility issues using our community Slack or our community forums.
|
||||||
|
|
||||||
|
## Dashboards and Visualizations
|
||||||
|
|
||||||
|
### Panel Suggestions
|
||||||
|
|
||||||
|
Grafana will now make suggestions for visualization types based on the current data surfaced by a query or queries in a panel. This makes seeing available, possible interpretations of your data more straightforward and can be a useful jumping-off point when building panels and dashboards with specific goals in mind.
|
||||||
|
|
||||||
|
### Candlestick Panel (Beta)
|
||||||
|
|
||||||
|
Grafana 8.3 is shipping with a new Candlestick panel that is so much more. Beyond candlesticks and open, high, low, high, close, behaviors, it includes customizable up/down colors, bar color determined by intra-period or inter-period movement of the data, volume histogram with matching colors, and the ability to detach or create a separate volume histogram to allow for more flexible dashboard design. You can read more about it here [link to do].
|
||||||
|
|
||||||
|
# Grafana Enterprise
|
||||||
|
|
||||||
|
## Recorded Queries
|
||||||
|
|
||||||
|
Recorded queries turn “point in time” data into time series.
|
||||||
|
|
||||||
|
Recorded queries allow you to export the results of certain non-time series queries to the Enterprise backend in order to store data over time and allow customers to construct their own time series.
|
||||||
|
|
||||||
|
This new feature is especially helpful for Enterprise customers using plugins because many new plugins, like ServiceNow and Jira, don’t return time series so customers weren’t able to plot historical data over time. With recorded queries, now they can! For more information
|
||||||
|
|
||||||
|
## Assign fine-grained permissions directly to users with the new role picker (beta)
|
||||||
|
|
||||||
|
Sometimes the Viewer, Editor, and Admin roles just don’t fit what a certain user needs to do in Grafana. Now you can assign fine-grained roles directly to users, so they can create reports, use Explore mode, create data sources, and perform other specific actions in Grafana. The role picker can be access from the Grafana Admin user management page.
|
||||||
|
|
||||||
|
## Use fine-grained access control for Organizations and Licensing (beta)
|
||||||
|
|
||||||
|
We’ve added new permissions to fine-grained access control to help you specify actions that users can perform. Now you can assign permissions to manage Organizations and License functions in Grafana, in addition to Users, Data Sources, Reports, and other resources. Fine-grained access control remains in beta and we will continue to add new permissions until all of Grafana’s endpoints are covered. For a complete list of the actions you can permit using fine-grained access control, see the [reference](https://grafana.com/docs/grafana/next/enterprise/access-control/fine-grained-access-control-references/).
|
||||||
|
|
||||||
|
## Get your encryption key from a Key Management Service
|
||||||
|
|
||||||
|
Grafana’s database contains secrets, like the credentials used to query data sources, send alert notifications and perform other functions within Grafana. These secrets are encrypted using keys, which are usually stored in Grafana’s configuration file. Now you can get your encryption key from Amazon KMS, Azure Key Vault, or Hashicorp Vault. This allows you to centrally manage your Grafana encryption key and reduce the chances it will leak.
|
||||||
|
|
||||||
|
In order to support this, we’ve upgraded Grafana Enterprise to use envelope encryption, which complements the KMS integration by adding a layer of indirection to the encryption process. Instead of encrypting all secrets with a single key, Grafana uses a set of keys called data encryption keys (DEKs) to encrypt them. These data encryption keys are themselves encrypted with a single key encryption key (KEK). With envelope encryption, you can store a KEK in your KMS, and still quickly encrypt and decrypt data using DEKs stored within the Grafana database.
|
||||||
|
|
||||||
|
## Pay the same for all users, regardless of their permissions
|
||||||
|
|
||||||
|
Are you tired of managing user permissions because your license only allows a certain number of Viewers and Editors or Admins? So were we. We’ve added support for combined user pricing, where all users cost the same and fall into the same license bucket in Grafana Enterprise. This is a specific license option and must be updated in your contract. To learn more, refer to our [licensing docs](https://grafana.com/docs/grafana/latest/enterprise/license/license-restrictions/). To switch to combined user pricing, contact your Grafana Labs account team.
|
||||||
|
|
||||||
|
## Author dashboards faster with resource caching
|
||||||
|
|
||||||
|
Your query editor just became faster. [Query caching](https://grafana.com/docs/grafana/latest/enterprise/query-caching/) improves query performance and sometimes reduces cost, by reducing the number of repetitive queries performed against data sources. Resource caching does the same thing but for resource calls, like retrieving the list of applications in the AppDynamics editor, the list of metrics from Datadog, or the list of values in a template variable dropdown. This makes for a zippier user experience for everyone writing queries in Grafana.
|
||||||
|
|
||||||
|
## Review audit logs for more services, like alerting
|
||||||
|
|
||||||
|
[Audit logs](https://grafana.com/docs/grafana/latest/enterprise/auditing/) are a record of the actions users perform in Grafana, which you can investigate in case of a security incident or to understand Grafana usage better. We’ve added audit logs for new actions performed against plugins, data sources, library elements, and Grafana’s new alerting service. This ensures that if a user makes a change anywhere in Grafana Enterprise, you’ll have a record of it. For details, refer to the [Auditing docs](https://grafana.com/docs/grafana/latest/enterprise/auditing/).
|
||||||
@@ -5,7 +5,7 @@ e2e.scenario({
|
|||||||
itName: 'Ensure you can import a number of json test dashboards from a specific test directory',
|
itName: 'Ensure you can import a number of json test dashboards from a specific test directory',
|
||||||
addScenarioDataSource: false,
|
addScenarioDataSource: false,
|
||||||
addScenarioDashBoard: false,
|
addScenarioDashBoard: false,
|
||||||
skipScenario: false,
|
skipScenario: true,
|
||||||
scenario: () => {
|
scenario: () => {
|
||||||
e2e.flows.importDashboards('/dashboards', 1000);
|
e2e.flows.importDashboards('/dashboards', 1000);
|
||||||
},
|
},
|
||||||
@@ -7,9 +7,11 @@ e2e.scenario({
|
|||||||
itName: 'Tests various Panel edit scenarios',
|
itName: 'Tests various Panel edit scenarios',
|
||||||
addScenarioDataSource: false,
|
addScenarioDataSource: false,
|
||||||
addScenarioDashBoard: false,
|
addScenarioDashBoard: false,
|
||||||
skipScenario: false,
|
skipScenario: true,
|
||||||
scenario: () => {
|
scenario: () => {
|
||||||
|
e2e().intercept('/api/ds/query').as('query');
|
||||||
e2e.flows.openDashboard({ uid: 'TkZXxlNG3' });
|
e2e.flows.openDashboard({ uid: 'TkZXxlNG3' });
|
||||||
|
e2e().wait('@query');
|
||||||
|
|
||||||
e2e.flows.openPanelMenuItem(e2e.flows.PanelMenuItems.Edit, PANEL_UNDER_TEST);
|
e2e.flows.openPanelMenuItem(e2e.flows.PanelMenuItems.Edit, PANEL_UNDER_TEST);
|
||||||
|
|
||||||
@@ -43,13 +45,12 @@ e2e.scenario({
|
|||||||
|
|
||||||
// Can change to Alerts tab (graph panel is the default vis so the alerts tab should be rendered)
|
// Can change to Alerts tab (graph panel is the default vis so the alerts tab should be rendered)
|
||||||
e2e.components.Tab.title('Alert').should('be.visible').click();
|
e2e.components.Tab.title('Alert').should('be.visible').click();
|
||||||
e2e.components.Tab.active().within((li: JQuery<HTMLLIElement>) => {
|
e2e.components.Tab.active().should('have.text', 'Alert0'); // there's no alert so therefore Alert + 0
|
||||||
expect(li.text()).equals('Alert0'); // there's no alert so therefore Alert + 0
|
e2e.components.AlertTab.content().should('not.exist');
|
||||||
});
|
|
||||||
e2e.components.AlertTab.content().should('be.visible');
|
|
||||||
e2e.components.QueryTab.content().should('not.exist');
|
e2e.components.QueryTab.content().should('not.exist');
|
||||||
e2e.components.TransformTab.content().should('not.exist');
|
e2e.components.TransformTab.content().should('not.exist');
|
||||||
e2e.components.PanelAlertTabContent.content().should('not.exist');
|
e2e.components.PanelAlertTabContent.content().should('exist');
|
||||||
|
e2e.components.PanelAlertTabContent.content().should('be.visible');
|
||||||
|
|
||||||
e2e.components.Tab.title('Query').should('be.visible').click();
|
e2e.components.Tab.title('Query').should('be.visible').click();
|
||||||
});
|
});
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { e2e } from '@grafana/e2e';
|
import { e2e } from '@grafana/e2e';
|
||||||
import { expect } from '../../../public/test/lib/common';
|
import { expect } from '../../public/test/lib/common';
|
||||||
|
|
||||||
const flakyTimeout = 10000;
|
const flakyTimeout = 10000;
|
||||||
|
|
||||||
@@ -8,25 +8,35 @@ PORT=${PORT:-$DEFAULT_PORT}
|
|||||||
|
|
||||||
echo -e "Starting Cypress scenarios"
|
echo -e "Starting Cypress scenarios"
|
||||||
|
|
||||||
|
args=("$@")
|
||||||
|
|
||||||
CMD="start"
|
CMD="start"
|
||||||
PARAMS=""
|
PARAMS=""
|
||||||
SLOWMO=0
|
SLOWMO=0
|
||||||
URL=${BASE_URL:-"http://$HOST:$PORT"}
|
URL=${BASE_URL:-"http://$HOST:$PORT"}
|
||||||
SUITE=${SUITE:-$DEFAULT_SUITE}
|
integrationFolder=../../e2e
|
||||||
|
testFiles=*-suite/*spec.ts
|
||||||
if [ "$1" == "debug" ]; then
|
|
||||||
echo -e "Debug mode"
|
|
||||||
SLOWMO=1
|
|
||||||
PARAMS="--no-exit"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" == "dev" ]; then
|
|
||||||
echo "Dev mode"
|
|
||||||
CMD="open"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd packages/grafana-e2e
|
cd packages/grafana-e2e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"debug")
|
||||||
|
echo -e "Debug mode"
|
||||||
|
SLOWMO=1
|
||||||
|
PARAMS="--no-exit"
|
||||||
|
;;
|
||||||
|
"dev")
|
||||||
|
echo "Dev mode"
|
||||||
|
CMD="open"
|
||||||
|
;;
|
||||||
|
"")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
integrationFolder=../../e2e/"${args[0]}"
|
||||||
|
testFiles="*.spec.ts"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
yarn $CMD --env BASE_URL=$URL,SLOWMO=$SLOWMO \
|
yarn $CMD --env BASE_URL=$URL,SLOWMO=$SLOWMO \
|
||||||
--config defaultCommandTimeout=30000,integrationFolder=../../e2e/$SUITE/specs,screenshotsFolder=../../e2e/$SUITE/screenshots,videosFolder=../../e2e/$SUITE/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false,videoUploadOnPasses=false \
|
--config defaultCommandTimeout=30000,testFiles=$testFiles,integrationFolder=$integrationFolder,screenshotsFolder=../../e2e/"${args[0]}"/screenshots,videosFolder=../../e2e/"${args[0]}"/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false,videoUploadOnPasses=false \
|
||||||
$PARAMS
|
$PARAMS
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { e2e } from '@grafana/e2e';
|
import { e2e } from '@grafana/e2e';
|
||||||
import { smokeTestScenario } from '../../shared/smokeTestScenario';
|
import { smokeTestScenario } from '../shared/smokeTestScenario';
|
||||||
|
|
||||||
e2e.scenario(smokeTestScenario);
|
e2e.scenario(smokeTestScenario);
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 94 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB |
@@ -8,4 +8,3 @@ DEFAULT_PACKAGE_FILE=dist/grafana-*linux-amd64.tar.gz
|
|||||||
PROV_DIR=$RUNDIR/conf/provisioning
|
PROV_DIR=$RUNDIR/conf/provisioning
|
||||||
DEFAULT_HOST=localhost
|
DEFAULT_HOST=localhost
|
||||||
DEFAULT_PORT=3001
|
DEFAULT_PORT=3001
|
||||||
DEFAULT_SUITE=suite1
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ const dataSourceName = 'PromExemplar';
|
|||||||
const addDataSource = () => {
|
const addDataSource = () => {
|
||||||
e2e.flows.addDataSource({
|
e2e.flows.addDataSource({
|
||||||
type: 'Prometheus',
|
type: 'Prometheus',
|
||||||
expectedAlertMessage: 'Bad Gateway',
|
expectedAlertMessage: 'Error reading Prometheus',
|
||||||
name: dataSourceName,
|
name: dataSourceName,
|
||||||
form: () => {
|
form: () => {
|
||||||
e2e.components.DataSource.Prometheus.configPage.exemplarsAddButton().click();
|
e2e.components.DataSource.Prometheus.configPage.exemplarsAddButton().click();
|
||||||
@@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
. e2e/variables
|
. e2e/variables
|
||||||
|
|
||||||
SUITE=verify ./e2e/run-suite
|
./e2e/run-suite verify/specs
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
[[Subject .Subject "[[.Title]]"]]
|
[[Subject .Subject "[[.Title]]"]]
|
||||||
|
|
||||||
[[ define "alert" ]]
|
[[ define "alert" ]]
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="value">
|
||||||
|
<span class="value-heading">Value:</span> <span class="value-value">[[ .ValueString ]]</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
[[ if gt (len .Annotations.SortedPairs) 0 ]]
|
[[ if gt (len .Annotations.SortedPairs) 0 ]]
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="annotations">
|
<td colspan="2" class="annotations">
|
||||||
@@ -108,6 +113,16 @@
|
|||||||
margin: 0 10px 0 0;
|
margin: 0 10px 0 0;
|
||||||
padding: 5px 9px;
|
padding: 5px 9px;
|
||||||
}
|
}
|
||||||
|
.value {
|
||||||
|
font-size: 14px;
|
||||||
|
padding-top: 24px;
|
||||||
|
}
|
||||||
|
.value-heading {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.value-value {
|
||||||
|
padding-left: 8px;
|
||||||
|
}
|
||||||
.annotations {
|
.annotations {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
padding: 24px 0 12px 0;
|
padding: 24px 0 12px 0;
|
||||||
|
|||||||
6
go.mod
6
go.mod
@@ -55,7 +55,7 @@ require (
|
|||||||
github.com/gosimple/slug v1.9.0
|
github.com/gosimple/slug v1.9.0
|
||||||
github.com/grafana/cuetsy v0.0.0-20210928021233-5ddfb47f9a7d
|
github.com/grafana/cuetsy v0.0.0-20210928021233-5ddfb47f9a7d
|
||||||
github.com/grafana/grafana-aws-sdk v0.7.0
|
github.com/grafana/grafana-aws-sdk v0.7.0
|
||||||
github.com/grafana/grafana-plugin-sdk-go v0.116.0
|
github.com/grafana/grafana-plugin-sdk-go v0.118.0
|
||||||
github.com/grafana/loki v1.6.2-0.20211015002020-7832783b1caa
|
github.com/grafana/loki v1.6.2-0.20211015002020-7832783b1caa
|
||||||
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
|
||||||
github.com/hashicorp/go-hclog v0.16.1
|
github.com/hashicorp/go-hclog v0.16.1
|
||||||
@@ -81,7 +81,7 @@ require (
|
|||||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||||
github.com/pkg/browser v0.0.0-20210904010418-6d279e18f982 // indirect
|
github.com/pkg/browser v0.0.0-20210904010418-6d279e18f982 // indirect
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/prometheus/alertmanager v0.23.1-0.20211021072955-1b8afe7cb5aa
|
github.com/prometheus/alertmanager v0.23.1-0.20211116083607-e2a10119aaf7
|
||||||
github.com/prometheus/client_golang v1.11.0
|
github.com/prometheus/client_golang v1.11.0
|
||||||
github.com/prometheus/client_model v0.2.0
|
github.com/prometheus/client_model v0.2.0
|
||||||
github.com/prometheus/common v0.32.1
|
github.com/prometheus/common v0.32.1
|
||||||
@@ -225,7 +225,7 @@ require (
|
|||||||
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
|
github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/prometheus/common/sigv4 v0.1.0 // indirect
|
github.com/prometheus/common/sigv4 v0.1.0 // indirect
|
||||||
github.com/prometheus/exporter-toolkit v0.6.1 // indirect
|
github.com/prometheus/exporter-toolkit v0.7.0 // indirect
|
||||||
github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289 // indirect
|
github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289 // indirect
|
||||||
github.com/prometheus/procfs v0.6.0 // indirect
|
github.com/prometheus/procfs v0.6.0 // indirect
|
||||||
github.com/protocolbuffers/txtpbfmt v0.0.0-20201118171849-f6a6b3f636fc // indirect
|
github.com/protocolbuffers/txtpbfmt v0.0.0-20201118171849-f6a6b3f636fc // indirect
|
||||||
|
|||||||
11
go.sum
11
go.sum
@@ -1227,8 +1227,8 @@ github.com/grafana/grafana-google-sdk-go v0.0.0-20211104130251-b190293eaf58 h1:2
|
|||||||
github.com/grafana/grafana-google-sdk-go v0.0.0-20211104130251-b190293eaf58/go.mod h1:Vo2TKWfDVmNTELBUM+3lkrZvFtBws0qSZdXhQxRdJrE=
|
github.com/grafana/grafana-google-sdk-go v0.0.0-20211104130251-b190293eaf58/go.mod h1:Vo2TKWfDVmNTELBUM+3lkrZvFtBws0qSZdXhQxRdJrE=
|
||||||
github.com/grafana/grafana-plugin-sdk-go v0.79.0/go.mod h1:NvxLzGkVhnoBKwzkst6CFfpMFKwAdIUZ1q8ssuLeF60=
|
github.com/grafana/grafana-plugin-sdk-go v0.79.0/go.mod h1:NvxLzGkVhnoBKwzkst6CFfpMFKwAdIUZ1q8ssuLeF60=
|
||||||
github.com/grafana/grafana-plugin-sdk-go v0.114.0/go.mod h1:D7x3ah+1d4phNXpbnOaxa/osSaZlwh9/ZUnGGzegRbk=
|
github.com/grafana/grafana-plugin-sdk-go v0.114.0/go.mod h1:D7x3ah+1d4phNXpbnOaxa/osSaZlwh9/ZUnGGzegRbk=
|
||||||
github.com/grafana/grafana-plugin-sdk-go v0.116.0 h1:I3BN7tc2jdXNRI8/3g+Pmf/NgJFbSudQslMESF10qD0=
|
github.com/grafana/grafana-plugin-sdk-go v0.118.0 h1:n2hU2Hkq0vzUG7g1meS77/yvZZWgEPiPtGuG4I1Jl94=
|
||||||
github.com/grafana/grafana-plugin-sdk-go v0.116.0/go.mod h1:F3F8qNzdsf6e+Yq35AgwaNOiCv+txpzGURyz+gJ5CuM=
|
github.com/grafana/grafana-plugin-sdk-go v0.118.0/go.mod h1:Mhy+5mC6rSqEhnzop1wEh//n/fgkzNK5pRgg3DfCp4g=
|
||||||
github.com/grafana/loki v1.6.2-0.20211015002020-7832783b1caa h1:+pXjAxavVR2FKKNsuuCXGCWEj8XGc1Af6SPiyBpzU2A=
|
github.com/grafana/loki v1.6.2-0.20211015002020-7832783b1caa h1:+pXjAxavVR2FKKNsuuCXGCWEj8XGc1Af6SPiyBpzU2A=
|
||||||
github.com/grafana/loki v1.6.2-0.20211015002020-7832783b1caa/go.mod h1:0O8o/juxNSKN/e+DzWDTRkl7Zm8CkZcz0NDqEdojlrk=
|
github.com/grafana/loki v1.6.2-0.20211015002020-7832783b1caa/go.mod h1:0O8o/juxNSKN/e+DzWDTRkl7Zm8CkZcz0NDqEdojlrk=
|
||||||
github.com/grafana/saml v0.0.0-20211007135653-aed1b2edd86b h1:YiSGp34F4V0G08HHx1cJBf2GVgwYAkXQjzuVs1t8jYk=
|
github.com/grafana/saml v0.0.0-20211007135653-aed1b2edd86b h1:YiSGp34F4V0G08HHx1cJBf2GVgwYAkXQjzuVs1t8jYk=
|
||||||
@@ -1967,8 +1967,8 @@ github.com/prometheus/alertmanager v0.21.1-0.20210422101724-8176f78a70e1/go.mod
|
|||||||
github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE=
|
github.com/prometheus/alertmanager v0.22.2/go.mod h1:rYinOWxFuCnNssc3iOjn2oMTlhLaPcUuqV5yk5JKUAE=
|
||||||
github.com/prometheus/alertmanager v0.23.0/go.mod h1:0MLTrjQI8EuVmvykEhcfr/7X0xmaDAZrqMgxIq3OXHk=
|
github.com/prometheus/alertmanager v0.23.0/go.mod h1:0MLTrjQI8EuVmvykEhcfr/7X0xmaDAZrqMgxIq3OXHk=
|
||||||
github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a/go.mod h1:U7pGu+z7A9ZKhK8lq1MvIOp5GdVlZjwOYk+S0h3LSbA=
|
github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a/go.mod h1:U7pGu+z7A9ZKhK8lq1MvIOp5GdVlZjwOYk+S0h3LSbA=
|
||||||
github.com/prometheus/alertmanager v0.23.1-0.20211021072955-1b8afe7cb5aa h1:KKgVswVOfDYOn9GNtO7bR3r4vyM77WXuJsyGxMl1Zgs=
|
github.com/prometheus/alertmanager v0.23.1-0.20211116083607-e2a10119aaf7 h1:OMwDo53awRp+UzaBrwmVC7HJiAMYP/niBJfKcGpPiac=
|
||||||
github.com/prometheus/alertmanager v0.23.1-0.20211021072955-1b8afe7cb5aa/go.mod h1:pRqzxS2B4tciJfx2JUvR67udJrQeSUZ603OQQFFUrIQ=
|
github.com/prometheus/alertmanager v0.23.1-0.20211116083607-e2a10119aaf7/go.mod h1:1UH4XA4DAXzsvofKVzcXmC0mqt6Y8BZP9JcQWKDmbFc=
|
||||||
github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||||
@@ -2030,8 +2030,9 @@ github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdD
|
|||||||
github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
|
github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
|
||||||
github.com/prometheus/exporter-toolkit v0.5.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg=
|
github.com/prometheus/exporter-toolkit v0.5.0/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg=
|
||||||
github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg=
|
github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg=
|
||||||
github.com/prometheus/exporter-toolkit v0.6.1 h1:Aqk75wQD92N9CqmTlZwjKwq6272nOGrWIbc8Z7+xQO0=
|
|
||||||
github.com/prometheus/exporter-toolkit v0.6.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g=
|
github.com/prometheus/exporter-toolkit v0.6.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g=
|
||||||
|
github.com/prometheus/exporter-toolkit v0.7.0 h1:XtYeVeeC5daG4txbc9+mieKq+/AK4gtIBLl9Mulrjnk=
|
||||||
|
github.com/prometheus/exporter-toolkit v0.7.0/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g=
|
||||||
github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289 h1:dTUS1vaLWq+Y6XKOTnrFpoVsQKLCbCp1OLj24TDi7oM=
|
github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289 h1:dTUS1vaLWq+Y6XKOTnrFpoVsQKLCbCp1OLj24TDi7oM=
|
||||||
github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc=
|
github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289/go.mod h1:FGbBv5OPKjch+jNUJmEQpMZytIdyW0NdBtWFcfSKusc=
|
||||||
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ find . -name 'vendor' -prune -o -name '*.libsonnet' -print -o -name '*.jsonnet'
|
|||||||
${JSONNET_FMT} "$f" | diff -u "$f" -; \
|
${JSONNET_FMT} "$f" | diff -u "$f" -; \
|
||||||
done
|
done
|
||||||
|
|
||||||
mixtool lint mixin.libsonnet
|
#mixtool lint mixin.libsonnet
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{
|
{
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"packages": ["packages/*"],
|
"packages": [
|
||||||
"version": "8.3.0-pre"
|
"packages/*"
|
||||||
|
],
|
||||||
|
"version": "8.3.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"private": true,
|
"private": true,
|
||||||
"name": "grafana",
|
"name": "grafana",
|
||||||
"version": "8.3.0-pre",
|
"version": "8.3.0",
|
||||||
"repository": "github:grafana/grafana",
|
"repository": "github:grafana/grafana",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
|
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
"postinstall": "husky install"
|
"postinstall": "husky install"
|
||||||
},
|
},
|
||||||
"grafana": {
|
"grafana": {
|
||||||
"whatsNewUrl": "https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v8-2/",
|
"whatsNewUrl": "https://grafana.com/docs/grafana/next/whatsnew/whats-new-in-v8-3/",
|
||||||
"releaseNotesUrl": "https://grafana.com/docs/grafana/next/release-notes/"
|
"releaseNotesUrl": "https://grafana.com/docs/grafana/next/release-notes/"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"author": "Grafana Labs",
|
"author": "Grafana Labs",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"name": "@grafana/data",
|
"name": "@grafana/data",
|
||||||
"version": "8.3.0-pre",
|
"version": "8.3.0",
|
||||||
"description": "Grafana Data Library",
|
"description": "Grafana Data Library",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"typescript"
|
"typescript"
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@braintree/sanitize-url": "5.0.2",
|
"@braintree/sanitize-url": "5.0.2",
|
||||||
"@grafana/schema": "8.3.0-pre",
|
"@grafana/schema": "8.3.0",
|
||||||
"@types/d3-interpolate": "^1.4.0",
|
"@types/d3-interpolate": "^1.4.0",
|
||||||
"d3-interpolate": "1.4.0",
|
"d3-interpolate": "1.4.0",
|
||||||
"date-fns": "2.21.3",
|
"date-fns": "2.21.3",
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { DataFrameDTO, FieldType, TableData, TimeSeries } from '../types/index';
|
|||||||
import { dateTime } from '../datetime/moment_wrapper';
|
import { dateTime } from '../datetime/moment_wrapper';
|
||||||
import { MutableDataFrame } from './MutableDataFrame';
|
import { MutableDataFrame } from './MutableDataFrame';
|
||||||
import { ArrayDataFrame } from './ArrayDataFrame';
|
import { ArrayDataFrame } from './ArrayDataFrame';
|
||||||
|
import { getFieldTypeFromValue } from '.';
|
||||||
|
|
||||||
describe('toDataFrame', () => {
|
describe('toDataFrame', () => {
|
||||||
it('converts timeseries to series', () => {
|
it('converts timeseries to series', () => {
|
||||||
@@ -118,15 +119,13 @@ describe('toDataFrame', () => {
|
|||||||
expect(guessFieldTypeFromValue('xxxx')).toBe(FieldType.string);
|
expect(guessFieldTypeFromValue('xxxx')).toBe(FieldType.string);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Guess Column Types from strings', () => {
|
it('Get column types from values', () => {
|
||||||
expect(guessFieldTypeFromValue('1')).toBe(FieldType.number);
|
expect(getFieldTypeFromValue(1)).toBe(FieldType.number);
|
||||||
expect(guessFieldTypeFromValue('1.234')).toBe(FieldType.number);
|
expect(getFieldTypeFromValue(1.234)).toBe(FieldType.number);
|
||||||
expect(guessFieldTypeFromValue('NaN')).toBe(FieldType.number);
|
expect(getFieldTypeFromValue(NaN)).toBe(FieldType.number);
|
||||||
expect(guessFieldTypeFromValue('3.125e7')).toBe(FieldType.number);
|
expect(getFieldTypeFromValue(3.125e7)).toBe(FieldType.number);
|
||||||
expect(guessFieldTypeFromValue('True')).toBe(FieldType.boolean);
|
expect(getFieldTypeFromValue(true)).toBe(FieldType.boolean);
|
||||||
expect(guessFieldTypeFromValue('FALSE')).toBe(FieldType.boolean);
|
expect(getFieldTypeFromValue('xxxx')).toBe(FieldType.string);
|
||||||
expect(guessFieldTypeFromValue('true')).toBe(FieldType.boolean);
|
|
||||||
expect(guessFieldTypeFromValue('xxxx')).toBe(FieldType.string);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Guess Column Types from series', () => {
|
it('Guess Column Types from series', () => {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function convertTableToDataFrame(table: TableData): DataFrame {
|
|||||||
// TODO: should be Column but type does not exists there so not sure whats up here.
|
// TODO: should be Column but type does not exists there so not sure whats up here.
|
||||||
const { text, type, ...disp } = c as any;
|
const { text, type, ...disp } = c as any;
|
||||||
return {
|
return {
|
||||||
name: text, // rename 'text' to the 'name' field
|
name: text?.length ? text : c, // rename 'text' to the 'name' field
|
||||||
config: (disp || {}) as FieldConfig,
|
config: (disp || {}) as FieldConfig,
|
||||||
values: new ArrayVector(),
|
values: new ArrayVector(),
|
||||||
type: type && Object.values(FieldType).includes(type as FieldType) ? (type as FieldType) : FieldType.other,
|
type: type && Object.values(FieldType).includes(type as FieldType) ? (type as FieldType) : FieldType.other,
|
||||||
@@ -189,10 +189,33 @@ export function guessFieldTypeFromNameAndValue(name: string, v: any): FieldType
|
|||||||
return guessFieldTypeFromValue(v);
|
return guessFieldTypeFromValue(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check the field type to see what the contents are
|
||||||
|
*/
|
||||||
|
export function getFieldTypeFromValue(v: any): FieldType {
|
||||||
|
if (v instanceof Date || isDateTime(v)) {
|
||||||
|
return FieldType.time;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNumber(v)) {
|
||||||
|
return FieldType.number;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isString(v)) {
|
||||||
|
return FieldType.string;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isBoolean(v)) {
|
||||||
|
return FieldType.boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FieldType.other;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given a value this will guess the best column type
|
* Given a value this will guess the best column type
|
||||||
*
|
*
|
||||||
* TODO: better Date/Time support! Look for standard date strings?
|
* NOTE: this is will try to see if string values can be mapped to other types (like number)
|
||||||
*/
|
*/
|
||||||
export function guessFieldTypeFromValue(v: any): FieldType {
|
export function guessFieldTypeFromValue(v: any): FieldType {
|
||||||
if (v instanceof Date || isDateTime(v)) {
|
if (v instanceof Date || isDateTime(v)) {
|
||||||
@@ -237,7 +260,7 @@ export function guessFieldTypeForField(field: Field): FieldType | undefined {
|
|||||||
// 2. Check the first non-null value
|
// 2. Check the first non-null value
|
||||||
for (let i = 0; i < field.values.length; i++) {
|
for (let i = 0; i < field.values.length; i++) {
|
||||||
const v = field.values.get(i);
|
const v = field.values.get(i);
|
||||||
if (v !== null) {
|
if (v != null) {
|
||||||
return guessFieldTypeFromValue(v);
|
return guessFieldTypeFromValue(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,11 +70,11 @@ describe('Process simple display values', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('array of text', () => {
|
it('array of text', () => {
|
||||||
assertSame(['a', 'b', 'c'], processors, { text: 'a,b,c', numeric: NaN });
|
assertSame(['a', 'b', 'c'], processors, { text: 'a, b, c', numeric: NaN });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('array of numbers', () => {
|
it('array of numbers', () => {
|
||||||
assertSame([1, 2, 3], processors, { text: '1,2,3', numeric: NaN });
|
assertSame([1, 2, 3], processors, { text: '1, 2, 3', numeric: NaN });
|
||||||
});
|
});
|
||||||
|
|
||||||
it('empty object', () => {
|
it('empty object', () => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Libraries
|
// Libraries
|
||||||
import { toString, toNumber as _toNumber, isEmpty, isBoolean } from 'lodash';
|
import { toString, toNumber as _toNumber, isEmpty, isBoolean, isArray, join } from 'lodash';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
import { Field, FieldType } from '../types/dataFrame';
|
import { Field, FieldType } from '../types/dataFrame';
|
||||||
@@ -116,6 +116,10 @@ export function getDisplayProcessor(options?: DisplayProcessorOptions): DisplayP
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (text == null && isArray(value)) {
|
||||||
|
text = join(value, ', ');
|
||||||
|
}
|
||||||
|
|
||||||
if (text == null) {
|
if (text == null) {
|
||||||
text = toString(value);
|
text = toString(value);
|
||||||
if (!text) {
|
if (!text) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const isGreaterValueMatcher: ValueMatcherInfo<BasicValueMatcherOptions<number>>
|
|||||||
const isGreaterOrEqualValueMatcher: ValueMatcherInfo<BasicValueMatcherOptions<number>> = {
|
const isGreaterOrEqualValueMatcher: ValueMatcherInfo<BasicValueMatcherOptions<number>> = {
|
||||||
id: ValueMatcherID.greaterOrEqual,
|
id: ValueMatcherID.greaterOrEqual,
|
||||||
name: 'Is greater or equal',
|
name: 'Is greater or equal',
|
||||||
description: 'Match when field value is lower or greater than option.',
|
description: 'Match when field value is greater than or equal to option.',
|
||||||
get: (options) => {
|
get: (options) => {
|
||||||
return (valueIndex: number, field: Field) => {
|
return (valueIndex: number, field: Field) => {
|
||||||
const value = field.values.get(valueIndex);
|
const value = field.values.get(valueIndex);
|
||||||
@@ -37,7 +37,7 @@ const isGreaterOrEqualValueMatcher: ValueMatcherInfo<BasicValueMatcherOptions<nu
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
getOptionsDisplayText: (options) => {
|
getOptionsDisplayText: (options) => {
|
||||||
return `Matches all rows where field value is lower or greater than: ${options.value}.`;
|
return `Matches all rows where field value is greater than or equal to: ${options.value}.`;
|
||||||
},
|
},
|
||||||
isApplicable: (field) => field.type === FieldType.number,
|
isApplicable: (field) => field.type === FieldType.number,
|
||||||
getDefaultOptions: () => ({ value: 0 }),
|
getDefaultOptions: () => ({ value: 0 }),
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user