mirror of
https://github.com/grafana/grafana.git
synced 2026-01-08 21:22:59 +08:00
Compare commits
324 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4cafe613e1 | ||
|
|
eb30befb0f | ||
|
|
8cea14f8d1 | ||
|
|
83f8c366a1 | ||
|
|
85525e84a0 | ||
|
|
aac024732e | ||
|
|
839485a4b6 | ||
|
|
4ced7b959e | ||
|
|
9a3ed87c89 | ||
|
|
9ec26dc477 | ||
|
|
90a99a4719 | ||
|
|
3af9f2fa2e | ||
|
|
873b254249 | ||
|
|
4d3c28a5d5 | ||
|
|
0766f05408 | ||
|
|
b96a5eea1a | ||
|
|
4b2c823521 | ||
|
|
a6e58b7e3a | ||
|
|
13fc39def9 | ||
|
|
205421fbbf | ||
|
|
703308f31a | ||
|
|
3bcf117344 | ||
|
|
5ed397b8d2 | ||
|
|
a38d16cbf3 | ||
|
|
49ce88d84d | ||
|
|
2f33b1241c | ||
|
|
64747b8da8 | ||
|
|
bf0a07f7d2 | ||
|
|
30757ee92d | ||
|
|
44887a2519 | ||
|
|
964876d95c | ||
|
|
3903b62ea5 | ||
|
|
7660a65579 | ||
|
|
a93e236263 | ||
|
|
c8a022d109 | ||
|
|
d271d27829 | ||
|
|
17ba2a553b | ||
|
|
0f8e196b31 | ||
|
|
cd6044b5a5 | ||
|
|
a06f6bf074 | ||
|
|
398cb9fe55 | ||
|
|
782210ef98 | ||
|
|
89568408af | ||
|
|
43ec783fd7 | ||
|
|
adec7aba14 | ||
|
|
22e6d10e42 | ||
|
|
403438c53d | ||
|
|
1a0ee53cdb | ||
|
|
35e78a7721 | ||
|
|
efe529917a | ||
|
|
0fee11137e | ||
|
|
2bcbb2dfb3 | ||
|
|
00e27a3925 | ||
|
|
907ca6d81f | ||
|
|
7e25e7c14f | ||
|
|
fcfb01faeb | ||
|
|
b9df06ed3a | ||
|
|
a07ad8af45 | ||
|
|
708cda2052 | ||
|
|
4450276449 | ||
|
|
880bf3c550 | ||
|
|
aaf3abc468 | ||
|
|
f1cd74a5e9 | ||
|
|
c00e4668ab | ||
|
|
cf2e7779ec | ||
|
|
7e963a1110 | ||
|
|
7a0a6f7b29 | ||
|
|
29fc1213d3 | ||
|
|
3bee136ba6 | ||
|
|
eecedff435 | ||
|
|
edd5d8bd92 | ||
|
|
5e332cc55d | ||
|
|
5d078ba874 | ||
|
|
af255219a4 | ||
|
|
3158f15ce5 | ||
|
|
dfbd23ba7b | ||
|
|
5b5e175127 | ||
|
|
10965b7842 | ||
|
|
25d8d0a49d | ||
|
|
bc3ebce715 | ||
|
|
95af6176bf | ||
|
|
8ddab3893e | ||
|
|
2617226815 | ||
|
|
bebe1c243e | ||
|
|
77d1f996cc | ||
|
|
f7d66fd008 | ||
|
|
d7f27135db | ||
|
|
2ae8f2bbb1 | ||
|
|
94a794b315 | ||
|
|
711bfa8ae9 | ||
|
|
a022ca2333 | ||
|
|
1e780bdaac | ||
|
|
4377817b27 | ||
|
|
ba1e26796d | ||
|
|
50d614098a | ||
|
|
b288d6c805 | ||
|
|
270f7b2d9c | ||
|
|
57423746ce | ||
|
|
205874431c | ||
|
|
82cbff094a | ||
|
|
afc761746d | ||
|
|
61335700d3 | ||
|
|
b58fac8f07 | ||
|
|
5bc24bf018 | ||
|
|
4cca6e11da | ||
|
|
5212a7a47a | ||
|
|
1a3f892ddc | ||
|
|
d5e4a54271 | ||
|
|
b2918bf4d9 | ||
|
|
84f41f4fe8 | ||
|
|
bec2878fe4 | ||
|
|
b7d2911cac | ||
|
|
f944a0fe16 | ||
|
|
e68b468420 | ||
|
|
5ad4d91de3 | ||
|
|
659ce4bcad | ||
|
|
9d0e4efd9b | ||
|
|
14acf3e39f | ||
|
|
45e484132c | ||
|
|
f26e850297 | ||
|
|
6e03fe1f94 | ||
|
|
a31a0e898a | ||
|
|
1f39b05f33 | ||
|
|
865723d56e | ||
|
|
700fd45f54 | ||
|
|
be55f8800e | ||
|
|
b0646b1be3 | ||
|
|
e7f52218d1 | ||
|
|
87edde2b38 | ||
|
|
6ea6c611a9 | ||
|
|
e555fd5455 | ||
|
|
d17f59f052 | ||
|
|
1d1e81b309 | ||
|
|
d27bc6e788 | ||
|
|
47c777930d | ||
|
|
787940f32e | ||
|
|
cdf8bab022 | ||
|
|
c29c1691fd | ||
|
|
585b39ac0f | ||
|
|
37b6fc7067 | ||
|
|
2255628a5a | ||
|
|
bfb9c7f249 | ||
|
|
01628c4045 | ||
|
|
01411b5f45 | ||
|
|
4363f9af1f | ||
|
|
3734b455d7 | ||
|
|
dea7d4996a | ||
|
|
f443777309 | ||
|
|
69d1d4b124 | ||
|
|
9fc02d717f | ||
|
|
d98982bf02 | ||
|
|
1c10ae4106 | ||
|
|
884b573c0b | ||
|
|
6fd53a9b88 | ||
|
|
e6b5a6b227 | ||
|
|
17354bfbe6 | ||
|
|
f86e30f492 | ||
|
|
e85b839bc4 | ||
|
|
ec21ded065 | ||
|
|
7fb85157c9 | ||
|
|
90ec0128c1 | ||
|
|
bf25f13e54 | ||
|
|
efd6b24077 | ||
|
|
9bceb3e737 | ||
|
|
2b19fed282 | ||
|
|
b381e17521 | ||
|
|
eae91b6f50 | ||
|
|
4f036ad4db | ||
|
|
85c3713611 | ||
|
|
40d60834c2 | ||
|
|
f59e0ed914 | ||
|
|
563a9ab439 | ||
|
|
6edfc5f9b3 | ||
|
|
c70c590f39 | ||
|
|
1ae1bc213d | ||
|
|
62c6522b1b | ||
|
|
238c5bc7ee | ||
|
|
4991ca5f51 | ||
|
|
53f5c6a44c | ||
|
|
5407140306 | ||
|
|
787553ed31 | ||
|
|
0a66eb3a8a | ||
|
|
468735b7a2 | ||
|
|
eb1e411991 | ||
|
|
3afbc685fc | ||
|
|
129734d1f5 | ||
|
|
2443ddf518 | ||
|
|
dc3dc215d8 | ||
|
|
fe7e1292cb | ||
|
|
80b8629f58 | ||
|
|
0743f84f50 | ||
|
|
f1fe8a870b | ||
|
|
5a3e45dd6c | ||
|
|
bbdad0fb27 | ||
|
|
3384269133 | ||
|
|
2a35b4fcef | ||
|
|
d5e0ba2e43 | ||
|
|
f3c1c06753 | ||
|
|
4dec7e8387 | ||
|
|
f4566647bf | ||
|
|
50c883a346 | ||
|
|
077f4c3079 | ||
|
|
8789c6b2ae | ||
|
|
bd0ff79e28 | ||
|
|
e6728d1434 | ||
|
|
6cd56ee459 | ||
|
|
2d7625ac1b | ||
|
|
37c34c6d5b | ||
|
|
3179d548bb | ||
|
|
5b73b4e070 | ||
|
|
122f8b257d | ||
|
|
48e5624095 | ||
|
|
7c079483eb | ||
|
|
2932cc8ec8 | ||
|
|
c630e0ce4f | ||
|
|
1308e19197 | ||
|
|
a682943b24 | ||
|
|
fd83e14400 | ||
|
|
19a88b3e6f | ||
|
|
3d2fbcba2d | ||
|
|
e43e5c3c42 | ||
|
|
67fc8ecbe3 | ||
|
|
709b49fdc8 | ||
|
|
6fdb1d0440 | ||
|
|
f0f4348aa5 | ||
|
|
eeab540874 | ||
|
|
47c3f21c26 | ||
|
|
b00b61f565 | ||
|
|
f5c43af76a | ||
|
|
382600c9eb | ||
|
|
099e6ee22d | ||
|
|
3a04080972 | ||
|
|
16870af3e8 | ||
|
|
3af0331022 | ||
|
|
1edb8f0a5d | ||
|
|
18056a148c | ||
|
|
a7f0fb5052 | ||
|
|
32ce82b874 | ||
|
|
0a9406b26c | ||
|
|
527e5bb6f8 | ||
|
|
3e351914fd | ||
|
|
f5212e4d5a | ||
|
|
6c0652989f | ||
|
|
a5637bd2ac | ||
|
|
162466cad4 | ||
|
|
c897372237 | ||
|
|
843c1c71d9 | ||
|
|
8d60ca53c5 | ||
|
|
0aac670de0 | ||
|
|
57fa05501b | ||
|
|
232fdd195a | ||
|
|
e6d0f5367f | ||
|
|
82fc75cacc | ||
|
|
ef9779c4c3 | ||
|
|
bab2f84155 | ||
|
|
0ff1be7ccc | ||
|
|
3fda778e6d | ||
|
|
4c55c450c3 | ||
|
|
6c370d7d66 | ||
|
|
90316bedee | ||
|
|
7b67b1c961 | ||
|
|
ff8e53a347 | ||
|
|
1f1d599815 | ||
|
|
24411c633c | ||
|
|
5aef9ffb19 | ||
|
|
f8b27f44c0 | ||
|
|
82b20b7c43 | ||
|
|
daf7c5fe93 | ||
|
|
0680dff343 | ||
|
|
87dfe0a523 | ||
|
|
66b1f6722f | ||
|
|
bcff7ec68f | ||
|
|
66f9e505e7 | ||
|
|
da3c22d3be | ||
|
|
4697ef8b81 | ||
|
|
b07267f3e3 | ||
|
|
fb3d542562 | ||
|
|
62a3b5a94d | ||
|
|
dca648f034 | ||
|
|
8291389f6c | ||
|
|
3fdbc461f1 | ||
|
|
08ad99c36e | ||
|
|
c6a58003d1 | ||
|
|
eb666f12a7 | ||
|
|
4f21d4dabe | ||
|
|
836168eb13 | ||
|
|
c4da73ce4d | ||
|
|
d9eb80f7f5 | ||
|
|
6459fd73ed | ||
|
|
be7782032e | ||
|
|
206b447a37 | ||
|
|
32198a472f | ||
|
|
bfd38ece7e | ||
|
|
ce185ce6a3 | ||
|
|
cc9d96e1dc | ||
|
|
d18f53977f | ||
|
|
6295ce8149 | ||
|
|
63b7770220 | ||
|
|
6671367781 | ||
|
|
53313e4a2d | ||
|
|
6909246a7a | ||
|
|
ee54923bdd | ||
|
|
2b516126cf | ||
|
|
ae33b9fce9 | ||
|
|
8ff34fa36e | ||
|
|
36edcfe208 | ||
|
|
358db0d130 | ||
|
|
9e0acc9ece | ||
|
|
5a1fc33eb4 | ||
|
|
c5aaf9526e | ||
|
|
d20ac04120 | ||
|
|
1fe18694ad | ||
|
|
e37dde0036 | ||
|
|
60fcb87a6b | ||
|
|
6292749014 | ||
|
|
d7ba4dd293 | ||
|
|
a7ad5ee55f | ||
|
|
71a0ae7931 | ||
|
|
b4579334d4 | ||
|
|
e031568aa4 | ||
|
|
918f1d943a | ||
|
|
d0871959b6 | ||
|
|
0a90d1eeeb | ||
|
|
c52dae0296 |
@@ -1,249 +0,0 @@
|
||||
// BETTERER RESULTS V2.
|
||||
//
|
||||
// If this file contains merge conflicts, use `betterer merge` to automatically resolve them:
|
||||
// https://phenomnomnominal.github.io/betterer/docs/results-file/#merge
|
||||
//
|
||||
exports[`no enzyme tests`] = {
|
||||
value: `{
|
||||
"packages/grafana-ui/src/components/BarGauge/BarGauge.test.tsx:4199795290": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Forms/Legacy/Input/Input.test.tsx:3129955645": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Graph/Graph.test.tsx:1664091255": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Graph/GraphTooltip/MultiModeGraphTooltip.test.tsx:1865444105": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Logs/LogRowContextProvider.test.tsx:2719724375": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/QueryField/QueryField.test.tsx:375894800": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Typeahead/PartialHighlighter.test.tsx:1751923376": [
|
||||
[0, 31, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Typeahead/Typeahead.test.tsx:972524250": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/braces.test.tsx:1440546721": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:1085648664": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:446043290": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/suggestions.test.tsx:3654981205": [
|
||||
[0, 18, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/CanvasSpanGraph.test.js:1974748555": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/GraphTicks.test.js:940336852": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/Scrubber.test.js:4256741694": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/TickLabels.test.js:2931161174": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/ViewingLayer.test.js:1676554632": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/index.test.js:186764954": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/TracePageHeader.test.js:3242042907": [
|
||||
[14, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/TracePageSearchBar.test.js:1062402339": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/ListView/index.test.js:1734982398": [
|
||||
[14, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianKeyValues.test.js:2408389970": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianLogs.test.js:3960703835": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/AccordianReferences.test.js:2429764318": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/KeyValuesTable.test.js:3813002651": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetail/index.test.js:2816619357": [
|
||||
[16, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanDetailRow.test.js:2623922632": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/SpanTreeOffset.test.js:174536706": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/Ticks.test.js:743308415": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineCollapser.test.js:4018342820": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineColumnResizer.test.js:2286101708": [
|
||||
[15, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineHeaderRow.test.js:2106409544": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/TimelineHeaderRow/TimelineViewingLayer.test.js:1423129438": [
|
||||
[15, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/VirtualizedTraceView.test.js:551014442": [
|
||||
[13, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TraceTimelineViewer/index.test.js:381298544": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/common/NewWindowIcon.test.js:1750458349": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/common/UiFindInput.test.js:2207118020": [
|
||||
[14, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/url/ReferenceLink.test.js:3249503373": [
|
||||
[14, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/core/components/PageActionBar/PageActionBar.test.tsx:1251504193": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/core/components/QueryOperationRow/QueryOperationAction.test.tsx:3032694716": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx:3743889097": [
|
||||
[0, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/core/components/Select/MetricSelect.test.tsx:3351544014": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/alerting/AlertRuleList.test.tsx:2998938420": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/alerting/TestRuleResult.test.tsx:2358420489": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/api-keys/ApiKeysAddedModal.test.tsx:3246264379": [
|
||||
[0, 20, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/dashboard/components/DashboardRow/DashboardRow.test.tsx:1463123173": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/dashboard/components/ShareModal/ShareLink.test.tsx:2357087833": [
|
||||
[0, 35, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/dashboard/dashgrid/DashboardGrid.test.tsx:2723773538": [
|
||||
[0, 35, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.test.tsx:2851646279": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/datasources/DashboardsTable.test.tsx:1950355032": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/datasources/DataSourceDashboards.test.tsx:1369048021": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/datasources/DataSourcesListPage.test.tsx:2960099202": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/datasources/settings/BasicSettings.test.tsx:625016324": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/datasources/settings/ButtonRow.test.tsx:1422996720": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/dimensions/editors/ThresholdsEditor/ThresholdsEditor.test.tsx:4164297658": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/folders/FolderSettingsPage.test.tsx:1109052730": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/invites/InviteesTable.test.tsx:3612992381": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/org/OrgDetailsPage.test.tsx:3835042085": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/org/OrgProfile.test.tsx:623809345": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/teams/TeamList.test.tsx:854193970": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/teams/TeamMemberRow.test.tsx:1649328210": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/teams/TeamMembers.test.tsx:4089428239": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/teams/TeamPages.test.tsx:3990420214": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/teams/TeamSettings.test.tsx:2043271249": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/users/UsersListPage.test.tsx:2518052139": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/features/users/UsersTable.test.tsx:263958312": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/cloud-monitoring/components/Aggregation.test.tsx:3822406835": [
|
||||
[1, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/cloudwatch/components/ConfigEditor.test.tsx:227258837": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/cloudwatch/components/LogsQueryField.test.tsx:1501504663": [
|
||||
[2, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/elasticsearch/configuration/ConfigEditor.test.tsx:3481855642": [
|
||||
[0, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/elasticsearch/configuration/DataLinks.test.tsx:248699332": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/influxdb/components/ConfigEditor.test.tsx:57753101": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/components/LokiExploreQueryEditor.test.tsx:1488067923": [
|
||||
[0, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/components/LokiQueryEditor.test.tsx:146069464": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/configuration/ConfigEditor.test.tsx:3658171175": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/configuration/DebugSection.test.tsx:1551927716": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/configuration/DerivedField.test.tsx:3570129984": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/loki/configuration/DerivedFields.test.tsx:2402631398": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/datasource/prometheus/configuration/AzureCredentialsForm.test.tsx:3424320489": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"public/app/plugins/panel/bargauge/BarGaugePanel.test.tsx:1597135392": [
|
||||
[0, 31, 13, "RegExp match", "2409514259"]
|
||||
]
|
||||
}`
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
import { regexp } from '@betterer/regexp';
|
||||
|
||||
export default {
|
||||
'no enzyme tests': () => regexp(/from 'enzyme'/g).include('**/*.test.*'),
|
||||
};
|
||||
@@ -1,8 +1,8 @@
|
||||
[run]
|
||||
init_cmds = [
|
||||
["make", "gen-go"],
|
||||
["GO_BUILD_DEV=1", "make", "build-cli"],
|
||||
["GO_BUILD_DEV=1", "make", "build-server"],
|
||||
["go", "run", "build.go", "-dev", "build-cli"],
|
||||
["go", "run", "build.go", "-dev", "build-server"],
|
||||
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
watch_all = true
|
||||
@@ -13,10 +13,10 @@ watch_dirs = [
|
||||
"$WORKDIR/conf",
|
||||
]
|
||||
watch_exts = [".go", ".ini", ".toml", ".template.html"]
|
||||
ignore_files = ["wire_gen.go"]
|
||||
ignore_files = ["wire_gen.go"]
|
||||
build_delay = 1500
|
||||
cmds = [
|
||||
["make", "gen-go"],
|
||||
["GO_BUILD_DEV=1", "make", "build-server"],
|
||||
["go", "run", "build.go", "-dev", "build-server"],
|
||||
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
]
|
||||
|
||||
1414
.drone.yml
1414
.drone.yml
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,14 @@
|
||||
.git
|
||||
.github
|
||||
.yarn
|
||||
build
|
||||
node_modules
|
||||
compiled
|
||||
data
|
||||
deployment_tools_config.json
|
||||
build
|
||||
vendor
|
||||
devenv
|
||||
data
|
||||
dist
|
||||
e2e/tmp
|
||||
node_modules
|
||||
pkg
|
||||
public/lib/monaco
|
||||
scripts/grafana-server/tmp
|
||||
vendor
|
||||
public/lib/monaco
|
||||
deployment_tools_config.json
|
||||
|
||||
# TS generate from cue by cuetsy
|
||||
**/*.gen.ts
|
||||
@@ -20,6 +16,3 @@ vendor
|
||||
# Auto-generated localisation files
|
||||
public/locales/_build/
|
||||
public/locales/**/*.js
|
||||
|
||||
# Auto-generated icon file
|
||||
packages/grafana-ui/src/components/Icon/iconBundle.ts
|
||||
|
||||
18
.eslintrc
18
.eslintrc
@@ -1,24 +1,12 @@
|
||||
{
|
||||
"extends": ["@grafana/eslint-config"],
|
||||
"root": true,
|
||||
"plugins": ["@emotion", "lodash", "jest", "import"],
|
||||
"settings": {
|
||||
"import/internal-regex": "^(app/)|(@grafana)",
|
||||
"import/external-module-folders": ["node_modules", ".yarn"]
|
||||
},
|
||||
"plugins": ["no-only-tests", "@emotion", "lodash"],
|
||||
"rules": {
|
||||
"no-only-tests/no-only-tests": "error",
|
||||
"react/prop-types": "off",
|
||||
"@emotion/jsx-import": "error",
|
||||
"lodash/import-scope": [2, "member"],
|
||||
"jest/no-focused-tests": "error",
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"groups": [["builtin", "external"], "internal", "parent", "sibling", "index"],
|
||||
"newlines-between": "always",
|
||||
"alphabetize": { "order": "asc" }
|
||||
}
|
||||
]
|
||||
"lodash/import-scope": [2, "member"]
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
|
||||
34
.github/CODEOWNERS
vendored
34
.github/CODEOWNERS
vendored
@@ -28,7 +28,6 @@ go.sum @grafana/backend-platform
|
||||
.drone.yml @grafana/grafana-release-eng
|
||||
.drone.star @grafana/grafana-release-eng
|
||||
/scripts/drone/ @grafana/grafana-release-eng
|
||||
/pkg/build/ @grafana/grafana-release-eng
|
||||
|
||||
# Cloud Datasources backend code
|
||||
/pkg/tsdb/cloudwatch @grafana/cloud-datasources
|
||||
@@ -54,20 +53,12 @@ go.sum @grafana/backend-platform
|
||||
/pkg/services/sqlstore/migrations @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
*_mig.go @grafana/backend-platform @grafana/hosted-grafana-team
|
||||
|
||||
# Grafana edge
|
||||
# Grafana live
|
||||
/pkg/services/live/ @grafana/grafana-edge-squad
|
||||
/pkg/services/searchV2/ @grafana/grafana-edge-squad
|
||||
/pkg/services/store/ @grafana/grafana-edge-squad
|
||||
/pkg/services/export/ @grafana/grafana-edge-squad
|
||||
/pkg/infra/filestore/ @grafana/grafana-edge-squad
|
||||
pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
|
||||
|
||||
# Alerting
|
||||
/pkg/services/ngalert @grafana/alerting-squad-backend
|
||||
/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad-backend
|
||||
/pkg/services/alerting @grafana/alerting-squad-backend
|
||||
/pkg/tests/api/alerting @grafana/alerting-squad-backend
|
||||
/public/app/features/alerting @grafana/alerting-squad-frontend
|
||||
# Unified Alerting
|
||||
/pkg/services/ngalert @grafana/alerting-squad
|
||||
/pkg/services/sqlstore/migrations/ualert @grafana/alerting-squad
|
||||
|
||||
# Library Services
|
||||
/pkg/services/libraryelements @grafana/user-essentials
|
||||
@@ -105,13 +96,12 @@ pkg/tsdb/testdatasource/sims/ @grafana/grafana-edge-squad
|
||||
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
|
||||
/public/app/core/components/Layers @grafana/grafana-edge-squad
|
||||
/public/app/features/canvas/ @grafana/grafana-edge-squad
|
||||
/public/app/features/comments/ @grafana/grafana-edge-squad
|
||||
/public/app/features/dimensions/ @grafana/grafana-edge-squad
|
||||
/public/app/features/geo/ @grafana/grafana-edge-squad
|
||||
/public/app/features/live/ @grafana/grafana-edge-squad
|
||||
/public/app/features/explore/ @grafana/observability-experience-squad
|
||||
/public/app/features/plugins @grafana/plugins-platform-frontend
|
||||
/public/app/features/transformers/spatial @grafana/grafana-edge-squad
|
||||
/public/app/core/components/TransformersUI/spatial @grafana/grafana-edge-squad
|
||||
/public/app/plugins/panel/alertlist @grafana/alerting-squad
|
||||
/public/app/plugins/panel/barchart @grafana/grafana-bi-squad
|
||||
/public/app/plugins/panel/heatmap @grafana/grafana-bi-squad
|
||||
@@ -167,17 +157,3 @@ lerna.json @grafana/frontend-ops
|
||||
|
||||
# Cloud middleware
|
||||
/grafana-mixin/ @grafana/hosted-grafana-team
|
||||
|
||||
# Grafana authentication and authorization
|
||||
/pkg/services/accesscontrol @grafana/grafana-authnz-team
|
||||
/pkg/services/auth @grafana/grafana-authnz-team
|
||||
/pkg/services/dashboards/accesscontrol.go @grafana/grafana-authnz-team
|
||||
/pkg/services/datasources/permissions @grafana/grafana-authnz-team
|
||||
/pkg/services/datasources/permissions/accesscontrol.go @grafana/grafana-authnz-team
|
||||
/pkg/services/guardian @grafana/grafana-authnz-team
|
||||
/pkg/services/ldap @grafana/grafana-authnz-team
|
||||
/pkg/services/login @grafana/grafana-authnz-team
|
||||
/pkg/services/multildap @grafana/grafana-authnz-team
|
||||
/pkg/services/oauthtoken @grafana/grafana-authnz-team
|
||||
/pkg/services/teamguardian @grafana/grafana-authnz-team
|
||||
/pkg/services/serviceaccounts @grafana/grafana-authnz-team
|
||||
|
||||
43
.github/ISSUE_TEMPLATE/4-UX-design.yaml
vendored
43
.github/ISSUE_TEMPLATE/4-UX-design.yaml
vendored
@@ -1,43 +0,0 @@
|
||||
name: UX design issue
|
||||
description: Create an issue for delivering wireframes, mockups or other design solutions.
|
||||
title: "UX: "
|
||||
labels: ["type/ux"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: background
|
||||
attributes:
|
||||
label: "Background / Why we're doing this"
|
||||
description: Describe the problem and background of the issue. This could include research insights that inform the design changes, unmet user needs, or other usability issues.
|
||||
placeholder: Add UI improvements to make Grafana Alerting alert creation easier based on usability test results.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Is there existing research for this?
|
||||
description: Please link research results or insights in the Background section if you have any. If no research was conducted, you might want to consider usability testing your design later.
|
||||
options: [
|
||||
"Yes, I have linked it",
|
||||
"No research yet"
|
||||
]
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: problems-or-tasks
|
||||
attributes:
|
||||
label: Problems or tasks
|
||||
description: Describe problems the new design should solve or tasks the user needs to complete.
|
||||
placeholder:
|
||||
value: |
|
||||
- A problem we're trying to solve
|
||||
- A task the user needs to accomplish
|
||||
- …
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Deliverables
|
||||
description: Add a checklist of deliverables here. You can later add links to each deliverable.
|
||||
value: |
|
||||
- Figma mockup
|
||||
- Miro board
|
||||
- …
|
||||
70
.github/commands.json
vendored
70
.github/commands.json
vendored
@@ -90,14 +90,6 @@
|
||||
"url":"https://github.com/orgs/grafana/projects/97"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/CloudWatch Logs",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/97"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/GoogleCloudMonitoring",
|
||||
@@ -106,12 +98,20 @@
|
||||
"url":"https://github.com/orgs/grafana/projects/97"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"oss-observability",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/Prometheus",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/112"
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -119,23 +119,7 @@
|
||||
"name":"datasource/InfluxDB",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/112"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/Graphite",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/112"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/OpenTSDB",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/112"
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -143,7 +127,7 @@
|
||||
"name":"datasource/OpenSearch",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/110"
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -151,7 +135,7 @@
|
||||
"name":"datasource/Loki",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/110"
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -159,7 +143,7 @@
|
||||
"name":"datasource/Tempo",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/110"
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -167,23 +151,7 @@
|
||||
"name":"datasource/Elasticsearch",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/110"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/Jaeger",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/110"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type":"label",
|
||||
"name":"datasource/Zipkin",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/110"
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -191,7 +159,7 @@
|
||||
"name":"area/explore",
|
||||
"action":"addToProject",
|
||||
"addToProject":{
|
||||
"url":"https://github.com/orgs/grafana/projects/111"
|
||||
"url":"https://github.com/orgs/grafana/projects/54"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -209,13 +177,5 @@
|
||||
"removeFromProject":{
|
||||
"url":"https://github.com/grafana/grafana/projects/33"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "team/grafana-partners",
|
||||
"action": "addToProject",
|
||||
"addToProject": {
|
||||
"url": "https://github.com/orgs/grafana/projects/87"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
43
.github/pr-checks.json
vendored
43
.github/pr-checks.json
vendored
@@ -7,43 +7,12 @@
|
||||
"failure": "Milestone not set"
|
||||
},
|
||||
{
|
||||
"type": "check-label",
|
||||
"type": "check-backport",
|
||||
"title": "Backport Check",
|
||||
"labels": {
|
||||
"exists": "Backport enabled",
|
||||
"notExists": "Backport decision needed",
|
||||
"matches": [
|
||||
"backport v*"
|
||||
]
|
||||
},
|
||||
"skip": {
|
||||
"message": "Backport skipped",
|
||||
"matches": [
|
||||
"backport",
|
||||
"no-backport"
|
||||
]
|
||||
},
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#should-the-pull-request-be-backported"
|
||||
},
|
||||
{
|
||||
"type": "check-changelog",
|
||||
"title": "Changelog Check",
|
||||
"labels": {
|
||||
"exists": "Changelog enabled",
|
||||
"notExists": "Changelog decision needed",
|
||||
"matches": [
|
||||
"add to changelog"
|
||||
]
|
||||
},
|
||||
"breakingChangeLabels": [
|
||||
"breaking change"
|
||||
],
|
||||
"skip": {
|
||||
"message": "Changelog skipped",
|
||||
"matches": [
|
||||
"no-changelog"
|
||||
]
|
||||
},
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes"
|
||||
"backportEnabled": "Backport enabled",
|
||||
"backportSkipped": "Backport skipped",
|
||||
"failure": "Backport decision needed",
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#should-the-pull-request-be-backported",
|
||||
"skipLabels": [ "backport", "no-backport"]
|
||||
}
|
||||
]
|
||||
8
.github/pr-commands.json
vendored
8
.github/pr-commands.json
vendored
@@ -179,17 +179,11 @@
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/dashboard/templating"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": ["/pkg/services/ngalert/**/*", "/pkg/services/sqlstore/migrations/ualert/**/*", "/pkg/services/alerting/**/*", "/public/app/features/alerting/**/*", "/pkg/tests/api/alerting/**/*"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "area/alerting"
|
||||
},
|
||||
{
|
||||
"type": "author",
|
||||
"name": "pr/external",
|
||||
"notMemberOf": { "org": "grafana" },
|
||||
"ignoreList": ["renovate[bot]","dependabot[bot]"],
|
||||
"ignoreList": ["renovate[bot]"],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "pr/external"
|
||||
}
|
||||
|
||||
7
.github/renovate.json5
vendored
7
.github/renovate.json5
vendored
@@ -11,17 +11,13 @@
|
||||
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
|
||||
"@types/grafana__slate-react", // should be updated when the `slate` package is updated
|
||||
"@types/react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"commander", // we are planning to remove this, so no need to update it
|
||||
"d3",
|
||||
"d3-force", // we should bump this once we move to esm modules
|
||||
"d3-interpolate", // we should bump this once we move to esm modules
|
||||
"d3-scale-chromatic", // we should bump this once we move to esm modules
|
||||
"eslint", // wait until `eslint-plugin-react-hooks>4.2.0` is released
|
||||
"execa", // we should bump this once we move to esm modules
|
||||
"history", // we should bump this together with react-router-dom
|
||||
"@mdx-js/react", // storybook peer-depends on it's 1.x version, we should upgrade this when we upgrade storybook
|
||||
"monaco-editor", // due to us exposing this via @grafana/ui/CodeEditor's props bumping can break plugins
|
||||
"node-fetch", // we should bump this once we move to esm modules
|
||||
"react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins
|
||||
"react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"react-router-dom", // we should bump this together with history
|
||||
"slate",
|
||||
@@ -29,6 +25,7 @@
|
||||
"systemjs",
|
||||
"copy-webpack-plugin", // try to upgrade with newer yarn release. Not working with 3.1.1
|
||||
"ts-loader", // we should remove ts-loader and use babel-loader instead
|
||||
"typescript", // >4.5.x doesn't seem to work on windows with pnp currently. probably similar to https://github.com/yarnpkg/berry/issues/3722
|
||||
"ora" // we should bump this once we move to esm modules
|
||||
],
|
||||
"ignorePaths": ["packages/grafana-toolkit/package.json", "emails/**", "plugins-bundled/**", "**/mocks/**"],
|
||||
|
||||
47
.github/stale.yml
vendored
Normal file
47
.github/stale.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# General configuration
|
||||
# Label to use when marking as stale
|
||||
staleLabel: stale
|
||||
|
||||
# Pull request specific configuration
|
||||
pulls:
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 14
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 30
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This pull request has been automatically marked as stale because it has not had
|
||||
activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please
|
||||
feel free to give a status update now, ping for review, or re-open when it's ready.
|
||||
Thank you for your contributions!
|
||||
# Comment to post when closing a stale Issue or Pull Request.
|
||||
closeComment: >
|
||||
This pull request has been automatically closed because it has not had
|
||||
activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
|
||||
Thank you for your contributions!
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 1
|
||||
|
||||
exemptLabels:
|
||||
- help wanted
|
||||
- type/bug
|
||||
- type/feature-request
|
||||
- Epic
|
||||
- no stalebot
|
||||
|
||||
# Issue specific configuration
|
||||
issues:
|
||||
limitPerRun: 1
|
||||
daysUntilStale: 100000
|
||||
daysUntilClose: 100000
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had activity in the
|
||||
last 100 days. It will be closed in the next 100 days if no activity occurs.
|
||||
Thank you for your contributions.
|
||||
closeComment: >
|
||||
This issue has been automatically closed because it has not had activity in the
|
||||
last month and a half. If this issue is still valid, please ping a maintainer and ask them to check this again.
|
||||
Thank you for your contributions.
|
||||
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
8
.github/workflows/bump-version.yml
vendored
8
.github/workflows/bump-version.yml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
default: '7.x.x'
|
||||
default: '8.x.x'
|
||||
workflow_call:
|
||||
inputs:
|
||||
version_call:
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
example: 7.4.3 or 7.4.3-beta1"
|
||||
exit 1
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set intermedia variables
|
||||
id: intermedia
|
||||
@@ -69,12 +69,12 @@ jobs:
|
||||
exit 1
|
||||
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- uses: actions/setup-node@v3.2.0
|
||||
- uses: actions/setup-node@v2.5.1
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Install Actions
|
||||
|
||||
2
.github/workflows/close-milestone.yml
vendored
2
.github/workflows/close-milestone.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
name: Cloud data sources test code coverage
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'pkg/tsdb/azuremonitor/**'
|
||||
- 'pkg/tsdb/cloudwatch/**'
|
||||
- 'pkg/tsdb/cloudmonitoring/**'
|
||||
- 'public/app/plugins/datasource/grafana-azure-monitor-datasource/**'
|
||||
- 'public/app/plugins/datasource/cloudwatch/**'
|
||||
- 'public/app/plugins/datasource/cloud-monitoring/**'
|
||||
branches-ignore:
|
||||
- dependabot/**
|
||||
- backport-*
|
||||
|
||||
jobs:
|
||||
workflow-call:
|
||||
uses: grafana/code-coverage/.github/workflows/code-coverage.yml@v0.1.2
|
||||
27
.github/workflows/codeql-analysis.yml
vendored
27
.github/workflows/codeql-analysis.yml
vendored
@@ -8,12 +8,9 @@ name: "CodeQL"
|
||||
on:
|
||||
push:
|
||||
branches: [main, v1.8.x, v2.0.x, v2.1.x, v2.6.x, v3.0.x, v3.1.x, v4.0.x, v4.1.x, v4.2.x, v4.3.x, v4.4.x, v4.5.x, v4.6.x, v4.7.x, v5.0.x, v5.1.x, v5.2.x, v5.3.x, v5.4.x, v6.0.x, v6.1.x, v6.2.x, v6.3.x, v6.4.x, v6.5.x, v6.6.x, v6.7.x, v7.0.x, v7.1.x, v7.2.x]
|
||||
paths-ignore:
|
||||
- '**/*.cue'
|
||||
- '**/*.json'
|
||||
- '**/*.md'
|
||||
- '**/*.txt'
|
||||
- '**/*.yml'
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '0 4 * * 6'
|
||||
|
||||
@@ -33,7 +30,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
@@ -49,5 +46,21 @@ jobs:
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
5
.github/workflows/commands.yml
vendored
5
.github/workflows/commands.yml
vendored
@@ -4,14 +4,13 @@ on:
|
||||
types: [labeled, unlabeled]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
concurrency:
|
||||
group: issue-commands-${{ github.event.issue.number }}
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
working-directory: './pr'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
path: './pr'
|
||||
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
working-directory: './base'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
path: './base'
|
||||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
@@ -92,15 +92,15 @@ jobs:
|
||||
GITHUB_STEP_NUMBER: 7
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get built packages from pr
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: buildPr
|
||||
|
||||
- name: Get built packages from base
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: buildBase
|
||||
|
||||
@@ -112,7 +112,7 @@ jobs:
|
||||
|
||||
- name: Get link for the Github Action job
|
||||
id: job
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
with:
|
||||
script: |
|
||||
const script = require('./.github/workflows/scripts/pr-get-job-link.js')
|
||||
@@ -128,7 +128,7 @@ jobs:
|
||||
- name: Persisting the check output
|
||||
run: |
|
||||
mkdir -p ./levitate
|
||||
echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\", \"pr_number\": \"${{ github.event.pull_request.number }}\" }" > ./levitate/result.json
|
||||
echo "{ \"exit_code\": ${{ steps.breaking-changes.outputs.is_breaking }}, \"message\": \"${{ steps.breaking-changes.outputs.message }}\", \"job_link\": \"${{ steps.job.outputs.link }}#step:${GITHUB_STEP_NUMBER}:1\" }" > ./levitate/result.json
|
||||
|
||||
- name: Upload check output as artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
|
||||
@@ -14,10 +14,10 @@ jobs:
|
||||
ARTIFACT_NAME: 'levitate'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: 'Download artifact'
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
RUN_ID: ${{ github.event.workflow_run.id }}
|
||||
with:
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
run: unzip "${ARTIFACT_FOLDER}/${ARTIFACT_NAME}.zip" -d "${ARTIFACT_FOLDER}"
|
||||
|
||||
- name: Parsing levitate result
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
id: levitate-run
|
||||
with:
|
||||
script: |
|
||||
@@ -61,9 +61,9 @@ jobs:
|
||||
const script = require('./.github/workflows/scripts/json-file-to-job-output.js');
|
||||
await script({ core, filePath });
|
||||
|
||||
- name: Check if "levitate breaking change" label exists
|
||||
- name: Check if "breaking change" label exists
|
||||
id: does-label-exist
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
with:
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
repo: context.repo.repo,
|
||||
});
|
||||
const labels = data.map(({ name }) => name);
|
||||
const doesExist = labels.includes('levitate breaking change');
|
||||
const doesExist = labels.includes('breaking change');
|
||||
|
||||
return doesExist ? 1 : 0;
|
||||
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
number: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
number: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
message: |
|
||||
⚠️ **Possible breaking changes**
|
||||
|
||||
@@ -90,72 +90,52 @@ jobs:
|
||||
|
||||
${{ steps.levitate-run.outputs.message }}
|
||||
|
||||
[Console output](${{ steps.levitate-run.outputs.job_link }})
|
||||
[Read our guideline](https://github.com/grafana/grafana/blob/main/contribute/breaking-changes-guide.md)
|
||||
[Check console output](${{ steps.levitate-run.outputs.job_link }})
|
||||
|
||||
- name: Remove comment on PR
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
number: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
number: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
delete: true
|
||||
|
||||
# Posts a notification to Slack if a PR has a breaking change and it did not have a breaking change before
|
||||
- name: Post to Slack
|
||||
id: slack
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
|
||||
uses: slackapi/slack-github-action@v1.18.0
|
||||
with:
|
||||
payload: |
|
||||
{
|
||||
"pr_link": "https://github.com/grafana/grafana/pull/${{ steps.levitate-run.outputs.pr_number }}",
|
||||
"pr_number": "${{ steps.levitate-run.outputs.pr_number }}",
|
||||
"job_link": "${{ steps.levitate-run.outputs.job_link }}",
|
||||
"reporting_job_link": "${{ github.event.workflow_run.html_url }}",
|
||||
"message": "${{ steps.levitate-run.outputs.message }}"
|
||||
}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }}
|
||||
|
||||
- name: Add "levitate breaking change" label
|
||||
- name: Add "breaking change" label
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
script: |
|
||||
await github.rest.issues.addLabels({
|
||||
issue_number: process.env.PR_NUMBER,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['levitate breaking change']
|
||||
labels: ['breaking change']
|
||||
})
|
||||
|
||||
- name: Remove "levitate breaking change" label
|
||||
- name: Remove "breaking change" label
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 0 && steps.does-label-exist.outputs.result == 1 }}
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
script: |
|
||||
await github.rest.issues.removeLabel({
|
||||
issue_number: process.env.PR_NUMBER,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: 'levitate breaking change'
|
||||
name: 'breaking change'
|
||||
})
|
||||
|
||||
# This is very weird, the actual request goes through (comes back with a 201), but does not assign the team.
|
||||
# Related issue: https://github.com/renovatebot/renovate/issues/1908
|
||||
- name: Add "grafana/plugins-platform-frontend" as a reviewer
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 1 }}
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
script: |
|
||||
await github.rest.pulls.requestReviewers({
|
||||
pull_number: process.env.PR_NUMBER,
|
||||
@@ -167,11 +147,10 @@ jobs:
|
||||
|
||||
- name: Remove "grafana/plugins-platform-frontend" from the list of reviewers
|
||||
if: ${{ steps.levitate-run.outputs.exit_code == 0 }}
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v5
|
||||
env:
|
||||
PR_NUMBER: ${{ steps.levitate-run.outputs.pr_number }}
|
||||
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
|
||||
with:
|
||||
github-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
script: |
|
||||
await github.rest.pulls.removeRequestedReviewers({
|
||||
pull_number: process.env.PR_NUMBER,
|
||||
|
||||
26
.github/workflows/enterprise-pr-check.yml
vendored
26
.github/workflows/enterprise-pr-check.yml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Enterprise PR check
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 'v[0-9]+.[0-9]+.x'
|
||||
jobs:
|
||||
dispatch:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Repository Dispatch
|
||||
uses: ./actions/repository-dispatch
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
repository: grafana/grafana-enterprise
|
||||
event_type: oss-pull-request
|
||||
client_payload:
|
||||
'{"source_branch": "${{ github.head_ref }}", "target_branch": "${{ github.base_ref }}", "pr_number": "${{ github.event.number }}"}'
|
||||
2
.github/workflows/github-release.yml
vendored
2
.github/workflows/github-release.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
2
.github/workflows/metrics-collector.yml
vendored
2
.github/workflows/metrics-collector.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
8
.github/workflows/pr-checks.yml
vendored
8
.github/workflows/pr-checks.yml
vendored
@@ -5,23 +5,21 @@ on:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
- ready_for_review
|
||||
- labeled
|
||||
- unlabeled
|
||||
- edited
|
||||
issues:
|
||||
types:
|
||||
- milestoned
|
||||
- demilestoned
|
||||
concurrency:
|
||||
group: pr-checks-${{ github.event.number }}
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.draft == false
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
29
.github/workflows/pr-codeql-analysis-go.yml
vendored
29
.github/workflows/pr-codeql-analysis-go.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: "CodeQL for PR / go"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '**/*.go'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "go"
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -1,31 +0,0 @@
|
||||
name: "CodeQL for PR / javascript"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '**/*.js'
|
||||
- '**/*.ts'
|
||||
- '**/*.tsx'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "javascript"
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
29
.github/workflows/pr-codeql-analysis-python.yml
vendored
29
.github/workflows/pr-codeql-analysis-python.yml
vendored
@@ -1,29 +0,0 @@
|
||||
name: "CodeQL for PR / python"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '**/*.py'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: "python"
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
3
.github/workflows/pr-commands-closed.yml
vendored
3
.github/workflows/pr-commands-closed.yml
vendored
@@ -3,8 +3,7 @@ on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
concurrency:
|
||||
group: pr-commands-closed-${{ github.event.number }}
|
||||
|
||||
jobs:
|
||||
close_job:
|
||||
# this job will only run if the PR has been closed without being merged
|
||||
|
||||
5
.github/workflows/pr-commands.yml
vendored
5
.github/workflows/pr-commands.yml
vendored
@@ -4,14 +4,13 @@ on:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
concurrency:
|
||||
group: pr-commands-${{ github.event.number }}
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
10
.github/workflows/publish.yml
vendored
10
.github/workflows/publish.yml
vendored
@@ -3,7 +3,7 @@ name: publish_docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v8.4.x
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
- 'packages/grafana-*/**'
|
||||
@@ -14,13 +14,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v1
|
||||
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
|
||||
- name: generate-packages-docs
|
||||
uses: actions/setup-node@v3.2.0
|
||||
uses: actions/setup-node@v2.5.1
|
||||
id: generate-docs
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '14'
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
host: github.com
|
||||
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
||||
source_folder: docs/sources
|
||||
target_folder: content/docs/grafana/next
|
||||
target_folder: content/docs/grafana/latest
|
||||
allow_no_changes: 'true'
|
||||
- shell: bash
|
||||
run: |
|
||||
|
||||
2
.github/workflows/remove-milestone.yml
vendored
2
.github/workflows/remove-milestone.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
33
.github/workflows/stale.yml
vendored
33
.github/workflows/stale.yml
vendored
@@ -1,33 +0,0 @@
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v5
|
||||
with:
|
||||
repo-token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to -1 to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
days-before-close: 14
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
days-before-stale: 30
|
||||
# We don't want any Issues to be marked as stale for now.
|
||||
days-before-issue-stale: -1
|
||||
exempt-issue-labels: no stalebot
|
||||
exempt-pr-labels: no stalebot
|
||||
operations-per-run: 500
|
||||
stale-issue-label: stale
|
||||
stale-pr-label: stale
|
||||
stale-pr-message: >
|
||||
This pull request has been automatically marked as stale because it has not had
|
||||
activity in the last 30 days. It will be closed in 2 weeks if no further activity occurs. Please
|
||||
feel free to give a status update now, ping for review, or re-open when it's ready.
|
||||
Thank you for your contributions!
|
||||
close-pr-message: >
|
||||
This pull request has been automatically closed because it has not had
|
||||
activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready.
|
||||
Thank you for your contributions!
|
||||
2
.github/workflows/update-changelog.yml
vendored
2
.github/workflows/update-changelog.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,6 +7,7 @@ awsconfig
|
||||
/.awcache
|
||||
/dist
|
||||
/public/build
|
||||
public/dist/tsconfig.tsbuildinfo
|
||||
/public/views/index.html
|
||||
/public/views/error.html
|
||||
/emails/dist
|
||||
@@ -16,7 +17,6 @@ awsconfig
|
||||
vendor/
|
||||
/docs/menu.yaml
|
||||
/requests
|
||||
tsconfig.tsbuildinfo
|
||||
|
||||
# Yarn
|
||||
.yarn/*
|
||||
@@ -39,7 +39,6 @@ tsconfig.tsbuildinfo
|
||||
|
||||
# Enterprise devenv
|
||||
/devenv/docker/blocks/grafana-enterprise
|
||||
/devenv/docker/blocks/saml-enterprise
|
||||
|
||||
/tmp
|
||||
tools/phantomjs/phantomjs
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Ignore husky hooks if no frontend code has been changed
|
||||
git diff --cached --name-only | grep -v --quiet "^pkg/" || exit 0
|
||||
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn run precommit
|
||||
|
||||
@@ -1,27 +1,14 @@
|
||||
.git
|
||||
.github
|
||||
.yarn
|
||||
build
|
||||
compiled
|
||||
data
|
||||
deployment_tools_config.json
|
||||
devenv
|
||||
dist
|
||||
e2e/tmp
|
||||
dist/
|
||||
pkg/
|
||||
node_modules
|
||||
pkg
|
||||
public/lib/monaco
|
||||
public/sass/*.generated.scss
|
||||
public/vendor/
|
||||
vendor/
|
||||
/data/
|
||||
e2e/tmp
|
||||
scripts/grafana-server/tmp
|
||||
vendor
|
||||
|
||||
# TS generate from cue by cuetsy
|
||||
**/*.gen.ts
|
||||
|
||||
# Auto-generated localisation files
|
||||
public/locales/_build/
|
||||
public/locales/**/*.js
|
||||
|
||||
# Auto-generated theme files
|
||||
theme.light.generated.json
|
||||
theme.dark.generated.json
|
||||
public/build/
|
||||
public/sass/*.generated.scss
|
||||
devenv/
|
||||
public/lib/monaco
|
||||
|
||||
4
.vscode/launch.json
vendored
4
.vscode/launch.json
vendored
@@ -8,15 +8,13 @@
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana-server/",
|
||||
"env": {},
|
||||
"cwd": "${workspaceFolder}",
|
||||
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
{
|
||||
"name": "Debug Jest test",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"runtimeExecutable": "yarn",
|
||||
"runtimeArgs": ["run", "jest", "--runInBand", "${file}"],
|
||||
"runtimeArgs": ["--inspect-brk", "${workspaceRoot}/node_modules/.bin/jest", "--runInBand", "${file}"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen",
|
||||
"port": 9229
|
||||
|
||||
768
.yarn/releases/yarn-3.1.1.cjs
vendored
Executable file
768
.yarn/releases/yarn-3.1.1.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
786
.yarn/releases/yarn-3.2.1.cjs
vendored
786
.yarn/releases/yarn-3.2.1.cjs
vendored
File diff suppressed because one or more lines are too long
2
.yarn/sdks/eslint/package.json
vendored
2
.yarn/sdks/eslint/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eslint",
|
||||
"version": "8.11.0-sdk",
|
||||
"version": "7.28.0-sdk",
|
||||
"main": "./lib/api.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
2
.yarn/sdks/prettier/package.json
vendored
2
.yarn/sdks/prettier/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "prettier",
|
||||
"version": "2.6.0-sdk",
|
||||
"version": "2.2.1-sdk",
|
||||
"main": "./index.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
20
.yarn/sdks/stylelint/bin/stylelint.js
vendored
Executable file
20
.yarn/sdks/stylelint/bin/stylelint.js
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const {existsSync} = require(`fs`);
|
||||
const {createRequire, createRequireFromPath} = require(`module`);
|
||||
const {resolve} = require(`path`);
|
||||
|
||||
const relPnpApiPath = "../../../../.pnp.cjs";
|
||||
|
||||
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
||||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
|
||||
|
||||
if (existsSync(absPnpApiPath)) {
|
||||
if (!process.versions.pnp) {
|
||||
// Setup the environment to be able to require stylelint/bin/stylelint.js
|
||||
require(absPnpApiPath).setup();
|
||||
}
|
||||
}
|
||||
|
||||
// Defer to the real stylelint/bin/stylelint.js your application uses
|
||||
module.exports = absRequire(`stylelint/bin/stylelint.js`);
|
||||
20
.yarn/sdks/stylelint/lib/index.js
vendored
Normal file
20
.yarn/sdks/stylelint/lib/index.js
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const {existsSync} = require(`fs`);
|
||||
const {createRequire, createRequireFromPath} = require(`module`);
|
||||
const {resolve} = require(`path`);
|
||||
|
||||
const relPnpApiPath = "../../../../.pnp.cjs";
|
||||
|
||||
const absPnpApiPath = resolve(__dirname, relPnpApiPath);
|
||||
const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath);
|
||||
|
||||
if (existsSync(absPnpApiPath)) {
|
||||
if (!process.versions.pnp) {
|
||||
// Setup the environment to be able to require stylelint/lib/index.js
|
||||
require(absPnpApiPath).setup();
|
||||
}
|
||||
}
|
||||
|
||||
// Defer to the real stylelint/lib/index.js your application uses
|
||||
module.exports = absRequire(`stylelint/lib/index.js`);
|
||||
6
.yarn/sdks/stylelint/package.json
vendored
Normal file
6
.yarn/sdks/stylelint/package.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "stylelint",
|
||||
"version": "14.0.1-sdk",
|
||||
"main": "lib/index.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
50
.yarn/sdks/typescript/lib/tsserver.js
vendored
50
.yarn/sdks/typescript/lib/tsserver.js
vendored
@@ -18,7 +18,6 @@ const moduleWrapper = tsserver => {
|
||||
const pnpApi = require(`pnpapi`);
|
||||
|
||||
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
|
||||
const isPortal = str => str.startsWith("portal:/");
|
||||
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
|
||||
|
||||
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
|
||||
@@ -45,7 +44,7 @@ const moduleWrapper = tsserver => {
|
||||
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
|
||||
if (resolved) {
|
||||
const locator = pnpApi.findPackageLocator(resolved);
|
||||
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
|
||||
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
|
||||
str = resolved;
|
||||
}
|
||||
}
|
||||
@@ -61,24 +60,16 @@ const moduleWrapper = tsserver => {
|
||||
//
|
||||
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
|
||||
//
|
||||
// Update 2021-10-08: VSCode changed their format in 1.61.
|
||||
// Update Oct 8 2021: VSCode changed their format in 1.61.
|
||||
// Before | ^zip:/c:/foo/bar.zip/package.json
|
||||
// After | ^/zip//c:/foo/bar.zip/package.json
|
||||
//
|
||||
// Update 2022-04-06: VSCode changed the format in 1.66.
|
||||
// Before | ^/zip//c:/foo/bar.zip/package.json
|
||||
// After | ^/zip/c:/foo/bar.zip/package.json
|
||||
//
|
||||
case `vscode <1.61`: {
|
||||
str = `^zip:${str}`;
|
||||
} break;
|
||||
|
||||
case `vscode <1.66`: {
|
||||
str = `^/zip/${str}`;
|
||||
} break;
|
||||
|
||||
case `vscode`: {
|
||||
str = `^/zip${str}`;
|
||||
str = `^/zip/${str}`;
|
||||
} break;
|
||||
|
||||
// To make "go to definition" work,
|
||||
@@ -94,7 +85,7 @@ const moduleWrapper = tsserver => {
|
||||
// everything else is up to neovim
|
||||
case `neovim`: {
|
||||
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
|
||||
str = `zipfile://${str}`;
|
||||
str = `zipfile:${str}`;
|
||||
} break;
|
||||
|
||||
default: {
|
||||
@@ -109,7 +100,8 @@ const moduleWrapper = tsserver => {
|
||||
|
||||
function fromEditorPath(str) {
|
||||
switch (hostInfo) {
|
||||
case `coc-nvim`: {
|
||||
case `coc-nvim`:
|
||||
case `neovim`: {
|
||||
str = str.replace(/\.zip::/, `.zip/`);
|
||||
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
|
||||
// So in order to convert it back, we use .* to match all the thing
|
||||
@@ -119,12 +111,6 @@ const moduleWrapper = tsserver => {
|
||||
: str.replace(/^.*zipfile:/, ``);
|
||||
} break;
|
||||
|
||||
case `neovim`: {
|
||||
str = str.replace(/\.zip::/, `.zip/`);
|
||||
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
|
||||
return str.replace(/^zipfile:\/\//, ``);
|
||||
} break;
|
||||
|
||||
case `vscode`:
|
||||
default: {
|
||||
return process.platform === `win32`
|
||||
@@ -157,9 +143,8 @@ const moduleWrapper = tsserver => {
|
||||
let hostInfo = `unknown`;
|
||||
|
||||
Object.assign(Session.prototype, {
|
||||
onMessage(/** @type {string | object} */ message) {
|
||||
const isStringMessage = typeof message === 'string';
|
||||
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
|
||||
onMessage(/** @type {string} */ message) {
|
||||
const parsedMessage = JSON.parse(message)
|
||||
|
||||
if (
|
||||
parsedMessage != null &&
|
||||
@@ -168,23 +153,14 @@ const moduleWrapper = tsserver => {
|
||||
typeof parsedMessage.arguments.hostInfo === `string`
|
||||
) {
|
||||
hostInfo = parsedMessage.arguments.hostInfo;
|
||||
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
|
||||
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
|
||||
hostInfo += ` <1.61`;
|
||||
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
|
||||
hostInfo += ` <1.66`;
|
||||
}
|
||||
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
|
||||
hostInfo += ` <1.61`;
|
||||
}
|
||||
}
|
||||
|
||||
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
|
||||
return typeof value === 'string' ? fromEditorPath(value) : value;
|
||||
});
|
||||
|
||||
return originalOnMessage.call(
|
||||
this,
|
||||
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
|
||||
);
|
||||
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
|
||||
return typeof value === `string` ? fromEditorPath(value) : value;
|
||||
}));
|
||||
},
|
||||
|
||||
send(/** @type {any} */ msg) {
|
||||
|
||||
50
.yarn/sdks/typescript/lib/tsserverlibrary.js
vendored
50
.yarn/sdks/typescript/lib/tsserverlibrary.js
vendored
@@ -18,7 +18,6 @@ const moduleWrapper = tsserver => {
|
||||
const pnpApi = require(`pnpapi`);
|
||||
|
||||
const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//);
|
||||
const isPortal = str => str.startsWith("portal:/");
|
||||
const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`);
|
||||
|
||||
const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => {
|
||||
@@ -45,7 +44,7 @@ const moduleWrapper = tsserver => {
|
||||
const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str;
|
||||
if (resolved) {
|
||||
const locator = pnpApi.findPackageLocator(resolved);
|
||||
if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) {
|
||||
if (locator && dependencyTreeRoots.has(`${locator.name}@${locator.reference}`)) {
|
||||
str = resolved;
|
||||
}
|
||||
}
|
||||
@@ -61,24 +60,16 @@ const moduleWrapper = tsserver => {
|
||||
//
|
||||
// Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910
|
||||
//
|
||||
// Update 2021-10-08: VSCode changed their format in 1.61.
|
||||
// Update Oct 8 2021: VSCode changed their format in 1.61.
|
||||
// Before | ^zip:/c:/foo/bar.zip/package.json
|
||||
// After | ^/zip//c:/foo/bar.zip/package.json
|
||||
//
|
||||
// Update 2022-04-06: VSCode changed the format in 1.66.
|
||||
// Before | ^/zip//c:/foo/bar.zip/package.json
|
||||
// After | ^/zip/c:/foo/bar.zip/package.json
|
||||
//
|
||||
case `vscode <1.61`: {
|
||||
str = `^zip:${str}`;
|
||||
} break;
|
||||
|
||||
case `vscode <1.66`: {
|
||||
str = `^/zip/${str}`;
|
||||
} break;
|
||||
|
||||
case `vscode`: {
|
||||
str = `^/zip${str}`;
|
||||
str = `^/zip/${str}`;
|
||||
} break;
|
||||
|
||||
// To make "go to definition" work,
|
||||
@@ -94,7 +85,7 @@ const moduleWrapper = tsserver => {
|
||||
// everything else is up to neovim
|
||||
case `neovim`: {
|
||||
str = normalize(resolved).replace(/\.zip\//, `.zip::`);
|
||||
str = `zipfile://${str}`;
|
||||
str = `zipfile:${str}`;
|
||||
} break;
|
||||
|
||||
default: {
|
||||
@@ -109,7 +100,8 @@ const moduleWrapper = tsserver => {
|
||||
|
||||
function fromEditorPath(str) {
|
||||
switch (hostInfo) {
|
||||
case `coc-nvim`: {
|
||||
case `coc-nvim`:
|
||||
case `neovim`: {
|
||||
str = str.replace(/\.zip::/, `.zip/`);
|
||||
// The path for coc-nvim is in format of /<pwd>/zipfile:/<pwd>/.yarn/...
|
||||
// So in order to convert it back, we use .* to match all the thing
|
||||
@@ -119,12 +111,6 @@ const moduleWrapper = tsserver => {
|
||||
: str.replace(/^.*zipfile:/, ``);
|
||||
} break;
|
||||
|
||||
case `neovim`: {
|
||||
str = str.replace(/\.zip::/, `.zip/`);
|
||||
// The path for neovim is in format of zipfile:///<pwd>/.yarn/...
|
||||
return str.replace(/^zipfile:\/\//, ``);
|
||||
} break;
|
||||
|
||||
case `vscode`:
|
||||
default: {
|
||||
return process.platform === `win32`
|
||||
@@ -157,9 +143,8 @@ const moduleWrapper = tsserver => {
|
||||
let hostInfo = `unknown`;
|
||||
|
||||
Object.assign(Session.prototype, {
|
||||
onMessage(/** @type {string | object} */ message) {
|
||||
const isStringMessage = typeof message === 'string';
|
||||
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
|
||||
onMessage(/** @type {string} */ message) {
|
||||
const parsedMessage = JSON.parse(message)
|
||||
|
||||
if (
|
||||
parsedMessage != null &&
|
||||
@@ -168,23 +153,14 @@ const moduleWrapper = tsserver => {
|
||||
typeof parsedMessage.arguments.hostInfo === `string`
|
||||
) {
|
||||
hostInfo = parsedMessage.arguments.hostInfo;
|
||||
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) {
|
||||
if (/(\/|-)1\.([1-5][0-9]|60)\./.test(process.env.VSCODE_IPC_HOOK)) {
|
||||
hostInfo += ` <1.61`;
|
||||
} else if (/(\/|-)1\.(6[1-5])\./.test(process.env.VSCODE_IPC_HOOK)) {
|
||||
hostInfo += ` <1.66`;
|
||||
}
|
||||
if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK && process.env.VSCODE_IPC_HOOK.match(/Code\/1\.([1-5][0-9]|60)\./)) {
|
||||
hostInfo += ` <1.61`;
|
||||
}
|
||||
}
|
||||
|
||||
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
|
||||
return typeof value === 'string' ? fromEditorPath(value) : value;
|
||||
});
|
||||
|
||||
return originalOnMessage.call(
|
||||
this,
|
||||
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
|
||||
);
|
||||
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
|
||||
return typeof value === `string` ? fromEditorPath(value) : value;
|
||||
}));
|
||||
},
|
||||
|
||||
send(/** @type {any} */ msg) {
|
||||
|
||||
2
.yarn/sdks/typescript/package.json
vendored
2
.yarn/sdks/typescript/package.json
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "typescript",
|
||||
"version": "4.6.4-sdk",
|
||||
"version": "4.4.4-sdk",
|
||||
"main": "./lib/typescript.js",
|
||||
"type": "commonjs"
|
||||
}
|
||||
|
||||
34
.yarnrc.yml
34
.yarnrc.yml
@@ -9,32 +9,32 @@ packageExtensions:
|
||||
"@mdx-js/loader@1.6.22":
|
||||
peerDependencies:
|
||||
react: 17.0.1
|
||||
"@storybook/addon-docs@6.4.21":
|
||||
"@storybook/addon-docs@6.4.15":
|
||||
peerDependencies:
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/addon-essentials@6.4.21":
|
||||
"@storybook/manager-webpack5": 6.4.15
|
||||
"@storybook/addon-essentials@6.4.15":
|
||||
peerDependencies:
|
||||
"@storybook/components": 6.4.21
|
||||
"@storybook/core-events": 6.4.21
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/theming": 6.4.21
|
||||
"@storybook/core-server@6.4.21":
|
||||
"@storybook/components": 6.4.15
|
||||
"@storybook/core-events": 6.4.15
|
||||
"@storybook/manager-webpack5": 6.4.15
|
||||
"@storybook/theming": 6.4.15
|
||||
"@storybook/core-server@6.4.15":
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/core@6.4.21":
|
||||
"@storybook/core@6.4.15":
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/csf-tools@6.4.21":
|
||||
"@storybook/manager-webpack5": 6.4.15
|
||||
"@storybook/csf-tools@6.4.15":
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/react@6.4.21":
|
||||
"@storybook/react@6.4.15":
|
||||
peerDependencies:
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/manager-webpack5": 6.4.15
|
||||
doctrine@3.0.0:
|
||||
dependencies:
|
||||
assert: 2.0.0
|
||||
moveable@0.29.8:
|
||||
moveable@0.27.3:
|
||||
dependencies:
|
||||
"@daybrush/utils": 1.6.0
|
||||
framework-utils: ^1.1.0
|
||||
@@ -49,13 +49,13 @@ packageExtensions:
|
||||
react-compat-css-styled@1.0.8:
|
||||
dependencies:
|
||||
react-simple-compat: 1.2.1
|
||||
react-compat-moveable@0.17.8:
|
||||
react-compat-moveable@0.15.2:
|
||||
dependencies:
|
||||
"@egjs/agent": ^2.2.1
|
||||
"@egjs/children-differ": ^1.0.1
|
||||
"@scena/matrix": 1.1.1
|
||||
css-to-mat: ^1.0.3
|
||||
gesto: ^1.7.0
|
||||
gesto: ^1.4.0
|
||||
overlap-area: ^1.0.0
|
||||
react-simple-compat: 1.2.1
|
||||
peerDependencies:
|
||||
@@ -78,4 +78,4 @@ plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
|
||||
spec: "https://mskelton.dev/yarn-outdated/v2"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.2.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.1.1.cjs
|
||||
|
||||
577
CHANGELOG.md
577
CHANGELOG.md
@@ -1,541 +1,3 @@
|
||||
<!-- 9.0.0-beta3 START -->
|
||||
|
||||
# 9.0.0-beta3 (2022-06-06)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add provenance guard to config api. [#50147](https://github.com/grafana/grafana/pull/50147), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||
- **Alerting:** Make folder filter clearable in Alert list panel. [#50093](https://github.com/grafana/grafana/pull/50093), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Alerting:** Provisioning API - Alert rules. [#47930](https://github.com/grafana/grafana/pull/47930), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||
- **Alerting:** Remove Image Upload code from Slack notifier. [#50062](https://github.com/grafana/grafana/pull/50062), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Alerting:** Remove double quotes from matchers. [#50038](https://github.com/grafana/grafana/pull/50038), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Cloudwatch:** Dynamic labels autocomplete. [#49794](https://github.com/grafana/grafana/pull/49794), [@sunker](https://github.com/sunker)
|
||||
- **Datasource:** Remove deprecated max_idle_connections_per_host setting. [#49948](https://github.com/grafana/grafana/pull/49948), [@marefr](https://github.com/marefr)
|
||||
- **Datasource:** Remove support for unencrypted passwords. [#49987](https://github.com/grafana/grafana/pull/49987), [@marefr](https://github.com/marefr)
|
||||
- **Dependencies:** Update to Golang version `1.17.11`. [#50253](https://github.com/grafana/grafana/pull/50253), [@dsotirakis](https://github.com/dsotirakis)
|
||||
- **Loki:** Run query when pressing Enter on line-filters. [#49913](https://github.com/grafana/grafana/pull/49913), [@svennergr](https://github.com/svennergr)
|
||||
- **Metrics:** Remove support for using summaries instead of histogram for HTTP instrumentation. [#49985](https://github.com/grafana/grafana/pull/49985), [@bergquist](https://github.com/bergquist)
|
||||
- **Plugins:** Remove deprecated /api/tsdb/query metrics endpoint. [#49916](https://github.com/grafana/grafana/pull/49916), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Support headers field for check health. [#49930](https://github.com/grafana/grafana/pull/49930), [@marefr](https://github.com/marefr)
|
||||
- **Prometheus/Loki:** Add raw query and syntax highlight in explain mode. [#50070](https://github.com/grafana/grafana/pull/50070), [@aocenas](https://github.com/aocenas)
|
||||
- **Prometheus:** Migrate metadata queries to use resource calls. [#49921](https://github.com/grafana/grafana/pull/49921), [@srclosson](https://github.com/srclosson)
|
||||
- **RBAC:** Make RBAC action names more consistent. [#49730](https://github.com/grafana/grafana/pull/49730), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **RBAC:** Make RBAC action names more consistent. (Enterprise)
|
||||
- **Settings:** Sunset non-duration based login lifetime config. [#49944](https://github.com/grafana/grafana/pull/49944), [@sakjur](https://github.com/sakjur)
|
||||
- **[9.0.x] Alerting:** Update alert rule diff to not see difference between nil and empty map. [#50198](https://github.com/grafana/grafana/pull/50198), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix alert list panel showing firing alerts with no instances. [#50069](https://github.com/grafana/grafana/pull/50069), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix notification policy "Override grouping" form save. [#50031](https://github.com/grafana/grafana/pull/50031), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Remove double quotes from matchers. [#50046](https://github.com/grafana/grafana/pull/50046), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Use correct permission scope for external AM updates. [#50159](https://github.com/grafana/grafana/pull/50159), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Datasource:** Fix allowed cookies to be forwarded as header to backend datasources. [#49541](https://github.com/grafana/grafana/pull/49541), [@marefr](https://github.com/marefr)
|
||||
- **Licensing:** Fix trial expiration warning. (Enterprise)
|
||||
- **Loki:** Fix uncaught errors if `labelKey` contains special characters. [#49887](https://github.com/grafana/grafana/pull/49887), [@svennergr](https://github.com/svennergr)
|
||||
- **Prometheus:** Fix aligning of labels of exemplars after backend migration. [#49924](https://github.com/grafana/grafana/pull/49924), [@aocenas](https://github.com/aocenas)
|
||||
- **SharePDF:** Fix repeated datasource variables in PDF. (Enterprise)
|
||||
- **State Timeline:** Fix Null Value Filling and Value Transformation. [#50054](https://github.com/grafana/grafana/pull/50054), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Usage stats:** Divide collection into multiple functions to isolate failures. [#49928](https://github.com/grafana/grafana/pull/49928), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Removes support for storing/using datasource `password` and `basicAuthPassword` unencrypted which was [deprecated in Grafana v8.1.0](https://grafana.com/docs/grafana/latest/installation/upgrading/#use-of-unencrypted-passwords-for-data-sources-no-longer-supported). Please use `secureJsonData.password` and `secureJsonData.basicAuthPassword`. Issue [#49987](https://github.com/grafana/grafana/issues/49987)
|
||||
|
||||
Removes the option to instrument HTTP request in Grafana using summaries instead of histograms. Issue [#49985](https://github.com/grafana/grafana/issues/49985)
|
||||
|
||||
Removes support for deprecated dataproxy.max_idle_connections_per_host setting. Please use max_idle_connections instead. Issue [#49948](https://github.com/grafana/grafana/issues/49948)
|
||||
|
||||
Removes the deprecated `getFormStyles` function from grafana-ui.
|
||||
Prefer using `GrafanaTheme2` and the `useStyles2` hook. Issue [#49945](https://github.com/grafana/grafana/issues/49945)
|
||||
|
||||
The configuration options `auth.login_maximum_inactive_lifetime_days` and `auth.login_maximum_lifetime_days` were deprecated in Grafana v7.2.0 and have now been removed. Use `login_maximum_inactive_lifetime_duration` and `login_maximum_lifetime_duration` to customize the maximum lifetime of a login session. Issue [#49944](https://github.com/grafana/grafana/issues/49944)
|
||||
|
||||
Removed the deprecated `isFocused` and `isInvalid` props from the `InlineLabel` component. These props haven't done anything for a while, so migration is just a matter of removing the props. Issue [#49929](https://github.com/grafana/grafana/issues/49929)
|
||||
|
||||
Removed the deprecated `onColorChange` prop from `ColorPicker`. Moving forward the `onChange` prop should be used. Issue [#49923](https://github.com/grafana/grafana/issues/49923)
|
||||
|
||||
`/api/tsdb/query` API has been removed. Use [/api/ds/query](https://grafana.com/docs/grafana/latest/http_api/data_source/#query-a-data-source) instead.
|
||||
Issue [#49916](https://github.com/grafana/grafana/issues/49916)
|
||||
|
||||
`onClipboardCopy` and `onClipboardError` APIs have been changed such that the callback's argument is just the text that's been copied rather than the old `ClipboardEvent` interface.
|
||||
Migration should just be a matter of going from
|
||||
|
||||
```tsx
|
||||
<ClipboardButton
|
||||
{/*other props... */}
|
||||
onClipboardCopy={(e) => {
|
||||
console.log(`Text "${e.text}" was copied!`);
|
||||
}}
|
||||
/>
|
||||
```
|
||||
|
||||
to
|
||||
|
||||
````tsx
|
||||
<ClipboardButton
|
||||
{/* other props... */}
|
||||
onClipboardCopy={(copiedText) => {
|
||||
console.log(`Text "${copiedText}" was copied!`);
|
||||
}}
|
||||
/>
|
||||
``` Issue [#49847](https://github.com/grafana/grafana/issues/49847)
|
||||
|
||||
|
||||
The following RBAC action renames have been carried out:
|
||||
|
||||
* `users.authtoken:update` -> `users.authtoken:write`;
|
||||
* `users.password:update` -> `users.password:write`;
|
||||
* `users.permissions:update` -> `users.permissions:write`;
|
||||
* `users.quotas:update` -> `users.quotas:write`;
|
||||
* `org.users.role:update` -> `org.users:write`;
|
||||
* `alert.instances:update` -> `alert.instances:write`;
|
||||
* `alert.rules:update` -> `alert.rules:write`;
|
||||
* `users.authtoken:list` -> `users.authtoken:read`;
|
||||
* `users.quotas:list` -> `users.quotas:read`;
|
||||
* `users.teams:read` -> replaced by `users.read` + `teams:read`
|
||||
|
||||
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#49730](https://github.com/grafana/grafana/issues/49730)
|
||||
|
||||
|
||||
The following RBAC action renames have been carried out:
|
||||
|
||||
* `reports.admin:write` -> `reports:write`;
|
||||
* `reports.admin:create` -> `reports:create`;
|
||||
* `licensing:update` -> `licensing:write`;
|
||||
* `roles:list` -> `roles:read`;
|
||||
* `teams.roles:list` -> `teams.roles:read`;
|
||||
* `users.roles:list` -> `users.roles:read`;
|
||||
* `users.permissions:list` -> `users.permissions:read`
|
||||
|
||||
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#3372](https://github.com/grafana/grafana/issues/3372)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **UI:** Remove deprecated getFormStyles function. [#49945](https://github.com/grafana/grafana/pull/49945), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **InlineLabel:** Remove deprecated props. [#49929](https://github.com/grafana/grafana/pull/49929), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **ColorPicker:** Remove deprecated onColorChange prop. [#49923](https://github.com/grafana/grafana/pull/49923), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **ClipboardButton:** Simplify callbacks. [#49847](https://github.com/grafana/grafana/pull/49847), [@kaydelaney](https://github.com/kaydelaney)
|
||||
|
||||
<!-- 9.0.0-beta3 END -->
|
||||
<!-- 9.0.0-beta2 START -->
|
||||
|
||||
# 9.0.0-beta2 (2022-05-31)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add legacy indicator to navbar. [#49511](https://github.com/grafana/grafana/pull/49511), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Alerting:** Add templated subject config to email notifier. [#49742](https://github.com/grafana/grafana/pull/49742), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Enable Unified Alerting for open source and enterprise. [#49834](https://github.com/grafana/grafana/pull/49834), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Make alertmanager datasource stable. [#49485](https://github.com/grafana/grafana/pull/49485), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Angular:** Remove deprecated angular modal support and libs. [#49781](https://github.com/grafana/grafana/pull/49781), [@torkelo](https://github.com/torkelo)
|
||||
- **AuthProxy:** Remove deprecated ldap_sync_ttl setting. [#49902](https://github.com/grafana/grafana/pull/49902), [@kalleep](https://github.com/kalleep)
|
||||
- **Build:** Enable long term caching for frontend assets. [#47625](https://github.com/grafana/grafana/pull/47625), [@jackw](https://github.com/jackw)
|
||||
- **Chore:** Remove deprecated TextDisplayOptions export. [#49705](https://github.com/grafana/grafana/pull/49705), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Chore:** Remove deprecated `surface` prop from IconButton. [#49715](https://github.com/grafana/grafana/pull/49715), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Chore:** Remove usage of deprecated getColorForTheme function. [#49519](https://github.com/grafana/grafana/pull/49519), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **DatePicker:** Add minDate prop. [#49503](https://github.com/grafana/grafana/pull/49503), [@alexanderzobnin](https://github.com/alexanderzobnin)
|
||||
- **Notification history:** Enable by default. [#49502](https://github.com/grafana/grafana/pull/49502), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Prometheus:** Add pluginVersion to query. [#49414](https://github.com/grafana/grafana/pull/49414), [@toddtreece](https://github.com/toddtreece)
|
||||
- **Prometheus:** Enable prometheusStreamingJSONParser by default. [#49475](https://github.com/grafana/grafana/pull/49475), [@toddtreece](https://github.com/toddtreece)
|
||||
- **Prometheus:** Predefined scopes for Azure authentication. [#49557](https://github.com/grafana/grafana/pull/49557), [@kostrse](https://github.com/kostrse)
|
||||
- **Prometheus:** Streaming JSON parser performance improvements. [#48792](https://github.com/grafana/grafana/pull/48792), [@toddtreece](https://github.com/toddtreece)
|
||||
- **ValueMapping:** Add support for regex replacement over multiple lines. [#49607](https://github.com/grafana/grafana/pull/49607), [@ashharrison90](https://github.com/ashharrison90)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Accessibility:** Pressing escape in a Modal or DashboardSettings correctly closes the overlay. [#49500](https://github.com/grafana/grafana/pull/49500), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Alerting:** Validate alert notification UID length. [#45546](https://github.com/grafana/grafana/pull/45546), [@wbrowne](https://github.com/wbrowne)
|
||||
- **BackendSrv:** Throw an error when fetching an invalid JSON. [#47493](https://github.com/grafana/grafana/pull/47493), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Fix:** Timeseries migration regex override. [#49629](https://github.com/grafana/grafana/pull/49629), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Loki:** Fix unwrap parsing in query builder. [#49732](https://github.com/grafana/grafana/pull/49732), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Navigation:** Position hamburger menu correctly in mobile view. [#49603](https://github.com/grafana/grafana/pull/49603), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **PanelEditor:** Fixes issue with Table view and multi data frames. [#49854](https://github.com/grafana/grafana/pull/49854), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **Preferences:** Fix updating of preferences for Navbar and Query History. [#49677](https://github.com/grafana/grafana/pull/49677), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **TimeRange:** Fixes issue when zooming out on a timerange with timespan 0. [#49622](https://github.com/grafana/grafana/pull/49622), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **Variables:** Fixes DS variables not being correctly used in panel queries. [#49323](https://github.com/grafana/grafana/pull/49323), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Drop support for deprecated setting ldap_sync_ttl under [auth.proxy]
|
||||
Only sync_ttl will work from now on Issue [#49902](https://github.com/grafana/grafana/issues/49902)
|
||||
|
||||
Removes support for deprecated `heading` and `description` props. Moving forward, the `Card.Heading` and `Card.Description` components should be used. Issue [#49885](https://github.com/grafana/grafana/issues/49885)
|
||||
|
||||
Removes the deprecated `link` variant from the `Button` component.
|
||||
To migrate, replace any usage of `variant="link"` with `fill="text"`. Issue [#49843](https://github.com/grafana/grafana/issues/49843)
|
||||
|
||||
Removes the deprecated `surface` prop from the `IconButton` component. This prop hasn't actually done anything for a while, so it should be safe to just remove any instances of its usage.
|
||||
Issue [#49715](https://github.com/grafana/grafana/issues/49715)
|
||||
|
||||
Removes the deprecated `TextDisplayOptions` export from `@grafana/data` in favor of `VizTextDisplayOptions` from `@grafana/schema`. To migrate, just replace usage of `TextDisplayOptions` with `VizTextDisplayOptions`. Issue [#49705](https://github.com/grafana/grafana/issues/49705)
|
||||
|
||||
Removed support for the deprecated `getColorForTheme(color: string, theme: GrafanaTheme)` function in favor of the
|
||||
`theme.visualization.getColorByName(color: string)` method. The output of this method is identical to the removed function, so migration should just be a matter of rewriting calls of `getColorForTheme(myColor, myTheme)` to `myTheme.visualization.getColorByName(myColor)`.
|
||||
Issue [#49519](https://github.com/grafana/grafana/issues/49519)
|
||||
|
||||
In the Prometheus data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Prometheus. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#49475](https://github.com/grafana/grafana/issues/49475)
|
||||
|
||||
Plugins using custom Webpack configs could potentially break due to the changes between webpack@4 and webpack@5. Please refer to the [official migration guide](https://webpack.js.org/migrate/5/) for assistance.
|
||||
|
||||
Webpack 5 does not include polyfills for node.js core modules by default (e.g. `buffer`, `stream`, `os`). This can result in failed builds for plugins. If polyfills are required it is recommended to create a custom webpack config in the root of the plugin repo and add the required fallbacks:
|
||||
|
||||
```js
|
||||
// webpack.config.js
|
||||
|
||||
module.exports.getWebpackConfig = (config, options) => ({
|
||||
...config,
|
||||
resolve: {
|
||||
...config.resolve,
|
||||
fallback: {
|
||||
os: require.resolve('os-browserify/browser'),
|
||||
stream: require.resolve('stream-browserify'),
|
||||
timers: require.resolve('timers-browserify'),
|
||||
},
|
||||
},
|
||||
});
|
||||
````
|
||||
|
||||
Please refer to the webpack build error messages or the [official migration guide](https://webpack.js.org/migrate/5/) for assistance with fallbacks.
|
||||
|
||||
**Which issue(s) this PR fixes**:
|
||||
|
||||
<!--
|
||||
|
||||
- Automatically closes linked issue when the Pull Request is merged.
|
||||
|
||||
Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
|
||||
|
||||
-->
|
||||
|
||||
Fixes #
|
||||
|
||||
**Special notes for your reviewer**:
|
||||
|
||||
It does not bump the following dependencies to the very latest due to the latest versions being ES modules:
|
||||
|
||||
- ora
|
||||
- globby
|
||||
- execa
|
||||
- chalk
|
||||
Issue [#47826](https://github.com/grafana/grafana/issues/47826)
|
||||
|
||||
We have changed the internals of `backendSrv.fetch()` to throw an error when the response is an incorrect JSON.
|
||||
|
||||
```javascript
|
||||
// PREVIOUSLY: this was returning with an empty object {} - in case the response is an invalid JSON
|
||||
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
|
||||
|
||||
// AFTER THIS CHANGE: the following will throw an error - in case the response is an invalid JSON
|
||||
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
|
||||
```
|
||||
|
||||
**When is the response handled as JSON?**
|
||||
|
||||
- If the response has the `"Content-Type: application/json"` header, OR
|
||||
- If the backendSrv options ([`BackendSrvRequest`](https://github.com/grafana/grafana/blob/e237ff20a996c7313632b2e28f38032012f0e340/packages/grafana-runtime/src/services/backendSrv.ts#L8)) specify the response as JSON: `{ responseType: 'json' }`
|
||||
|
||||
**How does it work after this change?**
|
||||
|
||||
- In case it is recognised as a JSON response and the response is empty, it returns an empty object `{}`
|
||||
- In case it is recognised as a JSON response and it has formatting errors, it throws an error
|
||||
|
||||
**How to migrate?**
|
||||
Make sure to handle possible errors on the callsite where using `backendSrv.fetch()` (or any other `backendSrv` methods). Issue [#47493](https://github.com/grafana/grafana/issues/47493)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **UI/Card:** Remove deprecated props. [#49885](https://github.com/grafana/grafana/pull/49885), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **UI/Button:** Remove deprecated "link" variant. [#49843](https://github.com/grafana/grafana/pull/49843), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Toolkit:** Bump dependencies. [#47826](https://github.com/grafana/grafana/pull/47826), [@jackw](https://github.com/jackw)
|
||||
|
||||
<!-- 9.0.0-beta2 END -->
|
||||
|
||||
<!-- 9.0.0-beta1 START -->
|
||||
|
||||
# 9.0.0-beta1 (2022-05-24)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **AccessControl:** Add setting for permission cache. (Enterprise)
|
||||
- **AccessControl:** Check dashboard permissions for reports. (Enterprise)
|
||||
- **Auth:** Remove grafana ui dependency to the aws sdk. [#43559](https://github.com/grafana/grafana/pull/43559), [@sunker](https://github.com/sunker)
|
||||
- **BasicRoles:** Add API endpoint to reset basic roles permissions to factory. (Enterprise)
|
||||
- **LDAP Mapping:** Allow Grafana Admin mapping without org role. [#37189](https://github.com/grafana/grafana/pull/37189), [@krzysdabro](https://github.com/krzysdabro)
|
||||
- **Licensing:** Only enforce total number of users. (Enterprise)
|
||||
- **Loki:** do not convert NaN to null. [#45389](https://github.com/grafana/grafana/pull/45389), [@gabor](https://github.com/gabor)
|
||||
- **Report:** API support for multiple dashboards. (Enterprise)
|
||||
- **Report:** Support sending embedded image in the report email. (Enterprise)
|
||||
- **Report:** UI for multiple dashboards. (Enterprise)
|
||||
- **Reporting:** Remove redundant empty attachment when export to CSV is enabled. (Enterprise)
|
||||
- **SAML:** Implement Name Templates for assertion_attribute_name option. (Enterprise)
|
||||
- **SSE/Alerting:** Support prom instant vector responses. [#44865](https://github.com/grafana/grafana/pull/44865), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Tracing:** Add trace to metrics config behind feature toggle. [#46298](https://github.com/grafana/grafana/pull/46298), [@connorlindsey](https://github.com/connorlindsey)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Fix:** Prevent automatic parsing of string data types to numbers. [#46035](https://github.com/grafana/grafana/pull/46035), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Prometheus:** Fix inconsistent labels in exemplars resulting in marshal json error. [#46135](https://github.com/grafana/grafana/pull/46135), [@hanjm](https://github.com/hanjm)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
In the Loki data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Loki. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#45389](https://github.com/grafana/grafana/issues/45389)
|
||||
|
||||
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
|
||||
|
||||
<!-- 9.0.0-beta1 END -->
|
||||
<!-- 8.5.4 START -->
|
||||
|
||||
# 8.5.4 (2022-05-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Remove disabled flag for data source when migrating alerts. [#48559](https://github.com/grafana/grafana/pull/48559), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Show notification tab of legacy alerting only to editor. [#49624](https://github.com/grafana/grafana/pull/49624), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49192](https://github.com/grafana/grafana/pull/49192), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **AzureMonitor:** Do not quote variables when a custom "All" variable option is used. [#49428](https://github.com/grafana/grafana/pull/49428), [@andresmgot](https://github.com/andresmgot)
|
||||
- **AzureMonitor:** Update allowed namespaces. [#48468](https://github.com/grafana/grafana/pull/48468), [@jcolladokuri](https://github.com/jcolladokuri)
|
||||
- **CloudMonitor:** Correctly encode default project response. [#49510](https://github.com/grafana/grafana/pull/49510), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Cloudwatch:** Add support for new AWS/RDS EBS\* metrics. [#48798](https://github.com/grafana/grafana/pull/48798), [@szymonpk](https://github.com/szymonpk)
|
||||
- **InfluxDB:** Use backend for influxDB by default via feature toggle. [#48453](https://github.com/grafana/grafana/pull/48453), [@yesoreyeram](https://github.com/yesoreyeram)
|
||||
- **Legend:** Use correct unit for percent and count calculations. [#49004](https://github.com/grafana/grafana/pull/49004), [@dprokop](https://github.com/dprokop)
|
||||
- **LokI:** use millisecond steps in Grafana 8.5.x. [#48630](https://github.com/grafana/grafana/pull/48630), [@gabor](https://github.com/gabor)
|
||||
- **Plugins:** Introduce HTTP 207 Multi Status response to api/ds/query. [#48550](https://github.com/grafana/grafana/pull/48550), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Reporting:** Improve PDF file size using grid layout. (Enterprise)
|
||||
- **Transformations:** Add an All Unique Values Reducer. [#48653](https://github.com/grafana/grafana/pull/48653), [@josiahg](https://github.com/josiahg)
|
||||
- **Transformers:** avoid error when the ExtractFields source field is missing. [#49368](https://github.com/grafana/grafana/pull/49368), [@wardbekker](https://github.com/wardbekker)
|
||||
- **[v8.5.x] Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49199](https://github.com/grafana/grafana/pull/49199), [@grafanabot](https://github.com/grafanabot)
|
||||
- **[v8.5.x] Reporting:** Improve PDF file size using grid layout. (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Allow disabling override timings for notification policies. [#48648](https://github.com/grafana/grafana/pull/48648), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Allow serving images from custom url path. [#49022](https://github.com/grafana/grafana/pull/49022), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Apply Custom Headers to datasource queries. [#47860](https://github.com/grafana/grafana/pull/47860), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Alerting:** Fix RBAC actions for notification policies. [#49185](https://github.com/grafana/grafana/pull/49185), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49270](https://github.com/grafana/grafana/pull/49270), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix anonymous access to alerting. [#49203](https://github.com/grafana/grafana/pull/49203), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** correctly show all alerts in a folder. [#48684](https://github.com/grafana/grafana/pull/48684), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **AzureMonitor:** Fixes metric definition for Azure Storage queue/file/blob/table resources. [#49101](https://github.com/grafana/grafana/pull/49101), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Dashboard:** Fix dashboard update permission check. [#48746](https://github.com/grafana/grafana/pull/48746), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **DashboardExport:** Fix exporting and importing dashboards where query data source ended up as incorrect. [#48410](https://github.com/grafana/grafana/pull/48410), [@torkelo](https://github.com/torkelo)
|
||||
- **FileUpload:** clicking the `Upload file` button now opens the modal correctly. [#48766](https://github.com/grafana/grafana/pull/48766), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **GrafanaUI:** Fix color of links in error Tooltips in light theme. [#49327](https://github.com/grafana/grafana/pull/49327), [@joshhunt](https://github.com/joshhunt)
|
||||
- **LibraryPanels:** Fix library panels not connecting properly in imported dashboards. [#49161](https://github.com/grafana/grafana/pull/49161), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Loki:** Improve unpack parser handling. [#49074](https://github.com/grafana/grafana/pull/49074), [@gabor](https://github.com/gabor)
|
||||
- **RolePicker:** Fix menu position on smaller screens. [#48429](https://github.com/grafana/grafana/pull/48429), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **TimeRange:** Fixes updating time range from url and browser history. [#48657](https://github.com/grafana/grafana/pull/48657), [@torkelo](https://github.com/torkelo)
|
||||
- **TimeSeries:** Fix detection & rendering of sparse datapoints. [#48841](https://github.com/grafana/grafana/pull/48841), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Timeseries:** Fix outside range stale state. [#49633](https://github.com/grafana/grafana/pull/49633), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Tooltip:** Fix links not legible in Tooltips when using light theme. [#48748](https://github.com/grafana/grafana/pull/48748), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Tooltip:** Sort decimals using standard numeric compare. [#49084](https://github.com/grafana/grafana/pull/49084), [@dprokop](https://github.com/dprokop)
|
||||
- **Transforms:** Labels to fields, fix label picker layout. [#49304](https://github.com/grafana/grafana/pull/49304), [@torkelo](https://github.com/torkelo)
|
||||
- **Variables:** Fixes issue with data source variables not updating queries with variable. [#49478](https://github.com/grafana/grafana/pull/49478), [@torkelo](https://github.com/torkelo)
|
||||
- **[v8.5.x] Alerting:** Fix RBAC actions for notification policies (#49185). [#49348](https://github.com/grafana/grafana/pull/49348), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **[v8.5.x] Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49427](https://github.com/grafana/grafana/pull/49427), [@konrad147](https://github.com/konrad147)
|
||||
- **[v8.5.x] Alerting:** Fix anonymous access to alerting. [#49268](https://github.com/grafana/grafana/pull/49268), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
For a data source query made via /api/ds/query :
|
||||
|
||||
- If the `DatasourceQueryMultiStatus` feature is enabled and
|
||||
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is now `207 Multi Status` instead of `400 Bad gateway`
|
||||
- If the `DatasourceQueryMultiStatus` feature is **not** enabled and
|
||||
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is `400 Bad Request` (no breaking change)
|
||||
--> Issue [#48550](https://github.com/grafana/grafana/issues/48550)
|
||||
|
||||
<!-- 8.5.4 END -->
|
||||
<!-- 8.5.3 START -->
|
||||
|
||||
# 8.5.3
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Security:** fixes CVE-2022-29170. [#49240](https://github.com/grafana/grafana/pull/49240), [@xlson](https://github.com/xlson)
|
||||
|
||||
<!-- 8.5.3 END -->
|
||||
<!-- 8.5.2 START -->
|
||||
|
||||
# 8.5.2 (2022-05-03)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add safeguard for migrations that might cause dataloss. [#48526](https://github.com/grafana/grafana/pull/48526), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||
- **AzureMonitor:** Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. [#48077](https://github.com/grafana/grafana/pull/48077), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Elasticsearch:** Add deprecation notice for < 7.10 versions. [#48506](https://github.com/grafana/grafana/pull/48506), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Traces:** Filter by service/span name and operation in Tempo and Jaeger. [#48209](https://github.com/grafana/grafana/pull/48209), [@joey-grafana](https://github.com/joey-grafana)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **AzureAd Oauth:** Fix strictMode to reject users without an assigned role. [#48474](https://github.com/grafana/grafana/pull/48474), [@kyschouv](https://github.com/kyschouv)
|
||||
- **CloudWatch:** Fix variable query tag migration. [#48587](https://github.com/grafana/grafana/pull/48587), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Plugins:** Ensure catching all appropriate 4xx api/ds/query scenarios. [#47565](https://github.com/grafana/grafana/pull/47565), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 8.5.2 END -->
|
||||
<!-- 8.5.1 START -->
|
||||
|
||||
# 8.5.1 (2022-04-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Azure Monitor:** Fix space character encoding for metrics query link to Azure Portal. [#48139](https://github.com/grafana/grafana/pull/48139), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **CloudWatch:** Prevent log groups from being removed on query change. [#47994](https://github.com/grafana/grafana/pull/47994), [@asimpson](https://github.com/asimpson)
|
||||
- **Cloudwatch:** Fix template variables in variable queries. [#48140](https://github.com/grafana/grafana/pull/48140), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Explore:** Prevent direct access to explore if disabled via feature toggle. [#47714](https://github.com/grafana/grafana/pull/47714), [@Elfo404](https://github.com/Elfo404)
|
||||
- **InfluxDB:** Fixes invalid no data alerts. [#48295](https://github.com/grafana/grafana/pull/48295), [@yesoreyeram](https://github.com/yesoreyeram)
|
||||
- **Navigation:** Prevent navbar briefly showing on login. [#47968](https://github.com/grafana/grafana/pull/47968), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Plugins Catalog:** Fix styling of hyperlinks. [#48196](https://github.com/grafana/grafana/pull/48196), [@marefr](https://github.com/marefr)
|
||||
- **Table:** Fix filter crashes table. [#48258](https://github.com/grafana/grafana/pull/48258), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **TimeSeries:** Properly stack series with missing datapoints. [#48321](https://github.com/grafana/grafana/pull/48321), [@leeoniya](https://github.com/leeoniya)
|
||||
|
||||
<!-- 8.5.1 END -->
|
||||
<!-- 8.5.0 START -->
|
||||
|
||||
# 8.5.0 (2022-04-21)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add contact points provisioning API. [#47197](https://github.com/grafana/grafana/pull/47197), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||
- **Alerting:** Add resolved count to notification title when both firing and resolved present. [#46697](https://github.com/grafana/grafana/pull/46697), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Alert rule should wait For duration when execution error state is Alerting. [#47052](https://github.com/grafana/grafana/pull/47052), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Classic conditions can now display multiple values. [#46971](https://github.com/grafana/grafana/pull/46971), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Alerting:** Display query from grafana-managed alert rules on `/api/v1/rules`. [#45969](https://github.com/grafana/grafana/pull/45969), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Alerting:** Enhance support for arbitrary group names in managed alerts. [#47785](https://github.com/grafana/grafana/pull/47785), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** add field for custom slack endpoint. [#45751](https://github.com/grafana/grafana/pull/45751), [@nathanrodman](https://github.com/nathanrodman)
|
||||
- **Azure Monitor :** Adding json formatting of error messages in Panel Header Corner and Inspect Error Tab. [#44877](https://github.com/grafana/grafana/pull/44877), [@yaelleC](https://github.com/yaelleC)
|
||||
- **Azure Monitor:** Add 2 more Curated Dashboards for VM Insights. [#45187](https://github.com/grafana/grafana/pull/45187), [@jcolladokuri](https://github.com/jcolladokuri)
|
||||
- **CloudWatch:** Handle new error codes for MetricInsights. [#47033](https://github.com/grafana/grafana/pull/47033), [@Gabrielopesantos](https://github.com/Gabrielopesantos)
|
||||
- **Dashboards:** show changes in save dialog. [#46557](https://github.com/grafana/grafana/pull/46557), [@ryantxu](https://github.com/ryantxu)
|
||||
- **DataSource:** Default data source is no longer a persisted state but just the default data source for new panels. [#45132](https://github.com/grafana/grafana/pull/45132), [@torkelo](https://github.com/torkelo)
|
||||
- **DataSourcePlugin API:** Allow queries import when changing data source type. [#47435](https://github.com/grafana/grafana/pull/47435), [@dprokop](https://github.com/dprokop)
|
||||
- **Explore:** Remove return to panel button. [#45018](https://github.com/grafana/grafana/pull/45018), [@gelicia](https://github.com/gelicia)
|
||||
- **Explore:** allow users to save Explore state to a new panel in a new dashboard. [#45148](https://github.com/grafana/grafana/pull/45148), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Instrumentation:** Proxy status code correction and various improvements. [#47473](https://github.com/grafana/grafana/pull/47473), [@marefr](https://github.com/marefr)
|
||||
- **Logging:** Introduce feature toggle to activate gokit/log format. [#47336](https://github.com/grafana/grafana/pull/47336), [@ying-jeanne](https://github.com/ying-jeanne)
|
||||
- **NewsPanel:** Add support for Atom feeds. [#45390](https://github.com/grafana/grafana/pull/45390), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Plugins:** Add deprecation notice for /api/tsdb/query endpoint. [#45238](https://github.com/grafana/grafana/pull/45238), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Adding support for traceID field to accept variables. [#45559](https://github.com/grafana/grafana/pull/45559), [@vinisdl](https://github.com/vinisdl)
|
||||
- **PostgreSQL:** \_\_unixEpochGroup to support arithmetic expression as argument. [#46764](https://github.com/grafana/grafana/pull/46764), [@s0nik42](https://github.com/s0nik42)
|
||||
- **Profile/Help:** Expose option to disable profile section and help menu. [#46308](https://github.com/grafana/grafana/pull/46308), [@cameronwaterman](https://github.com/cameronwaterman)
|
||||
- **Prometheus:** Enable new visual query builder by default. [#46634](https://github.com/grafana/grafana/pull/46634), [@torkelo](https://github.com/torkelo)
|
||||
- **SAML:** Allow disabling of SAML signups. [#47481](https://github.com/grafana/grafana/pull/47481), [@mmandrus](https://github.com/mmandrus)
|
||||
- **SAML:** Allow disabling of SAML signups. (Enterprise)
|
||||
- **Table:** New pagination option. [#45732](https://github.com/grafana/grafana/pull/45732), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **TablePanel:** Add cell inspect option. [#45620](https://github.com/grafana/grafana/pull/45620), [@dprokop](https://github.com/dprokop)
|
||||
- **Tempo / Trace Viewer:** Support Span Links in Trace Viewer. [#45632](https://github.com/grafana/grafana/pull/45632), [@Shachi16](https://github.com/Shachi16)
|
||||
- **Tempo:** Download span references in data inspector. [#47074](https://github.com/grafana/grafana/pull/47074), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Tempo:** Separate trace to logs and loki search datasource config. [#46655](https://github.com/grafana/grafana/pull/46655), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Trace View:** Show number of child spans. [#44393](https://github.com/grafana/grafana/pull/44393), [@tharun208](https://github.com/tharun208)
|
||||
- **Transformations:** Support escaped characters in key-value pair parsing. [#47901](https://github.com/grafana/grafana/pull/47901), [@aangelisc](https://github.com/aangelisc)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Azure Monitor:** Bug Fix for incorrect variable cascading for template variables. [#47478](https://github.com/grafana/grafana/pull/47478), [@jcolladokuri](https://github.com/jcolladokuri)
|
||||
- **CloudWatch:** List all metrics properly in SQL autocomplete. [#45898](https://github.com/grafana/grafana/pull/45898), [@sunker](https://github.com/sunker)
|
||||
- **CloudWatch:** Run query on blur in logs query field. [#47454](https://github.com/grafana/grafana/pull/47454), [@fridgepoet](https://github.com/fridgepoet)
|
||||
- **Dashboard:** Template variables are now correctly persisted when clicking breadcrumb links. [#46790](https://github.com/grafana/grafana/pull/46790), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **DashboardPage:** Remember scroll position when coming back panel edit / view panel. [#47639](https://github.com/grafana/grafana/pull/47639), [@torkelo](https://github.com/torkelo)
|
||||
- **Panel Edit:** Options search now works correctly when a logarithmic scale option is set. [#47927](https://github.com/grafana/grafana/pull/47927), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Postgres:** Return tables with hyphenated schemes. [#45754](https://github.com/grafana/grafana/pull/45754), [@zuchka](https://github.com/zuchka)
|
||||
- **Table panel:** Fix horizontal scrolling when pagination is enabled. [#47776](https://github.com/grafana/grafana/pull/47776), [@dprokop](https://github.com/dprokop)
|
||||
- **Variables:** Ensure variables in query params are correctly recognised. [#47049](https://github.com/grafana/grafana/pull/47049), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Variables:** Fix crash when changing query variable datasource. [#44957](https://github.com/grafana/grafana/pull/44957), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Visualizations:** Stack negative-valued series downwards. [#47373](https://github.com/grafana/grafana/pull/47373), [@leeoniya](https://github.com/leeoniya)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
For a proxied request, e.g. Grafana's datasource or plugin proxy:
|
||||
|
||||
- If the request is cancelled, e.g. from the browser/by the client, the HTTP status code is now `499 Client closed request` instead of `502 Bad gateway`
|
||||
- If the request times out, e.g. takes longer time than allowed, the HTTP status code is now `504 Gateway timeout` instead of `502 Bad gateway`. Issue [#47473](https://github.com/grafana/grafana/issues/47473)
|
||||
|
||||
The change in behavior is that negative-valued series are now stacked downwards from 0 (in their own stacks), rather than downwards from the top of the positive stacks. We now automatically group stacks by Draw style, Line interpolation, and Bar alignment, making it impossible to stack bars on top of lines, or smooth lines on top of stepped lines. Issue [#47373](https://github.com/grafana/grafana/issues/47373)
|
||||
|
||||
The meaning of the default data source has now changed from being a persisted property in a panel. Before when you selected the default data source for a panel and later changed the default data source to another data source it would change all panels who were configured to use the default data source. From now on the default data source is just the default for new panels and changing the default will not impact any currently saved dashboards. Issue [#45132](https://github.com/grafana/grafana/issues/45132)
|
||||
|
||||
The Tooltip component provided by `@grafana/ui` is no longer automatically interactive (that is you can hover onto it and click a link or select text). It will from now on by default close automatically when you mouse out from the trigger element. To make tooltips behave like before set the new `interactive` property to true.
|
||||
Issue [#45053](https://github.com/grafana/grafana/issues/45053)
|
||||
|
||||
### Deprecations
|
||||
|
||||
`/api/tsdb/query` API has been deprecated and will be removed in a future release. Use [/api/ds/query](https://grafana.com/docs/grafana/latest/http_api/data_source/#query-a-data-source) instead. Issue [#45238](https://github.com/grafana/grafana/issues/45238)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Card:** Increase clickable area when meta items are present. [#47935](https://github.com/grafana/grafana/pull/47935), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Loki:** Fix operator description propup from being shortened. [#46575](https://github.com/grafana/grafana/pull/46575), [@glintik](https://github.com/glintik)
|
||||
- **Tooltips:** Make tooltips non interactive by default. [#45053](https://github.com/grafana/grafana/pull/45053), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
<!-- 8.5.0 END -->
|
||||
<!-- 8.5.0-beta1 START -->
|
||||
|
||||
# 8.5.0-beta1 (2022-04-06)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- Add config option to enable/disable reporting. (Enterprise)
|
||||
- **Alerting:** Accurately set value for prom-compatible APIs. [#47216](https://github.com/grafana/grafana/pull/47216), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Alerting:** Provisioning API - Notification Policies. [#46755](https://github.com/grafana/grafana/pull/46755), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Notification URL points to alert view page instead of alert edit page. [#47752](https://github.com/grafana/grafana/pull/47752), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Analytics:** Enable grafana and plugin update checks to be operated independently. [#46352](https://github.com/grafana/grafana/pull/46352), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Azure Monitor:** Add support for multiple template variables in resource picker. [#46215](https://github.com/grafana/grafana/pull/46215), [@sarahzinger](https://github.com/sarahzinger)
|
||||
- **Caching:** Add separate TTL for resources cache. (Enterprise)
|
||||
- **Caching:** add support for TLS configuration for Redis Cluster. (Enterprise)
|
||||
- **NewsPanel:** Remove Use Proxy option and update documentation with recommendations. [#47189](https://github.com/grafana/grafana/pull/47189), [@joshhunt](https://github.com/joshhunt)
|
||||
- **OAuth:** Sync GitHub OAuth user name to Grafana if it's set. [#45438](https://github.com/grafana/grafana/pull/45438), [@pallxk](https://github.com/pallxk)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Plugins:** Fix Default Nav URL for dashboard includes. [#47143](https://github.com/grafana/grafana/pull/47143), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
When user is using Github OAuth, GitHub login is showed as both Grafana login and name. Now the GitHub name is showed as Grafana name, and GitHub login is showed as Grafana Login. Issue [#45438](https://github.com/grafana/grafana/issues/45438)
|
||||
|
||||
The meaning of the default data source has now changed from being a persisted property in a panel. Before when you selected the default data source for a panel and later changed the default data source to another data source it would change all panels who were configured to use the default data source. From now on the default data source is just the default for new panels and changing the default will not impact any currently saved dashboards. Issue [#45132](https://github.com/grafana/grafana/issues/45132)
|
||||
|
||||
<!-- 8.4.7 START -->
|
||||
|
||||
# 8.4.7 (2022-04-19)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **CloudWatch:** Added missing MemoryDB Namespace metrics. [#47290](https://github.com/grafana/grafana/pull/47290), [@james-deee](https://github.com/james-deee)
|
||||
- **Histogram Panel:** Take decimal into consideration. [#47330](https://github.com/grafana/grafana/pull/47330), [@mdvictor](https://github.com/mdvictor)
|
||||
- **TimeSeries:** Sort tooltip values based on raw values. [#46738](https://github.com/grafana/grafana/pull/46738), [@dprokop](https://github.com/dprokop)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **API:** Include userId, orgId, uname in request logging middleware. [#47183](https://github.com/grafana/grafana/pull/47183), [@marefr](https://github.com/marefr)
|
||||
- **Elasticsearch:** Respect maxConcurrentShardRequests datasource setting. [#47120](https://github.com/grafana/grafana/pull/47120), [@alexandrst88](https://github.com/alexandrst88)
|
||||
|
||||
<!-- 8.4.7 END -->
|
||||
<!-- 8.5.0-beta1 END -->
|
||||
<!-- 8.4.6 START -->
|
||||
|
||||
# 8.4.6 (2022-04-12)
|
||||
|
||||
- **Security:** Fixes CVE-2022-24812. For more information, see our [blog](https://grafana.com/blog/2022/04/12/grafana-enterprise-8.4.6-released-with-high-severity-security-fix/)
|
||||
|
||||
<!-- 8.4.6 END -->
|
||||
<!-- 8.4.5 START -->
|
||||
|
||||
# 8.4.5 (2022-03-31)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Instrumentation:** Make backend plugin metrics endpoints available with optional authentication. [#46467](https://github.com/grafana/grafana/pull/46467), [@marefr](https://github.com/marefr)
|
||||
- **Table panel:** Show datalinks for cell display modes JSON View and Gauge derivates. [#46020](https://github.com/grafana/grafana/pull/46020), [@mdvictor](https://github.com/mdvictor)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Azure Monitor:** Small bug fixes for Resource Picker. [#46665](https://github.com/grafana/grafana/pull/46665), [@sarahzinger](https://github.com/sarahzinger)
|
||||
- **Logger:** Use specified format for file logger. [#46970](https://github.com/grafana/grafana/pull/46970), [@sakjur](https://github.com/sakjur)
|
||||
- **Logs:** Handle missing fields in dataframes better. [#46963](https://github.com/grafana/grafana/pull/46963), [@gabor](https://github.com/gabor)
|
||||
- **ManageDashboards:** Fix error when deleting all dashboards from folder view. [#46877](https://github.com/grafana/grafana/pull/46877), [@joshhunt](https://github.com/joshhunt)
|
||||
|
||||
<!-- 8.4.5 END -->
|
||||
<!-- 8.4.4 START -->
|
||||
|
||||
# 8.4.4 (2022-03-16)
|
||||
@@ -682,43 +144,6 @@ AngularJS plugin support is now in a deprecated state, meaning it will be remove
|
||||
- **News:** Reload feed when changing the time range or refreshing. [#42217](https://github.com/grafana/grafana/pull/42217), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **UI/Plot:** Implement keyboard controls for plot cursor. [#42244](https://github.com/grafana/grafana/pull/42244), [@kaydelaney](https://github.com/kaydelaney)
|
||||
|
||||
<!-- 8.3.7 START -->
|
||||
|
||||
# 8.3.7 (2022-03-01)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Provisioning:** Ensure that the default value for orgID is set when provisioning datasources to be deleted. [#44244](https://github.com/grafana/grafana/pull/44244), [@filewalkwithme](https://github.com/filewalkwithme)
|
||||
|
||||
<!-- 8.3.7 END -->
|
||||
|
||||
<!-- 8.3.6 START -->
|
||||
|
||||
# 8.3.6 (2022-02-09)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Cloud Monitoring:** Reduce request size when listing labels. [#44365](https://github.com/grafana/grafana/pull/44365), [@mtanda](https://github.com/mtanda)
|
||||
- **Explore:** Show scalar data result in a table instead of graph. [#44362](https://github.com/grafana/grafana/pull/44362), [@tharun208](https://github.com/tharun208)
|
||||
- **Snapshots:** Updates the default external snapshot server URL. [#44563](https://github.com/grafana/grafana/pull/44563), [@DanCech](https://github.com/DanCech)
|
||||
- **Table:** Makes footer not overlap table content. [#44210](https://github.com/grafana/grafana/pull/44210), [@dprokop](https://github.com/dprokop)
|
||||
- **Tempo:** Add request histogram to service graph datalink. [#44671](https://github.com/grafana/grafana/pull/44671), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Tempo:** Add time range to tempo search query behind a feature flag. [#43811](https://github.com/grafana/grafana/pull/43811), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Tempo:** Auto-clear results when changing query type. [#44390](https://github.com/grafana/grafana/pull/44390), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Tempo:** Display start time in search results as relative time. [#44568](https://github.com/grafana/grafana/pull/44568), [@tharun208](https://github.com/tharun208)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **CloudMonitoring:** Fix resource labels in query editor. [#44550](https://github.com/grafana/grafana/pull/44550), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Cursor sync:** Apply the settings without saving the dashboard. [#44270](https://github.com/grafana/grafana/pull/44270), [@dprokop](https://github.com/dprokop)
|
||||
- **LibraryPanels:** Fix for Error while cleaning library panels. [#45033](https://github.com/grafana/grafana/pull/45033), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Logs Panel:** fix timestamp parsing for string dates without timezone. [#44664](https://github.com/grafana/grafana/pull/44664), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Prometheus:** Fix some of the alerting queries that use reduce/math operation. [#44380](https://github.com/grafana/grafana/pull/44380), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **TablePanel:** Fix ad-hoc variables not working on default datasources. [#44314](https://github.com/grafana/grafana/pull/44314), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Text Panel:** Fix alignment of elements. [#44313](https://github.com/grafana/grafana/pull/44313), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Variables:** Fix for constant variables in self referencing links. [#44631](https://github.com/grafana/grafana/pull/44631), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
<!-- 8.3.6 END -->
|
||||
<!-- 8.4.0-beta1 END -->
|
||||
<!-- 8.3.5 START -->
|
||||
|
||||
@@ -916,7 +341,7 @@ The access mode "browser" is deprecated in the following data sources and will b
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **AccessControl:** Apply role-based access control to licensing. (Enterprise)
|
||||
- **AccessControl:** Apply fine-grained access control to licensing. (Enterprise)
|
||||
- **Alerting:** Add UI for contact point testing with custom annotations and labels. [#40491](https://github.com/grafana/grafana/pull/40491), [@nathanrodman](https://github.com/nathanrodman)
|
||||
- **Alerting:** Make alert state indicator in panel header work with Grafana 8 alerts. [#38713](https://github.com/grafana/grafana/pull/38713), [@domasx2](https://github.com/domasx2)
|
||||
- **Alerting:** Option for Discord notifier to use webhook name. [#40463](https://github.com/grafana/grafana/pull/40463), [@Skyebold](https://github.com/Skyebold)
|
||||
|
||||
@@ -20,7 +20,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.11-alpine3.15 as go-builder
|
||||
FROM golang:1.17.8-alpine3.15 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++ make
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.11 AS go-builder
|
||||
FROM golang:1.17.8 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ The current team members are:
|
||||
- Emil Tullstedt ([Grafana Labs](https://grafana.com/))
|
||||
- Erik Sundell ([Grafana Labs](https://grafana.com/))
|
||||
- Fredrik Enestad ([Embark Studios](https://www.embark-studios.com/))
|
||||
- Hugo Häggmark ([Grafana Labs](https://grafana.com/))
|
||||
- Ivana Huckova ([Grafana Labs](https://grafana.com/))
|
||||
- Jeroen Op 't Eynde ([Grafana Labs](https://grafana.com/))
|
||||
- Jessica Müller ([Grafana Labs](https://grafana.com/))
|
||||
@@ -99,7 +100,7 @@ The current team members are:
|
||||
- Ryan McKinley ([Grafana Labs](https://grafana.com/))
|
||||
- Sofia Papagiannaki ([Grafana Labs](https://grafana.com/))
|
||||
- Stephanie Closson ([Grafana Labs](https://grafana.com/))
|
||||
- Tobias Skarhed ([CERN](https://home.web.cern.ch/))
|
||||
- Tobias Skarhed ([Grafana Labs](https://grafana.com/))
|
||||
- Torkel Ödegaard ([Grafana Labs](https://grafana.com/))
|
||||
- Utkarsh Bhatnagar ([Tinder](https://www.tinder.com/))
|
||||
- Will Browne ([Grafana Labs](https://grafana.com/))
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
# Hall of fame
|
||||
|
||||
List of previous team members that have had a big impact on the company or the product and contributed during a long period of time.
|
||||
|
||||
- Hugo Häggmark ([School of applied technology](https://salt.study))
|
||||
@@ -77,11 +77,11 @@ Instructions for setting up filters in Gmail can be found [here](#setting-up-gma
|
||||
|
||||
## 2. Ensure the issue contains basic information
|
||||
|
||||
Before triaging an issue very far, make sure that the issue's author provided the standard issue information. This will help you make an educated recommendation on how to categorize the issue. The Grafana project utilizes [GitHub issue templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository) to guide contributors to provide standard information that must be included for each type of template or type of issue.
|
||||
Before triaging an issue very far, make sure that the issue's author provided the standard issue information. This will help you make an educated recommendation on how to categorize the issue. The Grafana project utilizes [GitHub issue templates](https://help.github.com/en/articles/creating-issue-templates-for-your-repository) to guide contributors to provide standard information that must be included for each type of template or type of issue.
|
||||
|
||||
### Standard issue information that must be included
|
||||
|
||||
Given a certain [issue template](https://github.com/grafana/grafana/issues/new/choose) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
|
||||
Given a certain [issue template](<[template](https://github.com/grafana/grafana/issues/new/choose)>) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
|
||||
|
||||
#### Bug reports
|
||||
|
||||
@@ -192,7 +192,7 @@ First, evaluate if the documentation makes sense to be included in the Grafana p
|
||||
|
||||
- Is this something we want/can maintain as a project?
|
||||
- Is this referring to usage of some specific integration/tool and in that case is that a popular use case in combination with Grafana?
|
||||
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments) to identify that lots of other users want/need this.
|
||||
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) to identify that lots of other users want/need this.
|
||||
|
||||
Second, label the issue `type/docs` and at least one `area/*` or `datasource/*` label.
|
||||
|
||||
@@ -296,13 +296,13 @@ In many cases the issue author or community as a whole is more suitable to contr
|
||||
|
||||
## Investigation of issues
|
||||
|
||||
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [Needs investigation](https://github.com/grafana/grafana/labels/needs%20investigation). Depending on the perceived severity and/or number of [upvotes](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
|
||||
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [Needs investigation](https://github.com/grafana/grafana/labels/needs%20investigation). Depending on the perceived severity and/or number of [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
|
||||
|
||||
Investigating issues can be a very time consuming task, especially for the maintainers, given the huge number of combinations of plugins, data sources, platforms, databases, browsers, tools, hardware, integrations, versions and cloud services, etc that are being used with Grafana. There is a certain number of combinations that are more common than others, and these are in general easier for maintainers to investigate.
|
||||
|
||||
For some other combinations it may not be possible at all for a maintainer to setup a proper test environment to investigate the issue. In these cases we really appreciate any help we can get from the community. Otherwise the issue is highly likely to be closed.
|
||||
|
||||
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
|
||||
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
|
||||
|
||||
## Automation
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ packages/grafana-toolkit/
|
||||
packages/grafana-ui/
|
||||
packages/jaeger-ui-components/
|
||||
packaging/
|
||||
pkg/coremodel/
|
||||
pkg/framework/coremodel/
|
||||
grafana-mixin/
|
||||
cue/
|
||||
```
|
||||
|
||||
18
Makefile
18
Makefile
@@ -14,8 +14,6 @@ GO_FILES ?= ./pkg/...
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
API_DEFINITION_FILES = $(shell find ./pkg/api/docs/definitions -name '*.go' -print)
|
||||
SWAGGER_TAG ?= latest
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
|
||||
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))
|
||||
|
||||
all: deps build
|
||||
|
||||
@@ -35,7 +33,7 @@ node_modules: package.json yarn.lock ## Install node modules.
|
||||
##@ Swagger
|
||||
SPEC_TARGET = public/api-spec.json
|
||||
MERGED_SPEC_TARGET := public/api-merged.json
|
||||
NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/api.json
|
||||
NGALERT_SPEC_TARGET = pkg/services/ngalert/api/tooling/post.json
|
||||
|
||||
$(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec
|
||||
docker run --rm -it \
|
||||
@@ -50,13 +48,13 @@ $(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i /grafana/pkg/api/docs/tags.json
|
||||
|
||||
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
|
||||
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET)
|
||||
|
||||
$(NGALERT_SPEC_TARGET):
|
||||
+$(MAKE) -C pkg/services/ngalert/api/tooling api.json
|
||||
+$(MAKE) -C pkg/services/ngalert/api/tooling post.json
|
||||
|
||||
$(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) ## Merge generated and ngalert API specs
|
||||
go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/api.json
|
||||
go run pkg/api/docs/merge/merge_specs.go -o=public/api-merged.json $(<) pkg/services/ngalert/api/tooling/post.json
|
||||
|
||||
ensure_go-swagger_mac:
|
||||
@hash swagger &>/dev/null || (brew tap go-swagger/go-swagger && brew install go-swagger)
|
||||
@@ -67,7 +65,7 @@ ensure_go-swagger_mac:
|
||||
-x "github.com/prometheus/alertmanager" \
|
||||
-i pkg/api/docs/tags.json
|
||||
|
||||
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET) validate-api-spec
|
||||
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET)
|
||||
|
||||
validate-api-spec: $(MERGED_SPEC_TARGET) ## Validate API spec
|
||||
docker run --rm -it \
|
||||
@@ -89,15 +87,15 @@ gen-go: $(WIRE)
|
||||
|
||||
build-go: $(MERGED_SPEC_TARGET) gen-go ## Build all Go binaries.
|
||||
@echo "build go files"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build
|
||||
$(GO) run build.go build
|
||||
|
||||
build-server: ## Build Grafana server.
|
||||
@echo "build server"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build-server
|
||||
$(GO) run build.go build-server
|
||||
|
||||
build-cli: ## Build Grafana CLI application.
|
||||
@echo "build grafana-cli"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build-cli
|
||||
$(GO) run build.go build-cli
|
||||
|
||||
build-js: ## Build frontend assets.
|
||||
@echo "build frontend"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||

|
||||
|
||||
The open-source platform for monitoring and observability
|
||||
The open-source platform for monitoring and observability.
|
||||
|
||||
[](LICENSE)
|
||||
[](https://drone.grafana.net/grafana/grafana)
|
||||
[](https://goreportcard.com/report/github.com/grafana/grafana)
|
||||
|
||||
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture:
|
||||
Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data driven culture:
|
||||
|
||||
- **Visualizations:** Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
|
||||
- **Visualize:** Fast and flexible client side graphs with a multitude of options. Panel plugins offer many different ways to visualize metrics and logs.
|
||||
- **Dynamic Dashboards:** Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
|
||||
- **Explore Metrics:** Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
|
||||
- **Explore Logs:** Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
|
||||
|
||||
@@ -15,7 +15,6 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
|
||||
- `grafana/build-container`
|
||||
- Appveyor
|
||||
- Dockerfile
|
||||
- `.github/workflows/publish.yml`
|
||||
|
||||
## Go dependencies
|
||||
|
||||
|
||||
@@ -9,9 +9,6 @@ app_mode = production
|
||||
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
|
||||
instance_name = ${HOSTNAME}
|
||||
|
||||
# force migration will run migrations that might cause dataloss
|
||||
force_migration = false
|
||||
|
||||
#################################### Paths ###############################
|
||||
[paths]
|
||||
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
|
||||
@@ -196,19 +193,12 @@ reporting_enabled = true
|
||||
reporting_distributor = grafana-labs
|
||||
|
||||
# Set to false to disable all checks to https://grafana.com
|
||||
# for new versions of grafana. The check is used
|
||||
# in some UI views to notify that a grafana update exists.
|
||||
# for new versions (grafana itself and plugins), check is used
|
||||
# in some UI views to notify that grafana or plugin update exists
|
||||
# This option does not cause any auto updates, nor send any information
|
||||
# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version.
|
||||
# only a GET request to https://grafana.com to get latest versions
|
||||
check_for_updates = true
|
||||
|
||||
# Set to false to disable all checks to https://grafana.com
|
||||
# for new versions of plugins. The check is used
|
||||
# in some UI views to notify that a plugin update exists.
|
||||
# This option does not cause any auto updates, nor send any information
|
||||
# only a GET request to https://grafana.com to get the latest versions.
|
||||
check_for_plugin_updates = true
|
||||
|
||||
# Google Analytics universal tracking code, only enabled if you specify an id here
|
||||
google_analytics_ua_id =
|
||||
|
||||
@@ -233,9 +223,6 @@ application_insights_connection_string =
|
||||
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
|
||||
application_insights_endpoint_url =
|
||||
|
||||
# Controls if the UI contains any links to user feedback forms
|
||||
feedback_links_enabled = true
|
||||
|
||||
#################################### Security ############################
|
||||
[security]
|
||||
# disable creation of admin user on first start of grafana
|
||||
@@ -305,18 +292,6 @@ content_security_policy = false
|
||||
# $ROOT_PATH is server.root_url without the protocol.
|
||||
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
|
||||
|
||||
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
|
||||
angular_support_enabled = true
|
||||
|
||||
[security.encryption]
|
||||
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
|
||||
# Please note that small values may cause performance issues due to a high frequency decryption operations.
|
||||
data_keys_cache_ttl = 15m
|
||||
|
||||
# Defines the frequency of data encryption keys cache cleanup interval.
|
||||
# On every interval, decrypted data encryption keys that reached the TTL are removed from the cache.
|
||||
data_keys_cache_cleanup_interval = 1m
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
[snapshots]
|
||||
# snapshot sharing options
|
||||
@@ -477,8 +452,6 @@ token_url = https://gitlab.com/oauth/token
|
||||
api_url = https://gitlab.com/api/v4
|
||||
allowed_domains =
|
||||
allowed_groups =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
|
||||
#################################### Google Auth #########################
|
||||
[auth.google]
|
||||
@@ -523,7 +496,6 @@ auth_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize
|
||||
token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
|
||||
allowed_domains =
|
||||
allowed_groups =
|
||||
role_attribute_strict = false
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
@@ -584,6 +556,8 @@ enabled = false
|
||||
header_name = X-WEBAUTH-USER
|
||||
header_property = username
|
||||
auto_sign_up = true
|
||||
# Deprecated, use sync_ttl instead
|
||||
ldap_sync_ttl = 60
|
||||
sync_ttl = 60
|
||||
whitelist =
|
||||
headers =
|
||||
@@ -611,7 +585,7 @@ allow_sign_up = true
|
||||
|
||||
# LDAP background sync (Enterprise only)
|
||||
# At 1 am every day
|
||||
sync_cron = "0 1 * * *"
|
||||
sync_cron = "0 0 1 * * *"
|
||||
active_sync_enabled = true
|
||||
|
||||
#################################### AWS ###########################
|
||||
@@ -643,12 +617,6 @@ managed_identity_enabled = false
|
||||
# Should be set for user-assigned identity and should be empty for system-assigned identity
|
||||
managed_identity_client_id =
|
||||
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
enabled = true
|
||||
# If enabled, cache permissions in a in memory cache (Enterprise only)
|
||||
permission_cache = true
|
||||
|
||||
#################################### SMTP / Emailing #####################
|
||||
[smtp]
|
||||
enabled = false
|
||||
@@ -841,22 +809,6 @@ max_attempts = 3
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
min_interval = 10s
|
||||
|
||||
[unified_alerting.screenshots]
|
||||
# Enable screenshots in notifications. This option requires a remote HTTP image rendering service. Please
|
||||
# see [rendering] for further configuration options.
|
||||
capture = false
|
||||
|
||||
# The maximum number of screenshots that can be taken at the same time. This option is different from
|
||||
# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots
|
||||
# that can be taken at the same time for all firing alerts where as concurrent_render_request_limit sets
|
||||
# the total number of concurrent screenshots across all Grafana services.
|
||||
max_concurrent_screenshots = 5
|
||||
|
||||
# Uploads screenshots to the local Grafana server or remote storage such as Azure, S3 and GCS. Please
|
||||
# see [external_image_storage] for further configuration options. If this option is false then
|
||||
# screenshots will be persisted to disk for up to temp_data_lifetime.
|
||||
upload_external_image_storage = false
|
||||
|
||||
#################################### Alerting ############################
|
||||
[alerting]
|
||||
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
|
||||
@@ -925,20 +877,10 @@ max_annotations_to_keep =
|
||||
# Enable the Explore section
|
||||
enabled = true
|
||||
|
||||
#################################### Help #############################
|
||||
[help]
|
||||
# Enable the Help section
|
||||
enabled = true
|
||||
|
||||
#################################### Profile #############################
|
||||
[profile]
|
||||
# Enable the Profile section
|
||||
enabled = true
|
||||
|
||||
#################################### Query History #############################
|
||||
[query_history]
|
||||
# Enable the Query history
|
||||
enabled = true
|
||||
enabled = false
|
||||
|
||||
#################################### Internal Grafana Metrics ############
|
||||
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
|
||||
@@ -972,7 +914,6 @@ url = https://grafana.com
|
||||
url = https://grafana.com
|
||||
|
||||
#################################### Distributed tracing ############
|
||||
# Opentracing is deprecated use opentelemetry instead
|
||||
[tracing.jaeger]
|
||||
# jaeger destination (ex localhost:6831)
|
||||
address =
|
||||
@@ -999,15 +940,6 @@ disable_shared_zipkin_spans = false
|
||||
[tracing.opentelemetry.jaeger]
|
||||
# jaeger destination (ex http://localhost:14268/api/traces)
|
||||
address =
|
||||
# Propagation specifies the text map propagation format: w3c, jaeger
|
||||
propagation =
|
||||
|
||||
# This is a configuration for OTLP exporter with GRPC protocol
|
||||
[tracing.opentelemetry.otlp]
|
||||
# otlp destination (ex localhost:4317)
|
||||
address =
|
||||
# Propagation specifies the text map propagation format: w3c, jaeger
|
||||
propagation =
|
||||
|
||||
#################################### External Image Storage ##############
|
||||
[external_image_storage]
|
||||
@@ -1169,24 +1101,6 @@ license_path =
|
||||
# enable = feature1,feature2
|
||||
enable =
|
||||
|
||||
# The new prometheus visual query builder
|
||||
promQueryBuilder = true
|
||||
|
||||
# The new loki visual query builder
|
||||
lokiQueryBuilder = true
|
||||
|
||||
# Experimental Explore to Dashboard workflow
|
||||
explore2Dashboard = true
|
||||
|
||||
# Experimental Command Palette
|
||||
commandPalette = true
|
||||
|
||||
# Use dynamic labels in CloudWatch datasource
|
||||
cloudWatchDynamicLabels = true
|
||||
|
||||
# New expandable navigation
|
||||
newNavigation = true
|
||||
|
||||
# feature1 = true
|
||||
# feature2 = false
|
||||
|
||||
@@ -1220,22 +1134,3 @@ default_baselayer_config =
|
||||
|
||||
# Enable or disable loading other base map layers
|
||||
enable_custom_baselayers = true
|
||||
|
||||
#################################### Dashboard previews #####################################
|
||||
|
||||
[dashboard_previews.crawler]
|
||||
# Number of dashboards rendered in parallel. Default is 6.
|
||||
thread_count =
|
||||
|
||||
# Timeout passed down to the Image Renderer plugin. It is used in two separate places within a single rendering request:
|
||||
# First during the initial navigation to the dashboard and then when waiting for all the panels to load. Default is 20s.
|
||||
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
|
||||
rendering_timeout =
|
||||
|
||||
# Maximum duration of a single crawl. Default is 1h.
|
||||
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
|
||||
max_crawl_duration =
|
||||
|
||||
# Minimum interval between two subsequent scheduler runs. Default is 12h.
|
||||
# This setting should be expressed as a duration. Examples: 10s (seconds), 1m (minutes).
|
||||
scheduler_interval =
|
||||
|
||||
@@ -1,68 +1,76 @@
|
||||
# ---
|
||||
# # config file version
|
||||
# apiVersion: 2
|
||||
# apiVersion: 1
|
||||
|
||||
# # <list> list of roles to insert/update/delete
|
||||
# roles:
|
||||
# # <string, required> name of the role you want to create or update. Required.
|
||||
# - name: 'custom:users:writer'
|
||||
# # <string> uid of the role. Has to be unique for all orgs.
|
||||
# uid: customuserswriter1
|
||||
# # <string> description of the role, informative purpose only.
|
||||
# description: 'Create, read, write users'
|
||||
# # <int> version of the role, Grafana will update the role when increased.
|
||||
# version: 2
|
||||
# # <int> org id. Defaults to Grafana's default if not specified.
|
||||
# # list of default built-in role assignments that should be removed
|
||||
# removeDefaultAssignments:
|
||||
# # <string>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
|
||||
# - builtInRole: "Grafana Admin"
|
||||
# # <string>, must be one of the existing fixed roles
|
||||
# fixedRole: "fixed:permissions:admin"
|
||||
|
||||
# # list of default built-in role assignments that should be added back
|
||||
# addDefaultAssignments:
|
||||
# # <string>, must be one of the Organization roles (`Viewer`, `Editor`, `Admin`) or `Grafana Admin`
|
||||
# - builtInRole: "Admin"
|
||||
# # <string>, must be one of the existing fixed roles
|
||||
# fixedRole: "fixed:reporting:admin:read"
|
||||
|
||||
# # list of roles that should be deleted
|
||||
# deleteRoles:
|
||||
# # <string> name of the role you want to create. Required if no uid is set
|
||||
# - name: "custom:reports:editor"
|
||||
# # <string> uid of the role. Required if no name
|
||||
# uid: "customreportseditor1"
|
||||
# # <int> org id. will default to Grafana's default if not specified
|
||||
# orgId: 1
|
||||
# # <list> list of the permissions granted by this role.
|
||||
# permissions:
|
||||
# # <string, required> action allowed.
|
||||
# - action: 'users:read'
|
||||
# #<string> scope it applies to.
|
||||
# scope: 'users:*'
|
||||
# - action: 'users:write'
|
||||
# scope: 'users:*'
|
||||
# - action: 'users:create'
|
||||
# - name: 'custom:global:users:reader'
|
||||
# # <bool> overwrite org id and creates a global role.
|
||||
# global: true
|
||||
# # <string> state of the role. Defaults to 'present'. If 'absent', role will be deleted.
|
||||
# state: 'absent'
|
||||
# # <bool> force deletion revoking all grants of the role.
|
||||
# # <bool> force deletion revoking all grants of the role
|
||||
# force: true
|
||||
# - uid: 'basic_editor'
|
||||
# version: 2
|
||||
# - name: "custom:global:reports:reader"
|
||||
# uid: "customglobalreportsreader1"
|
||||
# # <bool> overwrite org id and removes a global role
|
||||
# global: true
|
||||
# # <list> list of roles to copy permissions from.
|
||||
# from:
|
||||
# - uid: 'basic_editor'
|
||||
# global: true
|
||||
# - name: 'fixed:users:writer'
|
||||
# global: true
|
||||
# # <list> list of the permissions to add/remove on top of the copied ones.
|
||||
# permissions:
|
||||
# - action: 'users:read'
|
||||
# scope: 'users:*'
|
||||
# - action: 'users:write'
|
||||
# scope: 'users:*'
|
||||
# # <string> state of the permission. Defaults to 'present'. If 'absent', the permission will be removed.
|
||||
# state: absent
|
||||
# force: true
|
||||
|
||||
# # <list> list role assignments to teams to create or remove.
|
||||
# teams:
|
||||
# # <string, required> name of the team you want to assign roles to. Required.
|
||||
# - name: 'Users writers'
|
||||
# # <int> org id. Will default to Grafana's default if not specified.
|
||||
# orgId: 1
|
||||
# # <list> list of roles to assign to the team
|
||||
# roles:
|
||||
# # <string> uid of the role you want to assign to the team.
|
||||
# - uid: 'customuserswriter1'
|
||||
# # <int> org id. Will default to Grafana's default if not specified.
|
||||
# orgId: 1
|
||||
# # <string> name of the role you want to assign to the team.
|
||||
# - name: 'fixed:users:writer'
|
||||
# # <bool> overwrite org id to specify the role is global.
|
||||
# # list of roles to insert/update depending on what is available in the database
|
||||
# roles:
|
||||
# # <string, required> name of the role you want to create. Required
|
||||
# - name: "custom:users:editor"
|
||||
# # <string> uid of the role. Has to be unique for all orgs.
|
||||
# uid: customuserseditor1
|
||||
# # <string> description of the role, informative purpose only.
|
||||
# description: "Role for our custom user editors"
|
||||
# # <int> version of the role, Grafana will update the role when increased
|
||||
# version: 2
|
||||
# # <int> org id. will default to Grafana's default if not specified
|
||||
# orgId: 1
|
||||
# # <list> list of the permissions granted by this role
|
||||
# permissions:
|
||||
# # <string, required> action allowed
|
||||
# - action: "users:read"
|
||||
# #<string> scope it applies to
|
||||
# scope: "users:*"
|
||||
# - action: "users:write"
|
||||
# scope: "users:*"
|
||||
# - action: "users:create"
|
||||
# scope: "users:*"
|
||||
# # <list> list of builtIn roles the role should be assigned to
|
||||
# builtInRoles:
|
||||
# # <string, required> name of the builtin role you want to assign the role to
|
||||
# - name: "Editor"
|
||||
# # <int> org id. will default to the role org id
|
||||
# orgId: 1
|
||||
# - name: "custom:global:users:reader"
|
||||
# uid: "customglobalusersreader1"
|
||||
# description: "Global Role for custom user readers"
|
||||
# version: 1
|
||||
# # <bool> overwrite org id and creates a global role
|
||||
# global: true
|
||||
# permissions:
|
||||
# - action: "users:read"
|
||||
# scope: "users:*"
|
||||
# builtInRoles:
|
||||
# - name: "Viewer"
|
||||
# orgId: 1
|
||||
# - name: "Editor"
|
||||
# # <bool> overwrite org id and assign role globally
|
||||
# global: true
|
||||
# # <string> state of the assignment. Defaults to 'present'. If 'absent', the assignment will be revoked.
|
||||
# state: absent
|
||||
|
||||
@@ -19,6 +19,8 @@ apiVersion: 1
|
||||
# orgId: 1
|
||||
# # <string> url
|
||||
# url: http://localhost:8080
|
||||
# # <string> database password, if used
|
||||
# password:
|
||||
# # <string> database user, if used
|
||||
# user:
|
||||
# # <string> database name, if used
|
||||
@@ -27,6 +29,8 @@ apiVersion: 1
|
||||
# basicAuth:
|
||||
# # <string> basic auth username
|
||||
# basicAuthUser:
|
||||
# # <string> basic auth password
|
||||
# basicAuthPassword:
|
||||
# # <bool> enable/disable with credentials headers
|
||||
# withCredentials:
|
||||
# # <bool> mark as default datasource. Max one per org
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
# instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty
|
||||
;instance_name = ${HOSTNAME}
|
||||
|
||||
# force migration will run migrations that might cause dataloss
|
||||
;force_migration = false
|
||||
|
||||
#################################### Paths ####################################
|
||||
[paths]
|
||||
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
|
||||
@@ -201,20 +198,13 @@
|
||||
# The name of the distributor of the Grafana instance. Ex hosted-grafana, grafana-labs
|
||||
;reporting_distributor = grafana-labs
|
||||
|
||||
# Set to false to disable all checks to https://grafana.com
|
||||
# for new versions of grafana. The check is used
|
||||
# in some UI views to notify that a grafana update exists.
|
||||
# Set to false to disable all checks to https://grafana.net
|
||||
# for new versions (grafana itself and plugins), check is used
|
||||
# in some UI views to notify that grafana or plugin update exists
|
||||
# This option does not cause any auto updates, nor send any information
|
||||
# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version.
|
||||
# only a GET request to http://grafana.com to get latest versions
|
||||
;check_for_updates = true
|
||||
|
||||
# Set to false to disable all checks to https://grafana.com
|
||||
# for new versions of plugins. The check is used
|
||||
# in some UI views to notify that a plugin update exists.
|
||||
# This option does not cause any auto updates, nor send any information
|
||||
# only a GET request to https://grafana.com to get the latest versions.
|
||||
;check_for_plugin_updates = true
|
||||
|
||||
# Google Analytics universal tracking code, only enabled if you specify an id here
|
||||
;google_analytics_ua_id =
|
||||
|
||||
@@ -233,9 +223,6 @@
|
||||
# Rudderstack Config url, optional, used by Rudderstack SDK to fetch source config
|
||||
;rudderstack_config_url =
|
||||
|
||||
# Controls if the UI contains any links to user feedback forms
|
||||
;feedback_links_enabled = true
|
||||
|
||||
#################################### Security ####################################
|
||||
[security]
|
||||
# disable creation of admin user on first start of grafana
|
||||
@@ -305,18 +292,6 @@
|
||||
# $ROOT_PATH is server.root_url without the protocol.
|
||||
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
|
||||
|
||||
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
|
||||
;angular_support_enabled = true
|
||||
|
||||
[security.encryption]
|
||||
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
|
||||
# Please note that small values may cause performance issues due to a high frequency decryption operations.
|
||||
;data_keys_cache_ttl = 15m
|
||||
|
||||
# Defines the frequency of data encryption keys cache cleanup interval.
|
||||
# On every interval, decrypted data encryption keys that reached the TTL are removed from the cache.
|
||||
;data_keys_cache_cleanup_interval = 1m
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
[snapshots]
|
||||
# snapshot sharing options
|
||||
@@ -506,7 +481,6 @@
|
||||
;token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
|
||||
;allowed_domains =
|
||||
;allowed_groups =
|
||||
;role_attribute_strict = false
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
@@ -594,7 +568,7 @@
|
||||
|
||||
# LDAP background sync (Enterprise only)
|
||||
# At 1 am every day
|
||||
;sync_cron = "0 1 * * *"
|
||||
;sync_cron = "0 0 1 * * *"
|
||||
;active_sync_enabled = true
|
||||
|
||||
#################################### AWS ###########################
|
||||
@@ -623,11 +597,6 @@
|
||||
# Should be set for user-assigned identity and should be empty for system-assigned identity
|
||||
;managed_identity_client_id =
|
||||
|
||||
#################################### Role-based Access Control ###########
|
||||
[rbac]
|
||||
;enabled = true
|
||||
# If enabled, cache permissions in a in memory cache (Enterprise only)
|
||||
;permission_cache = true
|
||||
#################################### SMTP / Emailing ##########################
|
||||
[smtp]
|
||||
;enabled = false
|
||||
@@ -890,20 +859,10 @@
|
||||
# Enable the Explore section
|
||||
;enabled = true
|
||||
|
||||
#################################### Help #############################
|
||||
[help]
|
||||
# Enable the Help section
|
||||
;enabled = true
|
||||
|
||||
#################################### Profile #############################
|
||||
[profile]
|
||||
# Enable the Profile section
|
||||
;enabled = true
|
||||
|
||||
#################################### Query History #############################
|
||||
[query_history]
|
||||
# Enable the Query history
|
||||
;enabled = true
|
||||
;enabled = false
|
||||
|
||||
#################################### Internal Grafana Metrics ##########################
|
||||
# Metrics available at HTTP URL /metrics and /metrics/plugins/:pluginId
|
||||
@@ -937,7 +896,6 @@
|
||||
;url = https://grafana.com
|
||||
|
||||
#################################### Distributed tracing ############
|
||||
# Opentracing is deprecated use opentelemetry instead
|
||||
[tracing.jaeger]
|
||||
# Enable by setting the address sending traces to jaeger (ex localhost:6831)
|
||||
;address = localhost:6831
|
||||
@@ -964,15 +922,6 @@
|
||||
[tracing.opentelemetry.jaeger]
|
||||
# jaeger destination (ex http://localhost:14268/api/traces)
|
||||
; address = http://localhost:14268/api/traces
|
||||
# Propagation specifies the text map propagation format: w3c, jaeger
|
||||
; propagation = jaeger
|
||||
|
||||
# This is a configuration for OTLP exporter with GRPC protocol
|
||||
[tracing.opentelemetry.otlp]
|
||||
# otlp destination (ex localhost:4317)
|
||||
; address = localhost:4317
|
||||
# Propagation specifies the text map propagation format: w3c, jaeger
|
||||
; propagation = w3c
|
||||
|
||||
#################################### External image storage ##########################
|
||||
[external_image_storage]
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
Grafana uses a _bus_ to pass messages between different parts of the application. All communication over the bus happens synchronously.
|
||||
|
||||
> **Deprecated:** The bus has officially been deprecated, however, we're still using the command/query objects paradigms.
|
||||
|
||||
There are three types of messages: _events_, _commands_, and _queries_.
|
||||
|
||||
## Events
|
||||
|
||||
@@ -99,8 +99,6 @@ To add a migration:
|
||||
- In the `AddMigrations` function, find the `addXxxMigration` function for the service you want to create a migration for.
|
||||
- At the end of the `addXxxMigration` function, register your migration:
|
||||
|
||||
> **NOTE:** Putting migrations behind feature flags is no longer recommended as it may cause the migration skip integration testing.
|
||||
|
||||
[Example](https://github.com/grafana/grafana/blob/00d0640b6e778ddaca021670fe851fe00982acf2/pkg/services/sqlstore/migrations/migrations.go#L55-L70)
|
||||
|
||||
### Implement `DatabaseMigrator`
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 119 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB |
@@ -1,119 +0,0 @@
|
||||
# Handling breaking changes in Grafana frontend APIs
|
||||
|
||||
This guide tries to help you identify and communicate breaking changes introduced to our frontend API.
|
||||
|
||||
- [What are our public APIs?](#what-are-our-public-apis)
|
||||
- [What is Levitate?](#what-is-levitate)
|
||||
- [How does the CI workflow look like?](#how-does-the-ci-workflow-look-like)
|
||||
- [I received a comment on my PR, what does it mean?](#i-received-a-comment-on-my-pr-what-does-it-mean)
|
||||
- [**I know it's a breaking change, what's next?**](#i-know-its-a-breaking-change-whats-next)
|
||||
- [Introduce breaking changes only in major versions](#introduce-breaking-changes-only-in-major-versions)
|
||||
- [Deprecate first](#deprecate-first)
|
||||
- [Communicate](#communicate)
|
||||
- [I still have questions, who can help me out?](#i-still-have-questions-who-can-help-me-out)
|
||||
|
||||
---
|
||||
|
||||
## What are our public APIs?
|
||||
|
||||
The Grafana frontend codebase is exposing functionality through NPM packages to make plugin development easier and faster.
|
||||
These packages live in the `/packages` folder and contain packages like:
|
||||
|
||||
- `@grafana/data`
|
||||
- `@grafana/runtime`
|
||||
- `@grafana/toolkit`
|
||||
- `@grafana/ui`
|
||||
- etc. ([They can be viewed here](https://github.com/grafana/grafana/tree/main/packages)
|
||||
|
||||
Any change that causes dependent software to behave differently is considered to be breaking.
|
||||
|
||||
## What is Levitate?
|
||||
|
||||
[`@grafana/levitate`](https://github.com/grafana/levitate) is a tool created by Grafana that can show breaking changes between two versions of a **TypeScript** package or a source file.
|
||||
|
||||
It can list exported members of an NPM package or imports used by an NPM package,
|
||||
**but we are mainly using it for comparing different versions of the same package to see changes in the exported members.**
|
||||
|
||||
A Github workflow runs against every pull request and comments a hint in case there are
|
||||
possible breaking changes. It also adds the `"breaking change"` label to the pull request.
|
||||
|
||||
## How does the CI workflow look like?
|
||||
|
||||
<img src="./breaking-changes-workflow.png" alt="CI workflow" width="700" />
|
||||
|
||||
## I received a comment on my PR, what does it mean?
|
||||
|
||||

|
||||
|
||||
Receiving a comment like the one above does not necessarily mean that you actually introduced breaking
|
||||
changes (as certain edge cases are still not covered by the tool), but as there is a good chance we rather raise attention.
|
||||
|
||||
By clicking the links in the comment ("more info" or "Check console output") you can view more detailed information about what triggered the notification.
|
||||
|
||||
**Removed exported members** (console view):<br />
|
||||
This means that some previously exported members won't be available in the newer version of the package which can break dependent plugins.
|
||||
|
||||

|
||||
|
||||
**Changed an existing member** (console view):<br />
|
||||
This means that a member was changed in a way that can break dependent plugins.
|
||||
|
||||

|
||||
|
||||
**No breaking changes** (console view):<br />
|
||||
Seeing this suggests that whilst changes were made, most probably none of them were breaking. You are good to go! 👏
|
||||
|
||||

|
||||
|
||||
## How can I decide if it is really a breaking change?
|
||||
|
||||
First go to the console output of the workflow and make sure that the diffs make sense.
|
||||
|
||||
It can happen that Levitate highlights a change which is marked with TSDoc tags `// @alpha` or `// @internal` in
|
||||
which case you can choose to ignore it - keep in mind though that these flags won't really hold developers back
|
||||
from using your code and most likely it is going to cause them problems if we are breaking them.
|
||||
|
||||
It can also happen that Levitate marks changing an interface as a possible breaking change.
|
||||
For anyone that implements that interface introducing a new property will break their code. Whilst this is correctly marked as a breaking change maybe it is an interface that is never implemented by other developers. In which case you can choose to ignore Levitate's message.
|
||||
|
||||
These notifications are only warnings though, and **in the end it's up to the author of the PR to make a decision that makes the most sense.**
|
||||
|
||||
## I know it's a breaking change, what's next?
|
||||
|
||||
### Introduce breaking changes only in major versions
|
||||
|
||||
We can make breaking changes less painful if they are only happening between major releases of Grafana.
|
||||
|
||||
### Deprecate first
|
||||
|
||||
Whenever possible try to deprecate first what you are about to remove or change. For example:
|
||||
|
||||
```javascript
|
||||
import { deprecationWarning } from '@grafana/data';
|
||||
|
||||
/**
|
||||
* @deprecated -- this is no longer necessary and will be removed in Grafana 9.0.0
|
||||
*/
|
||||
myOldFunction(name: string) {
|
||||
deprecationWarning('MyFile', 'myOldFunction', 'myNewFunction');
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
1. Add a deprecation comment `// @deprecated`
|
||||
2. Add info in the comment about **when it is going to be removed**
|
||||
3. Add info in the comment about **what should be used instead**
|
||||
4. In case it's a function or a method, use `deprecationWarning(<file name>, <old name>, <new name>)` to raise attention during runtime as well
|
||||
5. Update the [migration guide](../docs/sources/developers/plugins/migration-guide.md) with your instructions
|
||||
|
||||
### Communicate
|
||||
|
||||
Reach out to **@grafana/plugins-platform-frontend** to help finding which plugins are using the code that is just about to change, so we try making it smoother by communicating it to them.
|
||||
|
||||
---
|
||||
|
||||
## I still have questions, who can help me out?
|
||||
|
||||
We are here to help.
|
||||
|
||||
Please either ping us in the pull request by using the **@grafana/plugins-platform-frontend** handle or reach out to us on the internal Slack in `#grafana-plugins-platform`.
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 130 KiB |
@@ -117,14 +117,11 @@ If you're unsure, see the existing [changelog](https://github.com/grafana/grafan
|
||||
|
||||
### Pull request titles
|
||||
|
||||
The pull request title should be formatted according to `<Area>: <Summary>` (Both "Area" and "Summary" should start with a capital letter).
|
||||
|
||||
The Grafana team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body.
|
||||
|
||||
We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible.
|
||||
|
||||
**Example:**
|
||||
`Docs: Change url to URL in all documentation files`
|
||||
Make sure that the title for your pull request uses the same format as the subject line in the commit message.
|
||||
|
||||
## Configuration changes
|
||||
|
||||
|
||||
@@ -136,26 +136,6 @@ Running the backend tests on Windows currently needs some tweaking, so use the b
|
||||
go run build.go test
|
||||
```
|
||||
|
||||
### Run SQLLite, PostgreSQL and MySQL integration tests
|
||||
|
||||
By default, Grafana runs SQLite to run tests with SQLite.
|
||||
|
||||
```bash
|
||||
go test -covermode=atomic -tags=integration ./pkg/...
|
||||
```
|
||||
|
||||
To run PostgreSQL and MySQL integration tests locally, start the Docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
|
||||
|
||||
```bash
|
||||
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
|
||||
```
|
||||
|
||||
and/or
|
||||
|
||||
```bash
|
||||
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
|
||||
```
|
||||
|
||||
### Run end-to-end tests
|
||||
|
||||
The end to end tests in Grafana use [Cypress](https://www.cypress.io/) to run automated scripts in a headless Chromium browser. Read more about our [e2e framework](/contribute/style-guides/e2e.md).
|
||||
|
||||
@@ -212,10 +212,10 @@ of the sentence. When you write in passive voice, the recipient of the action (a
|
||||
Active-voice sentences are more direct and clearly identify _who_ is doing _what_. Not all tasks are completed by a user; sometimes the system can also be a performer (and by extension, the subject of the sentence). When you write in active voice you clearly make that distinction, which results in more engaging and less wordy content.
|
||||
|
||||
| Use (active) | Avoid (passive) |
|
||||
| ----------------------------------------------------- | -------------------------------------------------------------------- |
|
||||
| ----------------------------------------------------- | -------------------------------------------------------------------- | --- |
|
||||
| After you upgrade the software, restart the computer. | After the software has been upgraded, the computer can be restarted. |
|
||||
| Click **OK** to save the dashboard. | The dashboard is saved when the **OK** button is clicked. |
|
||||
| Create a dashboard. | A dashboard is created by you. |
|
||||
| Create a dashboard. | A dashboard is created by you. | . |
|
||||
|
||||
### Avoid obscure non-English words and abbreviations
|
||||
|
||||
|
||||
@@ -1,194 +0,0 @@
|
||||
# Localisation
|
||||
|
||||
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend.
|
||||
|
||||
## tl;dr
|
||||
|
||||
- Use `<Trans id="search-results.panel-link">Go to {panel.title}</Trans>` in code to add a translatable phrase
|
||||
- Translations are stored in .po files in `public/locales/{locale}/messages.po`
|
||||
- If a particular phrase is not available in the a language then it will fall back to English
|
||||
|
||||
## How to add a new translation phrase
|
||||
|
||||
1. Use one of `@lingui/macro`'s React components with the `id`, ensuring it conforms to the guidelines below, with the default english translation. e.g.
|
||||
|
||||
```jsx
|
||||
import { Trans } from @lingui/macro
|
||||
|
||||
const SearchTitle = ({term}) => (
|
||||
<Trans id="search-page.results-title">
|
||||
Results for {term}
|
||||
</Trans>
|
||||
);
|
||||
```
|
||||
|
||||
Prefer using the JSX components (compared to the plain javascript functions, see below) where possible for phrases. Many props can (and probably should) be changed to accept the `React.ReactNode` instead of `string` for phrases put into the DOM.
|
||||
|
||||
Note that Lingui must be able to statically analyse the code to extract the phrase, so the `id` can not be dynamic. e.g. the following will not work:
|
||||
|
||||
```jsx
|
||||
const ErrorMessage = ({ id, message }) => <Trans id={`errors.${id}`}>There was an error: {message}</Trans>;
|
||||
```
|
||||
|
||||
2. Upon reload, the default English phrase will appear on the page.
|
||||
|
||||
3. Before submitting your PR, run the `yarn i18n:extract` command to extract the messages you added into the `messages.po` file and make them available for translation.
|
||||
|
||||
## How translations work in Grafana
|
||||
|
||||
Grafana uses the [LinguiJS](https://github.com/lingui/js-lingui) framework for managing translating phrases in the Grafana frontend. It:
|
||||
|
||||
- Marks up phrases within our code for extraction
|
||||
- Extracts phrases into messages catalogues for translating in external systems
|
||||
- "Compiles" the catalogues to a format that can be used in the website
|
||||
- Manages the user's locale and putting the translated phrases in the UI
|
||||
|
||||
### Phrase ID naming convention
|
||||
|
||||
We set explicit IDs for phrases to make it easier to identify phrases out of context, and to track where they're used. IDs follow a naming scheme that includes _where_ the phrase is used. The exception is the rare case of single reoccuring words like "Cancel", but default to using a feature/phrase specific phrase.
|
||||
|
||||
Message IDs are made of _up to_ three segments in the format `feature.area.phrase`. For example:
|
||||
|
||||
- `dashboard.header.refresh-label`
|
||||
- `explore.toolbar.share-tooltip`
|
||||
|
||||
For components used all over the site, use just two segments:
|
||||
|
||||
- `footer.update`
|
||||
- `navigation.home`
|
||||
|
||||
### Top-level provider
|
||||
|
||||
In [AppWrapper.tsx](/public/app/AppWrapper.tsx) the app is wrapped with `I18nProvider` from `public/app/core/localisation.tsx` where the Lingui instance is created with the user's preferred locale. This sets the appropriate context and allows any component from `@lingui/macro` to use the translations for the user's preferred locale.
|
||||
|
||||
### Message format
|
||||
|
||||
Lingui uses the [ICU MessageFormat](https://unicode-org.github.io/icu/userguide/format_parse/messages/) for the phrases in the .po catalogues. ICU has special syntax especially for describing plurals across multiple languages. For more details see the [Lingui docs](https://lingui.js.org/ref/message-format.html).
|
||||
|
||||
### Plain JS usage
|
||||
|
||||
See [Lingui Docs](https://lingui.js.org/ref/macro.html#t) for more details.
|
||||
|
||||
Sometimes you may need to translate a string cannot be represented in JSX, such as `placeholder` props. Use the `t` macro for this.
|
||||
|
||||
```jsx
|
||||
import { t } from "@lingui/macro"
|
||||
|
||||
const placeholder = t({
|
||||
id: 'form.username-placeholder',
|
||||
message: `Username`
|
||||
});
|
||||
|
||||
return <input type="value" placeholder={placeholder}>
|
||||
```
|
||||
|
||||
While the `t` macro can technically be used outside of React functions (e.g, in actions/reducers), aim to keep all UI phrases within the React UI functions.
|
||||
|
||||
## Examples
|
||||
|
||||
See the [Lingui docs](https://lingui.js.org/ref/macro.html#usage) for more details.
|
||||
|
||||
### Basic usage
|
||||
|
||||
For fixed phrases:
|
||||
|
||||
```jsx
|
||||
import { Trans } from '@lingui/macro';
|
||||
|
||||
<Trans id="page.greeting">Hello user!</Trans>;
|
||||
```
|
||||
|
||||
You can include variables, just like regular JSX. Prefer using "simple" variables to make the extracted phrase easier to read for translators
|
||||
|
||||
```jsx
|
||||
import { Trans } from '@lingui/macro';
|
||||
|
||||
// Bad - translators will see: Hello {0}
|
||||
<Trans id="page.greeting">Hello {user.name}!</Trans>;
|
||||
|
||||
// Good - translators will see: Hello {userName}
|
||||
const userName = user.name;
|
||||
<Trans id="page.greeting">Hello {userName}!</Trans>;
|
||||
```
|
||||
|
||||
Variables must be strings (or, must support calling `.toString()`, which we almost never want).
|
||||
|
||||
```jsx
|
||||
import { Trans } from '@lingui/macro';
|
||||
|
||||
// This will not work
|
||||
const userName = <strong>user.name</strong>;
|
||||
<Trans id="page.greeting">Hello {userName}!</Trans>;
|
||||
|
||||
// Instead, put the JSX inside the phrase directly
|
||||
const userName = user.name;
|
||||
<Trans id="page.greeting">
|
||||
Hello <strong>{userName}</strong>!
|
||||
</Trans>;
|
||||
```
|
||||
|
||||
### React components and HTML tags
|
||||
|
||||
Both HTML tags and React components can be included in a phase. The Lingui macro will replace them with placeholder tags for the translators
|
||||
|
||||
```js
|
||||
import { Trans } from "@lingui/macro"
|
||||
|
||||
const randomVariable = "variable"
|
||||
|
||||
<Trans id="page.explainer">
|
||||
Click <button>here</button> to <a href="https://grafana.com">learn more.</a>
|
||||
</Trans>
|
||||
|
||||
// ↓ is transformed by macros into ↓
|
||||
<Trans
|
||||
id="page.explainer"
|
||||
defaults="Click <0>here</0> to <1>learn more</1>"
|
||||
components={[
|
||||
<button />,
|
||||
<Text />
|
||||
]}
|
||||
/>
|
||||
|
||||
// ↓ is in the messages.po file like ↓
|
||||
msgid "page.explainer"
|
||||
msgstr "Click <0>here</0> to <1>learn more</1>"
|
||||
```
|
||||
|
||||
### Plurals
|
||||
|
||||
See the [Lingui docs](https://lingui.js.org/ref/macro.html#id1) for more details.
|
||||
|
||||
Plurals require special handling to make sure they can be translating according to the rules of each locale (which may be more complex that you think!). Use the `<Plural />` component and specify the plural forms for the default language (English). The message will be extracted into a form where translators can extend it with rules for other locales.
|
||||
|
||||
```js
|
||||
import { Plural } from "@lingui/macro"
|
||||
|
||||
<Plural
|
||||
id="sharing.shared-with"
|
||||
value={sharedCount}
|
||||
none="Not shared with anyone"
|
||||
one="Shared with one person"
|
||||
other="Shared with # people"
|
||||
/>
|
||||
|
||||
// ↓ is transformed by macros into ↓
|
||||
|
||||
<Trans
|
||||
id="example.plurals"
|
||||
values={{ sharedCount }}
|
||||
defaults="{sharedCount, plural, none {Not shared with anyone}, one {Shared with one person}, other {Shared with # people}"
|
||||
/>
|
||||
|
||||
// sharedCount = 0 -> Not shared with anyone
|
||||
// sharedCount = 1 -> Shared with one person
|
||||
// sharedCount = 3 -> Shared with # people
|
||||
```
|
||||
|
||||
### Date and time
|
||||
|
||||
[Lingui has functions](https://lingui.js.org/ref/core.html#I18n.date) to format dates and times according to the convention to the user's preferred locale, based on the browser [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) API. However, as displaying dates and times is fundamental to Grafana, guidelines have not been established for this yet.
|
||||
|
||||
## Documentation
|
||||
|
||||
[Grafana's documentation](https://grafana.com/docs/grafana/latest/) is not yet open for translation and should be authored in English only.
|
||||
@@ -27,15 +27,10 @@ Before you can merge a pull request, it must have a review approval, and all the
|
||||
|
||||
### Format the pull request title
|
||||
|
||||
The pull request title should be formatted according to `<Area>: <Summary>` (Both "Area" and "Summary" should start with a capital letter).
|
||||
|
||||
Keep the summary short and understandable for the community as a whole.
|
||||
The pull request title should be formatted according to `<Area>: <Summary>`. Keep the summary short and understandable for the community as a whole.
|
||||
|
||||
All commits in a pull request are squashed when merged and the pull request title will be the default subject line of the squashed commit message. It's also used for [changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
|
||||
**Example:**
|
||||
`Docs: Change url to URL in all documentation files`
|
||||
|
||||
See [formatting guidelines](create-pull-request.md#formatting-guidelines) for more information.
|
||||
|
||||
### Assign a milestone
|
||||
@@ -48,31 +43,11 @@ This makes it easier to track what changes go into a certain release. Without th
|
||||
|
||||
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
|
||||
|
||||
Exactly what changes should be added to the changelog is hard to answer but some general guidance would be any change that you think would be interesting for the community as a whole. Use your best judgement and/or ask other maintainers for advice.
|
||||
|
||||
There's a GitHub action available in the repository named [Update changelog](https://github.com/grafana/grafana/blob/main/.github/workflows/update-changelog.yml) that can manually be triggered to re-generate the changelog and release notes for any release.
|
||||
|
||||
Exactly what changes should be added to the changelog is hard to answer but here's some general guidance:
|
||||
|
||||
- Include any bug fix in general.
|
||||
- Include any change that you think would be interesting for the community as a whole.
|
||||
- Skip larger features divided in multiple pull requests since they might go into the release blog post/What's New article.
|
||||
- Use your best judgement and/or ask other maintainers for advice.
|
||||
- Including a change in error rather than skipping one that should have been there is better.
|
||||
- Always keep [Format the pull request title](#format-the-pull-request-title) in mind.
|
||||
|
||||
An active decision to include change in changelog/release notes needs to be taken for every pull request. There's a pull request check named **Changelog Check** that will enforce this. By adding/removing labels on the pull request or updating the pull request title/description the check will be re-evaluated.
|
||||
|
||||
#### Skip changelog
|
||||
|
||||
If you don't want to include your change in changelog/release notes you need to add a label named **no-changelog** to the pull request.
|
||||
|
||||
#### Include in changelog/release notes
|
||||
|
||||
To include a pull request in the changelog/release notes you need to add a label named `add to changelog` to the pull request. Then additional validation rules is checked:
|
||||
|
||||
- Title need to be formatted according to [Format the pull request title](#format-the-pull-request-title)
|
||||
- Description needs to include a breaking change notice if change is labeled to be a breaking change, see Breaking changes below for more information.
|
||||
|
||||
Not complying with above rules can make the **Changelog Check** fail with validation errors.
|
||||
To include a pull request in the changelog/release notes the general rule of thumb is that a milestone should be assigned and labeled with `add to changelog`.
|
||||
|
||||
The changelog/release notes are divided into sections and here's a description of how you make a pull request show up in a certain section.
|
||||
|
||||
@@ -118,7 +93,7 @@ If you don't want to backport you need to add a label named **no-backport** to t
|
||||
|
||||
#### Backport
|
||||
|
||||
If your pull request has changes that need to go into one or several existing release branches you need to backport the changes. Please refer to [Backport PR](/.github/bot.md#backport-pr) for detailed instructions.
|
||||
If your pull request has changes that need to go into one or several existing release branches you need to backport the changes. Please refer to [Backport PR](.github/bot.md#backport-pr) for detailed instructions.
|
||||
|
||||
The general rule of thumb regarding what changes goes into what release is:
|
||||
|
||||
|
||||
@@ -58,100 +58,6 @@ code, plus lets you run each test case in isolation when debugging. Don't use `t
|
||||
Use [`t.Cleanup`](https://golang.org/pkg/testing/#T.Cleanup) to clean up resources in tests. It's a less fragile choice than `defer`, since it's independent of which
|
||||
function you call it in. It will always execute after the test is over in reverse call order (last `t.Cleanup` first, same as `defer`).
|
||||
|
||||
### Mock
|
||||
|
||||
Optionally, we use [`mock.Mock`](https://github.com/stretchr/testify#mock-package) package to generate mocks. This is
|
||||
useful when you expect different behaviours of the same function.
|
||||
|
||||
#### Tips
|
||||
|
||||
- Use `Once()` or `Times(n)` to make this mock only works `n` times.
|
||||
- Use `mockedClass.AssertExpectations(t)` to guarantee that the mock is called the times asked.
|
||||
- If any mock set is not called or its expects more calls, the test fails.
|
||||
- You can pass `mock.Anything` as argument if you don't care about the argument passed.
|
||||
- Use `mockedClass.AssertNotCalled(t, "FunctionName")` to assert that this test is not called.
|
||||
|
||||
#### Example
|
||||
|
||||
This is an example to easily create a mock of an interface.
|
||||
|
||||
Given this interface:
|
||||
|
||||
```go
|
||||
func MyInterface interface {
|
||||
Get(ctx context.Context, id string) (Object, error)
|
||||
}
|
||||
```
|
||||
|
||||
Mock implementation should be like this:
|
||||
|
||||
```go
|
||||
import
|
||||
|
||||
func MockImplementation struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
func (m *MockImplementation) Get(ctx context.Context, id string) error {
|
||||
args := m.Called(ctx, id) // Pass all arguments in order here
|
||||
return args.Get(0).(Object), args.Error(1)
|
||||
}
|
||||
```
|
||||
|
||||
And use it as the following way:
|
||||
|
||||
```go
|
||||
|
||||
objectToReturn := Object{Message: "abc"}
|
||||
errToReturn := errors.New("my error")
|
||||
|
||||
myMock := &MockImplementation{}
|
||||
defer myMock.AssertExpectations(t)
|
||||
|
||||
myMock.On("Get", mock.Anything, "id1").Return(objectToReturn, errToReturn).Once()
|
||||
myMock.On("Get", mock.Anything, "id2").Return(Object{}, nil).Once()
|
||||
|
||||
anyService := NewService(myMock)
|
||||
resp, err := anyService.Call("id1")
|
||||
|
||||
assert.Equal(t, resp.Message, objectToReturn.Message)
|
||||
assert.Error(t, err, errToReturn)
|
||||
|
||||
resp, err = anyService.Call("id2")
|
||||
assert.Nil(t, err)
|
||||
```
|
||||
|
||||
#### Mockery
|
||||
|
||||
When an interface to test is too big, it's annoying to mock each function manually. To avoid this, you can
|
||||
use [`mockery`](https://github.com/vektra/mockery) library to generate the mocks.
|
||||
|
||||
The command is like the following (there are more options documented if you need to use another one):
|
||||
|
||||
```
|
||||
mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
|
||||
```
|
||||
|
||||
- `--name`: Interface to mock
|
||||
- `--structname`: Mock implementation name
|
||||
- `--inpackage`: To use the same package name as the interface
|
||||
- `--filename`: Your mock generated file name
|
||||
|
||||
If any interface signature changes, executing the command again updates the mock.
|
||||
|
||||
Additionally, you can put `go:generate` command on the top of the file as a comment. It's useful because some IDEs
|
||||
like Goland and Visual Studio Code allows executing scripts from the IDE.
|
||||
|
||||
```
|
||||
package <package>
|
||||
|
||||
import (
|
||||
...
|
||||
)
|
||||
|
||||
//go:generate mockery --name InterfaceName --structname MockImplementationName --inpackage --filename my_implementation_mock.go
|
||||
```
|
||||
|
||||
## Globals
|
||||
|
||||
As a general rule of thumb, avoid using global variables, since they make the code difficult to maintain and reason
|
||||
|
||||
@@ -7,15 +7,6 @@ deleteDatasources:
|
||||
- name: gdev-influxdb2-influxql
|
||||
- name: gdev-loki-0.3
|
||||
- name: gdev-loki-0.4
|
||||
- name: gdev-elasticsearch-v2-metrics
|
||||
- name: gdev-elasticsearch-v2-logs
|
||||
- name: gdev-elasticsearch-v5-metrics
|
||||
- name: gdev-elasticsearch-v5-logs
|
||||
- name: gdev-elasticsearch-v56-metrics
|
||||
- name: gdev-elasticsearch-v56-logs
|
||||
- name: gdev-elasticsearch-v6-metrics
|
||||
- name: gdev-elasticsearch-v6-logs
|
||||
- name: gdev-elasticsearch-v6-filebeat
|
||||
|
||||
datasources:
|
||||
- name: gdev-graphite
|
||||
@@ -39,21 +30,12 @@ datasources:
|
||||
jsonData:
|
||||
graphiteVersion: "0.9"
|
||||
|
||||
- name: gdev-alertmanager
|
||||
type: alertmanager
|
||||
uid: gdev-alertmanager
|
||||
access: proxy
|
||||
url: http://localhost:9093
|
||||
jsonData:
|
||||
implementation: prometheus
|
||||
|
||||
- name: gdev-prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://localhost:9090
|
||||
jsonData:
|
||||
manageAlerts: true
|
||||
alertmanagerUid: gdev-alertmanager
|
||||
manageAlerts: false
|
||||
|
||||
- name: gdev-slow-prometheus
|
||||
type: prometheus
|
||||
@@ -114,7 +96,17 @@ datasources:
|
||||
tsdbResolution: 1
|
||||
tsdbVersion: 3
|
||||
|
||||
- name: gdev-elasticsearch
|
||||
- name: gdev-elasticsearch-v2-metrics
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[metrics-]YYYY.MM.DD"
|
||||
url: http://localhost:9200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 2
|
||||
|
||||
- name: gdev-elasticsearch-v2-logs
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[logs-]YYYY.MM.DD"
|
||||
@@ -122,9 +114,77 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
logLevelField: level
|
||||
logMessageField: line
|
||||
esVersion: 8.0.0
|
||||
esVersion: 2
|
||||
|
||||
- name: gdev-elasticsearch-v5-metrics
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[metrics-]YYYY.MM.DD"
|
||||
url: http://localhost:10200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 5
|
||||
|
||||
- name: gdev-elasticsearch-v5-logs
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[logs-]YYYY.MM.DD"
|
||||
url: http://localhost:10200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 5
|
||||
|
||||
- name: gdev-elasticsearch-v56-metrics
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[metrics-]YYYY.MM.DD"
|
||||
url: http://localhost:13200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 56
|
||||
|
||||
- name: gdev-elasticsearch-v56-logs
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[logs-]YYYY.MM.DD"
|
||||
url: http://localhost:13200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 56
|
||||
|
||||
- name: gdev-elasticsearch-v6-metrics
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[metrics-]YYYY.MM.DD"
|
||||
url: http://localhost:11200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 60
|
||||
|
||||
- name: gdev-elasticsearch-v6-logs
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[logs-]YYYY.MM.DD"
|
||||
url: http://localhost:11200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 60
|
||||
|
||||
- name: gdev-elasticsearch-v6-filebeat
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
database: "[filebeat-]YYYY.MM.DD"
|
||||
url: http://localhost:11200
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 60
|
||||
|
||||
- name: gdev-elasticsearch-v7-metrics
|
||||
type: elasticsearch
|
||||
@@ -135,7 +195,7 @@ datasources:
|
||||
timeInterval: 10s
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 7.10.0
|
||||
esVersion: 70
|
||||
|
||||
- name: gdev-elasticsearch-v7-logs
|
||||
type: elasticsearch
|
||||
@@ -145,7 +205,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 7.10.0
|
||||
esVersion: 70
|
||||
|
||||
- name: gdev-elasticsearch-v7-filebeat
|
||||
type: elasticsearch
|
||||
@@ -155,7 +215,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 7.10.0
|
||||
esVersion: 70
|
||||
timeInterval: "10s"
|
||||
logMessageField: message
|
||||
logLevelField: fields.level
|
||||
@@ -168,7 +228,7 @@ datasources:
|
||||
jsonData:
|
||||
interval: Daily
|
||||
timeField: "@timestamp"
|
||||
esVersion: 7.10.0
|
||||
esVersion: 70
|
||||
timeInterval: "10s"
|
||||
|
||||
- name: gdev-mysql
|
||||
|
||||
@@ -374,6 +374,17 @@
|
||||
"title": "Dashboard list",
|
||||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 29
|
||||
},
|
||||
"id": 30,
|
||||
"title": "Panel list",
|
||||
"type": "pluginlist"
|
||||
},
|
||||
{
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
package dev_dashboards
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed *.json */*.json
|
||||
var DevDashboardFS embed.FS
|
||||
@@ -1,84 +0,0 @@
|
||||
package dev_dashboards
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/fs"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"cuelang.org/go/cue/errors"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/grafana/grafana/pkg/coremodel/dashboard"
|
||||
"github.com/grafana/grafana/pkg/cuectx"
|
||||
)
|
||||
|
||||
func TestDevenvDashboardValidity(t *testing.T) {
|
||||
m, err := themaTestableDashboards()
|
||||
require.NoError(t, err)
|
||||
cm, err := dashboard.ProvideCoremodel(cuectx.ProvideThemaLibrary())
|
||||
require.NoError(t, err)
|
||||
|
||||
for path, b := range m {
|
||||
t.Run(path, func(t *testing.T) {
|
||||
// The path arg here only matters for error output
|
||||
cv, err := cuectx.JSONtoCUE(path, b)
|
||||
require.NoError(t, err, "error while decoding dashboard JSON into a CUE value")
|
||||
|
||||
_, err = cm.CurrentSchema().Validate(cv)
|
||||
if err != nil {
|
||||
// Testify trims errors to short length. We want the full text
|
||||
errstr := errors.Details(err, nil)
|
||||
t.Log(errstr)
|
||||
if strings.Contains(errstr, "null") {
|
||||
t.Log("validation failure appears to involve nulls - see if scripts/stripnulls.sh has any effect?")
|
||||
}
|
||||
t.FailNow()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func themaTestableDashboards() (map[string][]byte, error) {
|
||||
m := make(map[string][]byte)
|
||||
in := DevDashboardFS
|
||||
|
||||
err := fs.WalkDir(in, ".", func(path string, d fs.DirEntry, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if d.IsDir() || filepath.Ext(d.Name()) != ".json" {
|
||||
return nil
|
||||
}
|
||||
|
||||
// nolint:gosec
|
||||
f, err := in.Open(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close() // nolint: errcheck
|
||||
|
||||
b, err := io.ReadAll(f)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
jtree := make(map[string]interface{})
|
||||
json.Unmarshal(b, &jtree)
|
||||
if oldschemav, has := jtree["schemaVersion"]; !has || !(oldschemav.(float64) > dashboard.HandoffSchemaVersion-1) {
|
||||
return nil
|
||||
}
|
||||
|
||||
m[path] = b
|
||||
return nil
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return m, nil
|
||||
}
|
||||
@@ -0,0 +1,736 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": false,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Annotations & Alerts",
|
||||
"showIn": 0,
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "Elastic 5 Logs",
|
||||
"enable": false,
|
||||
"iconColor": "rgba(255, 96, 96, 1)",
|
||||
"limit": 100,
|
||||
"name": "test",
|
||||
"query": "",
|
||||
"showIn": 0,
|
||||
"textField": "description",
|
||||
"type": "alert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1591027568655,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"tags": ["gdev", "elasticsearch", "datasource-test"],
|
||||
"title": "Dashboards",
|
||||
"type": "dashboards"
|
||||
}
|
||||
],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": true,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "1",
|
||||
"size": "5"
|
||||
},
|
||||
"type": "terms"
|
||||
},
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
}
|
||||
],
|
||||
"query": "*",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Top 5 servers",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "5m",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"percents": [25, 50, 75, 95, 99]
|
||||
},
|
||||
"type": "percentiles"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Percentiles & Metric filter",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {
|
||||
"std_deviation_bounds_lower": true,
|
||||
"std_deviation_bounds_upper": true
|
||||
},
|
||||
"settings": {},
|
||||
"type": "extended_stats"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Standard dev",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@hostname",
|
||||
"value": "@hostname"
|
||||
},
|
||||
{
|
||||
"text": "Average",
|
||||
"value": "Average"
|
||||
},
|
||||
{
|
||||
"text": "Max",
|
||||
"value": "Max"
|
||||
},
|
||||
{
|
||||
"text": "Sum",
|
||||
"value": "Sum"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 13
|
||||
},
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"decimals": 2,
|
||||
"pattern": "/.*/",
|
||||
"thresholds": [],
|
||||
"type": "number",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "_term",
|
||||
"size": "0"
|
||||
},
|
||||
"type": "terms"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "3",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "4",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "sum"
|
||||
}
|
||||
],
|
||||
"refId": "B",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@timestamp",
|
||||
"value": "@timestamp"
|
||||
},
|
||||
{
|
||||
"text": "@message",
|
||||
"value": "@message"
|
||||
},
|
||||
{
|
||||
"text": "tags",
|
||||
"value": "tags"
|
||||
},
|
||||
{
|
||||
"text": "description",
|
||||
"value": "description"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v2-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 20
|
||||
},
|
||||
"id": 5,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"size": 500
|
||||
},
|
||||
"type": "raw_document"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
"circleMinSize": 2,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"decimals": 0,
|
||||
"esGeoPoint": "@location",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 27
|
||||
},
|
||||
"hideEmpty": false,
|
||||
"hideZero": false,
|
||||
"id": 8,
|
||||
"initialZoom": 1,
|
||||
"links": [],
|
||||
"locationData": "geohash",
|
||||
"mapCenter": "(0°, 0°)",
|
||||
"mapCenterLatitude": 0,
|
||||
"mapCenterLongitude": 0,
|
||||
"maxDataPoints": 1,
|
||||
"mouseWheelZoom": false,
|
||||
"showLegend": true,
|
||||
"stickyLabels": false,
|
||||
"tableQueryOptions": {
|
||||
"geohashField": "geohash",
|
||||
"latitudeField": "latitude",
|
||||
"longitudeField": "longitude",
|
||||
"metricField": "metric",
|
||||
"queryType": "geohash"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"fake": true,
|
||||
"field": "@location",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"precision": 2
|
||||
},
|
||||
"type": "geohash_grid"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": "0,10",
|
||||
"title": "World map panel",
|
||||
"type": "grafana-worldmap-panel",
|
||||
"unitPlural": "",
|
||||
"unitSingle": "",
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"filters": [],
|
||||
"hide": 0,
|
||||
"label": "",
|
||||
"name": "Filters",
|
||||
"skipUrlSync": false,
|
||||
"type": "adhoc"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-30m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"collapse": false,
|
||||
"enable": true,
|
||||
"notice": false,
|
||||
"now": true,
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
|
||||
"status": "Stable",
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
|
||||
"type": "timepicker"
|
||||
},
|
||||
"timezone": "browser",
|
||||
"title": "Datasource tests - Elasticsearch v2",
|
||||
"uid": "RlqLq2fiz",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,737 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": false,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Annotations & Alerts",
|
||||
"showIn": 0,
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "Elastic 5 Logs",
|
||||
"enable": false,
|
||||
"iconColor": "rgba(255, 96, 96, 1)",
|
||||
"limit": 100,
|
||||
"name": "test",
|
||||
"query": "",
|
||||
"showIn": 0,
|
||||
"textField": "description",
|
||||
"type": "alert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1591027589702,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"tags": ["gdev", "elasticsearch", "datasource-test"],
|
||||
"title": "Dashboards",
|
||||
"type": "dashboards"
|
||||
}
|
||||
],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": true,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "1",
|
||||
"size": "5"
|
||||
},
|
||||
"type": "terms"
|
||||
},
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
}
|
||||
],
|
||||
"query": "*",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Top 5 servers",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "5m",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"percents": [25, 50, 75, 95, 99]
|
||||
},
|
||||
"type": "percentiles"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Percentiles & Metric filter",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {
|
||||
"std_deviation_bounds_lower": true,
|
||||
"std_deviation_bounds_upper": true
|
||||
},
|
||||
"settings": {},
|
||||
"type": "extended_stats"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Standard dev",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@hostname",
|
||||
"value": "@hostname"
|
||||
},
|
||||
{
|
||||
"text": "Average",
|
||||
"value": "Average"
|
||||
},
|
||||
{
|
||||
"text": "Max",
|
||||
"value": "Max"
|
||||
},
|
||||
{
|
||||
"text": "Sum",
|
||||
"value": "Sum"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 13
|
||||
},
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"decimals": 2,
|
||||
"pattern": "/.*/",
|
||||
"thresholds": [],
|
||||
"type": "number",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "_term",
|
||||
"size": "0"
|
||||
},
|
||||
"type": "terms"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "3",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "4",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "sum"
|
||||
}
|
||||
],
|
||||
"refId": "B",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@timestamp",
|
||||
"value": "@timestamp"
|
||||
},
|
||||
{
|
||||
"text": "@message",
|
||||
"value": "@message"
|
||||
},
|
||||
{
|
||||
"text": "tags",
|
||||
"value": "tags"
|
||||
},
|
||||
{
|
||||
"text": "description",
|
||||
"value": "description"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v5-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 20
|
||||
},
|
||||
"id": 5,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"size": 500
|
||||
},
|
||||
"type": "raw_document"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
"circleMinSize": 2,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"decimals": 0,
|
||||
"esGeoPoint": "@location",
|
||||
"esLocationName": "",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 27
|
||||
},
|
||||
"hideEmpty": false,
|
||||
"hideZero": false,
|
||||
"id": 8,
|
||||
"initialZoom": 1,
|
||||
"links": [],
|
||||
"locationData": "geohash",
|
||||
"mapCenter": "(0°, 0°)",
|
||||
"mapCenterLatitude": 0,
|
||||
"mapCenterLongitude": 0,
|
||||
"maxDataPoints": 1,
|
||||
"mouseWheelZoom": false,
|
||||
"showLegend": true,
|
||||
"stickyLabels": false,
|
||||
"tableQueryOptions": {
|
||||
"geohashField": "geohash",
|
||||
"latitudeField": "latitude",
|
||||
"longitudeField": "longitude",
|
||||
"metricField": "metric",
|
||||
"queryType": "geohash"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"fake": true,
|
||||
"field": "@location",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"precision": 2
|
||||
},
|
||||
"type": "geohash_grid"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": "0,10",
|
||||
"title": "World map panel",
|
||||
"type": "grafana-worldmap-panel",
|
||||
"unitPlural": "",
|
||||
"unitSingle": "",
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"filters": [],
|
||||
"hide": 0,
|
||||
"label": "",
|
||||
"name": "Filters",
|
||||
"skipUrlSync": false,
|
||||
"type": "adhoc"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-30m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"collapse": false,
|
||||
"enable": true,
|
||||
"notice": false,
|
||||
"now": true,
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
|
||||
"status": "Stable",
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
|
||||
"type": "timepicker"
|
||||
},
|
||||
"timezone": "browser",
|
||||
"title": "Datasource tests - Elasticsearch v5",
|
||||
"uid": "8HjT32Bmz",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,737 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": false,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Annotations & Alerts",
|
||||
"showIn": 0,
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "Elastic 5 Logs",
|
||||
"enable": false,
|
||||
"iconColor": "rgba(255, 96, 96, 1)",
|
||||
"limit": 100,
|
||||
"name": "test",
|
||||
"query": "",
|
||||
"showIn": 0,
|
||||
"textField": "description",
|
||||
"type": "alert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1591027589702,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"tags": ["gdev", "elasticsearch", "datasource-test"],
|
||||
"title": "Dashboards",
|
||||
"type": "dashboards"
|
||||
}
|
||||
],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": true,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "1",
|
||||
"size": "5"
|
||||
},
|
||||
"type": "terms"
|
||||
},
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
}
|
||||
],
|
||||
"query": "*",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Top 5 servers",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v56-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "5m",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"percents": [25, 50, 75, 95, 99]
|
||||
},
|
||||
"type": "percentiles"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Percentiles & Metric filter",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v56-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {
|
||||
"std_deviation_bounds_lower": true,
|
||||
"std_deviation_bounds_upper": true
|
||||
},
|
||||
"settings": {},
|
||||
"type": "extended_stats"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Standard dev",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@hostname",
|
||||
"value": "@hostname"
|
||||
},
|
||||
{
|
||||
"text": "Average",
|
||||
"value": "Average"
|
||||
},
|
||||
{
|
||||
"text": "Max",
|
||||
"value": "Max"
|
||||
},
|
||||
{
|
||||
"text": "Sum",
|
||||
"value": "Sum"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v56-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 13
|
||||
},
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"decimals": 2,
|
||||
"pattern": "/.*/",
|
||||
"thresholds": [],
|
||||
"type": "number",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "_term",
|
||||
"size": "0"
|
||||
},
|
||||
"type": "terms"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "3",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "4",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "sum"
|
||||
}
|
||||
],
|
||||
"refId": "B",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@timestamp",
|
||||
"value": "@timestamp"
|
||||
},
|
||||
{
|
||||
"text": "@message",
|
||||
"value": "@message"
|
||||
},
|
||||
{
|
||||
"text": "tags",
|
||||
"value": "tags"
|
||||
},
|
||||
{
|
||||
"text": "description",
|
||||
"value": "description"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v56-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 20
|
||||
},
|
||||
"id": 5,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"size": 500
|
||||
},
|
||||
"type": "raw_document"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
"circleMinSize": 2,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"datasource": "gdev-elasticsearch-v56-metrics",
|
||||
"decimals": 0,
|
||||
"esGeoPoint": "@location",
|
||||
"esLocationName": "",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 27
|
||||
},
|
||||
"hideEmpty": false,
|
||||
"hideZero": false,
|
||||
"id": 8,
|
||||
"initialZoom": 1,
|
||||
"links": [],
|
||||
"locationData": "geohash",
|
||||
"mapCenter": "(0°, 0°)",
|
||||
"mapCenterLatitude": 0,
|
||||
"mapCenterLongitude": 0,
|
||||
"maxDataPoints": 1,
|
||||
"mouseWheelZoom": false,
|
||||
"showLegend": true,
|
||||
"stickyLabels": false,
|
||||
"tableQueryOptions": {
|
||||
"geohashField": "geohash",
|
||||
"latitudeField": "latitude",
|
||||
"longitudeField": "longitude",
|
||||
"metricField": "metric",
|
||||
"queryType": "geohash"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"fake": true,
|
||||
"field": "@location",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"precision": 2
|
||||
},
|
||||
"type": "geohash_grid"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": "0,10",
|
||||
"title": "World map panel",
|
||||
"type": "grafana-worldmap-panel",
|
||||
"unitPlural": "",
|
||||
"unitSingle": "",
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"datasource": "gdev-elasticsearch-v56-metrics",
|
||||
"filters": [],
|
||||
"hide": 0,
|
||||
"label": "",
|
||||
"name": "Filters",
|
||||
"skipUrlSync": false,
|
||||
"type": "adhoc"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-30m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"collapse": false,
|
||||
"enable": true,
|
||||
"notice": false,
|
||||
"now": true,
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
|
||||
"status": "Stable",
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
|
||||
"type": "timepicker"
|
||||
},
|
||||
"timezone": "browser",
|
||||
"title": "Datasource tests - Elasticsearch v56",
|
||||
"uid": "8HjT32BmO",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,737 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": false,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Annotations & Alerts",
|
||||
"showIn": 0,
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-elasticsearch-v6-logs",
|
||||
"enable": false,
|
||||
"iconColor": "rgba(255, 96, 96, 1)",
|
||||
"limit": 100,
|
||||
"name": "test",
|
||||
"query": "",
|
||||
"showIn": 0,
|
||||
"textField": "description",
|
||||
"type": "alert"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1591027529668,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"tags": ["gdev", "elasticsearch", "datasource-test"],
|
||||
"title": "Dashboards",
|
||||
"type": "dashboards"
|
||||
}
|
||||
],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": true,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "1",
|
||||
"size": "5"
|
||||
},
|
||||
"type": "terms"
|
||||
},
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
}
|
||||
],
|
||||
"query": "*",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Top 5 servers",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "5m",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"percents": [25, 50, 75, 95, 99]
|
||||
},
|
||||
"type": "percentiles"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Percentiles & Metric filter",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {
|
||||
"Count": "#6ED0E0"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": true,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"lines": false,
|
||||
"yaxis": 2,
|
||||
"zindex": -1
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "{{metric}}",
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {
|
||||
"std_deviation_bounds_lower": true,
|
||||
"std_deviation_bounds_upper": true
|
||||
},
|
||||
"settings": {},
|
||||
"type": "extended_stats"
|
||||
}
|
||||
],
|
||||
"query": "@metric:cpu",
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Standard dev",
|
||||
"tooltip": {
|
||||
"msResolution": true,
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "cumulative"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@hostname",
|
||||
"value": "@hostname"
|
||||
},
|
||||
{
|
||||
"text": "Average",
|
||||
"value": "Average"
|
||||
},
|
||||
{
|
||||
"text": "Max",
|
||||
"value": "Max"
|
||||
},
|
||||
{
|
||||
"text": "Sum",
|
||||
"value": "Sum"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 13
|
||||
},
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"decimals": 2,
|
||||
"pattern": "/.*/",
|
||||
"thresholds": [],
|
||||
"type": "number",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"field": "@hostname",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "asc",
|
||||
"orderBy": "_term",
|
||||
"size": "0"
|
||||
},
|
||||
"type": "terms"
|
||||
}
|
||||
],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "3",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "max"
|
||||
},
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "4",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "sum"
|
||||
}
|
||||
],
|
||||
"refId": "B",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@timestamp",
|
||||
"value": "@timestamp"
|
||||
},
|
||||
{
|
||||
"text": "@message",
|
||||
"value": "@message"
|
||||
},
|
||||
{
|
||||
"text": "tags",
|
||||
"value": "tags"
|
||||
},
|
||||
{
|
||||
"text": "description",
|
||||
"value": "description"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v6-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 20
|
||||
},
|
||||
"id": 5,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [],
|
||||
"dsType": "elasticsearch",
|
||||
"metrics": [
|
||||
{
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"size": 500
|
||||
},
|
||||
"type": "raw_document"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
"circleMinSize": 2,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"decimals": 0,
|
||||
"esGeoPoint": "@location",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 27
|
||||
},
|
||||
"hideEmpty": false,
|
||||
"hideZero": false,
|
||||
"id": 8,
|
||||
"initialZoom": "1",
|
||||
"links": [],
|
||||
"locationData": "geohash",
|
||||
"mapCenter": "(0°, 0°)",
|
||||
"mapCenterLatitude": 0,
|
||||
"mapCenterLongitude": 0,
|
||||
"maxDataPoints": 1,
|
||||
"mouseWheelZoom": false,
|
||||
"showLegend": true,
|
||||
"stickyLabels": false,
|
||||
"tableQueryOptions": {
|
||||
"geohashField": "geohash",
|
||||
"latitudeField": "latitude",
|
||||
"longitudeField": "longitude",
|
||||
"metricField": "metric",
|
||||
"queryType": "geohash"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"fake": true,
|
||||
"field": "@location",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"precision": 2
|
||||
},
|
||||
"type": "geohash_grid"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"field": "@value",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "avg"
|
||||
}
|
||||
],
|
||||
"refId": "A",
|
||||
"target": "",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": "0,10",
|
||||
"title": "World map panel",
|
||||
"type": "grafana-worldmap-panel",
|
||||
"unitPlural": "",
|
||||
"unitSingle": "",
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"filters": [],
|
||||
"hide": 0,
|
||||
"label": "",
|
||||
"name": "Filters",
|
||||
"skipUrlSync": false,
|
||||
"type": "adhoc"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"collapse": false,
|
||||
"enable": true,
|
||||
"notice": false,
|
||||
"now": true,
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
|
||||
"status": "Stable",
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"],
|
||||
"type": "timepicker"
|
||||
},
|
||||
"timezone": "browser",
|
||||
"title": "Datasource tests - Elasticsearch v6",
|
||||
"uid": "NF8Pq2Biz",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,241 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1591027621672,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"tags": ["gdev", "elasticsearch", "datasource-test"],
|
||||
"title": "Dashboards",
|
||||
"type": "dashboards"
|
||||
}
|
||||
],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {
|
||||
"error": "red"
|
||||
},
|
||||
"bars": true,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v6-filebeat",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": false,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": true,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"fake": true,
|
||||
"field": "fields.level",
|
||||
"id": "3",
|
||||
"settings": {
|
||||
"min_doc_count": 1,
|
||||
"order": "desc",
|
||||
"orderBy": "_term",
|
||||
"size": "10"
|
||||
},
|
||||
"type": "terms"
|
||||
},
|
||||
{
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "5m",
|
||||
"min_doc_count": 1,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"type": "count"
|
||||
}
|
||||
],
|
||||
"query": "fields.app:grafana",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-elasticsearch-v6-filebeat",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 22,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 5
|
||||
},
|
||||
"id": 2,
|
||||
"links": [],
|
||||
"options": {
|
||||
"showLabels": false,
|
||||
"showTime": true,
|
||||
"sortOrder": "Descending",
|
||||
"wrapLogMessage": true
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [
|
||||
{
|
||||
"$$hashKey": "object:394",
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"$$hashKey": "object:359",
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {},
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "fields.app:grafana",
|
||||
"refId": "A",
|
||||
"timeField": "@timestamp"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "elasticsearch", "datasource-test"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"datasource": "gdev-elasticsearch-v6-filebeat",
|
||||
"filters": [],
|
||||
"hide": 0,
|
||||
"label": "",
|
||||
"name": "Filters",
|
||||
"skipUrlSync": false,
|
||||
"type": "adhoc"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-30m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - Elasticsearch v6 Filebeat",
|
||||
"uid": "06tPt4gZz",
|
||||
"version": 1
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"iteration": 1601526910610,
|
||||
"iteration": 1646409057541,
|
||||
"links": [
|
||||
{
|
||||
"icon": "external link",
|
||||
@@ -73,6 +73,61 @@
|
||||
"timeShift": null,
|
||||
"title": "${custom.text}",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 9,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"type": "stat",
|
||||
"title": "Panel Title",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"title": "Var Link",
|
||||
"url": "/d/vmie2cmWz/bar-gauge-demo?var-custom=$custom"
|
||||
}
|
||||
]
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"reduceOptions": {
|
||||
"values": false,
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": ""
|
||||
},
|
||||
"orientation": "auto",
|
||||
"textMode": "auto",
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto"
|
||||
},
|
||||
"pluginVersion": "8.5.0-pre",
|
||||
"datasource": null
|
||||
}
|
||||
],
|
||||
"schemaVersion": 26,
|
||||
@@ -112,6 +167,11 @@
|
||||
"selected": false,
|
||||
"text": "p3",
|
||||
"value": "p3"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "p4",
|
||||
"value": "test%25value"
|
||||
}
|
||||
],
|
||||
"query": "p1,p2,p3",
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
{
|
||||
"__inputs": [],
|
||||
"__elements": [],
|
||||
"__requires": [
|
||||
{
|
||||
"type": "grafana",
|
||||
"id": "grafana",
|
||||
"name": "Grafana",
|
||||
"version": "8.4.0-pre"
|
||||
},
|
||||
{
|
||||
"type": "panel",
|
||||
"id": "text",
|
||||
"name": "Text",
|
||||
"version": ""
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"mode": "markdown",
|
||||
"content": "VariableUnderTest: $VariableUnderTest"
|
||||
},
|
||||
"pluginVersion": "8.4.0-pre",
|
||||
"title": "Panel Title",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 35,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Test variable output",
|
||||
"uid": "kVi2Gex7z",
|
||||
"version": 2,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -3,10 +3,7 @@
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
@@ -22,7 +19,6 @@
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [
|
||||
{
|
||||
@@ -36,7 +32,6 @@
|
||||
"type": "dashboards"
|
||||
}
|
||||
],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -1047,10 +1042,6 @@
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -1152,10 +1143,6 @@
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -1235,95 +1222,6 @@
|
||||
],
|
||||
"title": "Always show points between gaps",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineStyle": {
|
||||
"fill": "solid"
|
||||
},
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 7,
|
||||
"x": 7,
|
||||
"y": 22
|
||||
},
|
||||
"id": 16,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,61,,,,,,60,,,,,,,,,,,,,,,,,,61,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,61,,,,,,60,,,,,,59,,,,,,60,,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,57,,,,,,56,,,,,,57,,,,,,,,,,,,56,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,54,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,53,,,,,54,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,,,,,,,,,,,,,55,,,,,,56,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,,,,,,,57,,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,58,,,,,,59,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,58,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,61,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,61,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,60,,,,,,59,,,,,,60,,,,,,,,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,,59,,,,,,60,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,59,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,58,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,56,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,55,,,,,,56,,,,,,55,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,54,,,,,,53,,,,,,,,,,,,,,,,,,,52,,,,,,,,,,,51,,,,,,,,,,,,,,,,,,,,,,,,,52,,,,,,,54,,,,,,55,,,,,,56,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,57,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,58,,,,,,,,,,,,,,,,,,59,,,,,,,,,,,,,,,,,,60,,,,,,,,,,,,61,,,,,,,,,,,,,,,,,,,,,,,,60,,,,,,61,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,62,,,,,,61,,,,,,62,,,,,,61,,,,,,62,,,,,,,,,,,,,,,,,,,63,,,,,,,,,,,,,,,,,,,,,,,,64,,,,,,63,,,,,,64,,,,,,63,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,61,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,,,,,,,63,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,64,,,,,,,,,,,,63,,,,,,,,,,,,,62,,,,,,,,,,,,,,,,,,,,"
|
||||
}
|
||||
],
|
||||
"title": "Always show points between gaps",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 33,
|
||||
@@ -1344,6 +1242,5 @@
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Graph NG - Gaps and Connected",
|
||||
"uid": "8mmCAF1Mz",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
"version": 2
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,553 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "points",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 2,
|
||||
"scaleDistribution": {
|
||||
"log": 2,
|
||||
"type": "log"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"max": 500000,
|
||||
"min": 0.01,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 2,
|
||||
"spread": 1000,
|
||||
"startValue": 0.01
|
||||
}
|
||||
],
|
||||
"title": "Time series",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
}
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 0
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"bucket": {
|
||||
"layout": "auto"
|
||||
},
|
||||
"calculate": true,
|
||||
"calculation": {
|
||||
"yBuckets": {
|
||||
"scale": {
|
||||
"log": 2,
|
||||
"type": "log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cellGap": 1,
|
||||
"color": {
|
||||
"exponent": 0.5,
|
||||
"fill": "dark-orange",
|
||||
"mode": "scheme",
|
||||
"scale": "exponential",
|
||||
"scheme": "Spectral",
|
||||
"steps": 64
|
||||
},
|
||||
"exemplars": {
|
||||
"color": "rgba(255,0,255,0.7)"
|
||||
},
|
||||
"filterValues": {
|
||||
"le": 1e-9
|
||||
},
|
||||
"legend": {
|
||||
"show": true
|
||||
},
|
||||
"mode": "calculate",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
"axisPlacement": "left",
|
||||
"reverse": false
|
||||
},
|
||||
"yAxisLabels": "auto",
|
||||
"yAxisReverse": false
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 3,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "log2",
|
||||
"type": "heatmap-new"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
}
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 0
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"bucket": {
|
||||
"layout": "auto"
|
||||
},
|
||||
"calculate": true,
|
||||
"calculation": {
|
||||
"yBuckets": {
|
||||
"scale": {
|
||||
"log": 2,
|
||||
"type": "log"
|
||||
},
|
||||
"value": "2"
|
||||
}
|
||||
},
|
||||
"cellGap": 1,
|
||||
"color": {
|
||||
"exponent": 0.5,
|
||||
"fill": "dark-orange",
|
||||
"mode": "scheme",
|
||||
"scale": "exponential",
|
||||
"scheme": "Spectral",
|
||||
"steps": 64
|
||||
},
|
||||
"exemplars": {
|
||||
"color": "rgba(255,0,255,0.7)"
|
||||
},
|
||||
"filterValues": {
|
||||
"le": 1e-9
|
||||
},
|
||||
"legend": {
|
||||
"show": true
|
||||
},
|
||||
"mode": "calculate",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
"axisPlacement": "left",
|
||||
"reverse": false
|
||||
},
|
||||
"yAxisLabels": "auto",
|
||||
"yAxisReverse": false
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 3,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "log2 split 2",
|
||||
"type": "heatmap-new"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
}
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 14
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"bucket": {
|
||||
"layout": "auto"
|
||||
},
|
||||
"calculate": true,
|
||||
"cellGap": 1,
|
||||
"color": {
|
||||
"exponent": 0.5,
|
||||
"fill": "dark-orange",
|
||||
"mode": "scheme",
|
||||
"scale": "exponential",
|
||||
"scheme": "Spectral",
|
||||
"steps": 64
|
||||
},
|
||||
"exemplars": {
|
||||
"color": "rgba(255,0,255,0.7)"
|
||||
},
|
||||
"filterValues": {
|
||||
"le": 1e-9
|
||||
},
|
||||
"legend": {
|
||||
"show": true
|
||||
},
|
||||
"mode": "calculate",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
"axisPlacement": "left",
|
||||
"reverse": false
|
||||
},
|
||||
"yAxisLabels": "auto",
|
||||
"yAxisReverse": false
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 3,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "linear",
|
||||
"type": "heatmap-new"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
}
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 14
|
||||
},
|
||||
"id": 5,
|
||||
"options": {
|
||||
"bucket": {
|
||||
"layout": "auto"
|
||||
},
|
||||
"calculate": true,
|
||||
"calculation": {
|
||||
"yBuckets": {
|
||||
"scale": {
|
||||
"log": 10,
|
||||
"type": "log"
|
||||
}
|
||||
}
|
||||
},
|
||||
"cellGap": 1,
|
||||
"color": {
|
||||
"exponent": 0.5,
|
||||
"fill": "dark-orange",
|
||||
"mode": "scheme",
|
||||
"scale": "exponential",
|
||||
"scheme": "Spectral",
|
||||
"steps": 64
|
||||
},
|
||||
"exemplars": {
|
||||
"color": "rgba(255,0,255,0.7)"
|
||||
},
|
||||
"filterValues": {
|
||||
"le": 1e-9
|
||||
},
|
||||
"legend": {
|
||||
"show": true
|
||||
},
|
||||
"mode": "calculate",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
"axisPlacement": "left",
|
||||
"reverse": false
|
||||
},
|
||||
"yAxisLabels": "auto",
|
||||
"yAxisReverse": false
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 3,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "log10",
|
||||
"type": "heatmap-new"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
}
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 14
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
"bucket": {
|
||||
"layout": "auto"
|
||||
},
|
||||
"calculate": true,
|
||||
"calculation": {
|
||||
"yBuckets": {
|
||||
"scale": {
|
||||
"log": 10,
|
||||
"type": "log"
|
||||
},
|
||||
"value": "2"
|
||||
}
|
||||
},
|
||||
"cellGap": 1,
|
||||
"color": {
|
||||
"exponent": 0.5,
|
||||
"fill": "dark-orange",
|
||||
"mode": "scheme",
|
||||
"scale": "exponential",
|
||||
"scheme": "Spectral",
|
||||
"steps": 64
|
||||
},
|
||||
"exemplars": {
|
||||
"color": "rgba(255,0,255,0.7)"
|
||||
},
|
||||
"filterValues": {
|
||||
"le": 1e-9
|
||||
},
|
||||
"legend": {
|
||||
"show": true
|
||||
},
|
||||
"mode": "calculate",
|
||||
"tooltip": {
|
||||
"show": true,
|
||||
"yHistogram": false
|
||||
},
|
||||
"yAxis": {
|
||||
"axisPlacement": "left",
|
||||
"reverse": false
|
||||
},
|
||||
"yAxisLabels": "auto",
|
||||
"yAxisReverse": false
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 3,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "log10 split 2",
|
||||
"type": "heatmap-new"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 36,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests", "graph-ng"],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Heatmap calculate (log)",
|
||||
"uid": "ZXYQTA97ZZ",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -2,6 +2,6 @@
|
||||
FROM golang:latest
|
||||
ADD main.go /
|
||||
WORKDIR /
|
||||
RUN go mod init alert_webhook_listener && go build -o main .
|
||||
RUN go build -o main .
|
||||
EXPOSE 3010
|
||||
ENTRYPOINT ["/main"]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
alert_webhook_listener:
|
||||
build: docker/blocks/alert_webhook_listener
|
||||
network_mode: host
|
||||
ports:
|
||||
- "3010:3010"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
elastic_version=8.2.0
|
||||
@@ -1,3 +0,0 @@
|
||||
FROM node:16-alpine
|
||||
|
||||
COPY data.js /home/node/data.js
|
||||
@@ -1,137 +0,0 @@
|
||||
const http = require('http');
|
||||
|
||||
if (process.argv.length !== 3) {
|
||||
throw new Error('invalid command line: use node sendLogs.js ELASTIC_BASE_URL');
|
||||
}
|
||||
|
||||
const ELASTIC_BASE_URL = process.argv[2];
|
||||
|
||||
// helper function, do a http request
|
||||
async function jsonRequest(data, method, url, expectedStatusCode) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const req = http.request(
|
||||
{
|
||||
protocol: url.protocol,
|
||||
host: url.hostname,
|
||||
port: url.port,
|
||||
path: `${url.pathname}${url.search}`,
|
||||
method,
|
||||
headers: { 'content-type': 'application/json' },
|
||||
},
|
||||
(res) => {
|
||||
if (res.statusCode !== expectedStatusCode) {
|
||||
reject(new Error(`Invalid response: ${res.statusCode}`));
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
req.on('error', (err) => reject(err));
|
||||
|
||||
req.write(JSON.stringify(data));
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
// helper function, choose a random element from an array
|
||||
function chooseRandomElement(items) {
|
||||
const index = Math.trunc(Math.random() * items.length);
|
||||
return items[index];
|
||||
}
|
||||
|
||||
// helper function, sleep for a duration
|
||||
async function sleep(duration) {
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(resolve, duration);
|
||||
});
|
||||
}
|
||||
|
||||
async function elasticSendLogItem(timestamp, item) {
|
||||
// we need the YYYY.MM.DD format
|
||||
const timestampText = timestamp.toISOString().slice(0, 10).replace(/-/g, '.');
|
||||
const url = new URL(ELASTIC_BASE_URL);
|
||||
url.pathname = `/logs-${timestampText}/_doc`;
|
||||
await jsonRequest(item, 'POST', url, 201);
|
||||
console.log(`posted to ${url.toString()}`);
|
||||
}
|
||||
|
||||
async function elasticSetupIndexTemplate() {
|
||||
const data = {
|
||||
index_patterns: ['logs-*'],
|
||||
template: {
|
||||
mappings: {
|
||||
properties: {
|
||||
'@timestamp': {
|
||||
type: 'date',
|
||||
},
|
||||
counter: {
|
||||
type: 'integer',
|
||||
},
|
||||
float: {
|
||||
type: 'float',
|
||||
},
|
||||
level: {
|
||||
type: 'keyword',
|
||||
},
|
||||
label: {
|
||||
type: 'keyword',
|
||||
},
|
||||
location: {
|
||||
type: 'geo_point',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
const url = new URL(ELASTIC_BASE_URL);
|
||||
url.pathname = '/_index_template/gdev';
|
||||
await jsonRequest(data, 'PUT', url, 200);
|
||||
}
|
||||
|
||||
function makeRandomPoint() {
|
||||
const angle = Math.random() * 2 * Math.PI;
|
||||
const x = 45 * Math.sin(angle);
|
||||
const y = 45 * Math.cos(angle);
|
||||
return y + ', ' + x;
|
||||
}
|
||||
|
||||
function getRandomLogItem(counter, timestamp) {
|
||||
const randomText = `${Math.trunc(Math.random() * 1000 * 1000 * 1000)}`;
|
||||
const maybeAnsiText = Math.random() < 0.5 ? 'with ANSI \u001b[31mpart of the text\u001b[0m' : '';
|
||||
return {
|
||||
'@timestamp': timestamp.toISOString(),
|
||||
line: `log text ${maybeAnsiText} [${randomText}]`,
|
||||
counter: counter.toString(),
|
||||
float: 100 * Math.random().toString(),
|
||||
label: chooseRandomElement(['val1', 'val2', 'val3']),
|
||||
level: chooseRandomElement(['info', 'info', 'error']),
|
||||
// location: chooseRandomElement(LOCATIONS),
|
||||
location: makeRandomPoint(),
|
||||
};
|
||||
}
|
||||
|
||||
async function main() {
|
||||
await elasticSetupIndexTemplate();
|
||||
const SLEEP_ANGLE_STEP = Math.PI / 200;
|
||||
let sleepAngle = 0;
|
||||
function getNextSineWaveSleepDuration() {
|
||||
sleepAngle += SLEEP_ANGLE_STEP;
|
||||
return Math.trunc(1000 * Math.abs(Math.sin(sleepAngle)));
|
||||
}
|
||||
|
||||
for (let step = 0; step < 300; step++) {
|
||||
await sleep(getNextSineWaveSleepDuration());
|
||||
const timestamp = new Date();
|
||||
const item = getRandomLogItem(step + 1, timestamp);
|
||||
elasticSendLogItem(timestamp, item);
|
||||
}
|
||||
}
|
||||
|
||||
// when running in docker, we catch the needed stop-signal, to shutdown fast
|
||||
process.on('SIGTERM', () => {
|
||||
console.log('shutdown requested');
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
main();
|
||||
@@ -1,24 +1,22 @@
|
||||
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
||||
|
||||
elasticsearch:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:${elastic_version}
|
||||
elasticsearch-latest:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-beta1
|
||||
command: elasticsearch
|
||||
environment:
|
||||
- "discovery.type=single-node"
|
||||
- "xpack.license.self_generated.type=basic"
|
||||
- "xpack.security.enabled=false"
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "14200:9200"
|
||||
- "14300:9300"
|
||||
|
||||
data:
|
||||
build: docker/blocks/elastic/data
|
||||
command: node /home/node/data.js http://elasticsearch:9200
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
# elastic starts slowly, the first couple start of data.js
|
||||
# might fail, so we auto-restart it on failure.
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
delay: 5s
|
||||
max_attempts: 20 # should be enough
|
||||
# TODO: uncomment when https://github.com/grafana/fake-data-gen/pull/20 is merged
|
||||
# fake-elastic-latest-data:
|
||||
# image: grafana/fake-data-gen
|
||||
# links:
|
||||
# - elasticsearch-latest
|
||||
# environment:
|
||||
# FD_SERVER: elasticsearch-latest
|
||||
# FD_DATASOURCE: elasticsearch8
|
||||
# FD_PORT: 9200
|
||||
|
||||
15
devenv/docker/blocks/elastic2/docker-compose.yaml
Normal file
15
devenv/docker/blocks/elastic2/docker-compose.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
elasticsearch2:
|
||||
image: elasticsearch:2.4.1
|
||||
command: elasticsearch -Des.network.host=0.0.0.0
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./docker/blocks/elastic2/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
|
||||
fake-elastic-data:
|
||||
image: grafana/fake-data-gen
|
||||
environment:
|
||||
FD_SERVER: elasticsearch2
|
||||
FD_DATASOURCE: elasticsearch
|
||||
FD_PORT: 9200
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user