mirror of
https://github.com/grafana/grafana.git
synced 2026-01-10 22:14:04 +08:00
Compare commits
157 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5190ee547 | ||
|
|
8b72772444 | ||
|
|
2303e0fb18 | ||
|
|
c95500b9ba | ||
|
|
e4d4fa6623 | ||
|
|
dda1c80431 | ||
|
|
aee6df674c | ||
|
|
fc11be7250 | ||
|
|
37d1df05fd | ||
|
|
538f992aee | ||
|
|
ceeb381eae | ||
|
|
5ee4c694ea | ||
|
|
b61fc8bb7b | ||
|
|
713dec5268 | ||
|
|
16e03f34ba | ||
|
|
2b0cc8c9b4 | ||
|
|
051994d758 | ||
|
|
f9bbe2fe41 | ||
|
|
2135316a74 | ||
|
|
7f0d28abf5 | ||
|
|
5dcfad56cf | ||
|
|
01ed0afb9f | ||
|
|
2afeb5a60a | ||
|
|
744d93eb35 | ||
|
|
5bcc482697 | ||
|
|
4106856569 | ||
|
|
ea51a660e9 | ||
|
|
b484d59ed6 | ||
|
|
c423a15ec8 | ||
|
|
8011ff4f79 | ||
|
|
f6268bc37a | ||
|
|
ab7b01ec10 | ||
|
|
6b1c98de8b | ||
|
|
615c153b3a | ||
|
|
b6763e0ac2 | ||
|
|
eebe4a5e6f | ||
|
|
385bf145d8 | ||
|
|
ef3cf5cc94 | ||
|
|
7354150b79 | ||
|
|
4f542d69db | ||
|
|
d548282ed5 | ||
|
|
3e67fc8670 | ||
|
|
580030ed9a | ||
|
|
7fc361d50f | ||
|
|
3e3cf4dc60 | ||
|
|
68d8de712d | ||
|
|
48d280b999 | ||
|
|
b692d2fd4c | ||
|
|
d71e38eb96 | ||
|
|
49ad493676 | ||
|
|
e1006c8395 | ||
|
|
0d6b30ee28 | ||
|
|
b6d569fdb3 | ||
|
|
3158473206 | ||
|
|
81d34a9efa | ||
|
|
f00e253e6e | ||
|
|
86e2d2ab82 | ||
|
|
d8af326511 | ||
|
|
8943e7383d | ||
|
|
cc871bd682 | ||
|
|
05141051cd | ||
|
|
c270520aa9 | ||
|
|
e60f34336e | ||
|
|
ca413c612f | ||
|
|
22d31136ee | ||
|
|
5d87c596a7 | ||
|
|
8262548005 | ||
|
|
270660eaa8 | ||
|
|
b0314c0818 | ||
|
|
0c208a31dd | ||
|
|
c33d12185d | ||
|
|
5288ff82b7 | ||
|
|
d33b1e6561 | ||
|
|
42d465e38a | ||
|
|
4dffb875cf | ||
|
|
cfc83e8f20 | ||
|
|
38c362bdbb | ||
|
|
b144fb1a9f | ||
|
|
c330762f20 | ||
|
|
f593179a4a | ||
|
|
0f146e7c38 | ||
|
|
099f5cbf97 | ||
|
|
15ee6280db | ||
|
|
0b08c5e608 | ||
|
|
c713b92249 | ||
|
|
80a4d4296c | ||
|
|
47c10bab65 | ||
|
|
1acc921689 | ||
|
|
0528f7211a | ||
|
|
fafa352451 | ||
|
|
a9077812d8 | ||
|
|
5039c90b8c | ||
|
|
1df1d60e1e | ||
|
|
fbf3469e80 | ||
|
|
bc463d6a2f | ||
|
|
5d58d0aabb | ||
|
|
e3b5d53545 | ||
|
|
6bfe5ccf3e | ||
|
|
d025e3b57e | ||
|
|
44298a3761 | ||
|
|
37b07a5a11 | ||
|
|
42c5db4ac3 | ||
|
|
ca31570dcc | ||
|
|
da11a67c4e | ||
|
|
4a56ca167c | ||
|
|
698cf6de77 | ||
|
|
0954e1c277 | ||
|
|
986cfa767d | ||
|
|
0ba9aff11e | ||
|
|
3c8daef653 | ||
|
|
30b91296ad | ||
|
|
f570fb2d6f | ||
|
|
cfc0e132f5 | ||
|
|
f54533877b | ||
|
|
74dec56b49 | ||
|
|
320ad56397 | ||
|
|
46daba67d2 | ||
|
|
0e9b553daf | ||
|
|
c5ea45ab80 | ||
|
|
44838f201c | ||
|
|
47937d8f1b | ||
|
|
1d3339de34 | ||
|
|
876e18c105 | ||
|
|
bc5f11d0e4 | ||
|
|
61ba4eeb8c | ||
|
|
4d1d3f9ef5 | ||
|
|
e23c086a94 | ||
|
|
6ed29a0418 | ||
|
|
1616ea14f0 | ||
|
|
0af435c61d | ||
|
|
7a7aad22a2 | ||
|
|
994fa86836 | ||
|
|
099b761702 | ||
|
|
6ddb62fca1 | ||
|
|
6623706336 | ||
|
|
0be2177d15 | ||
|
|
3549380bd2 | ||
|
|
453b956797 | ||
|
|
aeee3931d2 | ||
|
|
be4b530a85 | ||
|
|
8df4fcd190 | ||
|
|
2297e13ac6 | ||
|
|
877b50957c | ||
|
|
a21a300f3e | ||
|
|
c946c4e372 | ||
|
|
f95657dc2d | ||
|
|
f2b7582671 | ||
|
|
e81a5bc015 | ||
|
|
cf29df808a | ||
|
|
1ab3249bab | ||
|
|
4452ddfee2 | ||
|
|
be08685e3f | ||
|
|
dc8d109ce4 | ||
|
|
6b83895315 | ||
|
|
a3d4d4ac7c | ||
|
|
7ea361825e | ||
|
|
11740b48a7 |
338
.drone.yml
338
.drone.yml
File diff suppressed because it is too large
Load Diff
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -3,7 +3,7 @@ name: publish_docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- v7.5.x
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
- 'packages/grafana-*/**'
|
||||
|
||||
208
CHANGELOG.md
208
CHANGELOG.md
@@ -1,4 +1,212 @@
|
||||
|
||||
<!-- 7.5.4 START -->
|
||||
|
||||
# 7.5.4 (2021-04-14)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
* **AzureMonitor**: Add support for Microsoft.AppConfiguration/configurationStores namespace. [#32123](https://github.com/grafana/grafana/pull/32123), [@deesejohn](https://github.com/deesejohn)
|
||||
* **TablePanel**: Make sorting case-insensitive. [#32435](https://github.com/grafana/grafana/pull/32435), [@kaydelaney](https://github.com/kaydelaney)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **AzureMonitor**: Add support for Virtual WAN namespaces. [#32935](https://github.com/grafana/grafana/pull/32935), [@joshhunt](https://github.com/joshhunt)
|
||||
* **Bugfix**: Add proper padding when scrolling is added to bar gauge. [#32411](https://github.com/grafana/grafana/pull/32411), [@mckn](https://github.com/mckn)
|
||||
* **Datasource**: Prevent default data source named "default" from causing infinite loop. [#32949](https://github.com/grafana/grafana/pull/32949), [@jackw](https://github.com/jackw)
|
||||
* **Prometheus**: Allow query_exemplars endpoint in data source proxy. [#32802](https://github.com/grafana/grafana/pull/32802), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
* **Table**: Fix table data links so they refer to correct row after sorting. [#32571](https://github.com/grafana/grafana/pull/32571), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
<!-- 7.5.4 END -->
|
||||
|
||||
<!-- 7.5.3 START -->
|
||||
|
||||
# 7.5.3 (2021-04-07)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
* **Dashboard**: Do not include default datasource when externally exporting dashboard with row. [#32494](https://github.com/grafana/grafana/pull/32494), [@kaydelaney](https://github.com/kaydelaney)
|
||||
* **Loki**: Remove empty annotations tags. [#32359](https://github.com/grafana/grafana/pull/32359), [@conorevans](https://github.com/conorevans)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **AdHocVariable**: Add default data source to picker. [#32470](https://github.com/grafana/grafana/pull/32470), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Configuration**: Prevent browser hanging / crashing with large number of org users. [#32546](https://github.com/grafana/grafana/pull/32546), [@jackw](https://github.com/jackw)
|
||||
* **Elasticsearch**: Fix bucket script variable duplication in UI. [#32705](https://github.com/grafana/grafana/pull/32705), [@Elfo404](https://github.com/Elfo404)
|
||||
* **Explore**: Fix bug where navigating to explore would result in wrong query and datasource to be shown. [#32558](https://github.com/grafana/grafana/pull/32558), [@aocenas](https://github.com/aocenas)
|
||||
* **FolderPicker**: Prevent dropdown menu from disappearing off screen. [#32603](https://github.com/grafana/grafana/pull/32603), [@jackw](https://github.com/jackw)
|
||||
* **SingleStat**: Fix issue with panel links. [#32721](https://github.com/grafana/grafana/pull/32721), [@gjulianm](https://github.com/gjulianm)
|
||||
* **Variables**: Confirm selection before opening new picker. [#32586](https://github.com/grafana/grafana/pull/32586), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Variables**: Confirm selection before opening new picker. [#32503](https://github.com/grafana/grafana/pull/32503), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Variables**: Fix unsupported data format error for null values. [#32480](https://github.com/grafana/grafana/pull/32480), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
<!-- 7.5.3 END -->
|
||||
|
||||
<!-- 7.5.2 START -->
|
||||
|
||||
# 7.5.2 (2021-03-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
* **Explore**: Set Explore's GraphNG to use default value for connected null values setting. [#32471](https://github.com/grafana/grafana/pull/32471), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **DashboardDataSource**: Fix query not being executed after selecting source panel. [#32383](https://github.com/grafana/grafana/pull/32383), [@torkelo](https://github.com/torkelo)
|
||||
* **Graph**: Fix setting right y-axis when standard option unit is configured. [#32426](https://github.com/grafana/grafana/pull/32426), [@torkelo](https://github.com/torkelo)
|
||||
* **Table**: Fix links for image cells. [#32370](https://github.com/grafana/grafana/pull/32370), [@kaydelaney](https://github.com/kaydelaney)
|
||||
* **Variables**: Fix data source variable when default data source is selected. [#32384](https://github.com/grafana/grafana/pull/32384), [@torkelo](https://github.com/torkelo)
|
||||
* **Variables**: Fix manually entering non-matching custom value in variable input/picker error. [#32390](https://github.com/grafana/grafana/pull/32390), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
<!-- 7.5.2 END -->
|
||||
|
||||
<!-- 7.5.1 START -->
|
||||
|
||||
# 7.5.1 (2021-03-26)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **MSSQL**: Fix panic not implemented by upgrading go-mssqldb dependency. [#32347](https://github.com/grafana/grafana/pull/32347), [@aknuds1](https://github.com/aknuds1)
|
||||
|
||||
<!-- 7.5.1 END -->
|
||||
|
||||
<!-- 7.5.0 START -->
|
||||
|
||||
# 7.5.0 (2021-03-25)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
* **Alerting**: Add ability to include aliases with hyphen in InfluxDB. [#32262](https://github.com/grafana/grafana/pull/32262), [@grafanabot](https://github.com/grafanabot)
|
||||
* **CloudWatch**: Use latest version of aws sdk. [#32217](https://github.com/grafana/grafana/pull/32217), [@sunker](https://github.com/sunker)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **Alerting**: Add ability to include aliases with hyphen in InfluxDB. [#32224](https://github.com/grafana/grafana/pull/32224), [@dsotirakis](https://github.com/dsotirakis)
|
||||
* **DashboardSettings**: Fixes issue with tags list not updating changes are made. [#32241](https://github.com/grafana/grafana/pull/32241), [@huynhsamha](https://github.com/huynhsamha)
|
||||
* **DashboardSettings**: Fixes issue with tags list not updating changes are made. [#32189](https://github.com/grafana/grafana/pull/32189), [@huynhsamha](https://github.com/huynhsamha)
|
||||
* **Loki**: Fix text search in Label browser. [#32293](https://github.com/grafana/grafana/pull/32293), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
|
||||
<!-- 7.5.0 END -->
|
||||
|
||||
<!-- 7.5.0-beta2 START -->
|
||||
|
||||
# 7.5.0-beta2 (2021-03-19)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
* **CloudWatch**: Add support for EC2 IAM role. [#31804](https://github.com/grafana/grafana/pull/31804), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Consume the grafana/aws-sdk. [#31807](https://github.com/grafana/grafana/pull/31807), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Restrict auth provider and assume role usage according to Grafana configuration. [#31805](https://github.com/grafana/grafana/pull/31805), [@sunker](https://github.com/sunker)
|
||||
* **Cloudwatch**: ListMetrics API page limit. [#31788](https://github.com/grafana/grafana/pull/31788), [@sunker](https://github.com/sunker)
|
||||
* **Cloudwatch**: Use shared library for aws auth. [#29550](https://github.com/grafana/grafana/pull/29550), [@ryantxu](https://github.com/ryantxu)
|
||||
* **DataLinks**: Bring back single click links for Stat, Gauge and BarGauge panel. [#31692](https://github.com/grafana/grafana/pull/31692), [@dprokop](https://github.com/dprokop)
|
||||
* **Docker**: Support pre-installed plugins from other sources in custom Dockerfiles. [#31234](https://github.com/grafana/grafana/pull/31234), [@sgnsys3](https://github.com/sgnsys3)
|
||||
* **Elasticseach**: Add support for histogram fields. [#29079](https://github.com/grafana/grafana/pull/29079), [@simianhacker](https://github.com/simianhacker)
|
||||
* **Exemplars**: Always query exemplars. [#31673](https://github.com/grafana/grafana/pull/31673), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
* **Explore**: Support full inspect drawer. [#32005](https://github.com/grafana/grafana/pull/32005), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **HttpServer**: Make read timeout configurable but disabled by default. [#31575](https://github.com/grafana/grafana/pull/31575), [@bergquist](https://github.com/bergquist)
|
||||
* **SQLStore**: Close session in withDbSession. [#31775](https://github.com/grafana/grafana/pull/31775), [@aknuds1](https://github.com/aknuds1)
|
||||
* **Templating**: Use dashboard timerange when variables are set to refresh 'On Dashboard Load'. [#31721](https://github.com/grafana/grafana/pull/31721), [@Elfo404](https://github.com/Elfo404)
|
||||
* **Tempo**: Convert to backend data source. [#31618](https://github.com/grafana/grafana/pull/31618), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **Admin**: Keeps expired api keys visible in table after delete. [#31636](https://github.com/grafana/grafana/pull/31636), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Data proxy**: Fix encoded characters in URL path should be proxied as encoded. [#30597](https://github.com/grafana/grafana/pull/30597), [@marefr](https://github.com/marefr)
|
||||
* **Explore/Logs**: Fix escaping in ANSI logs. [#31731](https://github.com/grafana/grafana/pull/31731), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **GraphNG**: Fix tooltip series color for multi data frame scenario. [#32098](https://github.com/grafana/grafana/pull/32098), [@dprokop](https://github.com/dprokop)
|
||||
* **GraphNG**: Make sure data set and config are in sync when initializing and re-initializing uPlot. [#32106](https://github.com/grafana/grafana/pull/32106), [@dprokop](https://github.com/dprokop)
|
||||
* **Loki**: Fix autocomplete when re-editing Loki label values. [#31828](https://github.com/grafana/grafana/pull/31828), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **MixedDataSource**: Name is updated when data source variables change. [#32090](https://github.com/grafana/grafana/pull/32090), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **PanelInspect**: Interpolates variables in CSV file name. [#31936](https://github.com/grafana/grafana/pull/31936), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **ReduceTransform**: Include series with numeric string names. [#31763](https://github.com/grafana/grafana/pull/31763), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Snapshots**: Fix usage of sign in link from the snapshot page. [#31986](https://github.com/grafana/grafana/pull/31986), [@marefr](https://github.com/marefr)
|
||||
* **TimePicker**: Fixes hidden time picker shown in kiosk TV mode. [#32062](https://github.com/grafana/grafana/pull/32062), [@torkelo](https://github.com/torkelo)
|
||||
* **ValueMappings**: Fixes value 0 not being mapped. [#31924](https://github.com/grafana/grafana/pull/31924), [@Willena](https://github.com/Willena)
|
||||
* **Variables**: Fixes filtering in picker with null items. [#31979](https://github.com/grafana/grafana/pull/31979), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Variables**: Improves inspection performance and unknown filtering. [#31811](https://github.com/grafana/grafana/pull/31811), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
* **Auth**: Allow soft token revocation. [#31601](https://github.com/grafana/grafana/pull/31601), [@joanlopez](https://github.com/joanlopez)
|
||||
|
||||
<!-- 7.5.0-beta2 END -->
|
||||
|
||||
<!-- 7.5.0-beta1 START -->
|
||||
|
||||
# 7.5.0-beta1 (2021-03-04)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
* **Alerting**: Customise OK notification priorities for Pushover notifier. [#30169](https://github.com/grafana/grafana/pull/30169), [@acaire](https://github.com/acaire)
|
||||
* **Alerting**: Improve default message for SensuGo notifier. [#31428](https://github.com/grafana/grafana/pull/31428), [@M4teo](https://github.com/M4teo)
|
||||
* **Alerting**: PagerDuty: adding current state to the payload. [#29270](https://github.com/grafana/grafana/pull/29270), [@Eraac](https://github.com/Eraac)
|
||||
* **AzureMonitor**: Add deprecation message for App Insights/Insights Analytics. [#30633](https://github.com/grafana/grafana/pull/30633), [@joshhunt](https://github.com/joshhunt)
|
||||
* **CloudMonitoring**: Allow free text input for GCP project on dashboard variable query. [#28048](https://github.com/grafana/grafana/issues/28048)
|
||||
* **CloudMonitoring**: Increase service api page size. [#30892](https://github.com/grafana/grafana/pull/30892), [@sunker](https://github.com/sunker)
|
||||
* **CloudMonitoring**: Show service and SLO display name in SLO Query editor. [#30900](https://github.com/grafana/grafana/pull/30900), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Add AWS Ground Station metrics and dimensions. [#31362](https://github.com/grafana/grafana/pull/31362), [@ilyastoli](https://github.com/ilyastoli)
|
||||
* **CloudWatch**: Add AWS Network Firewall metrics and dimensions. [#31498](https://github.com/grafana/grafana/pull/31498), [@ilyastoli](https://github.com/ilyastoli)
|
||||
* **CloudWatch**: Add AWS Timestream Metrics and Dimensions. [#31624](https://github.com/grafana/grafana/pull/31624), [@ilyastoli](https://github.com/ilyastoli)
|
||||
* **CloudWatch**: Add RDS Proxy metrics. [#31595](https://github.com/grafana/grafana/pull/31595), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Add eu-south-1 Cloudwatch region. [#31198](https://github.com/grafana/grafana/pull/31198), [@rubycut](https://github.com/rubycut)
|
||||
* **CloudWatch**: Make it possible to specify custom api endpoint. [#31402](https://github.com/grafana/grafana/pull/31402), [@sunker](https://github.com/sunker)
|
||||
* **Cloudwatch**: Add AWS/DDoSProtection metrics and dimensions. [#31297](https://github.com/grafana/grafana/pull/31297), [@relvira](https://github.com/relvira)
|
||||
* **Dashboard**: Remove template variables option from ShareModal. [#30395](https://github.com/grafana/grafana/pull/30395), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
* **Docs**: Define TLS/SSL terminology. [#30533](https://github.com/grafana/grafana/pull/30533), [@aknuds1](https://github.com/aknuds1)
|
||||
* **Elasticsearch**: Add word highlighting to search results. [#30293](https://github.com/grafana/grafana/pull/30293), [@simianhacker](https://github.com/simianhacker)
|
||||
* **Folders**: Editors should be able to edit name and delete folders. [#31242](https://github.com/grafana/grafana/pull/31242), [@torkelo](https://github.com/torkelo)
|
||||
* **Graphite/SSE**: update graphite to work with server side expressions. [#31455](https://github.com/grafana/grafana/pull/31455), [@kylebrandt](https://github.com/kylebrandt)
|
||||
* **InfluxDB**: Improve maxDataPoints error-message in Flux-mode, raise limits. [#31259](https://github.com/grafana/grafana/pull/31259), [@gabor](https://github.com/gabor)
|
||||
* **InfluxDB**: In flux query editor, do not run query when disabled. [#31324](https://github.com/grafana/grafana/pull/31324), [@gabor](https://github.com/gabor)
|
||||
* **LogsPanel**: Add deduplication option for logs. [#31019](https://github.com/grafana/grafana/pull/31019), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Loki**: Add line limit for annotations. [#31183](https://github.com/grafana/grafana/pull/31183), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Loki**: Add support for alerting. [#31424](https://github.com/grafana/grafana/pull/31424), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Loki**: Label browser. [#30351](https://github.com/grafana/grafana/pull/30351), [@davkal](https://github.com/davkal)
|
||||
* **PieChart**: Add color changing options to pie chart. [#31588](https://github.com/grafana/grafana/pull/31588), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
* **PostgreSQL**: Allow providing TLS/SSL certificates as text in addition to file paths. [#30353](https://github.com/grafana/grafana/pull/30353), [@ying-jeanne](https://github.com/ying-jeanne)
|
||||
* **Postgres**: SSL certification. [#30352](https://github.com/grafana/grafana/pull/30352), [@ying-jeanne](https://github.com/ying-jeanne)
|
||||
* **Profile**: Prevent OAuth users from changing user details or password. [#27886](https://github.com/grafana/grafana/pull/27886), [@dupondje](https://github.com/dupondje)
|
||||
* **Prometheus**: Change default httpMethod for new instances to POST. [#31292](https://github.com/grafana/grafana/pull/31292), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Prometheus**: Min step defaults to seconds when no unit is set. [#30966](https://github.com/grafana/grafana/pull/30966), [@nutmos](https://github.com/nutmos)
|
||||
* **Stats**: Exclude folders from total dashboard count. [#31320](https://github.com/grafana/grafana/pull/31320), [@bergquist](https://github.com/bergquist)
|
||||
* **Tracing**: Specify type of data frame that is expected for TraceView. [#31465](https://github.com/grafana/grafana/pull/31465), [@aocenas](https://github.com/aocenas)
|
||||
* **Transformers**: Add search to transform selection. [#30854](https://github.com/grafana/grafana/pull/30854), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **Alerting**: Ensure Discord notification is sent when metric name is absent. [#31257](https://github.com/grafana/grafana/pull/31257), [@LeviHarrison](https://github.com/LeviHarrison)
|
||||
* **Alerting**: Fix case when Alertmanager notifier fails if a URL is not working. [#31079](https://github.com/grafana/grafana/pull/31079), [@kurokochin](https://github.com/kurokochin)
|
||||
* **CloudMonitoring**: Prevent resource type variable function from crashing. [#30901](https://github.com/grafana/grafana/pull/30901), [@sunker](https://github.com/sunker)
|
||||
* **Color**: Fix issue where colors are reset to gray when switching panels. [#31611](https://github.com/grafana/grafana/pull/31611), [@torkelo](https://github.com/torkelo)
|
||||
* **Explore**: Show ANSI colored logs in logs context. [#31510](https://github.com/grafana/grafana/pull/31510), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Explore**: keep enabled/disabled state in angular based QueryEditors correctly. [#31558](https://github.com/grafana/grafana/pull/31558), [@gabor](https://github.com/gabor)
|
||||
* **Graph**: Fix tooltip not being displayed when close to edge of viewport. [#31493](https://github.com/grafana/grafana/pull/31493), [@msober](https://github.com/msober)
|
||||
* **Heatmap**: Fix missing value in legend. [#31430](https://github.com/grafana/grafana/pull/31430), [@kurokochin](https://github.com/kurokochin)
|
||||
* **InfluxDB**: Handle columns named "table". [#30985](https://github.com/grafana/grafana/pull/30985), [@gabor](https://github.com/gabor)
|
||||
* **Prometheus**: Use configured HTTP method for /series and /labels endpoints. [#31401](https://github.com/grafana/grafana/pull/31401), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **RefreshPicker**: Make valid intervals in url visible in RefreshPicker. [#30474](https://github.com/grafana/grafana/pull/30474), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **TimeSeriesPanel**: Fix overlapping time axis ticks. [#31332](https://github.com/grafana/grafana/pull/31332), [@torkelo](https://github.com/torkelo)
|
||||
* **TraceViewer**: Fix show log marker in spanbar. [#30742](https://github.com/grafana/grafana/pull/30742), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
* **Plugins**: Add autoEnabled plugin JSON field to auto enable App plugins and add configuration link to menu by default. [#31354](https://github.com/grafana/grafana/pull/31354), [@torkelo](https://github.com/torkelo)
|
||||
* **Pagination**: Improve pagination for large number of pages. [#30151](https://github.com/grafana/grafana/pull/30151), [@nathanrodman](https://github.com/nathanrodman)
|
||||
|
||||
<!-- 7.5.0-beta1 END -->
|
||||
|
||||
<!-- 7.4.5 START -->
|
||||
|
||||
# 7.4.5 (2021-03-18)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* **Security**: Fix API permissions issues related to team-sync CVE-2021-28146, CVE-2021-28147. (Enterprise)
|
||||
* **Security**: Usage insights requires signed in users CVE-2021-28148. (Enterprise)
|
||||
* **Security**: Do not allow editors to incorrectly bypass permissions on the default data source. CVE-2021-27962. (Enterprise)
|
||||
|
||||
<!-- 7.4.5 END -->
|
||||
|
||||
<!-- 7.4.3 START -->
|
||||
|
||||
# 7.4.3 (2021-02-24)
|
||||
|
||||
@@ -16,7 +16,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.16.0-alpine3.13 as go-builder
|
||||
FROM golang:1.16.1-alpine3.13 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ WORKDIR /usr/src/app/
|
||||
COPY package.json yarn.lock ./
|
||||
COPY packages packages
|
||||
|
||||
RUN apt-get update && apt-get install -yq git
|
||||
RUN yarn install --pure-lockfile
|
||||
|
||||
COPY tsconfig.json .eslintrc .editorconfig .browserslistrc .prettierrc.js ./
|
||||
|
||||
@@ -69,6 +69,10 @@ socket = /tmp/grafana.sock
|
||||
# CDN Url
|
||||
cdn_url =
|
||||
|
||||
# Sets the maximum time in minutes before timing out read of an incoming request and closing idle connections.
|
||||
# `0` means there is no timeout for reading the request.
|
||||
read_timeout = 0
|
||||
|
||||
#################################### Database ############################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -300,6 +304,9 @@ password_hint = password
|
||||
# Default UI theme ("dark" or "light")
|
||||
default_theme = dark
|
||||
|
||||
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
|
||||
home_page =
|
||||
|
||||
# External user management
|
||||
external_manage_link_url =
|
||||
external_manage_link_name =
|
||||
@@ -508,13 +515,16 @@ active_sync_enabled = true
|
||||
#################################### AWS ###########################
|
||||
[aws]
|
||||
# Enter a comma-separated list of allowed AWS authentication providers.
|
||||
# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_IAM_role (EC2 IAM Role)
|
||||
# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 IAM Role)
|
||||
allowed_auth_providers = default,keys,credentials
|
||||
|
||||
# Allow AWS users to assume a role using temporary security credentials.
|
||||
# If true, assume role will be enabled for all AWS authentication providers that are specified in aws_auth_providers
|
||||
assume_role_enabled = true
|
||||
|
||||
# Specify max no of pages to be returned by the ListMetricPages API
|
||||
list_metrics_page_limit = 500
|
||||
|
||||
#################################### SMTP / Emailing #####################
|
||||
[smtp]
|
||||
enabled = false
|
||||
@@ -682,6 +692,9 @@ max_annotation_age =
|
||||
max_annotations_to_keep =
|
||||
|
||||
#################################### Annotations #########################
|
||||
[annotations]
|
||||
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
|
||||
cleanupjob_batchsize = 100
|
||||
|
||||
[annotations.dashboard]
|
||||
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
|
||||
|
||||
@@ -70,6 +70,10 @@
|
||||
# CDN Url
|
||||
;cdn_url =
|
||||
|
||||
# Sets the maximum time using a duration format (5s/5m/5ms) before timing out read of an incoming request and closing idle connections.
|
||||
# `0` means there is no timeout for reading the request.
|
||||
;read_timeout = 0
|
||||
|
||||
#################################### Database ####################################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -300,6 +304,9 @@
|
||||
# Default UI theme ("dark" or "light")
|
||||
;default_theme = dark
|
||||
|
||||
# Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
|
||||
; home_page =
|
||||
|
||||
# External user management, these options affect the organization users view
|
||||
;external_manage_link_url =
|
||||
;external_manage_link_name =
|
||||
@@ -498,7 +505,7 @@
|
||||
#################################### AWS ###########################
|
||||
[aws]
|
||||
# Enter a comma-separated list of allowed AWS authentication providers.
|
||||
# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_IAM_role (EC2 IAM Role)
|
||||
# Options are: default (AWS SDK Default), keys (Access && secret key), credentials (Credentials field), ec2_iam_role (EC2 IAM Role)
|
||||
; allowed_auth_providers = default,keys,credentials
|
||||
|
||||
# Allow AWS users to assume a role using temporary security credentials.
|
||||
@@ -675,6 +682,9 @@
|
||||
;max_annotations_to_keep =
|
||||
|
||||
#################################### Annotations #########################
|
||||
[annotations]
|
||||
# Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
|
||||
;cleanupjob_batchsize = 100
|
||||
|
||||
[annotations.dashboard]
|
||||
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
|
||||
|
||||
1194
devenv/dev-dashboards/panel-common/linked-viz.json
Normal file
1194
devenv/dev-dashboards/panel-common/linked-viz.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,8 @@
|
||||
build: docker/blocks/prometheus2
|
||||
ports:
|
||||
- "9090:9090"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
node_exporter:
|
||||
image: prom/node-exporter
|
||||
|
||||
@@ -32,7 +32,7 @@ scrape_configs:
|
||||
|
||||
- job_name: 'grafana'
|
||||
static_configs:
|
||||
- targets: ['grafana:3000']
|
||||
- targets: ['host.docker.internal:3000']
|
||||
|
||||
- job_name: 'prometheus-random-data'
|
||||
static_configs:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
FROM golang:latest
|
||||
FROM golang:latest
|
||||
ADD main.go /
|
||||
WORKDIR /
|
||||
RUN go build -o main .
|
||||
RUN GO111MODULE=off go build -o main .
|
||||
EXPOSE 3011
|
||||
ENTRYPOINT ["/main"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
FROM golang:latest
|
||||
FROM golang:latest
|
||||
ADD main.go /
|
||||
WORKDIR /
|
||||
RUN go build -o main .
|
||||
RUN GO111MODULE=off go build -o main .
|
||||
EXPOSE 3011
|
||||
ENTRYPOINT ["/main"]
|
||||
|
||||
@@ -52,7 +52,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<h4>Configure Grafana</h4>
|
||||
<p>Review the configuration and setup options.</p>
|
||||
</a>
|
||||
<a href="{{< relref "getting-started/timeseries.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="{{< relref "basics/timeseries.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Intro to time series</h4>
|
||||
<p>Learn about time series data.</p>
|
||||
</a>
|
||||
@@ -78,7 +78,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<img src="/img/docs/logos/icon_elasticsearch.svg" >
|
||||
<h5>Elasticsearch</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/influxdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "datasources/influxdb/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_influxdb.svg" >
|
||||
<h5>InfluxDB</h5>
|
||||
</a>
|
||||
|
||||
@@ -36,7 +36,7 @@ Refer to [Configure a Grafana Docker image]({{< relref "configure-docker.md" >}}
|
||||
|
||||
### macOS
|
||||
|
||||
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. To configure Grafana, add a configuration file named `custom.ini` to the `conf` folder to override any of the settings defined in `conf/defaults.ini`.
|
||||
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. For a Grafana instance installed using Homebrew, edit the `grafana.ini` file directly. Otherwise, add a configuration file named `custom.ini` to the `conf` folder to override any of the settings defined in `conf/defaults.ini`.
|
||||
|
||||
## Comments in .ini Files
|
||||
|
||||
@@ -168,7 +168,7 @@ Override log path using the command line argument `cfg:default.paths.logs`:
|
||||
|
||||
### plugins
|
||||
|
||||
Directory where Grafana automatically scans and looks for plugins. Manually or automatically install any [plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) here.
|
||||
Directory where Grafana automatically scans and looks for plugins. For information about manually or automatically installing plugins, refer to [Install Grafana plugins]({{< relref "../plugins/installation.md" >}}).
|
||||
|
||||
**macOS:** By default, the Mac plugin location is: `/usr/local/var/lib/grafana/plugins`.
|
||||
|
||||
@@ -266,7 +266,12 @@ Path where the socket should be created when `protocol=socket`. Make sure that G
|
||||
Specify a full HTTP URL address to the root of your Grafana CDN assets. Grafana will add edition and version paths.
|
||||
|
||||
For example, given a cdn url like `https://cdn.myserver.com` grafana will try to load a javascript file from
|
||||
`http://cdn.myserver.com/grafana-oss/v7.4.0/public/build/app.<hash>.js`.
|
||||
`http://cdn.myserver.com/grafana-oss/7.4.0/public/build/app.<hash>.js`.
|
||||
|
||||
### read_timeout
|
||||
|
||||
Sets the maximum time using a duration format (5s/5m/5ms) before timing out read of an incoming request and closing idle connections.
|
||||
`0` means there is no timeout for reading the request.
|
||||
|
||||
<hr />
|
||||
|
||||
@@ -621,6 +626,10 @@ Text used as placeholder text on login page for password input.
|
||||
|
||||
Set the default UI theme: `dark` or `light`. Default is `dark`.
|
||||
|
||||
### home_page
|
||||
|
||||
Path to a custom home page. Users are only redirected to this if the default home dashboard is used. It should match a frontend route and contain a leading slash.
|
||||
|
||||
### External user management
|
||||
|
||||
If you manage users externally you can replace the user invite button for organizations with a link to an external site together with a description.
|
||||
@@ -780,7 +789,7 @@ You can configure core and external AWS plugins.
|
||||
|
||||
Specify what authentication providers the AWS plugins allow. For a list of allowed providers, refer to the data-source configuration page for a given plugin. If you configure a plugin by provisioning, only providers that are specified in `allowed_auth_providers` are allowed.
|
||||
|
||||
Options: `default` (AWS SDK default), `keys` (Access and secret key), `credentials` (Credentials file), `ec2_IAM_role` (EC2 IAM role)
|
||||
Options: `default` (AWS SDK default), `keys` (Access and secret key), `credentials` (Credentials file), `ec2_iam_role` (EC2 IAM role)
|
||||
|
||||
### assume_role_enabled
|
||||
|
||||
@@ -788,6 +797,16 @@ Set to `false` to disable AWS authentication from using an assumed role with tem
|
||||
|
||||
If this option is disabled, the **Assume Role** and the **External Id** field are removed from the AWS data source configuration page. If the plugin is configured using provisioning, it is possible to use an assumed role as long as `assume_role_enabled` is set to `true`.
|
||||
|
||||
### list_metrics_page_limit
|
||||
|
||||
Use the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) option to load metrics for custom namespaces in the CloudWatch data source. By default, the page limit is 500.
|
||||
|
||||
<hr />
|
||||
|
||||
## [auth.jwt]
|
||||
|
||||
Refer to [JWT authentication]({{< relref "../auth/jwt.md" >}}) for more information.
|
||||
|
||||
<hr />
|
||||
|
||||
## [smtp]
|
||||
@@ -1082,6 +1101,12 @@ Configures max number of alert annotations that Grafana stores. Default value is
|
||||
|
||||
<hr>
|
||||
|
||||
## [annotations]
|
||||
|
||||
### cleanupjob_batchsize
|
||||
|
||||
Configures the batch size for the annotation clean-up job. This setting is used for dashboard, API, and alert annotations.
|
||||
|
||||
## [annotations.dashboard]
|
||||
|
||||
Dashboard annotations means that annotations are associated with the dashboard they are created on.
|
||||
@@ -1507,7 +1532,7 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{<
|
||||
|
||||
### enable
|
||||
|
||||
Keys of alpha features to enable, separated by space. Available alpha features are: `transformations`,`ngalert`
|
||||
Keys of alpha features to enable, separated by space. Available alpha features are: `ngalert`
|
||||
|
||||
## [date_formats]
|
||||
|
||||
|
||||
@@ -7,7 +7,9 @@ weight = 300
|
||||
|
||||
# Image rendering
|
||||
|
||||
Grafana supports automatic rendering of panels and dashboards as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/notifications.md" >}}).
|
||||
Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/notifications.md" >}}).
|
||||
|
||||
>**Note:** Image rendering of dashboards is not supported at this time.
|
||||
|
||||
While an image is being rendered, the PNG image is temporarily written to the file system. When the image is rendered, the PNG image is temporarily written to the `png` folder in the Grafana `data` folder.
|
||||
|
||||
@@ -29,7 +31,7 @@ Alert notifications can include images, but rendering many images at the same ti
|
||||
|
||||
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) is a plugin that runs on the backend and handles rendering panels and dashboards as PNG images using headless Chrome.
|
||||
|
||||
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer/installation).
|
||||
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer/?tab=installation).
|
||||
|
||||
## Run in custom Grafana Docker image
|
||||
|
||||
|
||||
@@ -147,6 +147,7 @@ Since not all datasources have the same configuration settings we only have the
|
||||
| tlsAuthWithCACert | boolean | _All_ | Enable TLS authentication using CA cert |
|
||||
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
|
||||
| serverName | string | _All_ | Optional. Controls the server name used for certificate common name/subject alternative name verification. Defaults to using the data source URL. |
|
||||
| timeout | string | _All_ | Request timeout in seconds. Overrides dataproxy.timeout option |
|
||||
| graphiteVersion | string | Graphite | Graphite version |
|
||||
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source. |
|
||||
| httpMode | string | Influxdb | HTTP Method. 'GET', 'POST', defaults to GET |
|
||||
@@ -307,9 +308,9 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
|
||||
|
||||
### Reusable Dashboard URLs
|
||||
|
||||
If the dashboard in the json file contains an [uid](/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given since the new dashboard URL uses the uid as identifier.
|
||||
When Grafana starts, it will update/insert all dashboards available in the configured folders. If you modify the file, the dashboard will also be updated.
|
||||
By default, Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../dashboards/json-model.md" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
When Grafana starts, it updates/inserts all dashboards available in the configured folders. If you modify the file, then the dashboard is also updated.
|
||||
By default, Grafana deletes dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
> **Note:** Provisioning allows you to overwrite existing dashboards
|
||||
> which leads to problems if you re-use settings that are supposed to be unique.
|
||||
@@ -541,6 +542,7 @@ The following sections detail the supported settings and secure settings for eac
|
||||
| apiUrl | |
|
||||
| autoClose | |
|
||||
| overridePriority | |
|
||||
| sendTagsAs | |
|
||||
|
||||
#### Alert notification `telegram`
|
||||
|
||||
|
||||
@@ -36,3 +36,11 @@ To address this vulnerability, you can restrict data source query access in the
|
||||
|
||||
- Create multiple data sources with some restrictions added in data source configuration that restrict access (like database name or credentials). Then use the [Data Source Permissions]({{< relref "../permissions/datasource_permissions.md" >}}) Enterprise feature to restrict user access to the data source in Grafana.
|
||||
- Create a separate Grafana organization, and in that organization, create a separate data source. Make sure the data source has some option/user/credentials setting that limits access to a subset of the data. Not all data sources have an option to limit access.
|
||||
|
||||
## Implications of enabling anonymous access to dashboards
|
||||
|
||||
When you enable anonymous access to a dashboard, it is publicly available. This section lists the security implications of enabling Anonymous access.
|
||||
|
||||
- Anyone with the URL can access the dashboard.
|
||||
- Anyone can make view calls to the API and list all folders, dashboards, and data sources.
|
||||
- Anyone can make arbitrary queries to any data source that the Grafana instance is configured with.
|
||||
|
||||
@@ -22,12 +22,12 @@ Grafana will now persist all long term data in the database. How to configure th
|
||||
|
||||
## Alerting
|
||||
|
||||
Currently alerting supports a limited form of high availability. Since v4.2.0, [alert notifications](https://grafana.com/docs/grafana/latest/alerting/notifications/) are deduped when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers.
|
||||
Currently alerting supports a limited form of high availability. [Alert notifications]({{< relref "../alerting/notifications.md" >}}) are deduplicated when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers.
|
||||
|
||||
## User sessions
|
||||
|
||||
> After Grafana 6.2 you don't need to configure session storage since the database will be used by default.
|
||||
> If you want to offload the login session data from the database you can configure [remote_cache]({{< relref "../administration/configuration.md" >}}#remote-cache)
|
||||
> **Note:** You don't need to configure session storage, because the database will be used by default.
|
||||
> If you want to offload the login session data from the database, then you can configure [remote_cache]({{< relref "../administration/configuration.md" >}}#remote-cache).
|
||||
|
||||
The second thing to consider is how to deal with user sessions and how to configure your load balancer in front of Grafana.
|
||||
Grafana supports two ways of storing session data: locally on disk or in a database/cache-server.
|
||||
@@ -35,13 +35,13 @@ If you want to store sessions on disk you can use `sticky sessions` in your load
|
||||
you can use any stateless routing strategy in your load balancer (ex round robin or least connections).
|
||||
|
||||
### Sticky sessions
|
||||
|
||||
Using sticky sessions, all traffic for one user will always be sent to the same server. Which means that session related data can be
|
||||
stored on disk rather than on a shared database. This is the default behavior for Grafana and if you only want multiple servers for fail over this is a good solution since it requires the least amount of work.
|
||||
|
||||
### Stateless sessions
|
||||
|
||||
You can also choose to store session data in a Redis/Memcache/Postgres/MySQL which means that the load balancer can send a user to any Grafana server without having to log in on each server. This requires a little bit more work from the operator but enables you to remove/add grafana servers without impacting the user experience.
|
||||
If you use MySQL/Postgres for session storage, you first need a table to store the session data in. More details about that in [[sessions]]({{< relref "../administration/configuration.md" >}}#session)
|
||||
|
||||
For Grafana itself it doesn't really matter if you store the session data on disk or database/redis/memcache. But we recommend using a database/redis/memcache since it makes it easier to manage the grafana servers.
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,10 @@ The actual notifications are configured and shared between multiple alerts.
|
||||
## Alert execution
|
||||
|
||||
Alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `Elasticsearch`,
|
||||
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`.
|
||||
of core Grafana. Alert rules can query only backend data sources with alerting enabled. Such data sources are:
|
||||
- builtin or developed and maintained by grafana, such as: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
|
||||
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`
|
||||
- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../developers/plugins/metadata.md" >}}))
|
||||
|
||||
## Metrics from the alert engine
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ Hipchat | `hipchat` | yes, external only | no
|
||||
[Kafka](#kafka) | `kafka` | yes, external only | no
|
||||
Line | `line` | yes, external only | no
|
||||
Microsoft Teams | `teams` | yes, external only | no
|
||||
OpsGenie | `opsgenie` | yes, external only | yes
|
||||
[Opsgenie](#opsgenie) | `opsgenie` | yes, external only | yes
|
||||
[Pagerduty](#pagerduty) | `pagerduty` | yes, external only | yes
|
||||
Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes
|
||||
[Pushover](#pushover) | `pushover` | yes | no
|
||||
@@ -68,7 +68,7 @@ Sensu | `sensu` | yes, external only | no
|
||||
[Slack](#slack) | `slack` | yes | no
|
||||
Telegram | `telegram` | yes | no
|
||||
Threema | `threema` | yes, external only | no
|
||||
VictorOps | `victorops` | yes, external only | no
|
||||
VictorOps | `victorops` | yes, external only | yes
|
||||
[Webhook](#webhook) | `webhook` | yes, external only | yes
|
||||
[Zenduty](#zenduty) | `webhook` | yes, external only | yes
|
||||
|
||||
@@ -111,6 +111,19 @@ Token | If provided, Grafana will upload the generated image via Slack's file.up
|
||||
|
||||
If you are using the token for a slack bot, then you have to invite the bot to the channel you want to send notifications and add the channel to the recipient field.
|
||||
|
||||
### Opsgenie
|
||||
|
||||
To setup Opsgenie you will need an API Key and the Alert API Url. These can be obtained by configuring a new [Grafana Integration](https://docs.opsgenie.com/docs/grafana-integration).
|
||||
|
||||
Setting | Description
|
||||
--------|------------
|
||||
Alert API URL | The API URL for your Opsgenie instance. This will normally be either `https://api.opsgenie.com` or, for EU customers, `https://api.eu.opsgenie.com`.
|
||||
API Key | The API Key as provided by Opsgenie for your configured Grafana integration.
|
||||
Override priority | Configures the alert priority using the `og_priority` tag. The `og_priority` tag must have one of the following values: `P1`, `P2`, `P3`, `P4`, or `P5`. Default is `False`.
|
||||
Send notification tags as | Specify how you would like [Notification Tags]({{< relref "create-alerts.md/#notifications" >}}) delivered to Opsgenie.
|
||||
|
||||
> **Note:** When notification tags are sent as `Tags` they are concatenated into a string with a `key:value` format.
|
||||
|
||||
### PagerDuty
|
||||
|
||||
To set up PagerDuty, all you have to do is to provide an integration key.
|
||||
@@ -133,6 +146,11 @@ This behavior will become the default in a future version of Grafana.
|
||||
|
||||
> **Note:** The `state` tag overrides the current alert state inside the `custom_details` payload.
|
||||
|
||||
### VictorOps
|
||||
|
||||
To configure VictorOps, provide the URL from the Grafana Integration and substitute `$routing_key` with a valid key.
|
||||
|
||||
> **Note:** The tag `Severity` has special meaning in the [VictorOps Incident Fields](https://help.victorops.com/knowledge-base/incident-fields-glossary/). If an alert panel defines this key, then it replaces the `message_type` in the root of the event sent to VictorOps.
|
||||
### Pushover
|
||||
|
||||
To set up Pushover, you must provide a user key and an API token. Refer to [What is Pushover and how do I use it](https://support.pushover.net/i7-what-is-pushover-and-how-do-i-use-it) for instructions on how to generate them.
|
||||
@@ -186,23 +204,21 @@ Example json body:
|
||||
|
||||
### DingDing/DingTalk
|
||||
|
||||
[Instructions in Chinese](https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.p2lr6t&treeId=257&articleId=105733&docType=1).
|
||||
DingTalk supports the following "message type": `text`, `link` and `markdown`. Only the `link` message type is supported. Refer to the [configuration instructions](https://developers.dingtalk.com/document/app/custom-robot-access) in Chinese language.
|
||||
|
||||
In DingTalk PC Client:
|
||||
|
||||
1. Click "more" icon on upper right of the panel.
|
||||
|
||||
1. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
|
||||
2. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
|
||||
|
||||
1. In the "Robot Manage" panel, select "customized: customized robot with Webhook".
|
||||
3. In the "Robot Manage" panel, select "customized: customized robot with Webhook".
|
||||
|
||||
1. In the next new panel named "robot detail", click "Add" button.
|
||||
4. In the next new panel named "robot detail", click "Add" button.
|
||||
|
||||
1. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next".
|
||||
5. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next".
|
||||
|
||||
1. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the Grafana DingTalk setting page and then click "finish".
|
||||
|
||||
DingTalk supports the following "message type": `text`, `link` and `markdown`. Only the `link` message type is supported.
|
||||
6. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the Grafana DingTalk setting page and then click "finish".
|
||||
|
||||
### Kafka
|
||||
|
||||
@@ -251,4 +267,4 @@ This URL is based on the [domain]({{< relref "../administration/configuration/#d
|
||||
|
||||
> **Note:** Alert notification templating is only available in Grafana v7.4 and above.
|
||||
|
||||
The alert notification template feature allows you to take the [label]({{< relref "../getting-started/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}).
|
||||
The alert notification template feature allows you to take the [label]({{< relref "../basics/timeseries-dimensions.md#labels" >}}) value from an alert query and [inject that into alert notifications]({{< relref "./add-notification-template.md" >}}).
|
||||
|
||||
@@ -194,6 +194,8 @@ To ease configuration of a proper JMESPath expression, you can test/evaluate exp
|
||||
|
||||
### Role mapping
|
||||
|
||||
If the`role_attribute_path` property does not return a role, then the user is assigned the `Viewer` role by default. You can disable the role assignment by setting `role_attribute_strict = true`. It denies user access if no role or an invalid role is returned.
|
||||
|
||||
**Basic example:**
|
||||
|
||||
In the following example user will get `Editor` as role when authenticating. The value of the property `role` will be the resulting role if the role is a proper Grafana role, i.e. `Viewer`, `Editor` or `Admin`.
|
||||
|
||||
@@ -52,7 +52,7 @@ api_key_max_seconds_to_live = -1
|
||||
|
||||
### Anonymous authentication
|
||||
|
||||
You can make Grafana accessible without any login required by enabling anonymous access in the configuration file.
|
||||
You can make Grafana accessible without any login required by enabling anonymous access in the configuration file. For more information, refer to [Implications of allowing anonymous access to dashboards]({{< relref "../administration/security.md" >}}).
|
||||
|
||||
Example:
|
||||
|
||||
|
||||
92
docs/sources/auth/jwt.md
Normal file
92
docs/sources/auth/jwt.md
Normal file
@@ -0,0 +1,92 @@
|
||||
+++
|
||||
title = "JWT Authentication"
|
||||
description = "Grafana JWT Authentication"
|
||||
keywords = ["grafana", "configuration", "documentation", "jwt", "jwk"]
|
||||
weight = 250
|
||||
+++
|
||||
|
||||
# JWT authentication
|
||||
|
||||
You can configure Grafana to accept a JWT token provided in the HTTP header. The token is verified using any of the following:
|
||||
- PEM-encoded key file
|
||||
- JSON Web Key Set (JWKS) in a local file
|
||||
- JWKS provided by the configured JWKS endpoint
|
||||
|
||||
## Enable JWT
|
||||
|
||||
To use JWT authentication:
|
||||
1. Enable JWT in the [main config file]({{< relref "../administration/configuration.md" >}}).
|
||||
1. Specify the header name that contains a token.
|
||||
|
||||
```ini
|
||||
[auth.jwt]
|
||||
# By default, auth.jwt is disabled.
|
||||
enabled = true
|
||||
|
||||
# HTTP header to look into to get a JWT token.
|
||||
header_name = X-JWT-Assertion
|
||||
```
|
||||
|
||||
## Configure login claim
|
||||
|
||||
To identify the user, some of the claims needs to be selected as a login info. You could specify a claim that contains either a username or an email of the Grafana user.
|
||||
|
||||
Typically, the subject claim called `"sub"` would be used as a login but it might also be set to some application specific claim.
|
||||
|
||||
```ini
|
||||
# [auth.jwt]
|
||||
# ...
|
||||
|
||||
# Specify a claim to use as a username to sign in.
|
||||
username_claim = sub
|
||||
|
||||
# Specify a claim to use as an email to sign in.
|
||||
email_claim = sub
|
||||
```
|
||||
|
||||
## Signature verification
|
||||
|
||||
JSON web token integrity needs to be verified so cryptographic signature is used for this purpose. So we expect that every token must be signed with some known cryptographic key.
|
||||
|
||||
You have a variety of options on how to specify where the keys are located.
|
||||
|
||||
### Verify token using a JSON Web Key Set loaded from https endpoint
|
||||
|
||||
For more information on JWKS endpoints, refer to [Auth0 docs](https://auth0.com/docs/tokens/json-web-tokens/json-web-key-sets).
|
||||
|
||||
```ini
|
||||
# [auth.jwt]
|
||||
# ...
|
||||
|
||||
jwk_set_url = https://your-auth-provider.example.com/.well-known/jwks.json
|
||||
|
||||
# Cache TTL for data loaded from http endpoint.
|
||||
cache_ttl = 60m
|
||||
```
|
||||
|
||||
### Verify token using a JSON Web Key Set loaded from JSON file
|
||||
|
||||
Key set in the same format as in JWKS endpoint but located on disk.
|
||||
|
||||
```ini
|
||||
jwk_set_file = /path/to/jwks.json
|
||||
```
|
||||
|
||||
### Verify token using a single key loaded from PEM-encoded file
|
||||
|
||||
PEM-encoded key file in PKIX, PKCS #1, PKCS #8 or SEC 1 format.
|
||||
|
||||
```ini
|
||||
key_file = /path/to/key.pem
|
||||
```
|
||||
|
||||
## Validate claims
|
||||
|
||||
By default, only `"exp"`, `"nbf"` and `"iat"` claims are validated.
|
||||
|
||||
You might also want to validate that other claims are really what you expect them to be.
|
||||
|
||||
```ini
|
||||
# This can be seen as a required "subset" of a JWT Claims Set.
|
||||
expect_claims = {"iss": "https://your-token-issuer", "your-custom-claim": "foo"}
|
||||
```
|
||||
@@ -122,7 +122,7 @@ oauth_auto_login = true
|
||||
|
||||
### Hide sign-out menu
|
||||
|
||||
Set the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy.
|
||||
Set the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy or JWT authentication.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
|
||||
14
docs/sources/basics/_index.md
Normal file
14
docs/sources/basics/_index.md
Normal file
@@ -0,0 +1,14 @@
|
||||
+++
|
||||
title = "Grafana basics"
|
||||
weight = 15
|
||||
+++
|
||||
|
||||
# Grafana basics
|
||||
|
||||
This section provides basic information about observability topics in general and Grafana in particular. These topics will help people who are just starting out with observability and monitoring.
|
||||
|
||||
{{< docs/shared "basics/what-is-grafana.md" >}}
|
||||
|
||||
{{< docs/shared "basics/grafana-cloud.md" >}}
|
||||
|
||||
{{< docs/shared "basics/grafana-enterprise.md" >}}
|
||||
119
docs/sources/basics/glossary.md
Normal file
119
docs/sources/basics/glossary.md
Normal file
@@ -0,0 +1,119 @@
|
||||
+++
|
||||
title = "Glossary"
|
||||
description = "Grafana glossary"
|
||||
keywords = ["grafana", "intro", "glossary", "dictionary"]
|
||||
aliases = ["/docs/grafana/latest/guides/glossary", "/docs/grafana/latest/getting-started/glossary"]
|
||||
weight = 800
|
||||
+++
|
||||
|
||||
# Glossary
|
||||
|
||||
This topic lists words and abbreviations that are commonly used in the Grafana documentation and community.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Dashboard</td>
|
||||
<td>
|
||||
A set of one or more panels, organized and arranged into one or more rows, that provide an at-a-glance view of related information.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Data source</td>
|
||||
<td>
|
||||
A file, database, or service providing the data. Grafana supports several data sources by default, and can be extended to support additional data sources through plugins.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Exemplar</td>
|
||||
<td>
|
||||
An exemplar is any data that serves as a detailed example of one of the observations aggregated into a metric. An exemplar contains the observed value together with an optional timestamp and arbitrary labels, which are typically used to reference a trace.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Explore</td>
|
||||
<td>
|
||||
Explore allows a user to focus on building a query. Users can refine the query to return the expected metrics before building a dashboard. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/explore">Explore</a> topic.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Export/Import dashboard</td>
|
||||
<td>
|
||||
Grafana includes the ability to export your dashboards to a file containing JSON. Community members sometimes share their created dashboards on the <a href="https://grafana.com/grafana/dashboards">Grafana Dashboards page</a>. Dashboards previously exported or found on this site may be imported by other users.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Exporter</td>
|
||||
<td>
|
||||
An exporter translates data that comes out of a data source into a format that Prometheus can digest.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Integration (Grafana Cloud)</td>
|
||||
<td>
|
||||
Each Integration in Grafana Cloud uses the cloud agent to connect your data source to Grafana Cloud for visualizing. Note: Prometheus uses the word “integrations” to refer to software that exposes Prometheus metrics without needing an exporter, which is a different use of the same word we use here.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Graph</td>
|
||||
<td>
|
||||
A commonly-used visualization that displays data as points, lines, or bars.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Mixin</td>
|
||||
<td>
|
||||
A mixin is a set of Grafana dashboards and Prometheus rules and alerts, written in Jsonnet and packaged together in a bundle.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Panel</td>
|
||||
<td>
|
||||
Basic building block in Grafana, composed by a query and a visualization. Can be moved and resized within a dashboard.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Plugin</td>
|
||||
<td>
|
||||
An extension of Grafana that allows users to provide additional functionality to enhance their experience. The types of plugins currently supported are:
|
||||
<ul>
|
||||
<li>
|
||||
<b>App plugin:</b> Extends Grafana with a customized experience. It includes a set of panel and data source plugins, as well as custom pages.
|
||||
</li>
|
||||
<li>
|
||||
<b>Data source plugin:</b> Extends Grafana with support for additional data sources.
|
||||
</li>
|
||||
<li>
|
||||
<b>Panel plugin:</b> Extends Grafana with additional visualization options.
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Query</td>
|
||||
<td>
|
||||
Used to request data from a data source. The structure and format of the query depend on the specific data source.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Time series</td>
|
||||
<td>
|
||||
A series of measurements, ordered by time. Time series are stored in data sources and returned as the result of a query.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Trace</td>
|
||||
<td>
|
||||
An observed execution path of a request through a distributed system. For more information, refer to <a href="https://opentracing.io/docs/overview/what-is-tracing/">What is Distributed Tracing?</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Transformation</td>
|
||||
<td>
|
||||
Transformations process the result set of a query before it’s passed on for visualization. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/panels/transformations">Transformations overview</a> topic.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="vertical-align: top">Visualization</td>
|
||||
<td>A graphical representation of query results.</td>
|
||||
</tr>
|
||||
</table>
|
||||
55
docs/sources/basics/intro-histograms.md
Normal file
55
docs/sources/basics/intro-histograms.md
Normal file
@@ -0,0 +1,55 @@
|
||||
+++
|
||||
title = "Histograms and heatmaps"
|
||||
description = "An introduction to histograms and heatmaps"
|
||||
keywords = ["grafana", "heatmap", "panel", "documentation", "histogram"]
|
||||
aliases = ["/docs/grafana/latest/getting-started/intro-histograms"]
|
||||
weight = 700
|
||||
+++
|
||||
|
||||
# Introduction to histograms and heatmaps
|
||||
|
||||
A histogram is a graphical representation of the distribution of numerical data. It groups values into buckets
|
||||
(sometimes also called bins) and then counts how many values fall into each bucket.
|
||||
|
||||
Instead of graphing the actual values, histograms graph the buckets. Each bar represents a bucket,
|
||||
and the bar height represents the frequency (such as count) of values that fell into that bucket's interval.
|
||||
|
||||
## Histogram example
|
||||
|
||||
This histogram shows the value distribution of a couple of time series. You can easily see that
|
||||
most values land between 240-300 with a peak between 260-280.
|
||||
|
||||

|
||||
|
||||
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is you cannot see any trends or changes in the distribution over time.
|
||||
This is where heatmaps become useful.
|
||||
|
||||
## Heatmaps
|
||||
|
||||
A _heatmap_ is like a histogram, but over time where each time slice represents its own histogram. Instead of using bar height as a representation of frequency, it uses cells and colors the cell proportional to the number of values in the bucket.
|
||||
|
||||
In this example, you can clearly see what values are more common and how they trend over time.
|
||||
|
||||

|
||||
|
||||
## Pre-bucketed data
|
||||
|
||||
There are a number of data sources supporting histogram over time like Elasticsearch (by using a Histogram bucket
|
||||
aggregation) or Prometheus (with [histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) metric type
|
||||
and *Format as* option set to Heatmap). But generally, any data source could be used if it meets the requirements:
|
||||
returns series with names representing bucket bound or returns series sorted by the bound in ascending order.
|
||||
|
||||
## Raw data vs aggregated
|
||||
|
||||
If you use the heatmap with regular time series data (not pre-bucketed), then it's important to keep in mind that your data
|
||||
is often already aggregated by your time series backend. Most time series queries do not return raw sample data
|
||||
but include a group by time interval or maxDataPoints limit coupled with an aggregation function (usually average).
|
||||
|
||||
This all depends on the time range of your query of course. But the important point is to know that the histogram bucketing
|
||||
that Grafana performs might be done on already aggregated and averaged data. To get more accurate heatmaps it is better
|
||||
to do the bucketing during metric collection or store the data in Elasticsearch, or in the other data source which
|
||||
supports doing histogram bucketing on the raw data.
|
||||
|
||||
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points your heatmap will be
|
||||
more accurate but this can also be very CPU and memory taxing for your browser and could cause hangs and crashes if the number of
|
||||
data points becomes unreasonably large.
|
||||
85
docs/sources/basics/timeseries-dimensions.md
Normal file
85
docs/sources/basics/timeseries-dimensions.md
Normal file
@@ -0,0 +1,85 @@
|
||||
+++
|
||||
title = "Time series dimensions"
|
||||
description = "time series dimensions"
|
||||
keywords = ["grafana", "intro", "guide", "concepts", "timeseries", "labels"]
|
||||
aliases = ["/docs/grafana/latest/guides/timeseries-dimensions", "/docs/grafana/latest/getting-started/timeseries-dimensions"]
|
||||
weight = 600
|
||||
+++
|
||||
|
||||
# Time series dimensions
|
||||
|
||||
In [Introduction to time series]({{< relref "timeseries.md#time-series-databases" >}}), the concept of _labels_, also called _tags_, is introduced:
|
||||
|
||||
> Another feature of a TSDB is the ability to filter measurements using _tags_. Each data point is labeled with a tag that adds context information, such as where the measurement was taken.
|
||||
|
||||
With time series data, the data often contain more than a single series, and is a set of multiple time series. Many Grafana data sources support this type of data.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/example_graph_multi_dim.png" class="docs-image--no-shadow" max-width="850px" >}}
|
||||
|
||||
The common case is issuing a single query for a measurement with one or more additional properties as dimensions. For example, querying a temperature measurement along with a location property. In this case, multiple series are returned back from that single query and each series has unique location as a dimension.
|
||||
|
||||
To identify unique series within a set of time series, Grafana stores dimensions in _labels_.
|
||||
|
||||
## Labels
|
||||
|
||||
Each time series in Grafana optionally has labels. labels are set a of key/value pairs for identifying dimensions. Example labels could are `{location=us}` or `{country=us,state=ma,city=boston}`. Within a set of time series, the combination of its name and labels identifies each series. For example, `temperature {country=us,state=ma,city=boston}`.
|
||||
|
||||
Different sources of time series data have dimensions stored natively, or common storage patterns that allow the data to be extracted into dimensions.
|
||||
|
||||
Time series databases (TSDBs) usually natively support dimensionality. Prometheus also stores dimensions in _labels_. In TSDBs such as Graphite or OpenTSDB the term _tags_ is used instead.
|
||||
|
||||
In table databases such SQL, these dimensions are generally the `GROUP BY` parameters of a query.
|
||||
|
||||
## Multiple dimensions in table format
|
||||
|
||||
In SQL or SQL-like databases that return table responses, additional dimensions usually columns in the query response table.
|
||||
|
||||
### Single dimension
|
||||
|
||||
For example, consider a query like:
|
||||
|
||||
```sql
|
||||
SELECT BUCKET(StartTime, 1h), AVG(Temperature) AS Temp, Location FROM T
|
||||
GROUP BY BUCKET(StartTime, 1h), Location
|
||||
ORDER BY time asc
|
||||
```
|
||||
|
||||
Might return a table with three columns that each respectively have data types time, number, and string.
|
||||
|
||||
| StartTime | Temp | Location |
|
||||
| --------- | ---- | -------- |
|
||||
| 09:00 | 24 | LGA |
|
||||
| 09:00 | 20 | BOS |
|
||||
| 10:00 | 26 | LGA |
|
||||
| 10:00 | 22 | BOS |
|
||||
|
||||
The table format is _long_ formatted time series, also called _tall_. It has repeated time stamps, and repeated values in Location. In this case, we have two time series in the set that would be identified as `Temp {Location=LGA}` and `Temp {Location=BOS}`.
|
||||
|
||||
Individual time series from the set are extracted by using the time typed column `StartTime` as the time index of the time series, the numeric typed column `Temp` as the series name, and the name and values of the string typed `Location` column to build the labels, such as Location=LGA.
|
||||
|
||||
### Multiple dimensions
|
||||
|
||||
If the query is updated to select and group by more than just one string column, for example, `GROUP BY BUCKET(StartTime, 1h), Location, Sensor`, then an additional dimension is added:
|
||||
|
||||
| StartTime | Temp | Location | Sensor |
|
||||
| --------- | ---- | -------- | ------ |
|
||||
| 09:00 | 24 | LGA | A |
|
||||
| 09:00 | 24.1 | LGA | B |
|
||||
| 09:00 | 20 | BOS | A |
|
||||
| 09:00 | 20.2 | BOS | B |
|
||||
| 10:00 | 26 | LGA | A |
|
||||
| 10:00 | 26.1 | LGA | B |
|
||||
| 10:00 | 22 | BOS | A |
|
||||
| 10:00 | 22.2 | BOS | B |
|
||||
|
||||
In this case the labels that represent the dimensions will have two keys based on the two string typed columns `Location` and `Sensor`. This data results four series: `Temp {Location=LGA,Sensor=A}`, `Temp {Location=LGA,Sensor=B}`, `Temp {Location=BOS,Sensor=A}`, and `Temp {Location=BOS,Sensor=B}`.
|
||||
|
||||
> **Note:** More than one dimension is currently only supported in the Logs queries within the Azure Monitor service as of version 7.1.
|
||||
|
||||
> **Note:** Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert. See the documentation on [creating alerts with multiple series]({{< relref "../alerting/create-alerts.md#multiple-series" >}}).
|
||||
|
||||
### Multiple values
|
||||
|
||||
In the case SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
|
||||
|
||||
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../developers/plugins/data-frames.md#data-frames-as-time-series" >}}).
|
||||
123
docs/sources/basics/timeseries.md
Normal file
123
docs/sources/basics/timeseries.md
Normal file
@@ -0,0 +1,123 @@
|
||||
+++
|
||||
title = "Time series"
|
||||
description = "Introduction to time series"
|
||||
keywords = ["grafana", "intro", "guide", "concepts", "timeseries"]
|
||||
aliases = ["/docs/grafana/latest/guides/timeseries", "/docs/grafana/latest/getting-started/timeseries"]
|
||||
weight = 500
|
||||
+++
|
||||
|
||||
# Introduction to time series
|
||||
|
||||
Imagine you wanted to know how the temperature outside changes throughout the day. Once every hour, you'd check the thermometer and write down the time along with the current temperature. After a while, you'd have something like this:
|
||||
|
||||
| Time | Value |
|
||||
| ----- | ----- |
|
||||
| 09:00 | 24°C |
|
||||
| 10:00 | 26°C |
|
||||
| 11:00 | 27°C |
|
||||
|
||||
Temperature data like this is one example of what we call a *time series*—a sequence of measurements, ordered in time. Every row in the table represents one individual measurement at a specific time.
|
||||
|
||||
Tables are useful when you want to identify individual measurements but make it difficult to see the big picture. A more common visualization for time series is the _graph_, which instead places each measurement along a time axis. Visual representations like the graph make it easier to discover patterns and features of the data that otherwise would be difficult to see.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/example_graph.png" class="docs-image--no-shadow" max-width="850px" >}}
|
||||
|
||||
Temperature data like the one in the example, is far from the only example of a time series. Other examples of time series are:
|
||||
|
||||
- CPU and memory usage
|
||||
- Sensor data
|
||||
- Stock market index
|
||||
|
||||
While each of these examples are sequences of chronologically ordered measurements, they also share other attributes:
|
||||
|
||||
- New data is appended at the end, at regular intervals—for example, hourly at 09:00, 10:00, 11:00, and so on.
|
||||
- Measurements are seldom updated after they were added—for example, yesterday's temperature doesn't change.
|
||||
|
||||
Time series are powerful. They help you understand the past by letting you analyze the state of the system at any point in time. Time series could tell you that the server crashed moments after the free disk space went down to zero.
|
||||
|
||||
Time series can also help you predict the future, by uncovering trends in your data. If the number of registered users has been increasing monthly by 4% for the past few months, you can predict how big your user base is going to be at the end of the year.
|
||||
|
||||
Some time series have patterns that repeat themselves over a known period. For example, the temperature is typically higher during the day, before it dips down at night. By identifying these periodic, or _seasonal_, time series, you can make confident predictions about the next period. If we know that the system load peaks every day around 18:00, we can add more machines right before.
|
||||
|
||||
## Aggregating time series
|
||||
|
||||
Depending on what you're measuring, the data can vary greatly. What if you wanted to compare periods longer than the interval between measurements? If you'd measure the temperature once every hour, you'd end up with 24 data points per day. To compare the temperature in August over the years, you'd have to combine the 31 times 24 data points into one.
|
||||
|
||||
Combining a collection of measurements is called _aggregation_. There are several ways to aggregate time series data. Here are some common ones:
|
||||
|
||||
- **Average** returns the sum of all values divided by the total number of values.
|
||||
- **Min** and **Max** return the smallest, and largest value in the collection.
|
||||
- **Sum** returns the sum of all values in the collection.
|
||||
- **Count** returns the number of values in the collection.
|
||||
|
||||
For example, by aggregating the data in a month, you can determine that August 2017 was, on average, warmer than the year before. Instead, to see which month had the highest temperature, you'd compare the maximum temperature for each month.
|
||||
|
||||
How you choose to aggregate your time series data is an important decision and depends on the story you want to tell with your data. It's common to use different aggregations to visualize the same time series data in different ways.
|
||||
|
||||
## Time series and monitoring
|
||||
|
||||
In the IT industry, time series data is often collected to monitor things like infrastructure, hardware, or application events. Machine-generated time series data is typically collected with short intervals, which allows you to react to any unexpected changes, moments after they occur. As a consequence, data accumulates at a rapid pace, making it vital to have a way to store and query data efficiently. As a result, databases optimized for time series data have seen a rise in popularity in recent years.
|
||||
|
||||
### Time series databases
|
||||
|
||||
A time series database (TSDB) is a database explicitly designed for time series data. While it's possible to use any regular database to store measurements, a TSDB comes with some useful optimizations.
|
||||
|
||||
Modern time series databases take advantage of the fact that measurements are only ever appended, and rarely updated or removed. For example, the timestamps for each measurement change very little over time, which results in redundant data being stored.
|
||||
|
||||
Look at this sequence of Unix timestamps:
|
||||
|
||||
```
|
||||
1572524345, 1572524375, 1572524404, 1572524434, 1572524464
|
||||
```
|
||||
|
||||
Looking at these timestamps, they all start with `1572524`, leading to poor use of disk space. Instead, we could store each subsequent timestamp as the difference, or _delta_, from the first one:
|
||||
|
||||
```
|
||||
1572524345, +30, +29, +30, +30
|
||||
```
|
||||
|
||||
We could even take it a step further, by calculating the deltas of these deltas:
|
||||
|
||||
```
|
||||
1572524345, +30, -1, +1, +0
|
||||
```
|
||||
|
||||
If measurements are taken at regular intervals, most of these delta-of-deltas will be 0. Because of optimizations like these, TSDBs uses drastically less space than other databases.
|
||||
|
||||
Another feature of a TSDB is the ability to filter measurements using _tags_. Each data point is labeled with a tag that adds context information, such as where the measurement was taken. Here's an example of the [InfluxDB data format](https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/#syntax) that demonstrates how each measurement is stored.
|
||||
|
||||
Here are some of the TSDBs supported by Grafana:
|
||||
|
||||
- [Graphite](https://graphiteapp.org/)
|
||||
- [InfluxDB](https://www.influxdata.com/products/influxdb-overview/)
|
||||
- [Prometheus](https://prometheus.io/)
|
||||
|
||||
```
|
||||
weather,location=us-midwest temperature=82 1465839830100400200
|
||||
| -------------------- -------------- |
|
||||
| | | |
|
||||
| | | |
|
||||
+-----------+--------+-+---------+-+---------+
|
||||
|measurement|,tag_set| |field_set| |timestamp|
|
||||
+-----------+--------+-+---------+-+---------+
|
||||
```
|
||||
|
||||
### Collecting time series data
|
||||
|
||||
Now that we have a place to store our time series, how do we actually gather the measurements? To collect time series data, you'd typically install a _collector_ on the device, machine, or instance you want to monitor. Some collectors are made with a specific database in mind, and some support different output destinations.
|
||||
|
||||
Here are some examples of collectors:
|
||||
|
||||
- [collectd](https://collectd.org/)
|
||||
- [statsd](https://github.com/statsd/statsd)
|
||||
- [Prometheus exporters](https://prometheus.io/docs/instrumenting/exporters/)
|
||||
- [Telegraf](https://github.com/influxdata/telegraf)
|
||||
|
||||
A collector either _pushes_ data to a database or lets the database _pull_ the data from it. Both methods come with their own set of pros and cons:
|
||||
|
||||
| | Pros | Cons |
|
||||
| ---- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| Push | Easier to replicate data to multiple destinations. | The TSDB has no control over how much data gets sent. |
|
||||
| Pull | Better control of how much data that gets ingested, and its authenticity. | Firewalls, VPNs or load balancers can make it hard to access the agents. |
|
||||
|
||||
Since it would be inefficient to write every measurement to the database, collectors pre-aggregate the data and write to the time series database at regular intervals.
|
||||
@@ -12,5 +12,3 @@ This section provides information about best practices for intermediate Grafana
|
||||
- [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards" >}})
|
||||
- [Common observability strategies]({{< relref "common-observability-strategies" >}})
|
||||
- [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels" >}})
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ you can get event description and event tags. The text field can include links t
|
||||
|
||||
## Native annotations
|
||||
|
||||
Grafana v4.6+ comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../http_api/annotations.md" >}}).
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../http_api/annotations.md" >}}).
|
||||
|
||||
## Adding annotations
|
||||
|
||||
@@ -64,12 +64,4 @@ to show.
|
||||
|
||||
### Annotation query details
|
||||
|
||||
The annotation query options are different for each data source.
|
||||
|
||||
- [Graphite annotation queries]({{< relref "../datasources/graphite.md#annotations" >}})
|
||||
- [Elasticsearch annotation queries]({{< relref "../datasources/elasticsearch.md#annotations" >}})
|
||||
- [InfluxDB annotation queries]({{< relref "../datasources/influxdb.md#annotations" >}})
|
||||
- [Prometheus annotation queries]({{< relref "../datasources/prometheus.md#annotations" >}})
|
||||
- [MySQL annotation queries]({{< relref "../datasources/mysql.md#annotations" >}})
|
||||
- [Postgres annotation queries]({{< relref "../datasources/postgres.md#annotations" >}})
|
||||
- [Loki annotation queries]({{< relref "../datasources/loki.md#annotations" >}})
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../datasources/_index.md" >}}) topic.
|
||||
|
||||
@@ -46,6 +46,6 @@ The Dashboard Folder Page is similar to the Manage Dashboards page and is where
|
||||
|
||||
Permissions can be assigned to a folder and inherited by the containing dashboards. An Access Control List (ACL) is used where
|
||||
**Organization Role**, **Team** and Individual **User** can be assigned permissions. Read the
|
||||
[Dashboard and Folder Permissions]({{< relref "../permissions/dashboard_folder_permissions.md" >}}) docs for more detail
|
||||
[Dashboard and Folder Permissions]({{< relref "../permissions/dashboard-folder-permissions.md" >}}) docs for more detail
|
||||
on the permission system.
|
||||
|
||||
|
||||
@@ -26,8 +26,12 @@ Here are some examples:
|
||||
| Last 5 minutes | `now-5m` | `now` |
|
||||
| The day so far | `now/d` | `now` |
|
||||
| This week | `now/w` | `now/w` |
|
||||
| Week to date | `now/w` | `now` |
|
||||
| This week so far | `now/w` | `now` |
|
||||
| This month | `now/M` | `now/M` |
|
||||
| This month so far | `now/M` | `now` |
|
||||
| Previous Month | `now-1M/M` | `now-1M/M` |
|
||||
| This year so far | `now/Y` | `now` |
|
||||
| This Year | `now/Y` | `now/Y |
|
||||
|
||||
## Common time range controls
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ weight = 60
|
||||
|
||||
# Data sources
|
||||
|
||||
Grafana supports many different storage backends for your time series data (data source). Each data source has a specific Query Editor that is customized for the features and capabilities that the particular data source exposes.
|
||||
Grafana supports many different storage backends for your time series data (data source). Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
|
||||
## Querying
|
||||
|
||||
The query language and capabilities of each data source are obviously very different. You can combine data from multiple data sources onto a single Dashboard, but each Panel is tied to a specific data source that belongs to a particular Organization.
|
||||
Each data source has a specific Query Editor that is customized for the features and capabilities that the particular data source exposes. The query language and capabilities of each data source are obviously very different. You can combine data from multiple data sources onto a single Dashboard, but each Panel is tied to a specific data source that belongs to a particular Organization.
|
||||
|
||||
## Supported data sources
|
||||
|
||||
@@ -21,7 +21,7 @@ The following data sources are officially supported:
|
||||
- [Elasticsearch]({{< relref "elasticsearch.md" >}})
|
||||
- [Google Cloud Monitoring]({{< relref "google-cloud-monitoring/_index.md" >}})
|
||||
- [Graphite]({{< relref "graphite.md" >}})
|
||||
- [InfluxDB]({{< relref "influxdb.md" >}})
|
||||
- [InfluxDB]({{< relref "influxdb/_index.md" >}})
|
||||
- [Loki]({{< relref "loki.md" >}})
|
||||
- [Microsoft SQL Server (MSSQL)]({{< relref "mssql.md" >}})
|
||||
- [MySQL]({{< relref "mysql.md" >}})
|
||||
|
||||
@@ -6,23 +6,33 @@ weight = 100
|
||||
|
||||
# Add a data source
|
||||
|
||||
Before you create your first dashboard, you need to add your data source. Following are the list of instructions to create one.
|
||||
Before you can create your first dashboard, you need to add your data source.
|
||||
|
||||
> **Note:** Only users with the organization Admin role can add data sources.
|
||||
|
||||
1. Move your cursor to the cog on the side menu which will show you the configuration menu. If the side menu is not visible click the Grafana icon in the upper left corner. Click on **Configuration** > **Data Sources** in the side menu and you'll be taken to the data sources page
|
||||
1. Move your cursor to the cog on the side menu which will show you the configuration menu. If the side menu is not visible click the Grafana icon in the upper left corner. Click on **Configuration** > **Data sources** in the side menu and you'll be taken to the data sources page
|
||||
where you can add and edit data sources. You can also click the cog.
|
||||
{{< docs-imagebox img="/img/docs/v52/sidemenu-datasource.png" max-width="250px" class="docs-image--no-shadow">}}
|
||||
|
||||
1. Click **Add data source** and you will come to the settings page of your new data source.
|
||||
1. Move your cursor to the cog icon on the side menu which will show the configuration options.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v75/sidemenu-datasource-7-5.png" max-width="150px" class="docs-image--no-shadow">}}
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v52/add-datasource.png" max-width="700px" class="docs-image--no-shadow">}}
|
||||
1. Click on **Data Sources**. The data sources page opens showing a list of previously configured data sources for the Grafana instance.
|
||||
|
||||
1. In the **Name** box, enter a name for this data source.
|
||||
1. Click **Add data source** to see a list of all supported data sources.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v75/add-data-source-7-5.png" max-width="600px" class="docs-image--no-shadow">}}
|
||||
|
||||
1. Search for a specific data source by entering the name in the search dialog. Or you can scroll through supported data sources grouped into time series, logging, tracing and other categories.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v52/datasource-settings.png" max-width="700px" class="docs-image--no-shadow">}}
|
||||
1. Move the cursor over the data source you want to add.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v75/select-data-source-7-5.png" max-width="700px" class="docs-image--no-shadow">}}
|
||||
|
||||
1. Click **Select**. The data source configuration page opens.
|
||||
|
||||
1. Configure the data source following instructions specific to that data source. See [Data sources]({{< relref "_index.md" >}}) for links to configuration instructions for all supported data sources.
|
||||
|
||||
1. In the **Type**, select the type of data source. See [Supported data sources]({{< relref "_index.md#supported-data-sources" >}}) for more information and how to configure your data source settings.
|
||||
|
||||
1. Click **Save & Test**.
|
||||
|
||||
|
||||
@@ -6,11 +6,7 @@ aliases = ["/docs/grafana/latest/features/datasources/azuremonitor"]
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
# Using Azure Monitor in Grafana
|
||||
|
||||
> Officially released in Grafana v6.0.0
|
||||
|
||||
As of Grafana 6.0, the Azure Monitor plugin has been moved into Grafana so it now ships with built-in support for Azure Monitor.
|
||||
# Azure Monitor data source
|
||||
|
||||
The Azure Monitor data source supports multiple services in the Azure cloud:
|
||||
|
||||
|
||||
@@ -6,19 +6,17 @@ aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Using AWS CloudWatch in Grafana
|
||||
# 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. Add it as a data source, then you are ready to build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs.
|
||||
|
||||
## Adding the data source
|
||||
This topic explains options, variables, querying, and other options specific to this data source. Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
|
||||
1. In the side menu under the `Configuration` link, click on `Data Sources`.
|
||||
1. Click the `Add data source` button.
|
||||
1. Select `Cloudwatch` in the `Cloud` section.
|
||||
> **Note:** If you have issues with getting this data source to work and Grafana is giving you undescriptive errors, then check your log file (try looking in /var/log/grafana/grafana.log).
|
||||
|
||||
> **Note:** If at any moment you have issues with getting this data source to work and Grafana is giving you undescriptive errors then don't
|
||||
> forget to check your log file (try looking in /var/log/grafana/grafana.log).
|
||||
## Cloudwatch settings
|
||||
|
||||
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 |
|
||||
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
@@ -186,8 +184,6 @@ If the period field is left blank or set to `auto`, then it calculates automatic
|
||||
|
||||
### Deep linking from Grafana panels to the CloudWatch console
|
||||
|
||||
> Only available in Grafana v6.5+.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v65/cloudwatch-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch deep linking" >}}
|
||||
|
||||
Left clicking a time series in the panel shows a context menu with a link to `View in CloudWatch console`. Clicking that link will open a new tab that will take you to the CloudWatch console and display all the metrics for that query. 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.
|
||||
@@ -196,7 +192,7 @@ This feature is not available for metrics that are based on metric math expressi
|
||||
|
||||
## Using the Logs Query Editor
|
||||
|
||||
> Only available in Grafana v7.0+.
|
||||
> **Note:** Available in Grafana v7.0+.
|
||||
|
||||
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)
|
||||
|
||||
@@ -226,8 +222,6 @@ See the [Alerting]({{< relref "../alerting/_index.md" >}}) documentation for mor
|
||||
|
||||
## Curated dashboards
|
||||
|
||||
> Only available in Grafana v6.5+.
|
||||
|
||||
The updated CloudWatch data source ships with pre-configured dashboards for five of the most popular AWS services:
|
||||
|
||||
- Amazon Elastic Compute Cloud `Amazon EC2`,
|
||||
@@ -302,7 +296,7 @@ Filters syntax:
|
||||
Example `ec2_instance_attribute()` query
|
||||
|
||||
```javascript
|
||||
ec2_instance_attribute(us-east-1, InstanceId, { "tag:Environment": ["production"] });
|
||||
ec2_instance_attribute(us - east - 1, InstanceId, { 'tag:Environment': ['production'] });
|
||||
```
|
||||
|
||||
### Selecting attributes
|
||||
@@ -343,10 +337,10 @@ 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"] });
|
||||
ec2_instance_attribute(us - east - 1, Tags.Name, { 'tag:Team': ['sysops'] });
|
||||
```
|
||||
|
||||
## Using json format template variables
|
||||
## Using JSON format template variables
|
||||
|
||||
Some queries accept filters in JSON format and Grafana supports the conversion of template variables to JSON.
|
||||
|
||||
@@ -375,6 +369,22 @@ To request a quota increase, visit the [AWS Service Quotas console](https://cons
|
||||
|
||||
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
|
||||
|
||||
In the Grafana [configuration]({{< relref "../administration/configuration.md#aws" >}}) file, there's an `AWS` section that allows you to 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
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}})
|
||||
|
||||
@@ -77,9 +77,7 @@ number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 se
|
||||
| `s` | second |
|
||||
| `ms` | millisecond |
|
||||
|
||||
### Logs (BETA)
|
||||
|
||||
> Only available in Grafana v6.3+.
|
||||
### Logs
|
||||
|
||||
There are two parameters, `Message field name` and `Level field name`, that can optionally be configured from the data source settings page that determine
|
||||
which fields will be used for log messages and log levels when visualizing logs in [Explore]({{< relref "../explore" >}}).
|
||||
@@ -191,18 +189,18 @@ for annotation events.
|
||||
| `Text` | Event description field. |
|
||||
| `Tags` | Optional field name to use for event tags (can be an array or a CSV string). |
|
||||
|
||||
## Querying Logs (BETA)
|
||||
|
||||
> Only available in Grafana v6.3+.
|
||||
## Querying Logs
|
||||
|
||||
Querying and displaying log data from Elasticsearch is available in [Explore]({{< relref "../explore" >}}), and in the [logs panel]({{< relref "../panels/visualizations/logs-panel.md" >}}) in dashboards.
|
||||
Select the Elasticsearch data source, and then optionally enter a lucene query to display your logs.
|
||||
|
||||
When switching from a Prometheus or Loki data source in Explore, your query is translated to an Elasticsearch log query with a correct Lucene filter.
|
||||
|
||||
### Log Queries
|
||||
|
||||
Once the result is returned, the log panel shows a list of log rows and a bar chart where the x-axis shows the time and the y-axis shows the frequency/count.
|
||||
|
||||
Note that the fields used for log message and level is based on an [optional data source configuration](#logs-beta).
|
||||
Note that the fields used for log message and level is based on an [optional data source configuration](#logs).
|
||||
|
||||
### Filter Log Messages
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ weight = 200
|
||||
|
||||
# Using Google Cloud Monitoring in Grafana
|
||||
|
||||
Grafana ships with built-in support for Google Cloud Monitoring. Just add it as a data source and you are ready to build dashboards for your Google Cloud Monitoring metrics. Refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
Grafana ships with built-in support for Google Cloud Monitoring. Add it as a data source to build dashboards for your Google Cloud Monitoring metrics. For instructions on how to add a data source, refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}). Only users with the organization admin role can add data sources.
|
||||
|
||||
> **Note** Before Grafana v7.1, Google Cloud Monitoring was referred to as Google Stackdriver.
|
||||
|
||||
@@ -16,11 +16,11 @@ Grafana ships with built-in support for Google Cloud Monitoring. Just add it as
|
||||
|
||||
To access Google Cloud Monitoring settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Google Cloud Monitoring 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. |
|
||||
| `Service Account Key` | Upload or paste in the Service Account Key file for a GCP Project. Refer to [Using a Google Service Account Key File](#using-a-google-service-account-key-file) for details.|
|
||||
| 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 is pre-selected for new panels. |
|
||||
| `Service Account Key` | Upload or paste in the Service Account Key file for a GCP Project. For more information, refer to [Using a Google Service Account Key File](#using-a-google-service-account-key-file). |
|
||||
|
||||
## Authentication
|
||||
|
||||
@@ -93,7 +93,7 @@ To create a metric query, follow these steps:
|
||||
1. Choose a metric from the **Metric** dropdown.
|
||||
1. Use the plus and minus icons in the filter and group by sections to add/remove filters or group by clauses. This step is optional.
|
||||
|
||||
Google Cloud Monitoring metrics can be of different kinds (GAUGE, DELTA, CUMULATIVE) and these kinds have support for different aggregation options (reducers and aligners). The Grafana query editor shows the list of available aggregation methods for a selected metric and sets a default reducer and aligner when you select the metric. Units for the Y-axis are also automatically selected by the query editor.
|
||||
Google Cloud Monitoring supports different kinds of metrics like `GAUGE`, `DELTA,` and `CUMULATIVE`. They support different aggregation options, for example, reducers and aligners. The Grafana query editor displays the list of available aggregation methods for a selected metric and sets a default reducer and aligner when you select the metric.
|
||||
|
||||
#### Filter
|
||||
|
||||
@@ -122,7 +122,7 @@ The option is called `cloud monitoring auto` and the defaults are:
|
||||
- 5m for time ranges >= 23 hours and < 6 days
|
||||
- 1h for time ranges >= 6 days
|
||||
|
||||
The other automatic option is `grafana auto`. This will automatically set the group by time depending on the time range chosen and the width of the graph panel. For more information about grafana auto, refer to the [interval variable](http://docs.grafana.org/variables/templates-and-variables/#the-interval-variable).
|
||||
The other automatic option is `grafana auto`. This will automatically set the group by time depending on the time range chosen and the width of the time series panel. For more information about grafana auto, refer to the [interval variable](http://docs.grafana.org/variables/templates-and-variables/#the-interval-variable).
|
||||
|
||||
It is also possible to choose fixed time intervals to group by, like `1h` or `1d`.
|
||||
|
||||
@@ -182,6 +182,10 @@ Example Result: `gce_instance - compute.googleapis.com/instance/cpu/usage_time`
|
||||
Click on a time series in the panel to see a context menu with a link to View in Metrics Explorer in Google Cloud Console. Clicking that link opens the Metrics Explorer in the Google Cloud Console and runs the query from the Grafana panel there.
|
||||
The link navigates the user first to the Google Account Chooser and after successfully selecting an account, the user is redirected to the Metrics Explorer. The provided link is valid for any account, but it only displays the query if your account has access to the GCP project specified in the query.
|
||||
|
||||
#### Automatic unit detection
|
||||
|
||||
Grafana issues one query to the Cloud Monitoring API per query editor row, and each API response includes a unit. Grafana will attempt to convert the returned unit into a unit that is understood by the Grafana time series panel. If the conversion was successful, then the unit will be displayed on the Y-axis on the panel. If the query editor rows returned different units, then the unit from the last query editor row is used in the time series panel.
|
||||
|
||||
### SLO (Service Level Objective) queries
|
||||
|
||||
> **Note:** Available in Grafana v7.0 and later versions.
|
||||
|
||||
@@ -145,7 +145,7 @@ The macros support copying and pasting from [Chronograph](https://www.influxdata
|
||||
Macro example | Description
|
||||
------------ | -------------
|
||||
`v.timeRangeStart` | Will be replaced by the start of the currently active time selection. For example, *2020-06-11T13:31:00Z*
|
||||
`v.timeRangeEnd` | Will be replaced by the end of the currently active time selection. For example, *2020-06-11T14:31:00Z*
|
||||
`v.timeRangeStop` | Will be replaced by the end of the currently active time selection. For example, *2020-06-11T14:31:00Z*
|
||||
`v.windowPeriod` | Will be replaced with an interval string compatible with Flux that corresponds to Grafana's calculated interval based on the time range of the active time selection. For example, *5s*
|
||||
`v.defaultBucket` | Will be replaced with the data source configuration's "Default Bucket" setting
|
||||
`v.organization` | Will be replaced with the data source configuration's "Organization" setting
|
||||
|
||||
149
docs/sources/datasources/influxdb/_index.md
Normal file
149
docs/sources/datasources/influxdb/_index.md
Normal file
@@ -0,0 +1,149 @@
|
||||
+++
|
||||
title = "InfluxDB data source"
|
||||
description = "Guide for using InfluxDB in Grafana"
|
||||
keywords = ["grafana", "influxdb", "guide", "flux"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/influxdb", "/docs/grafana/latest/datasources/influxdb"]
|
||||
weight = 700
|
||||
+++
|
||||
|
||||
# InfluxDB data source
|
||||
|
||||
{{< docs/shared "influxdb/intro.md" >}}
|
||||
|
||||
This topic explains options, variables, querying, and other options specific to this data source. Refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
|
||||
## Data source options
|
||||
|
||||
To access data source settings, hover your mouse over the **Configuration** (gear) icon, then click **Data sources**, and then click the data source.
|
||||
|
||||
InfluxDB data source options differ depending on which [query language](#query-languages) you select: InfluxQL or Flux.
|
||||
|
||||
> **Note:** Though not required, it's a good practice to append the language choice to the data source name. For example:
|
||||
>
|
||||
- InfluxDB-InfluxQL
|
||||
- InfluxDB-Flux
|
||||
|
||||
### InfluxQL (classic InfluxDB query)
|
||||
|
||||
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` | 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.
|
||||
`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.
|
||||
`Whitelisted Cookies`| Cookies that will be forwarded to the data source. All other cookies will be deleted.
|
||||
`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.
|
||||
`User` | The username you use to sign into InfluxDB.
|
||||
`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.
|
||||
`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`.
|
||||
`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
|
||||
|
||||
For information on data source settings and using Flux in Grafana, refer to [Flux support in Grafana]({{< relref "influxdb-flux.md" >}}).
|
||||
|
||||
#### Min time interval
|
||||
|
||||
A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value _must_ be formatted as a number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
|
||||
Identifier | Description
|
||||
------------ | -------------
|
||||
`y` | year
|
||||
`M` | month
|
||||
`w` | week
|
||||
`d` | day
|
||||
`h` | hour
|
||||
`m` | minute
|
||||
`s` | second
|
||||
`ms` | millisecond
|
||||
|
||||
## Query languages
|
||||
|
||||
You can query InfluxDB using InfluxQL or Flux:
|
||||
|
||||
- [InfluxQL](https://docs.influxdata.com/influxdb/v1.8/query_language/explore-data/) is a SQL-like language for querying InfluxDB, with statements such as SELECT, FROM, WHERE, and GROUP BY that are familiar to SQL users. InfluxQL is available in InfluxDB 1.0 onwards.
|
||||
- [Flux](https://docs.influxdata.com/influxdb/v2.0/query-data/get-started/) provides significantly broader functionality than InfluxQL, supporting not only queries, but built-in functions for data shaping, string manipulation, joining to non-InfluxDB data sources and more, but also processing time-series data. It’s more similar to JavaScript with a functional style.
|
||||
|
||||
To help you choose the best language for your needs, here’s a comparison of [Flux vs InfluxQL](https://docs.influxdata.com/influxdb/v1.8/flux/flux-vs-influxql/), and [why InfluxData created Flux](https://www.influxdata.com/blog/why-were-building-flux-a-new-data-scripting-and-query-language/).
|
||||
|
||||
## InfluxQL query editor
|
||||
|
||||
Enter edit mode by clicking the panel title and clicking **Edit**. The editor allows you to select metrics and tags.
|
||||
|
||||

|
||||
|
||||
### Filter data (WHERE)
|
||||
|
||||
To add a tag filter, click the plus icon to the right of the `WHERE` condition. You can remove tag filters by clicking on the tag key and then selecting `--remove tag filter--`.
|
||||
|
||||
**Regex matching**
|
||||
|
||||
You can type in regex patterns for metric names or tag filter values. Be sure to wrap the regex pattern in forward slashes (`/`). Grafana automatically adjusts the filter tag condition to use the InfluxDB regex match condition operator (`=~`).
|
||||
|
||||
### Field and Aggregation functions
|
||||
|
||||
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
|
||||
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries to simplify and unify this part of the query. For example:
|
||||
|
||||

|
||||
|
||||
The above generates the following InfluxDB `SELECT` clause:
|
||||
|
||||
```sql
|
||||
SELECT derivative(mean("value"), 10s) /10 AS "REQ/s" FROM ....
|
||||
```
|
||||
|
||||
#### Select multiple fields
|
||||
|
||||
Use the plus button and select Field > field to add another SELECT clause. You can also
|
||||
specify an asterix `*` to select all fields.
|
||||
|
||||
### Group By
|
||||
To group by a tag, click the plus icon at the end of the GROUP BY row. Pick a tag from the dropdown that appears.
|
||||
You can remove the "Group By" by clicking on the `tag` and then click on the x icon.
|
||||
|
||||
### Text Editor Mode (RAW)
|
||||
|
||||
You can switch to raw query mode by clicking hamburger icon and then `Switch editor mode`.
|
||||
|
||||
> If you use Raw Query be sure your query at minimum have `WHERE $timeFilter`.
|
||||
> Also, always have a group by time and an aggregation function, otherwise InfluxDB can easily return hundreds of thousands of data points that will hang the browser.
|
||||
|
||||
### Alias patterns
|
||||
|
||||
- $m = replaced with measurement name
|
||||
- $measurement = replaced with measurement name
|
||||
- $col = replaced with column name
|
||||
- $tag_exampletag = replaced with the value of the `exampletag` tag. The syntax is `$tag_yourTagName` (must start with `$tag_`). To use your tag as an alias in the ALIAS BY field then the tag must be used to group by in the query.
|
||||
- You can also use [[tag_hostname]] pattern replacement syntax. For example, in the ALIAS BY field using this text `Host: [[tag_hostname]]` would substitute in the `hostname` tag value for each legend value and an example legend value would be: `Host: server1`.
|
||||
|
||||
## Querying logs
|
||||
|
||||
Querying and displaying log data from InfluxDB is available in [Explore]({{< relref "../../explore/_index.md" >}}), and in the [logs panel]({{< relref "../../panels/visualizations/logs-panel.md" >}}) in dashboards.
|
||||
Select the InfluxDB data source, and then enter a query to display your logs.
|
||||
|
||||
### Log queries
|
||||
|
||||
The Logs Explorer (the `Measurements/Fields` button) next to the query field shows a list of measurements and fields. Choose the desired measurement that contains your log data and then choose which field Explore should use to display the log message.
|
||||
|
||||
Once the result is returned, the log panel shows a list of log rows and a bar chart where the x-axis shows the time and the y-axis shows the frequency/count.
|
||||
|
||||
### Filter search
|
||||
|
||||
To add a filter, click the plus icon to the right of the `Measurements/Fields` button or a condition. You can remove tag filters by clicking on the first select and choosing `--remove filter--`.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../../dashboards/annotations.md" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
|
||||
An example query:
|
||||
|
||||
```SQL
|
||||
SELECT title, description from events WHERE $timeFilter ORDER BY time ASC
|
||||
```
|
||||
|
||||
For InfluxDB, you need to enter a query like the one in the example above. The ```where $timeFilter``` component is required. If you only select one column, then you do not need to enter anything in the column mapping fields. The **Tags** field can be a comma-separated string.
|
||||
77
docs/sources/datasources/influxdb/influxdb-flux.md
Normal file
77
docs/sources/datasources/influxdb/influxdb-flux.md
Normal file
@@ -0,0 +1,77 @@
|
||||
+++
|
||||
title = "Flux support in Grafana"
|
||||
description = "Guide for Flux in Grafana"
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Flux query language in Grafana
|
||||
|
||||
Grafana supports Flux running on InfluxDB 1.8+. See [1.8 compatibility](https://github.com/influxdata/influxdb-client-go/#influxdb-18-api-compatibility) for more information and connection details.
|
||||
|
||||
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-Flux`.
|
||||
`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 2.0 API port is by default 8086.
|
||||
`Organization` | The [Influx organization](https://v2.docs.influxdata.com/v2.0/organizations/) that will be used for Flux queries. This is also used to for the `v.organization` query macro.
|
||||
`Token` | The authentication token used for Flux queries. With Influx 2.0, use the [influx authentication token to function](https://v2.docs.influxdata.com/v2.0/security/tokens/create-token/). For influx 1.8, the token is `username:password`.
|
||||
`Default bucket` | (Optional) The [Influx bucket](https://v2.docs.influxdata.com/v2.0/organizations/buckets/) that will be used for the `v.defaultBucket` macro in Flux queries.
|
||||
`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.
|
||||
|
||||
## Min time interval
|
||||
|
||||
A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
|
||||
Identifier | Description
|
||||
------------ | -------------
|
||||
`y` | year
|
||||
`M` | month
|
||||
`w` | week
|
||||
`d` | day
|
||||
`h` | hour
|
||||
`m` | minute
|
||||
`s` | second
|
||||
`ms` | millisecond
|
||||
|
||||
You can use the [Flux query and scripting language](https://www.influxdata.com/products/flux/). Grafana's Flux query editor is a text editor for raw Flux queries with Macro support.
|
||||
|
||||
## Supported macros
|
||||
|
||||
The macros support copying and pasting from [Chronograph](https://www.influxdata.com/time-series-platform/chronograf/).
|
||||
|
||||
Macro example | Description
|
||||
------------ | -------------
|
||||
`v.timeRangeStart` | Will be replaced by the start of the currently active time selection. For example, *2020-06-11T13:31:00Z*
|
||||
`v.timeRangeStop` | Will be replaced by the end of the currently active time selection. For example, *2020-06-11T14:31:00Z*
|
||||
`v.windowPeriod` | Will be replaced with an interval string compatible with Flux that corresponds to Grafana's calculated interval based on the time range of the active time selection. For example, *5s*
|
||||
`v.defaultBucket` | Will be replaced with the data source configuration's "Default Bucket" setting
|
||||
`v.organization` | Will be replaced with the data source configuration's "Organization" setting
|
||||
|
||||
For example, the following query will be interpolated as the query that follows it, with interval and time period values changing according to active time selection\):
|
||||
|
||||
Grafana Flux query:
|
||||
|
||||
```flux
|
||||
from(bucket: v.defaultBucket)
|
||||
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|
||||
|> filter(fn: (r) => r["_measurement"] == "cpu" or r["_measurement"] == "swap")
|
||||
|> filter(fn: (r) => r["_field"] == "usage_system" or r["_field"] == "free")
|
||||
|> aggregateWindow(every: v.windowPeriod, fn: mean)
|
||||
|> yield(name: "mean")
|
||||
```
|
||||
|
||||
Interpolated query send to Influx:
|
||||
|
||||
```flux
|
||||
from(bucket: "grafana")
|
||||
|> range(start: 2020-06-11T13:59:07Z, stop: 2020-06-11T14:59:07Z)
|
||||
|> filter(fn: (r) => r["_measurement"] == "cpu" or r["_measurement"] == "swap")
|
||||
|> filter(fn: (r) => r["_field"] == "usage_system" or r["_field"] == "free")
|
||||
|> aggregateWindow(every: 2s, fn: mean)
|
||||
|> yield(name: "mean")
|
||||
```
|
||||
|
||||
You can view the interpolated version of a query with the query inspector. For more information, refer to [Inspect a panel]({{< relref "../../panels/inspect-panel.md" >}}) and [Queries]({{< relref "../../panels/queries.md" >}}).
|
||||
65
docs/sources/datasources/influxdb/influxdb-templates.md
Normal file
65
docs/sources/datasources/influxdb/influxdb-templates.md
Normal file
@@ -0,0 +1,65 @@
|
||||
+++
|
||||
title = "InfluxDB templates"
|
||||
description = "Guide for templates in InfluxDB"
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
## InfluxDB templates
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place.
|
||||
|
||||
For more information, refer to [Templates and variables]({{< relref "../../variables/_index.md" >}}).
|
||||
|
||||
## Using variables in InfluxDB queries
|
||||
|
||||
There are two syntaxes:
|
||||
|
||||
`$<varname>` Example:
|
||||
|
||||
```sql
|
||||
SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^$host$/ AND $timeFilter GROUP BY time($__interval), "hostname"
|
||||
```
|
||||
|
||||
`[[varname]]` Example:
|
||||
|
||||
```sql
|
||||
SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^[[host]]$/ AND $timeFilter GROUP BY time($__interval), "hostname"
|
||||
```
|
||||
|
||||
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the **Multi-value** or **Include all value** options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`.
|
||||
|
||||
Example dashboard:
|
||||
[InfluxDB Templated Dashboard](https://play.grafana.org/dashboard/db/influxdb-templated)
|
||||
|
||||
## Query variables
|
||||
|
||||
If you add a query template variable, then you can write an InfluxDB exploration (metadata) query. These queries can return things like measurement names, key names or key values. For more information, refer to [Add query variable]({{< relref "../../variables/variable-types/add-query-variable.md" >}}).
|
||||
|
||||
For example, you can have a variable that contains all values for tag `hostname` if you specify a query like this in the query variable **Query**.
|
||||
|
||||
```sql
|
||||
SHOW TAG VALUES WITH KEY = "hostname"
|
||||
```
|
||||
## Chained or nested variables
|
||||
|
||||
You can also create nested variables, sometimes called [chained variables]({{< relref "../../variables/variable-types/chained-variables.md" >}}).
|
||||
|
||||
For example, if you had another variable, for example `region`. Then you could have the hosts variable only show hosts from the current selected region with a query like this:
|
||||
|
||||
```sql
|
||||
SHOW TAG VALUES WITH KEY = "hostname" WHERE region = '$region'
|
||||
```
|
||||
|
||||
You can fetch key names for a given measurement.
|
||||
|
||||
```sql
|
||||
SHOW TAG KEYS [FROM <measurement_name>]
|
||||
```
|
||||
|
||||
If you have a variable with key names you can use this variable in a group by clause. This will allow you to change group by using the variable list at the top of the dashboard.
|
||||
|
||||
### Ad hoc filters variable
|
||||
|
||||
InfluxDB supports the special `Ad hoc filters` variable type. This variable allows you to specify any number of key/value filters on the fly. These filters are automatically applied to all your InfluxDB queries.
|
||||
|
||||
For more information, refer to [Add ad hoc filters]({{< relref "../../variables/variable-types/add-ad-hoc-filters.md" >}}).
|
||||
67
docs/sources/datasources/influxdb/provision-influxdb.md
Normal file
67
docs/sources/datasources/influxdb/provision-influxdb.md
Normal file
@@ -0,0 +1,67 @@
|
||||
+++
|
||||
title = "Provision InfluxDB"
|
||||
description = "Guide for provisioning InfluxDB"
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
# Provision InfluxDB
|
||||
|
||||
You can configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}}).
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
## InfluxDB 1.x example
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: InfluxDB_v1
|
||||
type: influxdb
|
||||
access: proxy
|
||||
database: site
|
||||
user: grafana
|
||||
password: grafana
|
||||
url: http://localhost:8086
|
||||
jsonData:
|
||||
httpMode: GET
|
||||
```
|
||||
|
||||
## InfluxDB 2.x for Flux example
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: InfluxDB_v2_Flux
|
||||
type: influxdb
|
||||
access: proxy
|
||||
url: http://localhost:8086
|
||||
secureJsonData:
|
||||
token: token
|
||||
jsonData:
|
||||
version: Flux
|
||||
organization: organization
|
||||
defaultBucket: bucket
|
||||
tlsSkipVerify: true
|
||||
```
|
||||
|
||||
## InfluxDB 2.x for InfluxQl example
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: InfluxDB_v2_InfluxQL
|
||||
type: influxdb
|
||||
access: proxy
|
||||
url: http://localhost:8086
|
||||
# This database should be mapped to a bucket
|
||||
database: site
|
||||
jsonData:
|
||||
httpMode: GET
|
||||
httpHeaderName1: 'Authorization'
|
||||
secureJsonData:
|
||||
httpHeaderValue1: 'Token <token>'
|
||||
|
||||
```
|
||||
@@ -54,3 +54,35 @@ Use the trace selector to pick particular trace from all traces logged in the ti
|
||||
## Linking Trace ID from logs
|
||||
|
||||
You can link to Jaeger trace from logs in Loki by configuring a derived field with internal link. See the [Derived fields]({{< relref "loki.md#derived-fields" >}}) section in the [Loki data source]({{< relref "loki.md" >}}) documentation for details.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
You can set up the data source via configuration files with Grafana’s provisioning system. Refer to [provisioning docs page]({{< relref "../administration/provisioning/#datasources" >}}) for information on various settings and how it works.
|
||||
|
||||
Here is an example with basic auth and trace-to-logs field.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Jaeger
|
||||
type: jaeger
|
||||
uid: jaeger-spectra
|
||||
access: proxy
|
||||
url: http://localhost:16686/
|
||||
basicAuth: true
|
||||
basicAuthUser: my_user
|
||||
editable: true
|
||||
isDefault: false
|
||||
jsonData:
|
||||
tracesToLogs:
|
||||
# Field with internal link pointing to a Loki data source in Grafana.
|
||||
# datasourceUid value must match the `datasourceUid` value of the Loki data source.
|
||||
datasourceUid: loki
|
||||
tags:
|
||||
- cluster
|
||||
- hostname
|
||||
- namespace
|
||||
- pod
|
||||
secureJsonData:
|
||||
basicAuthPassword: my_password
|
||||
|
||||
@@ -8,29 +8,23 @@ weight = 800
|
||||
|
||||
# Using Loki in Grafana
|
||||
|
||||
> BETA: Querying Loki data requires Grafana's Explore section.
|
||||
> Grafana v6.x comes with Explore enabled by default.
|
||||
> In Grafana v5.3.x and v5.4.x. you need to enable Explore manually.
|
||||
> Viewing Loki data in dashboard panels is supported in Grafana v6.4+.
|
||||
Grafana ships with built-in support for Loki, an open source log aggregation system by Grafana Labs. This topic explains options, variables, querying, and other options specific to this data source.
|
||||
|
||||
Grafana ships with built-in support for Loki, Grafana's log aggregation system.
|
||||
Just add it as a data source and you are ready to query your log data in [Explore]({{< relref "../explore" >}}).
|
||||
Add it as a data source and you are ready to build dashboards or query your log data in [Explore]({{< relref "../explore" >}}). Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
|
||||
## Adding the data source
|
||||
> **Note:** To troubleshoot configuration and other issues, check the log file located at /var/log/grafana/grafana.log on Unix systems or in <grafana_install_dir>/data/log on other platforms and manual installations.
|
||||
|
||||
1. Open Grafana and make sure you are logged in.
|
||||
1. In the side menu under the `Configuration` link you should find a link named `Data Sources`.
|
||||
1. Click the `Add data source` button at the top.
|
||||
1. Select `Loki` from the list of data sources.
|
||||
## Loki settings
|
||||
|
||||
> **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.
|
||||
To access Loki settings, click the **Configuration** (gear) icon, then click **Data Sources**, and then click the Loki data source.
|
||||
|
||||
| Name | Description |
|
||||
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels, queries, and Explore. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Loki instance, e.g., `http://localhost:3100` |
|
||||
| `Maximum lines` | Upper limit for number of log lines returned by Loki (default is 1000). Decrease if your browser is sluggish when displaying logs in Explore. |
|
||||
| Name | Description |
|
||||
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels, queries, and Explore. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Loki instance, e.g., `http://localhost:3100` |
|
||||
| `Whitelisted Cookies` | Grafana Proxy deletes forwarded cookies by default. Specify cookies by name that should be forwarded to the data source. |
|
||||
| `Maximum lines` | Upper limit for the number of log lines returned by Loki (default is 1000). Lower this limit if your browser is sluggish when displaying logs in Explore. |
|
||||
|
||||
### Derived fields
|
||||
|
||||
@@ -40,7 +34,7 @@ The Derived Fields configuration allows you to:
|
||||
- Add a link that uses the value of the field.
|
||||
|
||||
You can use this functionality to link to your tracing backend directly from your logs, or link to a user profile page if a userId is present in the log line. These links appear in the [log details](/explore/logs-integration/#labels-and-detected-fields).
|
||||
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields configuration" >}}
|
||||
|
||||
Each derived field consists of:
|
||||
|
||||
- **Name -** Shown in the log details as a label.
|
||||
@@ -49,97 +43,73 @@ Each derived field consists of:
|
||||
- **Internal link -** Select if the link is internal or external. In case of internal link, a data source selector allows you to select the target data source. Only tracing data sources are supported.
|
||||
|
||||
You can use a debug section to see what your fields extract and how the URL is interpolated. Click **Show example log message** to show the text area where you can enter a log message.
|
||||
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields_debug.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields debugging" >}}
|
||||
{{< docs-imagebox img="/img/docs/v75/loki_derived_fields_settings.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the derived fields debugging" >}}
|
||||
|
||||
The new field with the link shown in log details:
|
||||
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields_detail.png" class="docs-image--no-shadow" caption="Screenshot of the derived field in log detail" >}}
|
||||
{{< docs-imagebox img="/img/docs/explore/detected-fields-link-7-4.png" max-width="800px" caption="Detected fields link in Explore" >}}
|
||||
|
||||
## Querying Logs
|
||||
## Loki query editor
|
||||
|
||||
Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore" >}}), and with the [logs panel]({{< relref "../panels/visualizations/logs-panel.md" >}}) in dashboards. Select the Loki data source, and then enter a [LogQL](https://grafana.com/docs/loki/latest/logql/) query to display your logs.
|
||||
You can use the Loki query editor to create log and metric queries.
|
||||
|
||||
### Log Queries
|
||||
| Name | Description |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Query expression` | Loki query expression, refer to the [LogQL documentation](https://grafana.com/docs/loki/latest/logql/) for more information. |
|
||||
| `Query type` | Choose the type of query to run. The instant type queries against a single point in time. We are using "To" time from the time range. The range type queries over the selected range of time. |
|
||||
| `Line limit` | Upper limit for number of log lines returned by query. The default is the Maximum lines limit set in Loki settings. |
|
||||
| `Legend` | Available only in Dashboard. Controls the name of the time series, using name or pattern. For example `{{hostname}}` is replaced with the label value for the label `hostname`. |
|
||||
|
||||
A log query consists of two parts: **log stream selector**, and a **search expression**. For performance reasons you need to start by choosing a log stream by selecting a log label.
|
||||
### Log browser
|
||||
|
||||
The Logs Explorer (the `Log labels` button) next to the query field shows a list of labels of available log streams. An alternative way to write a query is to use the query field's autocomplete - you start by typing a left curly brace `{` and the autocomplete menu will suggest a list of labels. Press the `Enter` key to execute the query.
|
||||
With Loki log browser you can easily navigate trough your list of labels and values and construct the query of your choice. Log browser has multi-step selection:
|
||||
1. Choose the labels you would like to consider for your search.
|
||||
2. Pick the values for selected labels. Log browser supports facetting and therefore it shows you only possible label combinations.
|
||||
3. Choose the type of query - logs query or rate metrics query. Additionally, you can also validate selector.
|
||||
|
||||
Once the result is returned, the log panel shows a list of log rows and a bar chart where the x-axis shows the time and the y-axis shows the frequency/count.
|
||||
{{< docs-imagebox img="/img/docs/v75/loki_log_browser.png" class="docs-image--no-shadow" max-width="800px" caption="Screenshot of the derived fields debugging" >}}
|
||||
|
||||
<div class="medium-6 columns">
|
||||
<video width="800" height="500" controls>
|
||||
<source src="/assets/videos/explore_loki.mp4" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
## Querying with Loki
|
||||
|
||||
<br />
|
||||
There are two types of LogQL queries:
|
||||
|
||||
### Log Stream Selector
|
||||
- Log queries - Return the contents of log lines.
|
||||
- Metric queries - Extend log queries and calculate sample values based on the content of logs from a log query.
|
||||
|
||||
For the label part of the query expression, wrap it in curly braces `{}` and then use the key value syntax for selecting labels. Multiple label expressions are separated by a comma:
|
||||
### Log queries
|
||||
|
||||
`{app="mysql",name="mysql-backup"}`
|
||||
Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore" >}}), and with the [logs panel]({{< relref "../panels/visualizations/logs-panel.md" >}}) in dashboards. Select the Loki data source, and then enter a [LogQL](https://grafana.com/docs/loki/latest/logql/#log-queries) query to display your logs.
|
||||
|
||||
The following label matching operators are currently supported:
|
||||
A log query consists of two parts: log stream selector, and a log pipeline. For performance reasons begin by choosing a log stream by selecting a log label.
|
||||
|
||||
- `=` exactly equal.
|
||||
- `!=` not equal.
|
||||
- `=~` regex-match.
|
||||
- `!~` do not regex-match.
|
||||
### Log context
|
||||
|
||||
Examples:
|
||||
When using a search expression as detailed above, you can retrieve the context surrounding your filtered results.
|
||||
By clicking the `Show Context` link on the filtered rows, you'll be able to investigate the log messages that came before and after the
|
||||
log message you're interested in.
|
||||
|
||||
- `{name=~"mysql.+"}`
|
||||
- `{name!~"mysql.+"}`
|
||||
|
||||
The [same rules that apply for Prometheus Label Selectors](https://prometheus.io/docs/prometheus/latest/querying/basics/#instant-vector-selectors) apply for Loki Log Stream Selectors.
|
||||
|
||||
Another way to add a label selector is in the table section. Click **Filter** beside a label to add the label to the query expression. This even works for multiple queries and will add the label selector to each query.
|
||||
|
||||
### Search Expression
|
||||
|
||||
After writing the Log Stream Selector, you can filter the results further by writing a search expression. The search expression can be just text or a regex expression.
|
||||
|
||||
Example queries:
|
||||
|
||||
- `{job="mysql"} |= "error"`
|
||||
- `{name="kafka"} |~ "tsdb-ops.*io:2003"`
|
||||
- `{instance=~"kafka-[23]",name="kafka"} != "kafka.server:type=ReplicaManager"`
|
||||
|
||||
Filter operators can be chained and will sequentially filter down the expression. The resulting log lines will satisfy every filter.
|
||||
|
||||
**Example**
|
||||
|
||||
`{job="mysql"} |= "error" != "timeout"`
|
||||
|
||||
The following filter types are currently supported:
|
||||
|
||||
- `|=` line contains string.
|
||||
- `!=` line doesn't contain string.
|
||||
- `|~` line matches regular expression.
|
||||
- `!~` line does not match regular expression.
|
||||
|
||||
> **Note:** For more details about LogQL, Loki's query language, refer to the [Loki LogQL](https://grafana.com/docs/loki/latest/logql/)
|
||||
|
||||
## Live tailing
|
||||
### Live tailing
|
||||
|
||||
Loki supports Live tailing which displays logs in real-time. This feature is supported in [Explore]({{< relref "../explore/#loki-specific-features" >}}).
|
||||
|
||||
Note that Live Tailing relies on two Websocket connections: one between the browser and the Grafana server, and another between the Grafana server and the Loki server. If you run any reverse proxies, please configure them accordingly. The following example for Apache2 can be used for proxying between the browser and the Grafana server:
|
||||
|
||||
```
|
||||
ProxyPassMatch "^/(api/datasources/proxy/\d+/loki/api/v1/tail)" "ws://127.0.0.1:3000/$1"
|
||||
```
|
||||
|
||||
The following example shows basic NGINX proxy configuration. It assumes that the Grafana server is available at `http://localhost:3000/`, Loki server is running locally without proxy, and your external site uses HTTPS. If you also host Loki behind NGINX proxy, then you might want to repeat the following configuration for Loki as well.
|
||||
|
||||
In the `http` section of NGINX configuration, add the following map definition:
|
||||
|
||||
```
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
```
|
||||
|
||||
In your `server` section, add the following configuration:
|
||||
|
||||
```
|
||||
location ~ /(api/datasources/proxy/\d+/loki/api/v1/tail) {
|
||||
proxy_pass http://localhost:3000$request_uri;
|
||||
@@ -162,13 +132,9 @@ In your `server` section, add the following configuration:
|
||||
|
||||
> **Note:** This feature is only available in Grafana v6.3+.
|
||||
|
||||
## Log Context
|
||||
## Metric queries
|
||||
|
||||
When using a search expression as detailed above, you now have the ability to retrieve the context surrounding your filtered results.
|
||||
By clicking the `Show Context` link on the filtered rows, you'll be able to investigate the log messages that came before and after the
|
||||
log message you're interested in.
|
||||
|
||||
> **Note:** This feature is only available in Grafana v6.3+
|
||||
LogQL supports wrapping a log query with functions that allow for creating metrics out of the logs. See [LogQL](https://grafana.com/docs/loki/latest/logql/#metric-queries) documentation on how to create and use metrics queries.
|
||||
|
||||
## Templating
|
||||
|
||||
@@ -176,12 +142,20 @@ Instead of hard-coding things like server, application and sensor name in your m
|
||||
|
||||
Check out the [Templating]({{< relref "../variables/_index.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
## Query variable
|
||||
|
||||
Variable of the type _Query_ allows you to query Loki for a list labels or label values. The Loki data source plugin
|
||||
provides the following functions you can use in the `Query` input field.
|
||||
|
||||
| Name | Description |
|
||||
| --------------------- | --------------------------------------------------------------- |
|
||||
| `label_names()` | Returns a list of label names. |
|
||||
| `label_values(label)` | Returns a list of label values for the `label` in every metric. |
|
||||
|
||||
## Annotations
|
||||
|
||||
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/annotations" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
|
||||
|
||||
> **Note:** Annotations for Loki are only available in Grafana v6.4+
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
You can set up the data source via config files with Grafana's provisioning system.
|
||||
@@ -224,12 +198,12 @@ datasources:
|
||||
matcherRegex: "traceID=(\\w+)"
|
||||
name: TraceID
|
||||
# url will be interpreted as query for the datasource
|
||||
url: "$${__value.raw}"
|
||||
url: '$${__value.raw}'
|
||||
|
||||
# Field with external link.
|
||||
- matcherRegex: "traceID=(\\w+)"
|
||||
name: TraceID
|
||||
url: "http://localhost:16686/trace/$${__value.raw}"
|
||||
url: 'http://localhost:16686/trace/$${__value.raw}'
|
||||
```
|
||||
|
||||
Here's an example of a Jaeger data source corresponding to the above example. Note that the Jaeger `uid` value does match the Loki `datasourceUid` value.
|
||||
|
||||
@@ -10,13 +10,15 @@ weight = 900
|
||||
|
||||
Grafana ships with a built-in Microsoft SQL Server (MS SQL) data source plugin that allows you to query and visualize data from any Microsoft SQL Server 2005 or newer, including Microsoft Azure SQL Database. This topic explains options, variables, querying, and other options specific to the MS SQL data source. Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
|
||||
### Data source options
|
||||
## Data source options
|
||||
|
||||
To access data source settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the 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. |
|
||||
| `Host` | The IP address/hostname and optional port of your MS SQL instance. If port is omitted, default 1433 will be used. |
|
||||
| `Host` | The IP address/hostname and optional port of your MS SQL instance. If the port is omitted, the driver default will be used (0). |
|
||||
| `Database` | Name of your MS SQL database. |
|
||||
| `Authentication` | Authentication mode. Either using SQL Server Authentication or Windows Authentication (single sign on for Windows users). |
|
||||
| `User` | Database user's login/username |
|
||||
|
||||
@@ -6,18 +6,13 @@ aliases = ["/docs/grafana/latest/features/datasources/postgres/"]
|
||||
weight = 1200
|
||||
+++
|
||||
|
||||
# Using PostgreSQL in Grafana
|
||||
# PostgreSQL data source
|
||||
|
||||
Grafana ships with a built-in PostgreSQL data source plugin that allows you to query and visualize data from a PostgreSQL compatible database.
|
||||
Grafana ships with a built-in PostgreSQL data source plugin that allows you to query and visualize data from a PostgreSQL compatible database. This topic explains options, variables, querying, and other options specific to this data source. For instructions about 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.
|
||||
|
||||
## Adding the data source
|
||||
## PostgreSQL settings
|
||||
|
||||
1. Open the side menu by clicking the Grafana icon in the top header.
|
||||
1. In the side menu under the `Configuration` icon you should find a link named `Data Sources`.
|
||||
1. Click the `+ Add data source` button in the top header.
|
||||
1. Select *PostgreSQL* from the *Type* dropdown.
|
||||
|
||||
### Data source options
|
||||
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Prometheus data source.
|
||||
|
||||
Name | Description
|
||||
----------------- | -------------
|
||||
@@ -415,6 +410,7 @@ datasources:
|
||||
postgresVersion: 903 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10
|
||||
timescaledb: false
|
||||
```
|
||||
>**Note:** In the above code, the `postgresVersion` value of `10` refers to version PotgreSQL 10 and above.
|
||||
|
||||
If you encounter metric request errors or other issues:
|
||||
- Make sure your data source YAML file parameters exactly match the example. This includes parameter names and use of quotation marks.
|
||||
|
||||
@@ -23,7 +23,8 @@ To access Prometheus settings, hover your mouse over the **Configuration** (gear
|
||||
| `Basic Auth` | Enable basic authentication to the Prometheus data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. |
|
||||
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s.
|
||||
| `HTTP method` | Use either POST or GET HTTP method to query your data source. POST is the recommended and pre-selected method as it allows bigger queries. Change this to GET if you have a Prometheus version older than 2.1 or if POST requests are restricted in your network. |
|
||||
| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. |
|
||||
| `Custom Query Parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'. |
|
||||
| `Label name` | Add the name of the field in the label object. |
|
||||
@@ -187,6 +188,7 @@ datasources:
|
||||
type: prometheus
|
||||
# Access mode - proxy (server in the UI) or direct (browser in the UI).
|
||||
access: proxy
|
||||
httpMethod: POST
|
||||
url: http://localhost:9090
|
||||
jsonData:
|
||||
exemplarTraceIdDestinations:
|
||||
|
||||
@@ -18,7 +18,7 @@ To access Tempo settings, click the **Configuration** (gear) icon, then click **
|
||||
| ------------ | --------------------------------------------------------------------------------------- |
|
||||
| `Name` | The name using which you will refer to the data source in panels, queries, and Explore. |
|
||||
| `Default` | The default data source will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Tempo instance, e.g., `http://localhost:16686` |
|
||||
| `URL` | The URL of the Tempo instance, e.g., `http://tempo` |
|
||||
| `Basic Auth` | Enable basic authentication to the Tempo data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
@@ -32,7 +32,7 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
|
||||
- **Data source -** Target data source.
|
||||
- **Tags -** The tags that will be used in the Loki query. Default is `'cluster', 'hostname', 'namespace', 'pod'`.
|
||||
|
||||

|
||||

|
||||
|
||||
## Query traces
|
||||
|
||||
|
||||
@@ -3,98 +3,96 @@ title = "Contributor License Agreement (CLA)"
|
||||
description = "Contributor License Agreement (CLA)"
|
||||
aliases = ["/docs/grafana/latest/project/cla", "docs/contributing/cla.html"]
|
||||
+++
|
||||
|
||||
# Grafana Labs Contributor License Agreement
|
||||
|
||||
Thank you for your interest in contributing to Grafana Labs ("We" or "Us").
|
||||
Grafana Labs
|
||||
Software Grant and Contributor License Agreement ("Agreement")
|
||||
This agreement is based on the Apache Software Foundation Contributor License Agreement.
|
||||
(v r190612)
|
||||
|
||||
This contributor agreement ("Agreement") documents the rights granted by contributors to Us.
|
||||
To make this document effective, please sign it following the instructions at
|
||||
[cla-assistant](https://cla-assistant.io/grafana/grafana). This is a legally binding document,
|
||||
so please read it carefully before agreeing to it. The Agreement may cover more than
|
||||
one software project managed by Us.
|
||||
Thank you for your interest in software projects stewarded by Raintank, Inc. dba Grafana Labs (“Grafana Labs”). In order to clarify the intellectual property license
|
||||
granted with Contributions from any person or entity, Grafana Labs
|
||||
must have a Contributor License Agreement (CLA) on file that has been
|
||||
agreed to by each Contributor, indicating agreement to the license terms
|
||||
below. This license is for your protection as a Contributor as well
|
||||
as the protection of Grafana Labs and its users; it does not change
|
||||
your rights to use your own Contributions for any other purpose.
|
||||
This Agreement allows an individual to contribute to Grafana Labs on that individual’s own behalf, or an entity (the "Corporation") to
|
||||
submit Contributions to Grafana Labs, to authorize Contributions
|
||||
submitted by its designated employees to Grafana Labs, and to grant
|
||||
copyright and patent licenses thereto.
|
||||
|
||||
## 1. Definitions
|
||||
|
||||
"You" (Individual) means the individual who Submits a Contribution to Us.
|
||||
|
||||
"You" (Entity) means any Legal Entity on behalf of whom a Contribution has been received by Us. "Legal Entity" means an entity which is not a natural person. "Affiliates" means other Legal Entities that control, are controlled by, or under common control with that Legal Entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such Legal Entity, whether by contract or otherwise, (ii) ownership of fifty percent (50%) or more of the outstanding shares or securities which vote to elect the management or other persons who direct such Legal Entity or (iii) beneficial ownership of such entity.
|
||||
|
||||
"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, you must notify us at contact@grafana.com before Submitting such a Contribution.
|
||||
|
||||
"Copyright" means all rights protecting works of authorship owned or controlled by You [or Your Affiliates], including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any extensions by You.
|
||||
|
||||
"Material" means the work of authorship which is made available by Us to third parties. When this Agreement covers more than one software project, the Material means the work of authorship to which the Contribution was Submitted. After You Submit the Contribution, it may be included in the Material.
|
||||
|
||||
"Submit" means any form of electronic, verbal, or written communication sent to Us or our representatives, including but not limited to electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Us for the purpose of discussing and improving the Material, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
|
||||
|
||||
"Submission Date" means the date on which You Submit a Contribution to Us.
|
||||
|
||||
"Effective Date" means the date You execute this Agreement or the date You first Submit a Contribution to Us, whichever is earlier.
|
||||
|
||||
"Media" means any portion of a Contribution which is not software.
|
||||
|
||||
## 2. Grant of Rights
|
||||
|
||||
### 2.1 Copyright License
|
||||
|
||||
(a) You retain ownership of the Copyright in Your Contribution and have the same rights to use or license the Contribution which You would have had without entering into the Agreement.
|
||||
|
||||
(b) To the maximum extent permitted by the relevant law, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable license under the Copyright covering the Contribution, with the right to sublicense such rights through multiple tiers of sublicensees, to reproduce, modify, display, perform and distribute the Contribution as part of the Material; provided that this license is conditioned upon compliance with Section 2.3.
|
||||
|
||||
### 2.2 Patent License
|
||||
|
||||
For patent claims including, without limitation, method, process, and apparatus claims which You [or Your Affiliates] own, control or have the right to grant, now or in the future, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable patent license, with the right to sublicense these rights to multiple tiers of sublicensees, to make, have made, use, sell, offer for sale, import and otherwise transfer the Contribution and the Contribution in combination with the Material (and portions of such combination). This license is granted only to the extent that the exercise of the licensed rights infringes such patent claims; and provided that this license is conditioned upon compliance with Section 2.3.
|
||||
|
||||
### 2.3 Outbound License
|
||||
|
||||
As a condition on the grant of rights in Sections 2.1 and 2.2, We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or any licenses which are approved by the Open Source Initiative on or after the Effective Date, including both permissive and copyleft licenses, whether or not such licenses are subsequently disapproved (including any right to adopt any future version of a license if permitted).
|
||||
|
||||
In addition, We may use the following licenses for Media in the Contribution: GNU Free Documentation License v1.3, Creative Commons Attribution 3.0, or Creative Commons Attribution No Derivatives 3.0 (including any right to adopt any future version of a license if permitted).
|
||||
|
||||
2.4 Moral Rights. If moral rights apply to the Contribution, to the maximum extent permitted by law, You waive and agree not to assert such moral rights against Us or our successors in interest, or any of our licensees, either direct or indirect.
|
||||
|
||||
2.5 Our Rights. You acknowledge that We are not obligated to use Your Contribution as part of the Material and may decide to include any Contribution We consider appropriate.
|
||||
|
||||
2.6 Reservation of Rights. Any rights not expressly [assigned or] licensed under this section are expressly reserved by You.
|
||||
|
||||
## 3. Agreement
|
||||
|
||||
You confirm that:
|
||||
|
||||
(a) You have the legal authority to enter into this Agreement.
|
||||
|
||||
(b) You [or Your Affiliates] own the Copyright and patent claims covering the Contribution which are required to grant the rights under Section 2.
|
||||
|
||||
\(c)(Individual) The grant of rights under Section 2 does not violate any grant of rights which You have made to third parties, including Your employer. If You are an employee, You have had Your employer approve this Agreement or sign the Entity version of this document. If You are less than eighteen years old, please have Your parents or guardian sign the Agreement.
|
||||
|
||||
\(c)(Entity) The grant of rights under Section 2 does not violate any grant of rights which You or Your Affiliates have made to third parties.
|
||||
|
||||
## 4. Disclaimer
|
||||
|
||||
EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED "AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US [AND BY US TO YOU]. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.
|
||||
|
||||
## 5. Consequential Damage Waiver
|
||||
|
||||
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU [OR US] BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.
|
||||
|
||||
## 6. Miscellaneous
|
||||
|
||||
6.1 This Agreement will be governed by and construed in accordance with the laws of New York State, United States excluding its conflicts of law provisions. Under certain circumstances, the governing law in this section might be superseded by the United Nations Convention on Contracts for the International Sale of Goods ("UN Convention") and the parties intend to avoid the application of the UN Convention to this Agreement and, thus, exclude the application of the UN Convention in its entirety to this Agreement.
|
||||
|
||||
6.2 This Agreement sets out the entire agreement between You and Us for Your Contributions to Us and overrides all other agreements or understandings.
|
||||
|
||||
6.3 If You or We assign the rights or obligations received through this Agreement to a third party, as a condition of the assignment, that third party must agree in writing to abide by all the rights and obligations in the Agreement.
|
||||
|
||||
6.4 The failure of either party to require performance by the other party of any provision of this Agreement in one situation shall not affect the right of a party to require such performance at any time in the future. A waiver of performance under a provision in one situation shall not be considered a waiver of the performance of the provision in the future or a waiver of the provision in its entirety.
|
||||
|
||||
6.5 If any provision of this Agreement is found void and unenforceable, such provision will be replaced to the extent possible with a provision that comes closest to the meaning of the original provision and which is enforceable. The terms and conditions set forth in this Agreement shall apply notwithstanding any failure of essential purpose of this Agreement or any limited remedy to the maximum extent possible under law.
|
||||
|
||||
### Sign using CLA-Assistant
|
||||
|
||||
[https://cla-assistant.io/grafana/grafana](https://cla-assistant.io/grafana/grafana)
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
This CLA agreement is based on the [Harmony Contributor Agreement Template (combined)](http://www.harmonyagreements.org/agreements.html), [Creative Commons Attribution 3.0 Unported License](https://creativecommons.org/licenses/by/3.0/)
|
||||
You accept and agree to the following terms and conditions for Your
|
||||
present and future Contributions submitted to Grafana Labs. Except
|
||||
for the license granted herein to Grafana Labs and recipients of
|
||||
software distributed by Grafana Labs, You reserve all right, title,
|
||||
and interest in and to Your Contributions.
|
||||
1. Definitions.
|
||||
"You" (or "Your") shall mean the copyright owner or legal entity
|
||||
authorized by the copyright owner that is making this Agreement
|
||||
with Grafana Labs. For legal entities, the entity making a
|
||||
Contribution and all other entities that control, are controlled by,
|
||||
or are under common control with that entity are considered to be a
|
||||
single Contributor. For the purposes of this definition, "control"
|
||||
means (i) the power, direct or indirect, to cause the direction or
|
||||
management of such entity, whether by contract or otherwise, or
|
||||
(ii) ownership of fifty percent (50%) or more of the outstanding
|
||||
shares, or (iii) beneficial ownership of such entity.
|
||||
"Contribution" shall mean any work, as well as
|
||||
any modifications or additions to an existing work, that is intentionally
|
||||
submitted by You to Grafana Labs for inclusion in, or
|
||||
documentation of, any of the products owned or managed by Grafana Labs (the "Work"). For the purposes of this definition,
|
||||
"submitted" means any form of electronic, verbal, or written
|
||||
communication sent to Grafana Labs or its representatives,
|
||||
including but not limited to communication on electronic mailing
|
||||
lists, source code control systems (such as GitHub), and issue tracking systems
|
||||
that are managed by, or on behalf of, Grafana Labs for the
|
||||
purpose of discussing and improving the Work, but excluding
|
||||
communication that is conspicuously marked or otherwise designated
|
||||
in writing by You as "Not a Contribution."
|
||||
2. Grant of Copyright License. Subject to the terms and conditions
|
||||
of this Agreement, You hereby grant to Grafana Labs and to
|
||||
recipients of software distributed by Grafana Labs a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare derivative works of,
|
||||
publicly display, publicly perform, sublicense, and distribute
|
||||
Your Contributions and such derivative works.
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this Agreement, You hereby grant to Grafana Labs and to recipients
|
||||
of software distributed by Grafana Labs a perpetual, worldwide,
|
||||
non-exclusive, no-charge, royalty-free, irrevocable (except as
|
||||
stated in this section) patent license to make, have made, use,
|
||||
offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by You that are necessarily infringed by Your Contribution(s)
|
||||
alone or by combination of Your Contribution(s) with the Work to
|
||||
which such Contribution(s) were submitted. If any entity institutes
|
||||
patent litigation against You or any other entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that your
|
||||
Contribution, or the Work to which you have contributed, constitutes
|
||||
direct or contributory patent infringement, then any patent licenses
|
||||
granted to that entity under this Agreement for that Contribution or
|
||||
Work shall terminate as of the date such litigation is filed.
|
||||
4. You represent that You are legally entitled to grant the above
|
||||
license. If You are an individual, and if Your employer(s) has rights to intellectual property
|
||||
that you create that includes Your Contributions, you represent
|
||||
that You have received permission to make Contributions on behalf
|
||||
of that employer, or that Your employer has waived such rights for
|
||||
your Contributions to Grafana Labs. If You are a Corporation, any individual who makes a contribution from an account associated with You will be considered authorized to Contribute on Your behalf.
|
||||
5. You represent that each of Your Contributions is Your original
|
||||
creation (see section 7 for submissions on behalf of others).
|
||||
6. You are not expected to provide support for Your Contributions,
|
||||
except to the extent You desire to provide support. You may provide
|
||||
support for free, for a fee, or not at all. Unless required by
|
||||
applicable law or agreed to in writing, You provide Your
|
||||
Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||
OF ANY KIND, either express or implied, including, without
|
||||
limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
7. Should You wish to submit work that is not Your original creation,
|
||||
You may submit it to Grafana Labs separately from any
|
||||
Contribution, identifying the complete details of its source and
|
||||
of any license or other restriction (including, but not limited
|
||||
to, related patents, trademarks, and license agreements) of which
|
||||
you are personally aware, and conspicuously marking the work as
|
||||
"Submitted on behalf of a third-party: [named here]".
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Add authentication for data source plugins"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/latest/developers/plugins/authentication/"]
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/latest/developers/plugins/authentication/"]
|
||||
+++
|
||||
|
||||
# Add authentication for data source plugins
|
||||
@@ -11,7 +11,7 @@ When a user saves a password or any other sensitive data as a data source option
|
||||
|
||||
To minimize the amount of sensitive information sent to and from the browser, data source plugins can use the Grafana _data source proxy_. When using the data source proxy, any requests containing sensitive information go through the Grafana server. No sensitive data is sent to the browser after the data is saved.
|
||||
|
||||
Some data sources, like [Prometheus](https://grafana.com/docs/grafana/latest/features/datasources/prometheus/) and [InfluxDB](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/), allow users to configure whether to use the data source proxy, through a setting called _access modes_.
|
||||
Some data sources, like [Prometheus]({{< relref "../../datasources/prometheus.md" >}}) and [InfluxDB]({{< relref "../../datasources/influxdb" >}}), allow users to configure whether to use the data source proxy, through a setting called _access modes_.
|
||||
|
||||
## Add a proxy route to your plugin
|
||||
|
||||
@@ -131,6 +131,23 @@ To add URL parameters to proxied requests, use the `urlParams` property.
|
||||
]
|
||||
```
|
||||
|
||||
### Set body content
|
||||
|
||||
To set the body content and length of proxied requests, use the `body` property.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "http://api.example.com",
|
||||
"body": {
|
||||
"username": "{{ .JsonData.username }}",
|
||||
"password": "{{ .SecureJsonData.password }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Enable token authentication
|
||||
|
||||
To enable token-based authentication for proxied requests, use the `tokenAuth` property.
|
||||
|
||||
@@ -8,140 +8,26 @@ This guide explains how to add support for [annotations]({{< relref "../../dashb
|
||||
|
||||
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}}).
|
||||
|
||||
Data sources in Grafana can support [Annotations]({{< relref "../../dashboards/annotations.md" >}}) by handling _annotation queries_.
|
||||
|
||||
Handling annotation queries is similar to how you'd handle a metrics query. The difference is that instead of returning [data frames]({{< relref "data-frames.md" >}}), an annotation query returns _annotation events_.
|
||||
> **Note:** Annotation support for React plugins was released in Grafana 7.2. To support earlier versions, refer to the [Add support for annotation for Grafana 7.1](https://grafana.com/docs/grafana/v7.1/developers/plugins/add-support-for-annotations/).
|
||||
|
||||
## Add annotations support to your data source
|
||||
|
||||
To add support for annotations to an existing data source, you need to:
|
||||
To enable annotation support for your data source, add the following two lines of code. Grafana uses your default query editor for editing annotation queries.
|
||||
|
||||
- Enable annotations support
|
||||
- Override the `annotationQuery` method
|
||||
- Construct annotation events
|
||||
1. Add `"annotations": true` to the [plugin.json]({{< relref "metadata.md" >}}) file to let Grafana know that your plugin supports annotations.
|
||||
|
||||
### Enable annotations support
|
||||
**plugin.json**
|
||||
|
||||
Tell Grafana that your data source plugin can return annotations events by adding `"annotations": true` to the [plugin.json]({{< relref "metadata.md" >}}) file.
|
||||
|
||||
```json
|
||||
{
|
||||
"annotations": true
|
||||
}
|
||||
```
|
||||
|
||||
### Override the `annotationQuery` method
|
||||
|
||||
In `DataSource.ts`, override the `annotationQuery` method from `DataSourceApi`.
|
||||
|
||||
```ts
|
||||
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
|
||||
return [];
|
||||
}
|
||||
```
|
||||
|
||||
### Construct annotation events
|
||||
|
||||
Return an array of [AnnotationEvent]({{< relref "../../packages_api/data/annotationevent.md" >}}).
|
||||
|
||||
```ts
|
||||
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
|
||||
const events: AnnotationEvent[] = [];
|
||||
|
||||
const date = new Date();
|
||||
|
||||
const event: AnnotationEvent = {
|
||||
time: date.valueOf(),
|
||||
text: 'foo',
|
||||
tags: ['bar'],
|
||||
};
|
||||
|
||||
events.push(event);
|
||||
|
||||
return events;
|
||||
}
|
||||
```
|
||||
|
||||
## Region annotations
|
||||
|
||||
[Region annotations]({{< relref "../../dashboards/annotations.md#adding-regions-events" >}}) have a start and end time. This can for example be used to annotate maintenance windows or downtime.
|
||||
|
||||
To return a region annotation, set the `timeEnd`, and `isRegion` properties.
|
||||
|
||||
```ts
|
||||
const regionEvent: AnnotationEvent = {
|
||||
time: startDate.valueOf(),
|
||||
timeEnd: endDate.valueOf(),
|
||||
isRegion: true,
|
||||
text: 'foo',
|
||||
tags: ['bar'],
|
||||
};
|
||||
```
|
||||
|
||||
## Build a annotation query editor
|
||||
|
||||
Let users write custom annotation queries to only display the annotation events they care about, by adding a _query editor_. You only need to build a query editor if you want to let users query or filter annotations.
|
||||
|
||||
> **Note:** Annotation query editors have yet to receive support for React. The instructions here are given for Angular. Fortunately, you can run Angular even in a plugin otherwise written using React. This section will be updated once React support for annotation queries editors is available.
|
||||
|
||||
1. Create a file called `AnnotationQueryEditor.ts` in the `src` directory, with the following content.
|
||||
|
||||
```ts
|
||||
export class AnnotationQueryEditor {
|
||||
static templateUrl = 'partials/annotations.editor.html';
|
||||
|
||||
annotation: any;
|
||||
|
||||
constructor() {
|
||||
this.annotation.queryText = this.annotation.queryText || '';
|
||||
}
|
||||
```json
|
||||
{
|
||||
"annotations": true
|
||||
}
|
||||
```
|
||||
|
||||
1. Create a directory called `partials` in the `src` directory.
|
||||
2. In `datasource.ts`, override the `annotations` property from `DataSourceApi`. For the default behavior, you can set `annotations` to an empty object.
|
||||
|
||||
1. Create a file called `annotations.editor.html` in the `partials` directory you just created, with the following content.
|
||||
|
||||
```html
|
||||
<div class="gf-form-group">
|
||||
<div class="gf-form-inline">
|
||||
<div class="gf-form gf-form--grow">
|
||||
<input
|
||||
class="gf-form-input"
|
||||
placeholder="query expression"
|
||||
ng-model="ctrl.annotation.queryText"
|
||||
></input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
1. In your data source query—the one that extends [DataQuery]({{< relref "../../packages_api/data/dataquery.md" >}})—add the `queryText` property. The name of the property needs to correspond to the text in `ng-model`, e.g. `ctrl.annotation.<propertyName>`.
|
||||
**datasource.ts**
|
||||
|
||||
```ts
|
||||
export interface MyQuery extends DataQuery {
|
||||
// ...
|
||||
queryText?: string;
|
||||
}
|
||||
annotations: {};
|
||||
```
|
||||
|
||||
1. In `module.ts`, add the annotation query editor to the plugin.
|
||||
|
||||
```ts
|
||||
import { AnnotationQueryEditor } from './AnnotationQueryEditor';
|
||||
|
||||
export const plugin = new DataSourcePlugin<DataSource, MyQuery, MyDataSourceOptions>(DataSource)
|
||||
.setConfigEditor(ConfigEditor)
|
||||
.setQueryEditor(QueryEditor)
|
||||
.setAnnotationQueryCtrl(AnnotationQueryEditor);
|
||||
```
|
||||
|
||||
The `queryText` property is now available on the `options` object in the `annotationQuery` method:
|
||||
|
||||
```ts
|
||||
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
|
||||
const expression = options.annotation.queryText;
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
@@ -4,7 +4,7 @@ title = "Add support for Explore queries"
|
||||
|
||||
# Add support for Explore queries
|
||||
|
||||
This guide explains how to improve support for [Explore]({{< relref "../../explore/_index.md" >}}) to an existing data source plugin.
|
||||
This guide explains how to improve support for [Explore]({{< relref "../../explore/_index.md" >}}) in an existing data source plugin.
|
||||
|
||||
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}}).
|
||||
|
||||
@@ -85,25 +85,20 @@ The query editor for Explore is similar to the query editor for the data source
|
||||
};
|
||||
```
|
||||
|
||||
## Support multiple Explore modes
|
||||
## Selecting preferred visualisation
|
||||
|
||||
Explore lets you query any data source, regardless of whether it returns metrics or logs. You can change which type of query you want to make, by setting the _Explore mode_.
|
||||
Explore should by default select a reasonable visualization for your data so users do not have to tweak and play with the visualizations and just focus on querying. This usually works fairly well and Explore can figure out whether the returned data is time series data or logs or something else.
|
||||
|
||||
The query modes that the plugin supports are defined in the [plugin.json]({{< relref "metadata.md" >}}) file.
|
||||
|
||||
The query mode is available on the `props` object for both the query editor and the start page. For example, here's how you can change the query editor based on the currently selected mode:
|
||||
If this does not work for you or you want to show some data in a specific visualization, add a hint to your returned data frame using the `preferredVisualisationType` meta attribute.
|
||||
|
||||
You can construct a data frame with specific metadata:
|
||||
```
|
||||
export default (props: Props) => {
|
||||
const { query, exploreMode } = props;
|
||||
|
||||
switch (exploreMode) {
|
||||
case ExploreMode.Metrics:
|
||||
return <MetricsQueryField query={query} />;
|
||||
case ExploreMode.Logs:
|
||||
return <LogsQueryField query={query} />;
|
||||
default:
|
||||
return <p>Unsupported mode</p>;
|
||||
}
|
||||
}
|
||||
const firstResult = new MutableDataFrame({
|
||||
fields: [...],
|
||||
meta: {
|
||||
preferredVisualisationType: 'logs',
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
For possible options, refer to [PreferredVisualisationType](https://grafana.com/docs/grafana/latest/packages_api/data/preferredvisualisationtype/).
|
||||
|
||||
@@ -76,7 +76,7 @@ Now, when users write `$service`, the query looks like this:
|
||||
SELECT * FROM services WHERE id IN (admin,auth,billing)
|
||||
```
|
||||
|
||||
For more information on the available variable formats, refer to [Advanced variable format options](https://grafana.com/docs/grafana/latest/variables/advanced-variable-format-options/).
|
||||
For more information on the available variable formats, refer to [Advanced variable format options]({{< relref "../../variables/advanced-variable-format-options.md" >}}).
|
||||
|
||||
## Set a variable from your plugin
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ The resources capability allows a backend plugin to handle custom HTTP requests
|
||||
|
||||
Examples of use cases for implementing resources:
|
||||
|
||||
- Implement a custom data source proxy in case certain authentication/authorization or other requirements are required/needed that are not supported in Grafana's [built-in data proxy](https://grafana.com/docs/grafana/latest/http_api/data_source/#data-source-proxy-calls).
|
||||
- Implement a custom data source proxy in case certain authentication/authorization or other requirements are required/needed that are not supported in Grafana's [built-in data proxy]({{< relref "../../../http_api/data_source.md#data-source-proxy-calls" >}}).
|
||||
- Return data or information in a format suitable to use within a data source query editor to provide auto-complete functionality.
|
||||
- Return static resources, such as images or files.
|
||||
- Send a command to a device, such as a micro controller or IOT device.
|
||||
|
||||
@@ -14,6 +14,7 @@ To add logs support to an existing data source, you need to:
|
||||
|
||||
- Enable logs support
|
||||
- Construct the log data
|
||||
- (Optional) Add preferred visualisation type hint to the data frame
|
||||
|
||||
### Enable logs support
|
||||
|
||||
@@ -50,6 +51,25 @@ That's all you need to start returning log data from your data source. Go ahead
|
||||
|
||||
Congratulations, you just wrote your first logs data source plugin! Next, let's look at a couple of features that can further improve the experience for the user.
|
||||
|
||||
### (Optional) Add preferred visualisation type hint to the data frame
|
||||
|
||||
To make sure Grafana recognizes data as logs and shows logs visualization automatically in Explore you have do set `meta.preferredVisualisationType` to `'logs'` in the returned data frame. See [Selecting preferred visualisation section]({{< relref "add-support-for-explore-queries.md#selecting-preferred-visualisation" >}})
|
||||
|
||||
**Example:**
|
||||
|
||||
```ts
|
||||
const frame = new MutableDataFrame({
|
||||
refId: query.refId,
|
||||
meta: {
|
||||
preferredVisualisationType: 'logs',
|
||||
},
|
||||
fields: [
|
||||
{ name: 'time', type: FieldType.time },
|
||||
{ name: 'content', type: FieldType.string },
|
||||
],
|
||||
});
|
||||
```
|
||||
|
||||
## Add labels to your logs
|
||||
|
||||
To help filter log lines, many log systems let you query logs based on metadata, or _labels_.
|
||||
|
||||
@@ -72,7 +72,7 @@ A data transformation is any function that accepts a data frame as input, and re
|
||||
|
||||
A data frame with at least one time field is considered a _time series_.
|
||||
|
||||
For more information on time series, refer to our [Introduction to time series]({{< relref "../../getting-started/timeseries.md" >}}).
|
||||
For more information on time series, refer to our [Introduction to time series]({{< relref "../../basics/timeseries.md" >}}).
|
||||
|
||||
### Wide format
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ The plugin.json file is required for all plugins. When Grafana starts, it scans
|
||||
| `metrics` | boolean | No | For data source plugins. If the plugin supports metric queries. Used in the Explore feature. |
|
||||
| `preload` | boolean | No | Initialize plugin on startup. By default, the plugin initializes on first use. |
|
||||
| `queryOptions` | [object](#queryoptions) | No | For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed. |
|
||||
| `routes` | [object](#routes)[] | No | For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/). |
|
||||
| `routes` | [object](#routes)[] | No | For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Add authentication for data source plugins]({{< relref "add-authentication-for-data-source-plugins.md">}}). |
|
||||
| `skipDataQuery` | boolean | No | For panel plugins. Hides the query editor. |
|
||||
| `state` | string | No | Marks a plugin as a pre-release. Possible values are: `alpha`, `beta`. |
|
||||
| `streaming` | boolean | No | For data source plugins. If the plugin supports streaming. |
|
||||
@@ -168,12 +168,13 @@ For data source plugins. There is a query options section in the plugin's query
|
||||
|
||||
## routes
|
||||
|
||||
For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/).
|
||||
For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Add authentication for data source plugins]({{< relref "add-authentication-for-data-source-plugins.md">}}).
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------------|-------------------------|----------|---------------------------------------------------------------------------------------------------------|
|
||||
| `body` | [object](#body) | No | For data source plugins. Route headers set the body content and length to the proxied request. |
|
||||
| `headers` | array | No | For data source plugins. Route headers adds HTTP headers to the proxied request. |
|
||||
| `jwtTokenAuth` | [object](#jwttokenauth) | No | For data source plugins. Token authentication section used with an JWT OAuth API. |
|
||||
| `method` | string | No | For data source plugins. Route method matches the HTTP verb like GET or POST. |
|
||||
@@ -183,29 +184,37 @@ For data source plugins. Proxy routes used for plugin authentication and adding
|
||||
| `tokenAuth` | [object](#tokenauth) | No | For data source plugins. Token authentication section used with an OAuth API. |
|
||||
| `url` | string | No | For data source plugins. Route URL is where the request is proxied to. |
|
||||
|
||||
### body
|
||||
|
||||
For data source plugins. Route headers set the body content and length to the proxied request.
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|------|----------|-------------|
|
||||
|
||||
### jwtTokenAuth
|
||||
|
||||
For data source plugins. Token authentication section used with an JWT OAuth API.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|-------------------|----------|---------------------------------------------------------------------------|
|
||||
| `params` | [object](#params) | No | For data source plugins. Parameters for the token authentication request. |
|
||||
| `url` | string | No | For data source plugins. URL to fetch the JWT token. |
|
||||
| Property | Type | Required | Description |
|
||||
|----------|-------------------|----------|------------------------------------------------------|
|
||||
| `params` | [object](#params) | No | Parameters for the JWT token authentication request. |
|
||||
| `scopes` | string | No | |
|
||||
| `url` | string | No | URL to fetch the JWT token. |
|
||||
|
||||
#### params
|
||||
|
||||
For data source plugins. Parameters for the token authentication request.
|
||||
Parameters for the JWT token authentication request.
|
||||
|
||||
##### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|-----------------|--------|----------|--------------------------------------------------------------------------------------------------------------------|
|
||||
| `client_id` | string | No | For data source plugins. OAuth client id. |
|
||||
| `client_secret` | string | No | For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
|
||||
| `grant_type` | string | No | For data source plugins. OAuth grant type. |
|
||||
| `resource` | string | No | For data source plugins. OAuth resource. |
|
||||
| Property | Type | Required | Description |
|
||||
|----------------|----------|----------|-------------|
|
||||
| `client_email` | string | No | |
|
||||
| `private_key` | string | No | |
|
||||
| `scopes` | string[] | No | |
|
||||
| `token_uri` | string | No | |
|
||||
|
||||
### tokenAuth
|
||||
|
||||
@@ -213,22 +222,23 @@ For data source plugins. Token authentication section used with an OAuth API.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|-------------------|----------|---------------------------------------------------------------------------|
|
||||
| `params` | [object](#params) | No | For data source plugins. Parameters for the token authentication request. |
|
||||
| `url` | string | No | For data source plugins. URL to fetch the authentication token. |
|
||||
| Property | Type | Required | Description |
|
||||
|----------|-------------------|----------|--------------------------------------------------|
|
||||
| `params` | [object](#params) | No | Parameters for the token authentication request. |
|
||||
| `scopes` | string | No | |
|
||||
| `url` | string | No | URL to fetch the authentication token. |
|
||||
|
||||
#### params
|
||||
|
||||
For data source plugins. Parameters for the token authentication request.
|
||||
Parameters for the token authentication request.
|
||||
|
||||
##### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|-----------------|--------|----------|--------------------------------------------------------------------------------------------------------------------|
|
||||
| `client_id` | string | No | For data source plugins. OAuth client id. |
|
||||
| `client_secret` | string | No | For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
|
||||
| `grant_type` | string | No | For data source plugins. OAuth grant type. |
|
||||
| `resource` | string | No | For data source plugins. OAuth resource. |
|
||||
| Property | Type | Required | Description |
|
||||
|-----------------|--------|----------|-------------------------------------------------------------------------------------------|
|
||||
| `client_id` | string | No | OAuth client ID |
|
||||
| `client_secret` | string | No | OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
|
||||
| `grant_type` | string | No | OAuth grant type |
|
||||
| `resource` | string | No | OAuth resource |
|
||||
|
||||
|
||||
|
||||
@@ -160,8 +160,8 @@ async query(options: DataQueryRequest<MyQuery>): Promise<DataQueryResponse> {
|
||||
}
|
||||
```
|
||||
|
||||
For more information, refer to [Data frames](https://grafana.com/docs/grafana/latest/developers/plugins/data-frames/).
|
||||
For more information, refer to [Data frames]({{< relref "data-frames.md">}}).
|
||||
|
||||
## Troubleshoot plugin migration
|
||||
|
||||
With Grafana 7.0, backend plugins can now be cryptographically signed to verify their origin. By default, Grafana will ignore unsigned plugins. For more information, refer to [Allow unsigned plugins]({{< relref "../../plugins/plugin-signatures.md#allow-unsigned-plugins" >}}).
|
||||
As of Grafana 7.0, backend plugins can now be cryptographically signed to verify their origin. By default, Grafana ignores unsigned plugins. For more information, refer to [Allow unsigned plugins]({{< relref "../../plugins/plugin-signatures.md#allow-unsigned-plugins" >}}).
|
||||
|
||||
@@ -350,6 +350,10 @@
|
||||
"type": "array",
|
||||
"description": "For data source plugins. Route headers adds HTTP headers to the proxied request."
|
||||
},
|
||||
"body": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. Route headers set the body content and length to the proxied request."
|
||||
},
|
||||
"tokenAuth": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. Token authentication section used with an OAuth API.",
|
||||
@@ -357,28 +361,32 @@
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. URL to fetch the authentication token."
|
||||
"description": "URL to fetch the authentication token."
|
||||
},
|
||||
"scopes": {
|
||||
"type": "string",
|
||||
"description": ""
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. Parameters for the token authentication request.",
|
||||
"description": "Parameters for the token authentication request.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"grant_type": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth grant type."
|
||||
"description": "OAuth grant type"
|
||||
},
|
||||
"client_id": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth client id."
|
||||
"description": "OAuth client ID"
|
||||
},
|
||||
"client_secret": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
|
||||
"description": "OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
|
||||
},
|
||||
"resource": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth resource."
|
||||
"description": "OAuth resource"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -391,29 +399,36 @@
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. URL to fetch the JWT token.",
|
||||
"description": "URL to fetch the JWT token.",
|
||||
"format": "uri"
|
||||
},
|
||||
"scopes": {
|
||||
"type": "string",
|
||||
"description": ""
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. Parameters for the token authentication request.",
|
||||
"description": "Parameters for the JWT token authentication request.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"grant_type": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth grant type."
|
||||
"scopes": {
|
||||
"type": "array",
|
||||
"description": "",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"client_id": {
|
||||
"token_uri": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth client id."
|
||||
"description": ""
|
||||
},
|
||||
"client_secret": {
|
||||
"client_email": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
|
||||
"description": ""
|
||||
},
|
||||
"resource": {
|
||||
"private_key": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth resource."
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ weight = 150
|
||||
|
||||
Grafana Enterprise is a commercial edition of Grafana that includes additional features not found in the open source version.
|
||||
|
||||
Building on everything you already know and love about Grafana, Grafana Enterprise includes [exclusive datasource plugins]({{< relref "#enterprise-plugins">}}) and [additional features]({{< relref "#enterprise-features">}}). On top of that you get 24x7x365 support and training from the core Grafana team.
|
||||
Building on everything you already know and love about Grafana open source, Grafana Enterprise includes [exclusive datasource plugins]({{< relref "#enterprise-plugins">}}) and [additional features]({{< relref "#enterprise-features">}}). On top of that you get 24x7x365 support and training from the core Grafana team.
|
||||
|
||||
[Learn more about Grafana Enterprise.](https://grafana.com/enterprise)
|
||||
To learn more about Grafana Enterprise, refer to [our product page.](https://grafana.com/enterprise)
|
||||
|
||||
## Authentication
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ Audit logs are JSON objects representing user actions like:
|
||||
|
||||
### Format
|
||||
|
||||
Audit logs contain the following fields. The fields followed by **\*** are always available, the others depends on the type of action logged.
|
||||
Audit logs contain the following fields. The fields followed by **\*** are always available, the others depend on the type of action logged.
|
||||
|
||||
| Field name | Type | Description |
|
||||
| ---------- | ---- | ----------- |
|
||||
@@ -128,7 +128,7 @@ You can choose which exporter to use in the [configuration file]({{< relref "../
|
||||
|
||||
Options are `file`, `loki`, and `console`. Use spaces to separate multiple modes, such as `file loki`.
|
||||
|
||||
By default, when a user create or update a dashboard, its content will not appear in the logs as it can significantly increase the size of your logs. If this is important information for you and you can handle the amount of data generated, then you can enable this option in the configuration.
|
||||
By default, when a user creates or updates a dashboard, its content will not appear in the logs as it can significantly increase the size of your logs. If this is important information for you and you can handle the amount of data generated, then you can enable this option in the configuration.
|
||||
|
||||
```ini
|
||||
[auditing]
|
||||
|
||||
@@ -326,3 +326,38 @@ A list of headers that are stripped from the outgoing data source and alerting r
|
||||
### cookie_drop_list
|
||||
|
||||
A list of cookies that are stripped from the outgoing data source and alerting requests.
|
||||
|
||||
## [caching]
|
||||
|
||||
> **Note:** Available in Grafana Enterprise v7.5 and later versions.
|
||||
> **Note:** The Memcached cache backend is unavailable in Grafana Enterprise v7.5.
|
||||
|
||||
When query caching is enabled, Grafana temporarily stores the results of data source queries and serves cached responses to similar requests.
|
||||
|
||||
### backend
|
||||
|
||||
The caching backend to use when storing cached queries. Options: memory
|
||||
|
||||
### enabled
|
||||
|
||||
Setting 'enabled' to true enables caching datasource queries for all data sources.
|
||||
|
||||
### ttl
|
||||
|
||||
The default TTL (time to live) if no other TTL is available.
|
||||
|
||||
## [caching.memory]
|
||||
|
||||
### gc_interval
|
||||
|
||||
When storing cache data in-memory, this setting defines how often a background process cleans up stale data from the in-memory cache. More frequent "garbage collection" can keep memory usage from climbing but will increase CPU usage.
|
||||
|
||||
## [caching.redis]
|
||||
|
||||
### url
|
||||
|
||||
The full Redis URL of your Redis server. Example: `redis://localhost:6739/0`.
|
||||
|
||||
### prefix
|
||||
|
||||
A string that prefixes all Redis keys. This value must be set if using a shared database in Redis. If `prefix` is empty, then one will not be used.
|
||||
|
||||
15
docs/sources/enterprise/license/_index.md
Normal file
15
docs/sources/enterprise/license/_index.md
Normal file
@@ -0,0 +1,15 @@
|
||||
+++
|
||||
title = "Grafana Enterprise license"
|
||||
description = "Enterprise license"
|
||||
keywords = ["grafana", "licensing", "enterprise"]
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Grafana Enterprise license
|
||||
|
||||
To run Grafana Enterprise, you need a valid license. Contact a Grafana Labs representative](https://grafana.com/contact?about=grafana-enterprise) to obtain the license. For information on how to activate your license, refer to [Activate an Enterprise license]({{< relref "./activate-license.md" >}}).
|
||||
|
||||
See also:
|
||||
|
||||
- [License expiration]({{< relref "./license-expiration.md" >}})
|
||||
- [License restrictions]({{< relref "./license-restrictions.md" >}})
|
||||
@@ -2,6 +2,7 @@
|
||||
title = "Activate an Enterprise license"
|
||||
description = "Activate an Enterprise license"
|
||||
keywords = ["grafana", "licensing", "enterprise"]
|
||||
aliases = ["/docs/grafana/latest/enterprise/activate-license"]
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
@@ -13,10 +14,10 @@ Follow these steps to activate your Grafana Enterprise license:
|
||||
|
||||
To download your Grafana Enterprise license:
|
||||
|
||||
1. Log in to your [Grafana Cloud Account](https://grafana.com).
|
||||
1. Go to your **Org Profile**.
|
||||
1. Go to the section for Grafana Enterprise licenses in the side menu.
|
||||
1. At the bottom of the license details page there is **Download Token** link that will download the *license.jwt* file containing your license to your computer.
|
||||
1. Log in to your [Grafana Cloud Account](https://grafana.com).
|
||||
1. Go to your **Org Profile**.
|
||||
1. Go to the section for Grafana Enterprise licenses in the side menu.
|
||||
1. At the bottom of the license details page there is **Download Token** link that will download the *license.jwt* file containing your license to your computer.
|
||||
|
||||
## Step 2. Add your license to a Grafana instance
|
||||
|
||||
@@ -24,13 +25,12 @@ There are three different ways to add the license to a Grafana instance:
|
||||
|
||||
### Upload the license file through the Grafana Server Administrator page
|
||||
|
||||
This is the preferred option for single instance installations of
|
||||
Grafana Enterprise.
|
||||
This is the preferred option for single instance installations of Grafana Enterprise.
|
||||
|
||||
1. Sign in as a Grafana server admin.
|
||||
1. Navigate to **Server Admin > Upgrade** within Grafana.
|
||||
1. Click **Upload license token file**.
|
||||
1. Select your license file, and upload it.
|
||||
1. Sign in as a Grafana server admin.
|
||||
1. Navigate to **Server Admin > Upgrade** within Grafana.
|
||||
1. Click **Upload license token file**.
|
||||
1. Select your license file, and upload it.
|
||||
|
||||
### Place the license.jwt file in Grafana's data folder
|
||||
|
||||
@@ -60,9 +60,9 @@ There are three different ways to add the license to a Grafana instance:
|
||||
|
||||
## Step 3. Ensure that the license file's root URL matches the root_url configuration option
|
||||
|
||||
Update the [`root_url`]({{< relref "../administration/configuration/#root-url" >}}) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
|
||||
Update the [`root_url`]({{< relref "../../administration/configuration/#root-url" >}}) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
|
||||
|
||||
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`]({{< relref "../administration/configuration/#root-url" >}}) in your configuration.
|
||||
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`]({{< relref "../../administration/configuration/#root-url" >}}) in your configuration.
|
||||
|
||||
In your configuration file:
|
||||
|
||||
@@ -79,7 +79,4 @@ GF_SERVER_ROOT_URL=https://grafana.blah.com/
|
||||
|
||||
## Step 4. Restart Grafana
|
||||
|
||||
To finalize the installation of Grafana Enterprise, restart Grafana to
|
||||
enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../installation/restart-grafana.md" >}})
|
||||
topic for more information.
|
||||
|
||||
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../../installation/restart-grafana.md" >}}) for more information.
|
||||
@@ -2,7 +2,8 @@
|
||||
title = "License expiration"
|
||||
description = ""
|
||||
keywords = ["grafana", "licensing"]
|
||||
weight = 120
|
||||
aliases = ["/docs/grafana/latest/enterprise/license-expiration"]
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# License expiration
|
||||
@@ -13,7 +14,7 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
|
||||
|
||||
## Update your license
|
||||
|
||||
1. Locate your current `license.jwt` file. In a standard installation it is stored inside Grafana's data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration](https://grafana.com/docs/grafana/latest/administration/configuration/).
|
||||
1. Locate your current `license.jwt` file. In a standard installation it is stored inside the Grafana data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration]({{< relref "../../administration/configuration.md" >}}).
|
||||
|
||||
```ini
|
||||
[enterprise]
|
||||
@@ -22,10 +23,10 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
|
||||
|
||||
The configuration file's location may also be overridden by the `GF_ENTERPRISE_LICENSE_PATH` environment variable.
|
||||
|
||||
1. Log in to your [Grafana Cloud Account](https://grafana.com/login) and make sure you're in the correct organization in the dropdown at the top of the page.
|
||||
1. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
|
||||
1. Replace the current `license.jwt`-file with the one you've just downloaded.
|
||||
1. Restart Grafana.
|
||||
2. Log in to your [Grafana Cloud Account](https://grafana.com/login) and make sure you're in the correct organization in the dropdown at the top of the page.
|
||||
3. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
|
||||
4. Replace the current `license.jwt`-file with the one you've just downloaded.
|
||||
5. [Restart Grafana]({{< relref "../../installation/restart-grafana.md" >}}).
|
||||
|
||||
## If your license expires
|
||||
|
||||
@@ -38,7 +39,7 @@ Your current data source permissions will keep working as expected, but you'll b
|
||||
### LDAP authentication
|
||||
|
||||
- LDAP synchronization is not affected by an expired license.
|
||||
- Enhanced LDAP debugging is unavailable.
|
||||
- Team sync debugging is unavailable.
|
||||
|
||||
### SAML authentication
|
||||
|
||||
@@ -70,3 +71,9 @@ Vault integration is not affected by an expired license.
|
||||
### Auditing
|
||||
|
||||
Auditing is not affected by an expired license.
|
||||
|
||||
### License restrictions
|
||||
|
||||
The concurrent session limit remains active for seven days after the expiration date, after which it will be turned off.
|
||||
|
||||
The active users limit is turned off immediately.
|
||||
@@ -2,15 +2,20 @@
|
||||
title = "License restrictions"
|
||||
description = "Grafana Enterprise license restrictions"
|
||||
keywords = ["grafana", "licensing", "enterprise"]
|
||||
weight = 110
|
||||
aliases = ["/docs/grafana/latest/enterprise/license-restrictions"]
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
# License restrictions
|
||||
|
||||
Enterprise licenses are limited by the number of active users, a license expiration date, and the URL of the Grafana instance.
|
||||
Enterprise licenses are limited by the number of active users, the license expiration date, and the URL of the Grafana instance.
|
||||
|
||||
## User limits
|
||||
|
||||
Users are limited by the number of active users and the number of concurrent sessions for a given account.
|
||||
|
||||
### Active users limit
|
||||
|
||||
Grafana licenses allow for a certain number of active users per instance. An active user is any user that has signed in to Grafana within the past 30 days.
|
||||
|
||||
In the context of licensing, each user is classified as either a viewer or an editor:
|
||||
@@ -18,14 +23,24 @@ In the context of licensing, each user is classified as either a viewer or an ed
|
||||
- An editor is a user who has permission to edit and save a dashboard. Examples of editors are as follows:
|
||||
- Grafana server administrators.
|
||||
- Users who are assigned an organizational role of Editor or Admin.
|
||||
- Users that have been granted Admin or Edit permissions at the dashboard or folder level. Refer to [Dashboard and folder permissions](https://grafana.com/docs/grafana/latest/permissions/dashboard_folder_permissions/).
|
||||
- Users that have been granted Admin or Edit permissions at the dashboard or folder level. Refer to [Dashboard and folder permissions]({{< relref "../../permissions/dashboard-folder-permissions.md" >}}.
|
||||
- A viewer is a user with the Viewer role, which does not permit the user to save a dashboard.
|
||||
|
||||
Restrictions are applied separately for viewers and editors.
|
||||
|
||||
When the number of maximum active viewers or editors is reached, Grafana displays a warning banner.
|
||||
When the number of maximum active viewers or editors is reached, only they can sign in. New users or non-active users cannot sign in.
|
||||
|
||||
Sometimes it is useful to log in to an account from multiple locations concurrently. With Grafana Enterprise 7.5 and up, accounts are limited to three concurrent sessions.
|
||||
### Concurrent sessions limit
|
||||
|
||||
Sometimes it is useful to sign in to an account from multiple locations simultaneously. As of Grafana Enterprise 7.5+, accounts are limited to the number of concurrent sessions authorized in each license, which is typically three. A new session is created when a user signs in to Grafana from a new device, a different browser, or an incognito window. If a user signs in to Grafana from another tab or window within the same browser, then only one session is used.
|
||||
|
||||
Given a limit of three sessions, the longest inactive session is signed out of when a fourth person signs in to the same account.
|
||||
|
||||
### Usage billing
|
||||
|
||||
You can request Grafana Labs to turn on usage billing to allow an unlimited number of active users. When usage billing is enabled, Grafana does not enforce active user limits. Instead, we charge for active users above the limit, according to your customer contract.
|
||||
|
||||
Usage billing must be agreed upon with Grafana Labs, and it is only available if Grafana Enterprise is configured to [automatically refresh its license]({{< relref "../enterprise-configuration.md#auto_refresh_license" >}}).
|
||||
|
||||
## Expiration date
|
||||
|
||||
@@ -41,11 +56,10 @@ This CSV report helps to identify users, teams, and roles that have been granted
|
||||
|
||||
To download the report:
|
||||
1. Hover your cursor over the **Server Admin** (shield) icon in the side menu and then click **Licensing**.
|
||||
2. At the bottom of the page, click **Download report**.
|
||||
1. At the bottom of the page, click **Download report**.
|
||||
|
||||
## Update license restrictions
|
||||
|
||||
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](https://grafana.com/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
|
||||
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](https://grafana.com/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
|
||||
|
||||
For instructions on how to activate your license after it is updated, refer to
|
||||
[Activate an Enterprise license]({{< relref "./activate-license.md" >}})
|
||||
For instructions on how to activate your license after it is updated, refer to [Activate an Enterprise license]({{< relref "./activate-license.md" >}}).
|
||||
28
docs/sources/enterprise/query-caching.md
Normal file
28
docs/sources/enterprise/query-caching.md
Normal file
@@ -0,0 +1,28 @@
|
||||
+++
|
||||
title = "Query caching"
|
||||
description = "Grafana Enterprise data source query caching"
|
||||
keywords = ["grafana", "plugins", "query", "caching"]
|
||||
weight = 110
|
||||
+++
|
||||
|
||||
# Query caching
|
||||
|
||||
> **Note:** Query caching is available behind the `caching` feature flag in Grafana Enterprise 7.5+.
|
||||
|
||||
When query caching is enabled, Grafana temporarily stores the results of data source queries. When you or another user submit the exact same query again, the results will come back from the cache instead of from the data source (like Splunk or ServiceNow) itself.
|
||||
|
||||
Query caching currently works for all backend data sources. You can enable the cache globally and configure the cache duration (also called Time to Live, or TTL). The cache can either be in-memory or in Redis.
|
||||
|
||||
## Query caching benefits
|
||||
|
||||
- Faster dashboard load times, especially for popular dashboards.
|
||||
- Reduced API costs.
|
||||
- Reduced likelihood that APIs will rate-limit or throttle requests.
|
||||
|
||||
## Enable query caching
|
||||
|
||||
To enable and configure query caching, please refer the the [Query caching section of Enterprise Configuration]({{< relref "./enterprise-configuration.md#caching" >}}).
|
||||
|
||||
## Sending a request without cache
|
||||
|
||||
If the data source query request contains an `X-Cache-Skip` header, then Grafana skips the caching middleware, and does not search the cache for a response. This can be particularly useful when debugging data source queries using cURL.
|
||||
@@ -157,7 +157,7 @@ If the time zone is set differently between your Grafana server and its remote i
|
||||
|
||||
## Choose template variables
|
||||
|
||||
> ** Note:** Available in Grafana Enterprise version 7.5+ (behind `templateVariables` feature flag).
|
||||
> ** Note:** Available in Grafana Enterprise version 7.5+ (behind `reportVariables` feature flag).
|
||||
|
||||
You can configure report-specific template variables for the dashboard on the report page. The variables that you select will override the variables from the dashboard, and they are used when rendering a PDF file of the report. For detailed information about using template variables, refer to the [Templates and variables]({{< relref "../variables/_index.md" >}}) section.
|
||||
|
||||
|
||||
@@ -18,7 +18,4 @@ There are several sort options:
|
||||
- Views total
|
||||
- Views 30 days
|
||||
|
||||
`Errors 30 days` and `Views 30 days` are based on a calculated sorting index that weighs errors and views that happened within the past day more heavily than those that happened over the past 30 days.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/improved_search.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/improved-search-7-5.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
|
||||
@@ -63,23 +63,33 @@ The configuration file in Grafana Enterprise contains the following options. Eac
|
||||
# Set to complete URL to override apple/ios icon
|
||||
;apple_touch_icon =
|
||||
```
|
||||
|
||||
Below is an example for how to replace the default footer and help links with two custom links.
|
||||
You can replace the default footer links (Documentation, Support, Community) and even add your own custom links.
|
||||
An example follows for replacing the default footer and help links with new custom links.
|
||||
|
||||
```ini
|
||||
footer_links = support guides
|
||||
footer_links = support guides extracustom
|
||||
footer_links_support_text = Support
|
||||
footer_links_support_url = http://your.support.site
|
||||
footer_links_guides_text = Guides
|
||||
footer_links_guides_url = http://your.guides.site
|
||||
footer_links_extracustom_text = Custom text
|
||||
footer_links_extracustom_url = http://your.custom.site
|
||||
```
|
||||
|
||||
Here is the same example using environment variables instead of the custom.ini or grafana.ini file.
|
||||
|
||||
```
|
||||
GF_WHITE_LABELING_FOOTER_LINKS=support guides
|
||||
GF_WHITE_LABELING_FOOTER_LINKS=support guides extracustom
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_SUPPORT_TEXT=Support
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_SUPPORT_URL=http://your.support.site
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_GUIDES_TEXT=Guides
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_GUIDES_URL=http://your.guides.site
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_EXTRACUSTOM_TEXT=Custom Text
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_EXTRACUSTOM_URL=http://your.custom.site
|
||||
```
|
||||
|
||||
> **Note:** The following two links are always present in the footer:
|
||||
- Grafana edition
|
||||
- Grafana version with build number
|
||||
|
||||
If you specify `footer_links` or `GF_WHITE_LABELING_FOOTER_LINKS`, then all other default links are removed from the footer and only what is specified is included.
|
||||
|
||||
@@ -17,7 +17,7 @@ If you just want to explore your data and do not want to create a dashboard, the
|
||||
|
||||
## Start exploring
|
||||
|
||||
In order to access Explore, you must have an editor or an administrator role. Refer to [Organization roles](https://grafana.com/docs/grafana/latest/permissions/organization_roles/) for more information on what each role has access to.
|
||||
In order to access Explore, you must have an editor or an administrator role. Refer to [Organization roles]({{< relref "../permissions/organization_roles.md" >}}) for more information on what each role has access to.
|
||||
|
||||
To access Explore:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ weight = 15
|
||||
Along with metrics, Explore allows you to investigate your logs in the following data sources:
|
||||
|
||||
- [Elasticsearch]({{< relref "../datasources/elasticsearch.md" >}})
|
||||
- [InfluxDB]({{< relref "../datasources/influxdb.md" >}})
|
||||
- [InfluxDB]({{< relref "../datasources/influxdb/_index.md" >}})
|
||||
- [Loki]({{< relref "../datasources/loki.md" >}})
|
||||
|
||||
During an infrastructure monitoring and incident response, you can dig deeper into the metrics and logs to find the cause. Explore also allows you to correlate metrics and logs by viewing them side-by-side. This creates a new debugging workflow:
|
||||
|
||||
@@ -66,3 +66,35 @@ You can navigate from a span in a trace view directly to logs relevant for that
|
||||
{{< docs-imagebox img="/img/docs/explore/trace-to-log-7-4.png" class="docs-image--no-shadow" max-width= "600px" caption="Screenshot of the trace view in Explore with icon next to the spans" >}}
|
||||
|
||||
Click the document icon to open a split view in Explore with the configured data source and query relevant logs for the span.
|
||||
|
||||
## Data API
|
||||
|
||||
This visualization needs a specific shape of the data to be returned from the data source in order to correctly display it.
|
||||
|
||||
Data source needs to return data frame and set `frame.meta.preferredVisualisationType = 'trace'`.
|
||||
|
||||
### Data frame structure
|
||||
|
||||
Required fields:
|
||||
|
||||
| Field name | Type | Description |
|
||||
|------------|---------|-------------|
|
||||
| traceID | string | Identifier for the entire trace. There should be only one trace in the data frame. |
|
||||
| spanID | string | Identifier for the current span. SpanIDs should be unique per trace. |
|
||||
| parentSpanID | string | SpanID of the parent span to create child parent relationship in the trace view. Can be `undefined` for root span without parent. |
|
||||
| serviceName | string | Name of the service this span is part of. |
|
||||
| serviceTags | TraceKeyValuePair[] | List of tags relevant for the service. |
|
||||
| startTime | number | Start time of the span in millisecond epoch time. |
|
||||
| duration | number | Duration of the span in milliseconds. |
|
||||
|
||||
Optional fields:
|
||||
|
||||
| Field name | Type | Description |
|
||||
|------------|---------|-------------|
|
||||
| logs | TraceLog[] | List of logs associated with the current span. |
|
||||
| tags | TraceKeyValuePair[] | List of tags associated with the current span. |
|
||||
| warnings | string[] | List of warnings associated with the current span. |
|
||||
| stackTraces | string[] | List of stack traces associated with the current span. |
|
||||
| errorIconColor | string | Color of the error icon in case span is tagged with `error: true`. |
|
||||
|
||||
For details about the types see [TraceSpanRow](https://grafana.com/docs/grafana/latest/packages_api/data/tracespanrow/), [TraceKeyValuePair](https://grafana.com/docs/grafana/latest/packages_api/data/tracekeyvaluepair/) and [TraceLog](https://grafana.com/docs/grafana/latest/packages_api/data/tracelog/)
|
||||
|
||||
@@ -8,9 +8,7 @@ aliases = ["/docs/grafana/latest/guides/what-is-grafana"]
|
||||
|
||||
This section provides a high-level look at Grafana, the Grafana process, and Grafana features. It's a good place to learn how to use the Grafana software.
|
||||
|
||||
## What is Grafana?
|
||||
|
||||
Grafana is open source visualization and analytics software. It allows you to query, visualize, alert on, and explore your metrics no matter where they are stored. In plain English, it provides you with tools to turn your time-series database (TSDB) data into beautiful graphs and visualizations.
|
||||
{{< docs/shared "basics/what-is-grafana.md" >}}
|
||||
|
||||
After creating a dashboard like you do in [Getting started]({{< relref "getting-started.md" >}}), there are many possible things you might do next. It all depends on your needs and your use case.
|
||||
|
||||
@@ -74,16 +72,6 @@ Refer to [Provisioning]({{< relref "../administration/provisioning.md" >}}) for
|
||||
|
||||
When organizations have one Grafana and multiple teams, they often want the ability to both keep things separate and share dashboards. You can create a team of users and then set [permissions]({{< relref "../permissions/_index.md" >}}) on folders, dashboards, and down to the [data source level]({{< relref "../enterprise/datasource_permissions.md" >}}) if you're using [Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}).
|
||||
|
||||
## Grafana Cloud
|
||||
{{< docs/shared "basics/grafana-cloud.md" >}}
|
||||
|
||||
Grafana Cloud is a highly available, fast, fully managed OpenSaaS logging and metrics platform. Everything you love about Grafana, but Grafana Labs hosts it for you and handles all the headaches.
|
||||
|
||||
[Learn more about Grafana Cloud](https://grafana.com/cloud/) or try the [Grafana Cloud Linux host Quickstart](/docs/grafana-cloud/quickstart/).
|
||||
|
||||
## Grafana Enterprise
|
||||
|
||||
[Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}) is a commercial edition of Grafana that includes additional features not found in the open source version.
|
||||
|
||||
Building on everything you already know and love about Grafana, Grafana Enterprise adds enterprise data sources, advanced authentication options, more permission controls, 24x7x365 support, and training from the core Grafana team.
|
||||
|
||||
[Learn more about Grafana Enterprise](https://grafana.com/enterprise). To purchase Enterprise or obtain a trial license, contact the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).
|
||||
{{< docs/shared "basics/grafana-enterprise.md" >}}
|
||||
|
||||
110
docs/sources/getting-started/getting-started-influxdb.md
Normal file
110
docs/sources/getting-started/getting-started-influxdb.md
Normal file
@@ -0,0 +1,110 @@
|
||||
+++
|
||||
title = "With Grafana and InfluxDB"
|
||||
description = "Guide for getting started with Grafana and InfluxDB"
|
||||
keywords = ["grafana", "intro", "guide", "started"]
|
||||
weight = 250
|
||||
+++
|
||||
|
||||
# Getting started with Grafana and InfluxDB
|
||||
|
||||
{{< docs/shared "influxdb/intro.md" >}}
|
||||
|
||||
{{< docs/shared "getting-started/first-step.md" >}}
|
||||
|
||||
## Step 2. Get InfluxDB
|
||||
|
||||
You can [download InfluxDB](https://portal.influxdata.com/downloads/) and install it locally or you can sign up for [InfluxDB Cloud](https://www.influxdata.com/products/influxdb-cloud/).
|
||||
|
||||
> **Note:** Windows installers are not available for some versions of InfluxDB.
|
||||
|
||||
## Step 3. Install other InfluxDB software
|
||||
|
||||
[Install Telegraf](https://docs.influxdata.com/telegraf/v1.18/introduction/installation/). This tool is an agent that helps you get metrics into InfluxDB. For more information, refer to [Telegraf documentation](https://docs.influxdata.com/telegraf/v1.18/).
|
||||
|
||||
If you chose to use InfluxDB Cloud, then you should [download and install the InfluxDB Cloud CLI](https://portal.influxdata.com/downloads/). This tool allows you to send command line instructions to your cloud account. For more information, refer to [Influx CLI documentation](https://docs.influxdata.com/influxdb/cloud/write-data/developer-tools/influx-cli/).
|
||||
|
||||
## Step 4. Get data into InfluxDB
|
||||
|
||||
If you downloaded and installed InfluxDB on your local machine, then use the [Quick Start][https://docs.influxdata.com/influxdb/v2.0/write-data/#quick-start-for-influxdb-oss] feature to visualize InfluxDB metrics.
|
||||
|
||||
If you are using the cloud account, then the wizards will guide you through the initial process. For more information, refer to [Configure Telegraf](https://docs.influxdata.com/influxdb/cloud/write-data/no-code/use-telegraf/#configure-telegraf).
|
||||
|
||||
> **Note:** Windows users might need to make additional adjustments. Look for special instructions in the InfluxData documentation and [Using Telegraf on Windows](https://www.influxdata.com/blog/using-telegraf-on-windows/) blog post.
|
||||
|
||||
> **Note:** The regular system monitoring template in InfluxDB Cloud is not compatible with Windows. Windows users who use InfluxDB Cloud to monitor their system will need to use the [Windows System Monitoring Template](https://github.com/influxdata/community-templates/tree/master/windows_system).
|
||||
|
||||
## Step 5. Add your InfluxDB data source to Grafana
|
||||
|
||||
You can have more than one InfluxDB data source defined in Grafana.
|
||||
|
||||
1. Follow the general instructions to [add a data source]({{< relref "../datasources/add-a-data-source.md" >}}).
|
||||
1. Decide if you will use InfluxQL or Flux as your query language.
|
||||
- For InfluxQL, refer to [InfluxDB data source]({{< relref "../datasources/influxdb/_index.md" >}}) for information about specific data source fields.
|
||||
- For Flux, refer to [Flux query language in Grafana]({{< relref "../datasources/influxdb/influxdb-flux.md" >}}) for information about specific data source fields.
|
||||
|
||||
### InfluxDB guides
|
||||
|
||||
InfluxDB publishes guidance for connecting different versions of their product to Grafana.
|
||||
|
||||
- **InfluxDB OSS or Enterprise 1.8+.** To turn on Flux, refer to [Configure InfluxDB](https://docs.influxdata.com/influxdb/v1.8/administration/config/#flux-enabled-false.). Select your InfluxDB version in the upper right corner.
|
||||
- **InfluxDB OSS or Enterprise 2.x.** Refer to [Use Grafana with InfluxDB](https://docs.influxdata.com/influxdb/v2.0/tools/grafana/). Select your InfluxDB version in the upper right corner.
|
||||
- **InfluxDB Cloud.** Refer to [Use Grafana with InfluxDB Cloud](https://docs.influxdata.com/influxdb/cloud/tools/grafana/).
|
||||
|
||||
### Important tips
|
||||
|
||||
- Make sure your Grafana token has read access. If it doesn't, then you'll get an authentication error and be unable to connect Grafana to InfluxDB.
|
||||
- Avoid apostrophes and other non-standard characters in bucket and token names.
|
||||
- If the text name of the organization or bucket doesn't work, then try the ID number.
|
||||
- If you change your bucket name in InfluxDB, then you must also change it in Grafana and your Telegraf .conf file as well.
|
||||
|
||||
## Step 6. Add a query
|
||||
|
||||
This step varies depending on the query language that you selected when you set up your data source in Grafana.
|
||||
|
||||
### InfluxQL query language
|
||||
|
||||
In the query editor, click **select measurement**.
|
||||
|
||||

|
||||
|
||||
Grafana displays a list of possible series. Click one to select it, and Grafana graphs any available data. If there is no data to display, then try another selection or check your data source.
|
||||
|
||||
### Flux query language
|
||||
|
||||
Create a simple Flux query.
|
||||
|
||||
1. [Add a panel](../panels/add-a-panel.md).
|
||||
1. In the query editor, select your InfluxDB-Flux data source. For more information, refer to [Queries](../panels/queries.md).
|
||||
1. Select the **Table** visualization.
|
||||
1. In the query editor text field, enter `buckets()` and then click outside of the query editor.
|
||||
|
||||
This generic query returns a list of buckets.
|
||||
|
||||

|
||||
|
||||
You can also create Flux queries in the InfluxDB Explore view.
|
||||
|
||||
1. In your browser, log in to the InfluxDB native UI (OSS is typically something like http://localhost:8086 or for InfluxDB Cloud use: https://cloud2.influxdata.com).
|
||||
1. Click **Explore** to open the Data Explorer.
|
||||
1. The InfluxDB Data Explorer provides two mechanisms for creating Flux queries: a graphical query editor and a script editor. Using the graphical query editor, [create a query](https://docs.influxdata.com/influxdb/cloud/query-data/execute-queries/data-explorer/). It will look something like this:
|
||||
|
||||

|
||||
|
||||
1. Click **Script Editor** to view the text of the query, and then copy all the lines of your Flux code, which will look something like this:
|
||||
|
||||

|
||||
|
||||
1. In Grafana, [add a panel](../panels/add-a-panel.md) and then paste your Flux code into the query editor.
|
||||
1. Click **Apply**. Your new panel should be visible with data from your Flux query.
|
||||
|
||||
## Step 7. Check InfluxDB metrics in Grafana Explore
|
||||
|
||||
In your Grafana instance, go to the [Explore]({{< relref "../explore/_index.md" >}}) view and build queries to experiment with the metrics you want to monitor. Here you can also debug issues related to collecting metrics.
|
||||
|
||||
## Step 8. Start building dashboards
|
||||
|
||||
There you go! Use Explore and Data Explorer to experiment with your data, and add the queries that you like to your dashboard as panels. Have fun!
|
||||
|
||||
Here are some resources to learn more:
|
||||
- Grafana documentation: [InfluxDB data source](../datasources/influxdb/_index.md)
|
||||
- InfluxDB documentation: [Comparison of Flux vs InfluxQL](https://docs.influxdata.com/influxdb/v1.8/flux/flux-vs-influxql/)
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "With Grafana and Prometheus"
|
||||
description = "Guide for getting started with Grafana"
|
||||
description = "Guide for getting started with Grafana and Prometheus"
|
||||
keywords = ["grafana", "intro", "guide", "started"]
|
||||
aliases = ["/docs/grafana/latest/guides/gettingstarted","/docs/grafana/latest/guides/getting_started"]
|
||||
weight = 300
|
||||
@@ -12,16 +12,12 @@ Prometheus is an open source systems monitoring system for which Grafana provide
|
||||
|
||||
You can also configure a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance to display system metrics without having to host Grafana yourself.
|
||||
|
||||
## Step 1. Install Grafana and build your first dashboard
|
||||
|
||||
Use the instructions in [Getting started with Grafana]({{< relref "getting-started.md" >}}) to:
|
||||
- Install Grafana.
|
||||
- Log in to Grafana.
|
||||
- Create your first dashboard.
|
||||
{{< docs/shared "getting-started/first-step.md" >}}
|
||||
|
||||
## Step 2. Download Prometheus and node_exporter
|
||||
|
||||
Prometheus, like Grafana, can be installed on many different operating systems. Refer to the [Prometheus download page](https://prometheus.io/download/), which lists all stable versions of Prometheus components. Download the following components:
|
||||
|
||||
- [Prometheus](https://prometheus.io/download/#prometheus)
|
||||
- [node_exporter](https://prometheus.io/download/#node_exporter)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "With Grafana and MS SQL Server"
|
||||
description = "Guide for getting started with Grafana"
|
||||
description = "Guide for getting started with Grafana and MS SQL Server"
|
||||
keywords = ["grafana", "intro", "guide", "started", "SQL", "MSSQL"]
|
||||
aliases = ["/docs/grafana/latest/guides/gettingstarted","/docs/grafana/latest/guides/getting_started"]
|
||||
weight = 400
|
||||
@@ -9,51 +9,27 @@ weight = 400
|
||||
# Getting started with Grafana and MS SQL Server
|
||||
|
||||
Microsoft SQL Server is a popular relational database management system that is widely used in development and production environments. This topic walks you through the steps to create a series of dashboards in Grafana to display metrics from a MS SQL Server database. You can also configure the MS SQL Server data source on a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance without having to host Grafana yourself.
|
||||
## Step 1. Install Grafana and build your first dashboard
|
||||
|
||||
Use the instructions in [Getting started with Grafana]({{< relref "getting-started.md" >}}) to:
|
||||
- Install Grafana.
|
||||
- Log in to Grafana.
|
||||
- Create your first dashboard.
|
||||
{{< docs/shared "getting-started/first-step.md" >}}
|
||||
|
||||
> **Note:** You must install Grafana 5.1+ in order to use the integrated MS SQL data source.
|
||||
|
||||
## Step 2. Download MS SQL Server
|
||||
|
||||
MS SQL Server can be installed on many different operating systems. Refer to the [MS SQL Server downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), for a complete list of all available options.
|
||||
|
||||
Alternately, if you are working on Mac or Linux, then you can install MS SQL Server using the resources available in [grafana/grafana](https://github.com/grafana/grafana) GitHub repository (recommended). Here you will find a collection of supported data sources, including MS SQL Server, along with test data and pre-configured dashboards for use.
|
||||
|
||||
> **Note:** Installing MS SQL Server on Windows from the [grafana/grafana](https://github.com/grafana/grafana/tree/master/devenv) GitHub repository is not supported at this time.
|
||||
|
||||
MS SQL Server can be installed on Windows or Linux operating systems and also on Docker containers. Refer to the [MS SQL Server downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), for a complete list of all available options.
|
||||
## Step 3. Install MS SQL Server
|
||||
|
||||
You can install MS SQL Server on the host running Grafana or on a remote server. To install the software from the [downloads page](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), follow their setup prompts.
|
||||
|
||||
Otherwise, follow the instructions below to install and configure MS SQL Server from the [grafana/grafana](https://github.com/grafana/grafana/tree/master) repository.
|
||||
|
||||
1. Clone the [grafana/grafana](https://github.com/grafana/grafana/tree/master) repository to your local system.
|
||||
1. Install Docker or verify that it is installed on your machine.
|
||||
1. Within your local `grafana` repository, change directory to [devenv](https://github.com/grafana/grafana/tree/master/devenv).
|
||||
1. Run the bash command to setup data sources and dashboards.
|
||||
```
|
||||
./setup.sh
|
||||
```
|
||||
1. Restart the Grafana server.
|
||||
1. Change directory back to [master](https://github.com/grafana/grafana/tree/master/devenv).
|
||||
1. Run the make command to create the MS SQL Server database.
|
||||
```
|
||||
make devenv sources=mssql
|
||||
```
|
||||
This creates an image of the SQL Server database and runs it as a Docker container.
|
||||
|
||||
If you are on a Windows host but want to use Grafana and MS SQL data source on a Linux environment, refer to the [WSL to set up your Grafana development environment](https://grafana.com/blog/2021/03/03/.how-to-set-up-a-grafana-development-environment-on-a-windows-pc-using-wsl). This will allow you to leverage the resources available in [grafana/grafana](https://github.com/grafana/grafana) GitHub repository. Here you will find a collection of supported data sources, including MS SQL Server, along with test data and pre-configured dashboards for use.
|
||||
## Step 4. Adding the MS SQL data source
|
||||
|
||||
To add MS SQL Server data source:
|
||||
|
||||
1. In the Grafana side menu, hover your cursor over the **Configuration** (gear) icon and then click **Data Sources**.
|
||||
1. Filter by `mssql` and select the **Microsoft SQL Server** option.
|
||||
2. Click **Add data source** in the top right header to open the configuration page.
|
||||
3. Enter the information specified in the table below, then click **Save & Test**.
|
||||
1. Click **Add data source** in the top right header to open the configuration page.
|
||||
1. Enter the information specified in the table below, then click **Save & Test**.
|
||||
|
||||
Name | Description
|
||||
------------ | -------------
|
||||
@@ -73,6 +49,7 @@ Optionally, play around this dashboard and customize it to:
|
||||
- Change frequency of data polling.
|
||||
- Change the period for which the data is displayed.
|
||||
- Rearrange and resize panels.
|
||||
|
||||
## Step 5. Start building dashboards
|
||||
|
||||
Now that you have gained some idea of using the pre-packaged MS SQL data source and some test data, the next step is to setup your own instance of MS SQL Server database and data your development or sandbox area. In the previous steps, if you followed along the path of deploying your own instance of MS SQL Server, you are already on your way.
|
||||
|
||||
@@ -31,7 +31,7 @@ To log in to Grafana for the first time:
|
||||
|
||||
To create your first dashboard:
|
||||
|
||||
1. Click the **+** icon on the left panel, select **Create Dashboard**, and then click **Add new panel**.
|
||||
1. Click the **+** icon on the left panel, select **Create Dashboard**, and then click **Add an empty panel**.
|
||||
1. In the New Dashboard/Edit Panel view, go to the **Query** tab.
|
||||
1. Configure your [query]({{< relref "../panels/queries.md" >}}) by selecting ``-- Grafana --`` from the [data source selector]({{< relref "../panels/queries.md/#data-source-selector" >}}). This generates the Random Walk dashboard.
|
||||
1. Click the **Save** icon in the top right corner of your screen to save the dashboard.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Glossary"
|
||||
description = "Grafana glossary"
|
||||
keywords = ["grafana", "intro", "glossary", "dictionary"]
|
||||
aliases = ["/docs/grafana/latest/guides/glossary"]
|
||||
aliases = ["/docs/grafana/latest/guides/glossary", "/docs/grafana/latest/getting-started/glossary"]
|
||||
weight = 800
|
||||
+++
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ dashboards, creating users and updating data sources.
|
||||
|
||||
- [Data Source Permissions API]({{< relref "datasource_permissions.md" >}})
|
||||
- [External Group Sync API]({{< relref "external_group_sync.md" >}})
|
||||
- [License API]({{< relref "licensing.md" >}})
|
||||
- [Reporting API]({{< relref "reporting.md" >}})
|
||||
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
## Logout User
|
||||
## Logout User
|
||||
|
||||
`POST /api/admin/users/:id/logout`
|
||||
|
||||
|
||||
@@ -53,7 +53,6 @@ Content-Type: application/json
|
||||
The format for `time` and `timeEnd` should be epoch numbers in millisecond resolution.
|
||||
|
||||
`POST /api/annotations`
|
||||
|
||||
|
||||
**Example Request**:
|
||||
|
||||
@@ -72,7 +71,6 @@ Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and
|
||||
> The response for this HTTP request is slightly different in versions prior to v6.4. In prior versions you would
|
||||
also get an endId if you where creating a region. But in 6.4 regions are represented using a single event with time and
|
||||
timeEnd properties.
|
||||
|
||||
@@ -11,6 +11,27 @@ aliases = ["/docs/grafana/latest/http_api/authentication/"]
|
||||
|
||||
Currently you can authenticate via an `API Token` or via a `Session cookie` (acquired using regular login or OAuth).
|
||||
|
||||
## X-Grafana-Org-Id Header
|
||||
|
||||
**X-Grafana-Org-Id** is an optional property that specifies the organization to which the action is applied. If it is not set, the created key belongs to the current context org. Use this header in all requests except those regarding admin.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
POST /api/auth/keys HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
X-Grafana-Org-Id: 2
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Basic Auth
|
||||
|
||||
If basic auth is enabled (it is enabled by default), then you can authenticate your HTTP request via
|
||||
standard basic auth. Basic auth will also authenticate LDAP users.
|
||||
|
||||
curl example:
|
||||
```bash
|
||||
?curl http://admin:admin@localhost:3000/api/org
|
||||
|
||||
@@ -44,6 +44,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
- **message** - Set a commit message for the version history.
|
||||
- **refresh** - Set the dashboard refresh interval. If this is lower than [the minimum refresh interval]({{< relref "../administration/configuration.md#min_refresh_interval">}}), then Grafana will ignore it and will enforce the minimum refresh interval.
|
||||
|
||||
For adding or updating an alert rule for a dashboard panel the user should declare a
|
||||
`dashboard.panels.alert` block.
|
||||
|
||||
**Example Request for updating dashboard alert rule**:
|
||||
|
||||
@@ -45,17 +45,12 @@ Content-Type: application/json
|
||||
|
||||
## Get folder by uid
|
||||
|
||||
`GET /api/folders/:uid`
|
||||
|
||||
Will return the folder given the folder uid.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/folders/nErXDvCkzzh HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
`GET /api/folders/:uid`
|
||||
|
||||
Will return the folder given the folder uid.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/folders/nErXDvCkzzh HTTP/1.1
|
||||
Accept: application/json
|
||||
|
||||
@@ -1,11 +1,43 @@
|
||||
+++
|
||||
title = "Licensing HTTP API "
|
||||
description = "Grafana Licensing HTTP API"
|
||||
description = "Enterprise Licensing HTTP API"
|
||||
keywords = ["grafana", "http", "documentation", "api", "licensing", "enterprise"]
|
||||
aliases = ["/docs/grafana/latest/http_api/licensing/"]
|
||||
+++
|
||||
|
||||
> Licensing is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
# Enterprise License API
|
||||
|
||||
Licensing is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
## Check license availability
|
||||
|
||||
> **Note:** Available in Grafana Enterprise v7.4+.
|
||||
|
||||
`GET /api/licensing/check`
|
||||
|
||||
Checks if a valid license is available.
|
||||
|
||||
**Example request:**
|
||||
|
||||
```http
|
||||
GET /api/licensing/check
|
||||
Accept: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example response:**
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 4
|
||||
|
||||
```
|
||||
|
||||
Status codes:
|
||||
|
||||
- **200** - OK
|
||||
|
||||
## Manually force license refresh
|
||||
|
||||
> **Note:** Available in Grafana Enterprise v7.4+.
|
||||
|
||||
@@ -42,6 +42,7 @@ The `name` parameter returns a single team if the parameter matches the `name` f
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
Status Codes:
|
||||
|
||||
|
||||
@@ -298,9 +298,11 @@ Content-Type: application/json
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Basic YWRtaW46YWRtaW4=
|
||||
**Example Response**:
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -328,7 +330,7 @@ Content-Type: application/json
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Star a dashboard
|
||||
|
||||
`POST /api/user/stars/dashboard/:dashboardId`
|
||||
@@ -336,7 +338,7 @@ Changes the password for the user
|
||||
Stars the given Dashboard for the actual user.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
|
||||
```http
|
||||
POST /api/user/stars/dashboard/1 HTTP/1.1
|
||||
Accept: application/json
|
||||
@@ -415,7 +417,7 @@ Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
@@ -423,7 +425,7 @@ Return a list of all organizations of the current user.
|
||||
|
||||
```
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
Authorization: Basic YWRtaW46YWRtaW4=
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
@@ -16,6 +16,9 @@ This section discusses the hardware and software requirements as well as the pro
|
||||
- [Install on macOS]({{< relref "mac" >}})
|
||||
- [Install on Windows]({{< relref "windows" >}})
|
||||
- [Run Docker image]({{< relref "docker" >}})
|
||||
- [Deploy Grafana on Kubernetes]({{< relref "kubernetes" >}})
|
||||
|
||||
Refer to [Upgrade Grafana]({{< relref "upgrading.md" >}}) topic. If you need to restart Grafana, refer to the [Restart Grafana]({{< relref "Restart-grafana.md" >}})
|
||||
topic for detailed information.
|
||||
For upgrade instructions, refer to [Upgrade Grafana]({{< relref "upgrading.md" >}}).
|
||||
To restart Grafana, refer to [Restart Grafana]({{< relref "restart-grafana.md" >}}).
|
||||
|
||||
To install Grafana Enterprise, refer to the instructions for installing Grafana on your system. Then, refer to [Activate an Enterprise license]({{< relref "../enterprise/license/activate-license.md" >}}).
|
||||
|
||||
@@ -112,6 +112,20 @@ docker build \
|
||||
docker run -d -p 3000:3000 --name=grafana grafana-custom
|
||||
```
|
||||
|
||||
### Build with pre-installed plugins from other sources
|
||||
|
||||
You can build a Docker image with plugins from other sources by specifying the URL like this: `GF_INSTALL_PLUGINS=<url to plugin zip>;<plugin name>`.
|
||||
|
||||
```bash
|
||||
cd packaging/docker/custom
|
||||
docker build \
|
||||
--build-arg "GRAFANA_VERSION=latest" \
|
||||
--build-arg "GF_INSTALL_PLUGINS=http://plugin-domain.com/my-custom-plugin.zip;custom-plugin,grafana-clock-panel" \
|
||||
-t grafana-custom -f Dockerfile .
|
||||
|
||||
docker run -d -p 3000:3000 --name=grafana grafana-custom
|
||||
```
|
||||
|
||||
Replace `Dockerfile` in above example with `ubuntu.Dockerfile` to build a custom Ubuntu based image (Grafana v6.5+).
|
||||
|
||||
### Build with Grafana Image Renderer plugin pre-installed
|
||||
@@ -179,7 +193,7 @@ Version | User | User ID | Group | Group ID
|
||||
--------|---------|---------|---------|---------
|
||||
< 5.1 | grafana | 104 | grafana | 107
|
||||
\>= 5.1 | grafana | 472 | grafana | 472
|
||||
\>= 7.3 | grafana | 472 | root | 1
|
||||
\>= 7.3 | grafana | 472 | root | 0
|
||||
|
||||
There are two possible solutions to this problem. Either you start the new container as the root user and change ownership from `104` to `472`, or you start the upgraded container as user `104`.
|
||||
|
||||
@@ -227,4 +241,3 @@ Refer to [Configure a Grafana Docker image]({{< relref "../administration/config
|
||||
|
||||
Refer to the [Configuration]({{< relref "../administration/configuration.md" >}}) page for details on options for customizing your environment, logging, database, and so on.
|
||||
|
||||
|
||||
|
||||
241
docs/sources/installation/kubernetes.md
Normal file
241
docs/sources/installation/kubernetes.md
Normal file
@@ -0,0 +1,241 @@
|
||||
+++
|
||||
title = "Deploy Grafana on Kubernetes"
|
||||
description = "Guide for deploying Grafana on Kubernetes"
|
||||
keywords = ["grafana", "configuration", "documentation", "kubernetes"]
|
||||
weight = 700
|
||||
+++
|
||||
|
||||
## Deploy Grafana on Kubernetes
|
||||
|
||||
This page explains how to install and run Grafana on Kubernetes (K8S). It uses Kubernetes manifests for the setup. If you prefer Helm, refer to the [Grafana Helm community charts](https://github.com/grafana/helm-charts).
|
||||
|
||||
If you are interested in Grafana Enterprise (not Grafana OS), jump to [Deploy Grafana Enterprise on Kubernetes](#deploy-grafana-enterprise-on-kubernetes) section.
|
||||
|
||||
### Create Grafana Kubernetes manifest
|
||||
1. Create a file called `grafana.yaml`, then paste the contents below.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
name: grafana
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 472
|
||||
supplementalGroups:
|
||||
- 0
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:7.5.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http-grafana
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /robots.txt
|
||||
port: 3000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 3000
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
memory: 750Mi
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana-pv
|
||||
volumes:
|
||||
- name: grafana-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
ports:
|
||||
- port: 3000
|
||||
protocol: TCP
|
||||
targetPort: http-grafana
|
||||
selector:
|
||||
app: grafana
|
||||
sessionAffinity: None
|
||||
type: LoadBalancer
|
||||
```
|
||||
|
||||
|
||||
### Send manifest to Kubernetes API server
|
||||
|
||||
1. Run the following command:
|
||||
`kubectl apply -f grafana.yaml`
|
||||
|
||||
1. Check that it worked by running the following:
|
||||
`kubectl port-forward service/grafana 3000:3000`
|
||||
|
||||
1. Navigate to `localhost:3000` in your browser. You should see a Grafana login page.
|
||||
|
||||
1. Use `admin` for both the username and password to login.
|
||||
|
||||
## Deploy Grafana Enterprise on Kubernetes
|
||||
The process for deploying Grafana Enterprise is almost identical to the process above, except for some extra steps required to add in your license file. They are described in the following sections.
|
||||
|
||||
### Obtain Grafana Enterprise license
|
||||
To run Grafana Enterprise, you need a valid license. [Contact a Grafana Labs representative](https://grafana.com/contact?about=grafana-enterprise) to obtain the license. This topic assumes that you already have done this and have a `license.jwt` file. Your license should also be associated with a URL, which we will use later in the topic.
|
||||
|
||||
### Create License Secret
|
||||
Create a Kubernetes secret from your license file using the following command:
|
||||
```bash
|
||||
kubectl create secret generic ge-license --from-file=/path/to/your/license.jwt
|
||||
```
|
||||
|
||||
### Create Grafana Enterprise configuration
|
||||
Create a Grafana configuration file with the name `grafana.ini`. Then paste the content below.
|
||||
>**Note:** You will have to update the `root_url` field to the url associated with the license you were given.
|
||||
```yaml
|
||||
[enterprise]
|
||||
license_path = /etc/grafana/license/license.jwt
|
||||
[server]
|
||||
root_url =/your/license/root/url
|
||||
|
||||
```
|
||||
|
||||
### Create Configmap for Grafana Enterprise Config
|
||||
Create a Kubernetes Configmap from your `grafana.ini` file with the following command:
|
||||
```bash
|
||||
kubectl create configmap ge-config --from-file=/path/to/your/config.ini
|
||||
```
|
||||
### Create Grafana Enterprise Kubernetes manifest
|
||||
Create a `grafana.yaml` file, then paste the content below. This YAML is identical to the one for Grafana OS install except for the additional references to the Configmap which has your Grafana configuration file and the Secret that has your license.
|
||||
|
||||
```yaml
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: local-path
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
name: grafana
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
containers:
|
||||
- image: grafana/grafana-enterprise:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: grafana
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http-grafana
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /robots.txt
|
||||
port: 3000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
resources:
|
||||
limits:
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 2Gi
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana
|
||||
- mountPath: /etc/grafana
|
||||
name: ge-config
|
||||
- mountPath: /etc/grafana/license
|
||||
name: ge-license
|
||||
volumes:
|
||||
- name: grafana
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana
|
||||
- name: ge-config
|
||||
configMap:
|
||||
name: ge-config
|
||||
- name: ge-license
|
||||
secret:
|
||||
secretName: ge-license
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
ports:
|
||||
- port: 3000
|
||||
protocol: TCP
|
||||
targetPort: http-grafana
|
||||
selector:
|
||||
app: grafana
|
||||
sessionAffinity: None
|
||||
type: LoadBalancer
|
||||
```
|
||||
|
||||
1. Send manifest to Kubernetes API Server
|
||||
`kubectl apply -f grafana.yaml`
|
||||
|
||||
1. Check that it worked by running the following:
|
||||
`kubectl port-forward service/grafana 3000:3000`
|
||||
|
||||
1. Navigate to `localhost:3000` in your browser. You should see the Grafana login page.
|
||||
|
||||
1. Use `admin` for both the username and password to login.
|
||||
If it worked, you should see `Enterprise (Licensed)` at the bottom of the page.
|
||||
@@ -313,4 +313,10 @@ NOTE: Only snapshots created on Grafana 7.3 or later will use this column to sto
|
||||
|
||||
The Grafana Docker images use the `root` group instead of the `grafana` group. This change can cause builds to break for users who extend the Grafana Docker image. Learn more about this change in the [Docker migration instructions]({{< relref "docker/#migrate-to-v73-or-later">}})
|
||||
|
||||
## Upgrading to v7.5
|
||||
|
||||
### VictorOps Alert Notifier
|
||||
|
||||
The VictorOps alert notifier now accepts a `severity` tag, in a similar vein to the PagerDuty alert notifier. The possible values are outlined in the [VictorOps docs](https://help.victorops.com/knowledge-base/incident-fields-glossary/).
|
||||
|
||||
For example, if you want an alert to be `INFO`-level in VictorOps, create a tag `severity=info` (case-insensitive) in your alert.
|
||||
|
||||
@@ -36,7 +36,7 @@ Organization Admins can:
|
||||
|
||||
## Teams
|
||||
|
||||
Teams are groups of users within the same organization. Teams allow you to grant permissions for a group of users. They are most often used to manage [permissions for folders and dashboards]({{< relref "../permissions/dashboard_folder_permissions.md" >}}). Enterprise users can use them to apply [data source permissions]({{< relref "../enterprise/datasource_permissions.md" >}}).
|
||||
Teams are groups of users within the same organization. Teams allow you to grant permissions for a group of users. They are most often used to manage [permissions for folders and dashboards]({{< relref "../permissions/dashboard-folder-permissions.md" >}}). Enterprise users can use them to apply [data source permissions]({{< relref "../enterprise/datasource_permissions.md" >}}).
|
||||
|
||||
Teams are mostly managed by Organization Admins. However, if the Grafana server setting [editors_can_admin]({{< relref "../administration/configuration.md#editors_can_admin" >}}) is applied, then users who are assigned the Team Admin role can also manage teams in their organization and users assigned to their teams.
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ See the complete list of teams in your Grafana organization.
|
||||
Add a team to your Grafana organization.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-server-user-list.md" >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
1. Click **New Team**.
|
||||
1. Enter team information:
|
||||
- **Name -** Enter the name of the new team.
|
||||
@@ -46,7 +46,7 @@ Add a team to your Grafana organization.
|
||||
Add an existing user account to a team.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-server-user-list.md" >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
1. Click the name of the team that you want to add users to.
|
||||
1. Click **Add member**.
|
||||
1. In the **Add team member** list, click the user account that you want to add to the team. You can also type in the field to filter the list.
|
||||
@@ -61,7 +61,7 @@ Add an existing user account to a team.
|
||||
Remove a user account from the team.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-server-user-list.md" >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
1. Click the name of the team that you want to remove users from.
|
||||
1. Click the red **X** next to the name of the user that you want to remove from the team and then click **Delete**.
|
||||
{{< /docs/list >}}
|
||||
@@ -71,7 +71,7 @@ Remove a user account from the team.
|
||||
Change team member permission levels.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-server-user-list.md" >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
1. Click the name of the team in which you want to change user permissions.
|
||||
1. In the team member list, find and click the user account that you want to change. You can use the search field to filter the list if necessary.
|
||||
1. Click the **Permission** list, and then click the new user permission level.
|
||||
@@ -84,6 +84,6 @@ Change team member permission levels.
|
||||
Permanently delete the team and all special permissions assigned to it.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-server-user-list.md" >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
1. Click the red **X** next to the team that you want to delete and then click **Delete**.
|
||||
{{< /docs/list >}}
|
||||
|
||||
@@ -8,7 +8,7 @@ aliases =["/docs/grafana/latest/manage-users/add-or-remove-user/","/docs/grafana
|
||||
|
||||
This topic explains user management tasks performed by Grafana Server Admins.
|
||||
|
||||
In order to perform any of these tasks, you must be logged in to Grafana on an account with Grafana Server Admin permissions. For more information about Grafana Admin permissions, refer to [Grafana Server Admin role]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}})
|
||||
In order to perform any of these tasks, you must be logged in to Grafana on an account with Grafana Server Admin permissions. For more information about Grafana Admin permissions, refer to [Grafana Server Admin role]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}).
|
||||
|
||||
> **Note:** The Grafana Server Admin role does not exist in Grafana Cloud. Grafana Cloud users cannot perform tasks listed in this section.
|
||||
|
||||
@@ -27,7 +27,7 @@ Grafana displays all user accounts on the server, listed in alphabetical order b
|
||||
- **Server Admin status -** If the user account has **Grafana Admin** option set, then a shield icon is displayed.
|
||||
- **Account status -** If the account is disabled, then the **Disabled** label is displayed.
|
||||
|
||||

|
||||

|
||||
|
||||
## View user account details
|
||||
|
||||
|
||||
0
docs/sources/menu.yaml
Normal file
0
docs/sources/menu.yaml
Normal file
@@ -23,5 +23,4 @@ You can drag and drop panels by clicking and holding the panel title, then dragg
|
||||
- Click series name in the legend to hide series.
|
||||
- Ctrl/Shift/Meta + click legend name to hide other series.
|
||||
- Hover your cursor over a panel and press `e` to open the panel editor.
|
||||
- Hover your cursor over a panel and press `v` to open the panel in fullscreen view.
|
||||
|
||||
- Hover your cursor over a panel and press `v` to open the panel in full screen view.
|
||||
|
||||
@@ -14,7 +14,7 @@ Panels allow you to show your data in visual form. This topic walks you through
|
||||
|
||||

|
||||
|
||||
1. Click **Add new panel**.
|
||||
1. Click **Add an empty panel**.
|
||||
|
||||
Grafana creates an empty graph panel with your default data source selected.
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user