Compare commits
274 Commits
sriram/SQL
...
v11.1.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12b0b3adfc | ||
|
|
901418e263 | ||
|
|
bdcafd7b94 | ||
|
|
6be6e48f4c | ||
|
|
1760373261 | ||
|
|
e5ba2c88a5 | ||
|
|
6435fd23ff | ||
|
|
cf195e8d41 | ||
|
|
446c8e9cc2 | ||
|
|
c7e6c1dc32 | ||
|
|
d652d2d139 | ||
|
|
7ece6b35f0 | ||
|
|
df4c5f46f8 | ||
|
|
46d0ac7e5c | ||
|
|
fc02db9805 | ||
|
|
a0ff48f602 | ||
|
|
1502c7163a | ||
|
|
e4285198aa | ||
|
|
2331c4b6a9 | ||
|
|
7ecfc9e2e4 | ||
|
|
15937ea865 | ||
|
|
064665daea | ||
|
|
251ec844a7 | ||
|
|
c5685dc75b | ||
|
|
b9c564d349 | ||
|
|
409e5d1ce2 | ||
|
|
015666cf0d | ||
|
|
aea8a5d0e3 | ||
|
|
3084f4bcba | ||
|
|
5599981422 | ||
|
|
aac8b983c2 | ||
|
|
9f1fab9134 | ||
|
|
af039556a3 | ||
|
|
f044b14b0e | ||
|
|
81831fec55 | ||
|
|
d5dd4a0c3a | ||
|
|
c8ca8e0f4a | ||
|
|
6076d9b0e0 | ||
|
|
fd76baa5cb | ||
|
|
6e84f62fa2 | ||
|
|
cb5982875b | ||
|
|
1a79ce375f | ||
|
|
668fd0904a | ||
|
|
37f189314a | ||
|
|
9f17756d05 | ||
|
|
4ebddb4f23 | ||
|
|
5e71df3736 | ||
|
|
bca31b7b00 | ||
|
|
4ff3ab2f22 | ||
|
|
dbc7496a00 | ||
|
|
56383725f3 | ||
|
|
f16f14e759 | ||
|
|
b9b601b05a | ||
|
|
f3edb622bd | ||
|
|
bca08a06fc | ||
|
|
74da8c09e3 | ||
|
|
d0adcfa51b | ||
|
|
04c8255493 | ||
|
|
fccf08107b | ||
|
|
4fdbca747c | ||
|
|
249218b089 | ||
|
|
ed487355a9 | ||
|
|
17f973b8e6 | ||
|
|
dbbb357681 | ||
|
|
5fcb301765 | ||
|
|
18aeac0c5b | ||
|
|
9ca175cbfb | ||
|
|
d564bec2c4 | ||
|
|
4dce0b3ce7 | ||
|
|
4c76044f05 | ||
|
|
4d58cbd301 | ||
|
|
c2535206ce | ||
|
|
96f879808b | ||
|
|
7d6566959b | ||
|
|
eb1b89b26d | ||
|
|
32e24d1d7d | ||
|
|
13fb4acc31 | ||
|
|
aec2368800 | ||
|
|
ec687036e5 | ||
|
|
8d41b98037 | ||
|
|
639ed2366d | ||
|
|
c9e5cc32fd | ||
|
|
9fe605265d | ||
|
|
46651214d8 | ||
|
|
13dbd81407 | ||
|
|
2e2ef4e402 | ||
|
|
b0faef336b | ||
|
|
249f8fe115 | ||
|
|
4be9eebb8e | ||
|
|
44f2b5d9c5 | ||
|
|
ed5b6179ac | ||
|
|
dcdf148140 | ||
|
|
1256172df5 | ||
|
|
9731d7c0f7 | ||
|
|
09ed2369ce | ||
|
|
33eaec336e | ||
|
|
312b99f68e | ||
|
|
da500a56b3 | ||
|
|
783216e4b9 | ||
|
|
cc2941b1b8 | ||
|
|
1c6687ac61 | ||
|
|
53d92abf74 | ||
|
|
bacab3498c | ||
|
|
90646fa1e6 | ||
|
|
ca5554e88d | ||
|
|
d6dd16fdf9 | ||
|
|
fc43fecb81 | ||
|
|
b549030921 | ||
|
|
e998da3163 | ||
|
|
374e83718e | ||
|
|
b6d5da870d | ||
|
|
90cd1d9ca2 | ||
|
|
0eef9d22d2 | ||
|
|
34d6127e3d | ||
|
|
07005383db | ||
|
|
d5a6f8eed0 | ||
|
|
0d08409945 | ||
|
|
ee41006ac2 | ||
|
|
4d59d59425 | ||
|
|
567fbab84a | ||
|
|
7045ce16dd | ||
|
|
49b6f2847d | ||
|
|
a07b6c7c95 | ||
|
|
f19611aa9f | ||
|
|
a3e7b4bbba | ||
|
|
59c9ddba40 | ||
|
|
6941bd5fc8 | ||
|
|
ae03217b9c | ||
|
|
68665e4ce9 | ||
|
|
738cc49ec5 | ||
|
|
bb5d2c83ef | ||
|
|
b7d434faaf | ||
|
|
f4e7402e3f | ||
|
|
4c70fd6a3e | ||
|
|
78d19bfa11 | ||
|
|
4aa2bb630e | ||
|
|
8c9d4696e1 | ||
|
|
39df6fb2fa | ||
|
|
3d38f30ff4 | ||
|
|
fe032f10c7 | ||
|
|
61d9102d98 | ||
|
|
99bd39539b | ||
|
|
a1751ab900 | ||
|
|
2c084e6113 | ||
|
|
93d25da8c1 | ||
|
|
78680389b3 | ||
|
|
a8ed6c49e3 | ||
|
|
9f22e97ab6 | ||
|
|
8a8679fc4e | ||
|
|
8a219d5d18 | ||
|
|
c17f395374 | ||
|
|
8007be0b57 | ||
|
|
ec81c967b6 | ||
|
|
beac3bdbcb | ||
|
|
00614f2813 | ||
|
|
16bca1736d | ||
|
|
907916dc39 | ||
|
|
417edf5c43 | ||
|
|
a034ed6f1b | ||
|
|
bf264b2df3 | ||
|
|
bd59be01e8 | ||
|
|
8ecf1dff7e | ||
|
|
12a3a261a2 | ||
|
|
b4f4b3e9b4 | ||
|
|
c2e78f5cd6 | ||
|
|
f5cebcca1b | ||
|
|
009a75f796 | ||
|
|
7e742cdaa2 | ||
|
|
17fce96f7f | ||
|
|
220f0a5b42 | ||
|
|
61662f3574 | ||
|
|
2c8c2199a1 | ||
|
|
6a9fc2ac93 | ||
|
|
af6b53420b | ||
|
|
ed0cd7ee06 | ||
|
|
104daa45db | ||
|
|
7e9f8a8779 | ||
|
|
1d30eb36d9 | ||
|
|
27cd35a97b | ||
|
|
41bd47700a | ||
|
|
6f27663318 | ||
|
|
be8ff40d58 | ||
|
|
e0dbd8f3f2 | ||
|
|
af1aaab3a6 | ||
|
|
b1a552bd07 | ||
|
|
26822fae62 | ||
|
|
abd9e86fe6 | ||
|
|
eab471a17c | ||
|
|
c5ea48aec9 | ||
|
|
5c39ab885d | ||
|
|
2efd32d5e4 | ||
|
|
1af63c69f8 | ||
|
|
3124df86a9 | ||
|
|
e5bbc6f17a | ||
|
|
64b649e407 | ||
|
|
b8c48273db | ||
|
|
06a25efb55 | ||
|
|
d4241ea163 | ||
|
|
0d3206db83 | ||
|
|
6920f9118c | ||
|
|
cbf4bd59fa | ||
|
|
c20fd6e7f5 | ||
|
|
37b9d659a7 | ||
|
|
6452e9665e | ||
|
|
2d0723ffc8 | ||
|
|
a56e351bc8 | ||
|
|
cae1635c8f | ||
|
|
b1751659c7 | ||
|
|
2835a1c9c7 | ||
|
|
460dfdd63d | ||
|
|
69139f20a5 | ||
|
|
8c8a2d77bf | ||
|
|
e60254c952 | ||
|
|
8caf0df5a4 | ||
|
|
11b8626b36 | ||
|
|
c032def097 | ||
|
|
5510541ae7 | ||
|
|
81c03daac3 | ||
|
|
244d0cf46a | ||
|
|
fbcdaccb6d | ||
|
|
bd64166681 | ||
|
|
60ea823a60 | ||
|
|
b908b86d22 | ||
|
|
9cafc1abe4 | ||
|
|
e0c2a0a219 | ||
|
|
801dd891b8 | ||
|
|
bf610cb029 | ||
|
|
36102bbaef | ||
|
|
66034f5eb7 | ||
|
|
6f5e8414b3 | ||
|
|
4cf941e19f | ||
|
|
64e4b0ec6a | ||
|
|
80b3b5d292 | ||
|
|
82eccf0672 | ||
|
|
6a89d906cc | ||
|
|
795025156e | ||
|
|
b5eeb5fd92 | ||
|
|
7910226cdf | ||
|
|
446501ffd1 | ||
|
|
fe6cc7bcb5 | ||
|
|
0b55fd04bc | ||
|
|
b1a42dd55a | ||
|
|
b97bf4c632 | ||
|
|
bbefb6a4eb | ||
|
|
9b283e650d | ||
|
|
e4a82fedbd | ||
|
|
d19a851353 | ||
|
|
3531b585e3 | ||
|
|
e62f0388da | ||
|
|
6257deeae6 | ||
|
|
5ec9cd017b | ||
|
|
10e913ac79 | ||
|
|
f96fb799a9 | ||
|
|
212fe5d179 | ||
|
|
36dbcbc78a | ||
|
|
3418e01da5 | ||
|
|
c4f072e4a9 | ||
|
|
ba5cc1b089 | ||
|
|
34289b84fd | ||
|
|
cdc07eb126 | ||
|
|
1d165ba391 | ||
|
|
4690d88c52 | ||
|
|
7535629551 | ||
|
|
badcca2bb2 | ||
|
|
96ba44c802 | ||
|
|
37b9dc0a37 | ||
|
|
9bfa4a6ce6 | ||
|
|
5c6f18a18b | ||
|
|
cad1d4541b | ||
|
|
36dd8f50de | ||
|
|
1d6d252e1d | ||
|
|
92ba78cd95 | ||
|
|
db381f3afd | ||
|
|
e20392c206 |
@@ -1320,10 +1320,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/core/services/echo/backends/analytics/ApplicationInsightsBackend.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/core/services/echo/backends/analytics/RudderstackBackend.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
@@ -2800,7 +2796,8 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "10"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/inspect/HelpWizard/utils.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/inspect/InspectDataTab.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
@@ -2860,6 +2857,10 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/saving/DashboardSceneChangeTracker.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/saving/SaveDashboardAsForm.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
@@ -2893,6 +2894,9 @@ exports[`better eslint`] = {
|
||||
"public/app/features/dashboard-scene/saving/shared.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/scene/DashboardControls.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/scene/NavToolbarActions.test.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
@@ -2948,7 +2952,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -6232,6 +6238,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/plugins/datasource/dashboard/datasource.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/datasource/dashboard/index.ts:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`./runSharedRequest\`)", "0"],
|
||||
[0, 0, 0, "Do not re-export imported variable (\`./DashboardQueryEditor\`)", "1"],
|
||||
|
||||
929
.drone.yml
929
.drone.yml
File diff suppressed because it is too large
Load Diff
10
.github/CODEOWNERS
vendored
10
.github/CODEOWNERS
vendored
@@ -43,12 +43,12 @@
|
||||
/docs/sources/dashboards/ @imatwawana
|
||||
/docs/sources/datasources/ @jdbaldry
|
||||
/docs/sources/explore/ @grafana/explore-squad @lwandz13
|
||||
/docs/sources/fundamentals @chri2547
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/introduction/ @chri2547
|
||||
/docs/sources/fundamentals @irenerl24
|
||||
/docs/sources/getting-started/ @irenerl24
|
||||
/docs/sources/introduction/ @irenerl24
|
||||
/docs/sources/panels-visualizations/ @imatwawana
|
||||
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/setup-grafana/ @chri2547
|
||||
/docs/sources/setup-grafana/ @irenerl24
|
||||
/docs/sources/upgrade-guide/ @imatwawana
|
||||
/docs/sources/whatsnew/ @imatwawana
|
||||
|
||||
@@ -658,6 +658,8 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/backport.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/release-pr.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/release-comms.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/codeowners-validator.yml @tolzhabayev
|
||||
/.github/workflows/codeql-analysis.yml @DanCech
|
||||
/.github/workflows/commands.yml @torkelo
|
||||
|
||||
22
.github/workflows/actions/changelog/action.yml
vendored
Normal file
22
.github/workflows/actions/changelog/action.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Changelog generator
|
||||
description: Generates and publishes a changelog for the given release version
|
||||
inputs:
|
||||
target:
|
||||
description: Target tag, branch or commit hash for the changelog
|
||||
required: true
|
||||
previous:
|
||||
description: Previous tag, branch or commit hash to start changelog from
|
||||
required: false
|
||||
github_token:
|
||||
description: GitHub token with read/write access to all necessary repositories
|
||||
required: true
|
||||
output_file:
|
||||
description: A file to store resulting changelog markdown
|
||||
required: false
|
||||
outputs:
|
||||
changelog:
|
||||
description: Changelog contents between the two given versions in Markdown format
|
||||
runs:
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
|
||||
319
.github/workflows/actions/changelog/index.js
vendored
Normal file
319
.github/workflows/actions/changelog/index.js
vendored
Normal file
@@ -0,0 +1,319 @@
|
||||
import { appendFileSync, writeFileSync } from 'fs';
|
||||
import { exec as execCallback } from 'node:child_process';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
//
|
||||
// Github Action core utils: logging (notice + debug log levels), must escape
|
||||
// newlines and percent signs
|
||||
//
|
||||
const escapeData = (s) => s.replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A');
|
||||
const LOG = (msg) => console.log(`::notice::${escapeData(msg)}`);
|
||||
|
||||
//
|
||||
// Semver utils: parse, compare, sort etc (using official regexp)
|
||||
// https://regex101.com/r/Ly7O1x/3/
|
||||
//
|
||||
const semverRegExp =
|
||||
/^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
||||
|
||||
const semverParse = (tag) => {
|
||||
const m = tag.match(semverRegExp);
|
||||
if (!m) {
|
||||
return;
|
||||
}
|
||||
const [_, major, minor, patch, prerelease] = m;
|
||||
return [+major, +minor, +patch, prerelease, tag];
|
||||
};
|
||||
|
||||
// semverCompare takes two parsed semver tags and comparest them more or less
|
||||
// according to the semver specs
|
||||
const semverCompare = (a, b) => {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
if (a[i] !== b[i]) {
|
||||
return a[i] < b[i] ? 1 : -1;
|
||||
}
|
||||
}
|
||||
if (a[3] !== b[3]) {
|
||||
return a[3] < b[3] ? 1 : -1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
// Using `git tag -l` output find the tag (version) that goes semantically
|
||||
// right before the given version. This might not work correctly with some
|
||||
// pre-release versions, which is why it's possible to pass previous version
|
||||
// into this action explicitly to avoid this step.
|
||||
const getPreviousVersion = async (version) => {
|
||||
const exec = promisify(execCallback);
|
||||
const { stdout } = await exec('git tag -l');
|
||||
const prev = stdout
|
||||
.split('\n')
|
||||
.map(semverParse)
|
||||
.filter((tag) => tag)
|
||||
.sort(semverCompare)
|
||||
.find((tag) => semverCompare(tag, semverParse(version)) > 0);
|
||||
if (!prev) {
|
||||
throw `Could not find previous git tag for ${version}`;
|
||||
}
|
||||
return prev[4];
|
||||
};
|
||||
|
||||
// A helper for Github GraphQL API endpoint
|
||||
const graphql = async (ghtoken, query, variables) => {
|
||||
const { env } = process;
|
||||
const results = await fetch('https://api.github.com/graphql', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${ghtoken}`,
|
||||
},
|
||||
body: JSON.stringify({ query, variables }),
|
||||
});
|
||||
const { data } = await results.json();
|
||||
return data;
|
||||
};
|
||||
|
||||
// Using Github GraphQL API find the timestamp for the given tag/commit hash.
|
||||
// This is required for PR listing, because Github API only takes date/time as
|
||||
// a "since" parameter while listing. Currently there is no way to provide two
|
||||
// "commitish" items and get a list of PRs in between them.
|
||||
const getCommitishDate = async (name, owner, target) => {
|
||||
const result = await graphql(
|
||||
ghtoken,
|
||||
`
|
||||
query getCommitDate($owner: String!, $name: String!, $target: String!) {
|
||||
repository(owner: $owner, name: $name) {
|
||||
object(expression: $target) {
|
||||
... on Commit {
|
||||
committedDate
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ name, owner, target }
|
||||
);
|
||||
return result.repository.object.committedDate;
|
||||
};
|
||||
|
||||
// Using Github GraphQL API get a list of PRs between the two "commitish" items.
|
||||
// This resoves the "since" item's timestamp first and iterates over all PRs
|
||||
// till "target" using naïve pagination.
|
||||
const getHistory = async (name, owner, target, sinceDate) => {
|
||||
LOG(`Fetching ${owner}/${name} PRs since ${sinceDate} till ${target}`);
|
||||
const query = `
|
||||
query findCommitsWithAssociatedPullRequests(
|
||||
$name: String!
|
||||
$owner: String!
|
||||
$target: String!
|
||||
$sinceDate: GitTimestamp
|
||||
$cursor: String
|
||||
) {
|
||||
repository(name: $name, owner: $owner) {
|
||||
object(expression: $target) {
|
||||
... on Commit {
|
||||
history(first: 50, since: $sinceDate, after: $cursor) {
|
||||
totalCount
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
associatedPullRequests(first: 1) {
|
||||
nodes {
|
||||
title
|
||||
number
|
||||
labels(first: 10) {
|
||||
nodes {
|
||||
name
|
||||
}
|
||||
}
|
||||
commits(first: 1) {
|
||||
nodes {
|
||||
commit {
|
||||
author {
|
||||
user {
|
||||
login
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
|
||||
let cursor;
|
||||
let nodes = [];
|
||||
for (;;) {
|
||||
const result = await graphql(ghtoken, query, {
|
||||
name,
|
||||
owner,
|
||||
target,
|
||||
sinceDate,
|
||||
cursor,
|
||||
});
|
||||
LOG(`GraphQL: ${JSON.stringify(result)}`);
|
||||
nodes = [...nodes, ...result.repository.object.history.nodes];
|
||||
const { hasNextPage, endCursor } = result.repository.object.history.pageInfo;
|
||||
if (!hasNextPage) {
|
||||
break;
|
||||
}
|
||||
cursor = endCursor;
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
|
||||
// The main function for this action: given two "commitish" items it gets a
|
||||
// list of PRs between them and filters/groups the PRs by category (bugfix,
|
||||
// feature, deprecation, breaking change and plugin fixes/enhancements).
|
||||
//
|
||||
// PR grouping relies on Github labels only, not on the PR contents.
|
||||
const getChangeLogItems = async (name, owner, sinceDate, to) => {
|
||||
// check if a node contains a certain label
|
||||
const hasLabel = ({ labels }, label) => labels.nodes.some(({ name }) => name === label);
|
||||
// get all the PRs between the two "commitish" items
|
||||
const history = await getHistory(name, owner, to, sinceDate);
|
||||
|
||||
const items = history.flatMap((node) => {
|
||||
// discard PRs without a "changelog" label
|
||||
const changes = node.associatedPullRequests.nodes.filter((PR) => hasLabel(PR, 'add to changelog'));
|
||||
if (changes.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const item = changes[0];
|
||||
const { number, url, labels } = item;
|
||||
const title = item.title.replace(/^\[[^\]]+\]:?\s*/, '');
|
||||
// for changelog PRs try to find a suitable category.
|
||||
// Note that we can not detect "deprecation notices" like that
|
||||
// as there is no suitable label yet.
|
||||
const isBug = /fix/i.test(title) || hasLabel({ labels }, 'type/bug');
|
||||
const isBreaking = hasLabel({ labels }, 'breaking change');
|
||||
const isPlugin =
|
||||
hasLabel({ labels }, 'area/grafana/ui') ||
|
||||
hasLabel({ labels }, 'area/grafana/toolkit') ||
|
||||
hasLabel({ labels }, 'area/grafana/runtime');
|
||||
const author = item.commits.nodes[0].commit.author.user.login;
|
||||
return {
|
||||
repo: name,
|
||||
number,
|
||||
title,
|
||||
author,
|
||||
isBug,
|
||||
isPlugin,
|
||||
isBreaking,
|
||||
};
|
||||
});
|
||||
return items;
|
||||
};
|
||||
|
||||
// ======================================================
|
||||
// GENERATE CHANGELOG
|
||||
// ======================================================
|
||||
|
||||
LOG(`Changelog action started`);
|
||||
|
||||
const ghtoken = process.env.GITHUB_TOKEN || process.env.INPUT_GITHUB_TOKEN;
|
||||
if (!ghtoken) {
|
||||
throw 'GITHUB_TOKEN is not set and "github_token" input is empty';
|
||||
}
|
||||
|
||||
const target = process.argv[2] || process.env.INPUT_TARGET;
|
||||
LOG(`Target tag/branch/commit: ${target}`);
|
||||
|
||||
const previous = process.argv[3] || process.env.INPUT_PREVIOUS || (await getPreviousVersion(target));
|
||||
|
||||
LOG(`Previous tag/commit: ${previous}`);
|
||||
|
||||
const sinceDate = await getCommitishDate('grafana', 'grafana', previous);
|
||||
LOG(`Previous tag/commit timestamp: ${sinceDate}`);
|
||||
|
||||
// Get all changelog items from Grafana OSS
|
||||
const oss = await getChangeLogItems('grafana', 'grafana', sinceDate, target);
|
||||
// Get all changelog items from Grafana Enterprise
|
||||
const entr = await getChangeLogItems('grafana-enterprise', 'grafana', sinceDate, target);
|
||||
|
||||
LOG(`Found OSS PRs: ${oss.length}`);
|
||||
LOG(`Found Enterprise PRs: ${entr.length}`);
|
||||
|
||||
// Sort PRs and categorise them into sections
|
||||
const changelog = [...oss, ...entr]
|
||||
.sort((a, b) => (a.title < b.title ? -1 : 1))
|
||||
.reduce(
|
||||
(changelog, item) => {
|
||||
if (item.isPlugin) {
|
||||
changelog.plugins.push(item);
|
||||
} else if (item.isBug) {
|
||||
changelog.bugfixes.push(item);
|
||||
} else if (item.isBreaking) {
|
||||
changelog.breaking.push(item);
|
||||
} else {
|
||||
changelog.features.push(item);
|
||||
}
|
||||
return changelog;
|
||||
},
|
||||
{
|
||||
breaking: [],
|
||||
plugins: [],
|
||||
bugfixes: [],
|
||||
features: [],
|
||||
}
|
||||
);
|
||||
|
||||
// Convert PR numbers to Github links
|
||||
const pullRequestLink = (n) => `[#${n}](https://github.com/grafana/grafana/pull/${n})`;
|
||||
// Convert Github user IDs to Github links
|
||||
const userLink = (u) => `[@${u}](https://github.com/${u})`;
|
||||
|
||||
// Now that we have a changelog - we can render some markdown as an output
|
||||
const markdown = (changelog) => {
|
||||
// This convers a list of changelog items into a markdown section with a list of titles/links
|
||||
const section = (title, items) =>
|
||||
items.length === 0
|
||||
? ''
|
||||
: `### ${title}
|
||||
|
||||
${items
|
||||
.map(
|
||||
(item) =>
|
||||
`- ${item.title.replace(/^([^:]*:)/gm, '**$1**')} ${
|
||||
item.repo === 'grafana-enterprise'
|
||||
? '(Enterprise)'
|
||||
: `${pullRequestLink(item.number)}, ${userLink(item.author)}`
|
||||
}`
|
||||
)
|
||||
.join('\n')}
|
||||
`;
|
||||
|
||||
// Render all present sections for the given changelog
|
||||
return `${section('Features and enhancements', changelog.features)}
|
||||
${section('Bug fixes', changelog.bugfixes)}
|
||||
${section('Breaking changes', changelog.breaking)}
|
||||
${section('Plugin development fixes & changes', changelog.plugins)}
|
||||
`;
|
||||
};
|
||||
|
||||
const md = markdown(changelog);
|
||||
|
||||
// Print changelog, mostly for debugging
|
||||
LOG(`Resulting markdown: ${md}`);
|
||||
|
||||
// Save changelog as an output for this action
|
||||
if (process.env.GITHUB_OUTPUT) {
|
||||
LOG(`Output to ${process.env.GITHUB_OUTPUT}`);
|
||||
appendFileSync(process.env.GITHUB_OUTPUT, `changelog<<EOF\n${escapeData(md)}\nEOF`);
|
||||
} else {
|
||||
LOG('GITHUB_OUTPUT is not set');
|
||||
}
|
||||
|
||||
// Save changelog as an output file (if requested)
|
||||
if (process.env.INPUT_OUTPUT_FILE) {
|
||||
LOG(`Output to ${process.env.INPUT_OUTPUT_FILE}`);
|
||||
writeFileSync(process.env.INPUT_OUTPUT_FILE, md);
|
||||
}
|
||||
85
.github/workflows/bump-version.yml
vendored
85
.github/workflows/bump-version.yml
vendored
@@ -5,74 +5,39 @@ on:
|
||||
version:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1'
|
||||
required: true
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
push:
|
||||
default: true
|
||||
required: false
|
||||
dry_run:
|
||||
default: false
|
||||
required: false
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
id: regex-match
|
||||
with:
|
||||
text: ${{ github.event.inputs.version }}
|
||||
regex: '^(\d+.\d+).\d+(?:-(?:(preview\d?)|(pre)))?$'
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
id: regex-match-version-call
|
||||
with:
|
||||
text: ${{ inputs.version_call }}
|
||||
regex: '^(\d+.\d+).\d+(?:-(?:(preview\d?)|(pre)))?$'
|
||||
- name: Validate input version
|
||||
if: ${{ steps.regex-match.outputs.match == '' && github.event.inputs.version != '' }}
|
||||
run: |
|
||||
echo "The input version format is not correct, please respect:\
|
||||
major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. \
|
||||
example: 7.4.3, 7.4.3-preview or 7.4.3-preview1"
|
||||
exit 1
|
||||
- name: Validate input version call
|
||||
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}
|
||||
run: |
|
||||
echo "The input version format is not correct, please respect:\
|
||||
major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. \
|
||||
example: 7.4.3, 7.4.3-preview or 7.4.3-preview1"
|
||||
exit 1
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set intermedia variables
|
||||
id: intermedia
|
||||
run: |
|
||||
echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
echo "check_passed=false" >> $GITHUB_OUTPUT
|
||||
echo "branch_name=v${{steps.regex-match.outputs.group1}}" >> $GITHUB_OUTPUT
|
||||
echo "branch_exist=$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout Actions
|
||||
- name: Checkout Grafana
|
||||
uses: actions/checkout@v4
|
||||
- name: Update package.json versions
|
||||
uses: ./pkg/build/actions/bump-version
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
# Go is required for also updating the schema versions as part of the precommit hook:
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
version: ${{ inputs.version }}
|
||||
- if: ${{ inputs.push }}
|
||||
name: Generate token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run bump version (manually invoked)
|
||||
uses: ./actions/bump-version
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
precommit_make_target: gen-cue
|
||||
- if: ${{ inputs.push }}
|
||||
name: Push & Create PR
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local --add --bool push.autoSetupRemote true
|
||||
git checkout -b "bump-version/${{ github.run_id }}/${{ inputs.version }}"
|
||||
git add .
|
||||
git commit -m "bump version ${{ inputs.version }}"
|
||||
git push
|
||||
gh pr create --dry-run=${{ inputs.dry_run }} -l "type/ci" -l "no-changelog" -B "${{ github.ref_name }}" --title "Release: Bump version to ${{ inputs.version }}" --body "Updated version to ${{ inputs.version }}"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
139
.github/workflows/changelog.yml
vendored
Normal file
139
.github/workflows/changelog.yml
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
name: Generate changelog
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Target release version (semver, git tag, branch or commit)'
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: 'The base branch that these changes are being merged into'
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Target release version (semver, git tag, branch or commit)'
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: 'The base branch that these changes are being merged into'
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
with:
|
||||
ref: main
|
||||
sparse-checkout: |
|
||||
.github/workflows
|
||||
CHANGELOG.md
|
||||
.nvmrc
|
||||
.prettierignore
|
||||
.prettierrc.js
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: "Configure git user"
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local --add --bool push.autoSetupRemote true
|
||||
- name: "Create branch"
|
||||
run: git checkout -b "changelog/${{ github.run_id }}/${{ inputs.version }}"
|
||||
- name: "Generate changelog"
|
||||
id: changelog
|
||||
uses: ./.github/workflows/actions/changelog
|
||||
with:
|
||||
github_token: ${{ steps.generate_token.outputs.token }}
|
||||
target: v${{ inputs.version }}
|
||||
output_file: changelog_items.md
|
||||
- name: "Patch CHANGELOG.md"
|
||||
run: |
|
||||
# Prepare CHANGELOG.md content with version delimiters
|
||||
(
|
||||
echo
|
||||
echo "# ${{ inputs.version}} ($(date '+%F'))"
|
||||
echo
|
||||
cat changelog_items.md
|
||||
) > CHANGELOG.part
|
||||
|
||||
# Check if a version exists in the changelog
|
||||
if grep -q "<!-- ${{ inputs.version}} START" CHANGELOG.md ; then
|
||||
# Replace the content between START and END delimiters
|
||||
echo "Version ${{ inputs.version }} is found in the CHANGELOG.md, patching contents..."
|
||||
sed -i -e '/${{ inputs.version }} START/,/${{ inputs.version }} END/{//!d;}' \
|
||||
-e '/${{ inputs.version }} START/r CHANGELOG.part' CHANGELOG.md
|
||||
else
|
||||
# Prepend changelog part to the main changelog file
|
||||
echo "Version ${{ inputs.version }} not found in the CHANGELOG.md"
|
||||
(
|
||||
echo "<!-- ${{ inputs.version }} START -->"
|
||||
cat CHANGELOG.part
|
||||
echo "<!-- ${{ inputs.version }} END -->"
|
||||
cat CHANGELOG.md
|
||||
) > CHANGELOG.tmp
|
||||
mv CHANGELOG.tmp CHANGELOG.md
|
||||
fi
|
||||
|
||||
git diff CHANGELOG.md
|
||||
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
- name: "Commit changelog changes"
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
- name: "git push"
|
||||
if: ${{ inputs.dry_run }} != true
|
||||
run: git push
|
||||
- name: "Create changelog PR"
|
||||
run: >
|
||||
gh pr create \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
--label "no-backport" \
|
||||
--label "no-changelog" \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: update changelog for ${{ inputs.version }}" \
|
||||
--body "Changelog changes for release ${{ inputs.version }}"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
35
.github/workflows/community-release.yml
vendored
35
.github/workflows/community-release.yml
vendored
@@ -1,25 +1,46 @@
|
||||
name: Create community release post
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1'
|
||||
dry_run:
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
description: When enabled, this workflow will print a preview instead of creating an actual post.
|
||||
secrets:
|
||||
GRAFANA_MISC_STATS_API_KEY:
|
||||
required: true
|
||||
GRAFANABOT_FORUM_KEY:
|
||||
required: true
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1'
|
||||
dry_run:
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
description: When enabled, this workflow will print a preview instead of creating an actual post.
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run community-release (manually invoked)
|
||||
uses: grafana/grafana-github-actions-go/community-release@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ inputs.version }}
|
||||
metrics_api_key: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
community_api_key: ${{ secrets.GRAFANABOT_FORUM_KEY }}
|
||||
community_api_username: grafanabot
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
|
||||
35
.github/workflows/github-release.yml
vendored
35
.github/workflows/github-release.yml
vendored
@@ -1,27 +1,48 @@
|
||||
name: Create or update GitHub release
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone (NO v prefix)
|
||||
type: string
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
description: Mark this release as latest (`1`) or not (`0`, default)
|
||||
type: string
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone (NO v prefix)
|
||||
type: string
|
||||
latest:
|
||||
required: false
|
||||
description: Mark this release as latest (`1`) or not (`0`, default)
|
||||
type: string
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
# contents: write allows the action(s) to create github releases
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Create GitHub release (manually invoked)
|
||||
uses: grafana/grafana-github-actions-go/github-release@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ inputs.version }}
|
||||
metrics_api_key: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
latest: ${{ inputs.latest }}
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
|
||||
@@ -1,38 +1,21 @@
|
||||
name: "publish-technical-documentation-next"
|
||||
name: publish-technical-documentation-next
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- main
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: "ubuntu-latest"
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (next)"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-next"
|
||||
- uses: actions/checkout@v4
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation@publish-technical-documentation/v1
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/next"
|
||||
website_directory: content/docs/grafana/next
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: "publish-technical-documentation-release"
|
||||
name: publish-technical-documentation-release
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -12,63 +12,18 @@ on:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: "ubuntu-latest"
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Checkout Actions library"
|
||||
uses: "actions/checkout@v4"
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v1
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: "./actions"
|
||||
|
||||
- name: "Install Actions from library"
|
||||
run: "npm install --production --prefix ./actions"
|
||||
|
||||
- name: "Determine if there is a matching release tag"
|
||||
id: "has-matching-release-tag"
|
||||
uses: "./actions/has-matching-release-tag"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
|
||||
|
||||
- name: "Determine technical documentation version"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./actions/docs-target"
|
||||
id: "target"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Switch to HEAD of version branch for tags"
|
||||
# Tags aren't necessarily made to the HEAD of the version branch.
|
||||
# The documentation to be published is always on the HEAD of the version branch.
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true' && github.ref_type == 'tag'"
|
||||
run: "git switch --detach origin/${{ steps.target.outputs.target }}.x"
|
||||
|
||||
- name: "Publish to website repository (release)"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-release"
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||
release_branch_with_patch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
website_directory: content/docs/grafana
|
||||
version_suffix: ""
|
||||
|
||||
78
.github/workflows/release-comms.yml
vendored
Normal file
78
.github/workflows/release-comms.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
# This workflow runs whenever the release PR is merged. It includes post-release communication processes like
|
||||
# posting to slack, the website, community forums, etc.
|
||||
# Only things that happen after a release is completed and all of the necessary code changes (like the changelog) are made.
|
||||
name: Post-release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
required: false
|
||||
default: true
|
||||
version:
|
||||
required: true
|
||||
latest:
|
||||
type: bool
|
||||
default: false
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- 'main'
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')) }}
|
||||
name: Setup and establish latest
|
||||
outputs:
|
||||
version: ${{ steps.output.outputs.version }}
|
||||
dry_run: ${{ steps.output.outputs.dry_run }}
|
||||
latest: ${{ steps.output.outputs.latest }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
echo setting up GITHUB_ENV for ${{ github.event_name }}
|
||||
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
|
||||
echo "DRY_RUN=${{ inputs.dry_run }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ inputs.latest }}" >> $GITHUB_ENV
|
||||
- if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }}
|
||||
run: |
|
||||
echo "VERSION=$(echo ${{ github.head_ref }} | sed -e 's/release\/.*\///g')" >> $GITHUB_ENV
|
||||
echo "DRY_RUN=${{ contains(github.event.pull_request.labels.*.name, 'release/dry-run') }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') }}" >> $GITHUB_ENV
|
||||
- id: output
|
||||
run: |
|
||||
echo "dry_run: $DRY_RUN"
|
||||
echo "latest: $LATEST"
|
||||
echo "version: $VERSION"
|
||||
|
||||
echo "dry_run=$DRY_RUN" >> "$GITHUB_OUTPUT"
|
||||
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
post_changelog_on_forum:
|
||||
needs: setup
|
||||
uses: ./.github/workflows/community-release.yml
|
||||
secrets:
|
||||
GRAFANA_MISC_STATS_API_KEY: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
GRAFANABOT_FORUM_KEY: ${{ secrets.GRAFANABOT_FORUM_KEY }}
|
||||
with:
|
||||
version: ${{ needs.setup.outputs.version }}
|
||||
dry_run: ${{ needs.setup.outputs.dry_run == 'true' }}
|
||||
create_github_release:
|
||||
# a github release requires a git tag
|
||||
# The github-release action retrieves the changelog using the /repos/grafana/grafana/contents/CHANGELOG.md API
|
||||
# endpoint.
|
||||
needs: setup
|
||||
uses: ./.github/workflows/github-release.yml
|
||||
with:
|
||||
version: ${{ needs.setup.outputs.version }}
|
||||
dry_run: ${{ needs.setup.outputs.dry_run == 'true' }}
|
||||
latest: ${{ needs.setup.outputs.latest }}
|
||||
post_on_slack:
|
||||
needs: setup
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
echo announce on slack that ${{ needs.setup.outputs.version }} has been released
|
||||
echo dry run: ${{ needs.setup.outputs.dry_run }}
|
||||
167
.github/workflows/release-pr.yml
vendored
Normal file
167
.github/workflows/release-pr.yml
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
# This workflow creates a new PR in Grafana which is triggered after a release is completed.
|
||||
# It should include all code changes that are needed after a release is done. This includes the changelog update and
|
||||
# version bumps, but could include more in the future.
|
||||
# Please refrain from including any processes that do not result in code changes in this workflow. Instead, they should
|
||||
# either be triggered in the release promotion process or in the release comms process (that is triggered by merging
|
||||
# this PR).
|
||||
name: Complete a Grafana release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
type: string
|
||||
description: The version of Grafana that is being released
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: The base branch that these changes are being merged into
|
||||
backport:
|
||||
required: false
|
||||
type: string
|
||||
description: Branch to backport these changes to
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
push-changelog-to-main:
|
||||
name: Create PR to main to update the changelog
|
||||
uses: ./.github/workflows/changelog.yml
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
latest: ${{ inputs.latest }}
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
target: main
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
create-prs:
|
||||
name: Create Release PR
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
steps:
|
||||
- name: Generate bot token
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Checkout Grafana
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.target }}
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Checkout Grafana (main)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: '0'
|
||||
fetch-tags: 'false'
|
||||
path: .grafana-main
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: Configure git user
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local --add --bool push.autoSetupRemote true
|
||||
|
||||
- name: Create branch
|
||||
run: git checkout -b "release/${{ github.run_id }}/${{ inputs.version }}"
|
||||
- name: Generate changelog
|
||||
id: changelog
|
||||
uses: ./.grafana-main/.github/workflows/actions/changelog
|
||||
with:
|
||||
github_token: ${{ steps.generate_token.outputs.token }}
|
||||
target: v${{ inputs.version }}
|
||||
output_file: changelog_items.md
|
||||
- name: Patch CHANGELOG.md
|
||||
run: |
|
||||
# Prepare CHANGELOG.md content with version delimiters
|
||||
(
|
||||
echo
|
||||
echo "# ${{ inputs.version}} ($(date '+%F'))"
|
||||
echo
|
||||
cat changelog_items.md
|
||||
) > CHANGELOG.part
|
||||
|
||||
# Check if a version exists in the changelog
|
||||
if grep -q "<!-- ${{ inputs.version}} START" CHANGELOG.md ; then
|
||||
# Replace the content between START and END delimiters
|
||||
echo "Version ${{ inputs.version }} is found in the CHANGELOG.md, patching contents..."
|
||||
sed -i -e '/${{ inputs.version }} START/,/${{ inputs.version }} END/{//!d;}' \
|
||||
-e '/${{ inputs.version }} START/r CHANGELOG.part' CHANGELOG.md
|
||||
else
|
||||
# Prepend changelog part to the main changelog file
|
||||
echo "Version ${{ inputs.version }} not found in the CHANGELOG.md"
|
||||
(
|
||||
echo "<!-- ${{ inputs.version }} START -->"
|
||||
cat CHANGELOG.part
|
||||
echo "<!-- ${{ inputs.version }} END -->"
|
||||
cat CHANGELOG.md
|
||||
) > CHANGELOG.tmp
|
||||
mv CHANGELOG.tmp CHANGELOG.md
|
||||
fi
|
||||
|
||||
rm -f CHANGELOG.part changelog_items.md
|
||||
|
||||
git diff CHANGELOG.md
|
||||
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
- name: Commit CHANGELOG.md changes
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
|
||||
- name: Update package.json versions
|
||||
uses: ./.grafana-main/pkg/build/actions/bump-version
|
||||
with:
|
||||
version: 'patch'
|
||||
|
||||
- name: Add package.json changes
|
||||
run: |
|
||||
git add package.json lerna.json yarn.lock packages public
|
||||
git commit -m "Update version to ${{ inputs.version }}"
|
||||
|
||||
- name: Git push
|
||||
if: ${{ inputs.dry_run }} != true
|
||||
run: git push --set-upstream origin release/${{ github.run_id }}/${{ inputs.version }}
|
||||
|
||||
- name: Create PR without backports
|
||||
if: "${{ inputs.backport == '' }}"
|
||||
run: >
|
||||
gh pr create \
|
||||
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
--body "These code changes must be merged after a release is complete"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create PR with backports
|
||||
if: "${{ inputs.backport != '' }}"
|
||||
run: >
|
||||
gh pr create \
|
||||
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
|
||||
-l "product-approved" \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
--body "These code changes must be merged after a release is complete"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
364
CHANGELOG.md
364
CHANGELOG.md
@@ -1,3 +1,367 @@
|
||||
<!-- 11.1.7+security-01 START -->
|
||||
|
||||
# 11.1.7+security-01 (2024-10-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **SQL Expressions**: Fixes CVE-2024-9264
|
||||
|
||||
<!-- 11.1.7+security-01 END -->
|
||||
<!-- 11.1.7 START -->
|
||||
|
||||
# 11.1.7 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93355](https://github.com/grafana/grafana/pull/93355), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix preview of silences when label name contains spaces [#93050](https://github.com/grafana/grafana/pull/93050), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93115](https://github.com/grafana/grafana/pull/93115), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93704](https://github.com/grafana/grafana/pull/93704), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93439](https://github.com/grafana/grafana/pull/93439), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Remove Basic Logs retention warning [#93122](https://github.com/grafana/grafana/pull/93122), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93675](https://github.com/grafana/grafana/pull/93675), [@ifrost](https://github.com/ifrost)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93487](https://github.com/grafana/grafana/pull/93487), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.1.7 END -->
|
||||
<!-- 11.1.6+security-01 START -->
|
||||
|
||||
# 11.1.6+security-01 (2024-10-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **SQL Expressions**: Fixes CVE-2024-9264
|
||||
|
||||
<!-- 11.1.6+security-01 END -->
|
||||
<!-- 11.1.6 START -->
|
||||
|
||||
# 11.1.6 (2024-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update swagger ui (4.3.0 to 5.17.14) [#92341](https://github.com/grafana/grafana/pull/92341), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Templating:** Fix searching non-latin template variables [#92892](https://github.com/grafana/grafana/pull/92892), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92646](https://github.com/grafana/grafana/pull/92646), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
|
||||
|
||||
<!-- 11.1.6 END -->
|
||||
<!-- 11.1.5 START -->
|
||||
|
||||
# 11.1.5 (2024-08-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix permissions for prometheus rule endpoints [#91414](https://github.com/grafana/grafana/pull/91414), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix persisting result fingerprint that is used by recovery threshold [#91290](https://github.com/grafana/grafana/pull/91290), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Auditing:** Fix a possible crash when audit logger parses responses for failed requests (Enterprise)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they don't belong to [#92273](https://github.com/grafana/grafana/pull/92273), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they dont belong to (Enterprise)
|
||||
- **RBAC:** Fix seeder failures when inserting duplicated permissions (Enterprise)
|
||||
- **Snapshots:** Fix panic when snapshot_remove_expired is true [#91232](https://github.com/grafana/grafana/pull/91232), [@ryantxu](https://github.com/ryantxu)
|
||||
- **VizTooltip:** Fix positioning at bottom and right edges on mobile [#92137](https://github.com/grafana/grafana/pull/92137), [@leeoniya](https://github.com/leeoniya)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
|
||||
|
||||
<!-- 11.1.5 END -->
|
||||
<!-- 11.1.4 START -->
|
||||
|
||||
# 11.1.4 (2024-08-14)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Swagger:** Fixed CVE-2024-6837.
|
||||
|
||||
<!-- 11.1.4 END -->
|
||||
<!-- 11.1.3 START -->
|
||||
|
||||
# 11.1.3 (2024-07-26)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **RBAC**: Allow plugins to use scoped actions [#90946](https://github.com/grafana/grafana/pull/90946), [@gamab](https://github.com/gamab)
|
||||
|
||||
<!-- 11.1.3 END -->
|
||||
<!-- 11.1.2 START -->
|
||||
|
||||
# 11.1.2 (2024-07-26)
|
||||
|
||||
<!-- 11.1.2 END -->
|
||||
<!-- 11.1.1 START -->
|
||||
|
||||
# 11.1.1 (2024-07-25)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Skip fetching alerts for unsaved dashboards [#90074](https://github.com/grafana/grafana/pull/90074), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Skip loading alert rules for dashboards when disabled [#89905](https://github.com/grafana/grafana/pull/89905), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Support `utf8_strict_mode: false` in Mimir [#90148](https://github.com/grafana/grafana/pull/90148), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Scenes:** Fixes issue with panel repeat height calculation [#90232](https://github.com/grafana/grafana/pull/90232), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Table Panel:** Fix Image hover without datalinks [#89922](https://github.com/grafana/grafana/pull/89922), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Tempo:** Fix grpc streaming support over pdc-agent [#90055](https://github.com/grafana/grafana/pull/90055), [@taylor-s-dean](https://github.com/taylor-s-dean)
|
||||
- **RBAC**: Allow plugins to use scoped actions [#90946](https://github.com/grafana/grafana/pull/90946), [@gamab](https://github.com/gamab)
|
||||
|
||||
<!-- 11.1.1 END -->
|
||||
<!-- 11.1.0 START -->
|
||||
|
||||
# 11.1.0 (2024-06-21)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Tracing:** Enable traces to profiles. [#88896](https://github.com/grafana/grafana/issues/88896), [@marefr](https://github.com/marefr)
|
||||
- **Auth:** Add org to role mappings support to Google integration. [#88891](https://github.com/grafana/grafana/issues/88891), [@kalleep](https://github.com/kalleep)
|
||||
- **Alerting:** Support AWS SNS integration in Grafana. [#88867](https://github.com/grafana/grafana/issues/88867), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Auth:** Add org to role mappings support to Okta integration. [#88770](https://github.com/grafana/grafana/issues/88770), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Add org to role mappings support to Gitlab integration. [#88751](https://github.com/grafana/grafana/issues/88751), [@kalleep](https://github.com/kalleep)
|
||||
- **Cloudwatch:** Use the metric map from grafana-aws-sdk. [#88733](https://github.com/grafana/grafana/issues/88733), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Add option to use Redis in cluster mode for Alerting HA. [#88696](https://github.com/grafana/grafana/issues/88696), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **VizTooltip:** Allow setting the `maxWidth` option. [#88652](https://github.com/grafana/grafana/issues/88652), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Auth:** Add org to role mappings support to GitHub integration . [#88537](https://github.com/grafana/grafana/issues/88537), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **CloudWatch:** Handle permissions error and update docs. [#88524](https://github.com/grafana/grafana/issues/88524), [@iwysiu](https://github.com/iwysiu)
|
||||
- ** Alerting:** Correctly handle duplicating notification templates. [#88487](https://github.com/grafana/grafana/issues/88487), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Mute Timing service to prevent changing provenance status to none. [#88462](https://github.com/grafana/grafana/issues/88462), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Ensure we fetch AM config before saving new configuration. [#88458](https://github.com/grafana/grafana/issues/88458), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Remove regex reference in silences filter tooltip. [#88455](https://github.com/grafana/grafana/issues/88455), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Cloudwatch:** Update AWS DynamoDB Metrics. [#88418](https://github.com/grafana/grafana/issues/88418), [@LeonardoBoleli](https://github.com/LeonardoBoleli)
|
||||
- **Alerting:** Make regex notification routing preview consistent with notification policies implementation. [#88413](https://github.com/grafana/grafana/issues/88413), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **DateTimePicker:** Return cleared value in onChange. [#88377](https://github.com/grafana/grafana/issues/88377), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **NodeGraph:** Add msagl and the layered layout code. [#88375](https://github.com/grafana/grafana/issues/88375), [@aocenas](https://github.com/aocenas)
|
||||
- **API:** Add in theme support to /render/\* endpoint. [#88304](https://github.com/grafana/grafana/issues/88304), [@timlevett](https://github.com/timlevett)
|
||||
- **Alerting:** Add filters for RouteGetRuleStatuses. [#88295](https://github.com/grafana/grafana/issues/88295), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **Plugins:** Update the `plugin.json` schema with UI extensions meta-data. [#88288](https://github.com/grafana/grafana/issues/88288), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Auth:** Update SAML lib to improve HTTP-Post binding. [#88287](https://github.com/grafana/grafana/issues/88287), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Tempo:** Send current filters when retrieving tags for AdHocFilters. [#88270](https://github.com/grafana/grafana/issues/88270), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tempo:** Support standard span convention. [#88268](https://github.com/grafana/grafana/issues/88268), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **ValueFormats:** Add Uruguay peso currency. [#88260](https://github.com/grafana/grafana/issues/88260), [@lfdominguez](https://github.com/lfdominguez)
|
||||
- **DateTimePicker:** Add clearable prop. [#88215](https://github.com/grafana/grafana/issues/88215), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Correlations:** Enable feature toggle by default (on-prem). [#88208](https://github.com/grafana/grafana/issues/88208), [@ifrost](https://github.com/ifrost)
|
||||
- **Stat:** Add percent change color modes. [#88205](https://github.com/grafana/grafana/issues/88205), [@drew08t](https://github.com/drew08t)
|
||||
- **Logs:** Added multi-line display control to the "wrap lines" option. [#88144](https://github.com/grafana/grafana/issues/88144), [@matyax](https://github.com/matyax)
|
||||
- **Tempo:** Update lezer autocomplete (histogram, quantile) and add missing functions. [#88131](https://github.com/grafana/grafana/issues/88131), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **AnnotationsPlugin2:** Implement support for rectangular annotations in Heatmap. [#88107](https://github.com/grafana/grafana/issues/88107), [@adrapereira](https://github.com/adrapereira)
|
||||
- **CodeEditor:** Improved styles when the code editor is loading. [#88102](https://github.com/grafana/grafana/issues/88102), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **CloudWatch:** Add additional AWS/KinesisAnalytics metrics . [#88101](https://github.com/grafana/grafana/issues/88101), [@tristanburgess](https://github.com/tristanburgess)
|
||||
- **Cloudwatch:** Add AWS/Events Metrics. [#88097](https://github.com/grafana/grafana/issues/88097), [@LeonardoBoleli](https://github.com/LeonardoBoleli)
|
||||
- **Azure:** Basic Logs support. [#88025](https://github.com/grafana/grafana/issues/88025), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Dashboard:** Make dashboard search faster. [#88019](https://github.com/grafana/grafana/issues/88019), [@knuzhdin](https://github.com/knuzhdin)
|
||||
- **Alerting:** Support custom API URL for PagerDuty integration. [#88007](https://github.com/grafana/grafana/issues/88007), [@gaurav1999](https://github.com/gaurav1999)
|
||||
- **Alerting:** Add optional metadata via query param to silence GET requests. [#88000](https://github.com/grafana/grafana/issues/88000), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Store:** Enable adding extra middleware. [#87984](https://github.com/grafana/grafana/issues/87984), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Tempo:** Don't modify the passed time range when using timeShiftEnabled. [#87980](https://github.com/grafana/grafana/issues/87980), [@aocenas](https://github.com/aocenas)
|
||||
- **InfluxDB:** Introduce maxDataPoints setting for flux variable query editor. [#87935](https://github.com/grafana/grafana/issues/87935), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Alerting:** New list view UI – Part 1. [#87907](https://github.com/grafana/grafana/issues/87907), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **NodeGraph:** Remove msagl lib and layered layout option. [#87905](https://github.com/grafana/grafana/issues/87905), [@aocenas](https://github.com/aocenas)
|
||||
- **InfluxDB:** Introduce custom variable support. [#87903](https://github.com/grafana/grafana/issues/87903), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Gops:** Add tracking for data source check. [#87886](https://github.com/grafana/grafana/issues/87886), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **AzureMonitor:** Prometheus exemplars support . [#87742](https://github.com/grafana/grafana/issues/87742), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Feature Management:** Move awsDatasourcesNewFormStyling to GA. [#87696](https://github.com/grafana/grafana/issues/87696), [@idastambuk](https://github.com/idastambuk)
|
||||
- **TimeRangePicker:** Announce to screen reader when time range is updated. [#87692](https://github.com/grafana/grafana/issues/87692), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Alerting:** Template selector in contact points form. [#87689](https://github.com/grafana/grafana/issues/87689), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Azure:** Load custom clouds from ini file. [#87667](https://github.com/grafana/grafana/issues/87667), [@JonCole](https://github.com/JonCole)
|
||||
- **Loki:** Kick start your query now applies templates to the current query. [#87658](https://github.com/grafana/grafana/issues/87658), [@matyax](https://github.com/matyax)
|
||||
- **Elasticsearch:** Queries no longer executed while typing. [#87652](https://github.com/grafana/grafana/issues/87652), [@matyax](https://github.com/matyax)
|
||||
- **Alerting:** Add options to configure TLS for HA using Redis. [#87567](https://github.com/grafana/grafana/issues/87567), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **VizLegend:** Represent line style in series legend and tooltip. [#87558](https://github.com/grafana/grafana/issues/87558), [@domasx2](https://github.com/domasx2)
|
||||
- **FeatureBadge:** Update FeatureBadge to support current release stages. [#87555](https://github.com/grafana/grafana/issues/87555), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Logs:** Infinite scrolling in Explore enabled by default. [#87493](https://github.com/grafana/grafana/issues/87493), [@matyax](https://github.com/matyax)
|
||||
- **Plugins:** Improve frontend loader cache. [#87488](https://github.com/grafana/grafana/issues/87488), [@jackw](https://github.com/jackw)
|
||||
- **Chore:** Upgrade go from 1.21.0 to 1.21.10. [#87479](https://github.com/grafana/grafana/issues/87479), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
|
||||
- **Chore:** Upgrade go to 1.22.3. [#87463](https://github.com/grafana/grafana/issues/87463), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
|
||||
- **Team:** Add an endpoint for bulk team membership updates. [#87441](https://github.com/grafana/grafana/issues/87441), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Flamegraph:** Add collapse and expand group buttons to toolbar. [#87395](https://github.com/grafana/grafana/issues/87395), [@aocenas](https://github.com/aocenas)
|
||||
- **OIDC:** Support Generic OAuth org to role mappings. [#87394](https://github.com/grafana/grafana/issues/87394), [@sathieu](https://github.com/sathieu)
|
||||
- **Search:** Announce to screen reader when query returns no result. [#87382](https://github.com/grafana/grafana/issues/87382), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Logs:** Added support for numeric log levels. [#87366](https://github.com/grafana/grafana/issues/87366), [@nailgun](https://github.com/nailgun)
|
||||
- **Prometheus:** Place custom inputs first when using regex filter values in the query builder. [#87360](https://github.com/grafana/grafana/issues/87360), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **Alerting:** Remove requirement for datasource query on rule read. [#87349](https://github.com/grafana/grafana/issues/87349), [@rwwiv](https://github.com/rwwiv)
|
||||
- **Alerting:** Add RBAC logic for silences creation. [#87322](https://github.com/grafana/grafana/issues/87322), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Update silences creation to support `__alert_rule_uid__` and move into drawer. [#87320](https://github.com/grafana/grafana/issues/87320), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Flamegraph:** Add diff mode color legend. [#87319](https://github.com/grafana/grafana/issues/87319), [@aocenas](https://github.com/aocenas)
|
||||
- **Dashboard:** Keyboard and mouse panel shortcuts improvement. [#87317](https://github.com/grafana/grafana/issues/87317), [@tskarhed](https://github.com/tskarhed)
|
||||
- **PanelHeaderCorner:** Remove font-awesome icons. [#87303](https://github.com/grafana/grafana/issues/87303), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Alerting:** Add OAuth2 to HTTP settings for vanilla Alertmanager / Mimir. [#87272](https://github.com/grafana/grafana/issues/87272), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Plugins:** Allow apps to expose components. Update the extensions API. [#87236](https://github.com/grafana/grafana/issues/87236), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Plugins:** Catalog to show all plugins by default. [#87168](https://github.com/grafana/grafana/issues/87168), [@sympatheticmoose](https://github.com/sympatheticmoose)
|
||||
- **Prometheus:** Ensure values in metric selector are visible. [#87150](https://github.com/grafana/grafana/issues/87150), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **Select:** Add data-testid to Input. [#87105](https://github.com/grafana/grafana/issues/87105), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Prometheus:** Add native histogram types metric explorer to allow filter by type. [#87090](https://github.com/grafana/grafana/issues/87090), [@bohandley](https://github.com/bohandley)
|
||||
- **Prometheus:** Add hints for native histograms. [#87017](https://github.com/grafana/grafana/issues/87017), [@bohandley](https://github.com/bohandley)
|
||||
- **Alerting:** Reduce number of request fetching rules in the dashboard view using rtkq. [#86991](https://github.com/grafana/grafana/issues/86991), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Plugins:** Make grafana-com API URL usage consistent. [#86920](https://github.com/grafana/grafana/issues/86920), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Stack:** Add size props. [#86900](https://github.com/grafana/grafana/issues/86900), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Table Panel:** Enable Text Wrapping. [#86895](https://github.com/grafana/grafana/issues/86895), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Alerting:** Get grafana-managed alert rule by UID. [#86845](https://github.com/grafana/grafana/issues/86845), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **Cloudwatch:** Add Kendra metrics. [#86809](https://github.com/grafana/grafana/issues/86809), [@scottschreckengaust](https://github.com/scottschreckengaust)
|
||||
- **Auth:** Added support to filter for parent teams in GitHub connector's team membership filter. [#86754](https://github.com/grafana/grafana/issues/86754), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Alerting:** Hook up GMA silence APIs to new authentication handler. [#86625](https://github.com/grafana/grafana/issues/86625), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **GeoMap:** Pan and zoom keyboard support. [#86573](https://github.com/grafana/grafana/issues/86573), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Alerting:** Optimize rule status gathering APIs when a limit is applied. [#86568](https://github.com/grafana/grafana/issues/86568), [@stevesg](https://github.com/stevesg)
|
||||
- **Plugins:** Add an auto-generated part to the `plugin.json` schema. [#86520](https://github.com/grafana/grafana/issues/86520), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Loki/Prometheus Query Editor:** Disabled cmd/ctrl+f keybinding within the editor. [#86418](https://github.com/grafana/grafana/issues/86418), [@matyax](https://github.com/matyax)
|
||||
- **Grafana packages:** Remove E2E workspace. [#86416](https://github.com/grafana/grafana/issues/86416), [@sunker](https://github.com/sunker)
|
||||
- **RefreshPicker:** Change running state to be less distracting . [#86405](https://github.com/grafana/grafana/issues/86405), [@torkelo](https://github.com/torkelo)
|
||||
- **Prometheus:** Cancellable label values requests. [#86403](https://github.com/grafana/grafana/issues/86403), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **SQLStore:** Improve recursive CTE support detection. [#86397](https://github.com/grafana/grafana/issues/86397), [@mildwonkey](https://github.com/mildwonkey)
|
||||
- **CloudMonitoring:** Ensure variables can be used in all variable queries. [#86377](https://github.com/grafana/grafana/issues/86377), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Common labels/displayed fields:** Show label names with values. [#86345](https://github.com/grafana/grafana/issues/86345), [@matyax](https://github.com/matyax)
|
||||
- **AuthZ:** Further protect admin endpoints. [#86285](https://github.com/grafana/grafana/issues/86285), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Explore:** Deprecate local storage singular datasource key. [#86250](https://github.com/grafana/grafana/issues/86250), [@gelicia](https://github.com/gelicia)
|
||||
- **Loki:** Add label filters after label_format if present. [#86124](https://github.com/grafana/grafana/issues/86124), [@matyax](https://github.com/matyax)
|
||||
- **Alerting:** Immutable plugin rules and alerting plugins extensions. [#86042](https://github.com/grafana/grafana/issues/86042), [@konrad147](https://github.com/konrad147)
|
||||
- **Tempo:** Group by template vars. [#86022](https://github.com/grafana/grafana/issues/86022), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Short Links:** Add setting for changing expiration time. [#86003](https://github.com/grafana/grafana/issues/86003), [@gelicia](https://github.com/gelicia)
|
||||
- **Prometheus:** Add native histogram functions. [#86002](https://github.com/grafana/grafana/issues/86002), [@bohandley](https://github.com/bohandley)
|
||||
- **Plugins:** Removed feature toggle pluginsDynamicAngularDetectionPatterns. [#85956](https://github.com/grafana/grafana/issues/85956), [@xnyo](https://github.com/xnyo)
|
||||
- **Plugins:** Removed feature toggle enablePluginsTracingByDefault. [#85953](https://github.com/grafana/grafana/issues/85953), [@xnyo](https://github.com/xnyo)
|
||||
- **Tracing:** Allow otel service name and attributes to be overridden from env. [#85937](https://github.com/grafana/grafana/issues/85937), [@marefr](https://github.com/marefr)
|
||||
- **PanelChrome:** Improve accessibility landmark markup. [#85863](https://github.com/grafana/grafana/issues/85863), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Gops:** Add configuration tracker on the existing IRM page. [#85838](https://github.com/grafana/grafana/issues/85838), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **CloudWatch:** Add additional Glue metrics. [#85798](https://github.com/grafana/grafana/issues/85798), [@tristanburgess](https://github.com/tristanburgess)
|
||||
- **CloudWatch:** Add labels for Metric Query type queries. [#85766](https://github.com/grafana/grafana/issues/85766), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **Util:** Support parsing and splitting strings enclosed in quotes in util.SplitString. [#85735](https://github.com/grafana/grafana/issues/85735), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Loki:** Handle `X-Scope-OrgID` and tenant IDs. [#85726](https://github.com/grafana/grafana/issues/85726), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **CloudWatch:** Add a Performance Insights and other missing metrics to aws/rds. [#85680](https://github.com/grafana/grafana/issues/85680), [@kgeckhart](https://github.com/kgeckhart)
|
||||
- **Prometheus:** Respect dashboard queries when querying ad hoc filter labels. [#85674](https://github.com/grafana/grafana/issues/85674), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Pyroscope:** Add adhoc filters support. [#85601](https://github.com/grafana/grafana/issues/85601), [@aocenas](https://github.com/aocenas)
|
||||
- **Table Panel:** Update background colors to respect transparency. [#85565](https://github.com/grafana/grafana/issues/85565), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Canvas:** Add support for line animation. [#85556](https://github.com/grafana/grafana/issues/85556), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Reducers:** Add in basic Percentile Support. [#85554](https://github.com/grafana/grafana/issues/85554), [@timlevett](https://github.com/timlevett)
|
||||
- **Storage:** Watch tests. [#85496](https://github.com/grafana/grafana/issues/85496), [@DanCech](https://github.com/DanCech)
|
||||
- **Plugins:** Show update buttons when instance version is different. [#85486](https://github.com/grafana/grafana/issues/85486), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Tempo:** Always use time range even if timeShiftEnabled is false. [#85477](https://github.com/grafana/grafana/issues/85477), [@ogxd](https://github.com/ogxd)
|
||||
- **Alerting:** Gops labels integration. [#85467](https://github.com/grafana/grafana/issues/85467), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Explore:** Set X-Cache-Skip to true for query requests. [#85460](https://github.com/grafana/grafana/issues/85460), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Explore:** Make Explore breadcrumb clickable. [#85437](https://github.com/grafana/grafana/issues/85437), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Prometheus:** Fuzzy search for metric names in Code Mode. [#85396](https://github.com/grafana/grafana/issues/85396), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **Storage Api:** Adds traces. [#85391](https://github.com/grafana/grafana/issues/85391), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **Storage Api:** Add metrics. [#85316](https://github.com/grafana/grafana/issues/85316), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **Alerting:** Improve paused alert visibility and allow pausing/resuming from alert list view. [#85116](https://github.com/grafana/grafana/issues/85116), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **CloudWatch:** Clarify match exact tooltip and docs. [#85095](https://github.com/grafana/grafana/issues/85095), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Evaluation quick buttons. [#85010](https://github.com/grafana/grafana/issues/85010), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Add state history polling interval. [#84837](https://github.com/grafana/grafana/issues/84837), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **CloudWatch:** Improve metric label parsing. [#84835](https://github.com/grafana/grafana/issues/84835), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Improve template preview. [#84798](https://github.com/grafana/grafana/issues/84798), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** New settings page. [#84501](https://github.com/grafana/grafana/issues/84501), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Explore:** Move Query History to be screen wide. [#84321](https://github.com/grafana/grafana/issues/84321), [@gelicia](https://github.com/gelicia)
|
||||
- **MixedDataSource:** Support multi value data source variable that issues a query to each data source. [#83356](https://github.com/grafana/grafana/issues/83356), [@torkelo](https://github.com/torkelo)
|
||||
- **PluginExtensions:** Make the extensions registry reactive. [#83085](https://github.com/grafana/grafana/issues/83085), [@mckn](https://github.com/mckn)
|
||||
- **Loki:** Use label/<name>/values API instead of series API for label values discovery. [#83044](https://github.com/grafana/grafana/issues/83044), [@yuri-rs](https://github.com/yuri-rs)
|
||||
- **Tempo:** Escape backslash in span name for promsql query. [#83024](https://github.com/grafana/grafana/issues/83024), [@ttshivers](https://github.com/ttshivers)
|
||||
- **Alerting:** Export and provisioning rules into subfolders. [#77450](https://github.com/grafana/grafana/issues/77450), [@papagian](https://github.com/papagian)
|
||||
- **Notification banner:** Integrate with RBAC. (Enterprise)
|
||||
- **Auth:** Assign users using SAML to AutoAssignOrgRole if no role matches. (Enterprise)
|
||||
- **Notification banner:** Display preview. (Enterprise)
|
||||
- **Auth:** Add None and Viewer roles as options to SAML UI config. (Enterprise)
|
||||
- **SAML:** Add nonce to the generated script tag. (Enterprise)
|
||||
- **Notification banner:** Add settings page. (Enterprise)
|
||||
- **Notification banner:** Add API client. (Enterprise)
|
||||
- **Chore:** Upgrade go version to 1.22.3. (Enterprise)
|
||||
- **Auditing:** Correctly parse the URL for auditing through Loki. (Enterprise)
|
||||
- **Auditlog:** Refactor action to post-action in default auditlogging. (Enterprise)
|
||||
- **Plugins:** Make grafana-com API URL usage consistent. (Enterprise)
|
||||
- **Plugins:** Make grafana-com API URL usage consistent. (Enterprise)
|
||||
- **Caching:** Implement mtls-enabled memcached integration. (Enterprise)
|
||||
- **OpenAPI:** Document the datasource caching API. (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix go-swagger extraction and several embedded types from Alertmanager in Swagger docs. [#88879](https://github.com/grafana/grafana/issues/88879), [@alexweav](https://github.com/alexweav)
|
||||
- **DashboardScene:** Fixes inspect with transforms issue. [#88843](https://github.com/grafana/grafana/issues/88843), [@torkelo](https://github.com/torkelo)
|
||||
- **Elasticsearch:** Fix stripping of trailing slashes in datasource URLs. [#88779](https://github.com/grafana/grafana/issues/88779), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Fix editor history in wrong order. [#88666](https://github.com/grafana/grafana/issues/88666), [@svennergr](https://github.com/svennergr)
|
||||
- **Cli:** Fix bug where password is hashed twice. [#88589](https://github.com/grafana/grafana/issues/88589), [@kalleep](https://github.com/kalleep)
|
||||
- **AzureMonitor:** Fix bug detecting app insights queries. [#88572](https://github.com/grafana/grafana/issues/88572), [@aangelisc](https://github.com/aangelisc)
|
||||
- **SSE:** Fix threshold unmarshal to avoid panic. [#88521](https://github.com/grafana/grafana/issues/88521), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Dashboard:** Fix Variables query hides fields with non-supported datasources. [#88516](https://github.com/grafana/grafana/issues/88516), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Explore:** Align time filters properly to day boundaries in query history. [#88498](https://github.com/grafana/grafana/issues/88498), [@aocenas](https://github.com/aocenas)
|
||||
- **Access Control:** Clean up permissions for deprovisioned data sources. [#88483](https://github.com/grafana/grafana/issues/88483), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Dashboards:** Correctly display Admin access to dashboards in the UI. [#88439](https://github.com/grafana/grafana/issues/88439), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **LibraryPanels/RBAC:** Ignore old folder permission check when deleting/patching lib panel. [#88422](https://github.com/grafana/grafana/issues/88422), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **LogsTable:** Fix default sort by time. [#88398](https://github.com/grafana/grafana/issues/88398), [@svennergr](https://github.com/svennergr)
|
||||
- **Dashboards:** Fix regression when deleting folder. [#88311](https://github.com/grafana/grafana/issues/88311), [@papagian](https://github.com/papagian)
|
||||
- **Docker:** Fix renderer plugin in custom Dockerfile. [#88223](https://github.com/grafana/grafana/issues/88223), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **Alerting:** Fix rules deleting when reordering whilst filtered. [#88221](https://github.com/grafana/grafana/issues/88221), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix "copy link" not including full URL. [#88210](https://github.com/grafana/grafana/issues/88210), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix typo in JSON response for rule export. [#88028](https://github.com/grafana/grafana/issues/88028), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix scheduler to sort rules before evaluation. [#88006](https://github.com/grafana/grafana/issues/88006), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **CloudMonitoring:** Fix query type selection issue. [#87990](https://github.com/grafana/grafana/issues/87990), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Alerting:** Assume built-in AM is receiving alerts in case of not having admin config. [#87893](https://github.com/grafana/grafana/issues/87893), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **DashboardScene:** Skip panel repeats when values are the same. [#87788](https://github.com/grafana/grafana/issues/87788), [@torkelo](https://github.com/torkelo)
|
||||
- **Alerting:** Fix deleting rules when silencing/resuming rule from a panel alert tab. [#87710](https://github.com/grafana/grafana/issues/87710), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Dashboards:** Don't set dashboard creator/updater if the action is done by an API key. [#87704](https://github.com/grafana/grafana/issues/87704), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Elasticsearch:** Fix setting of default maxConcurrentShardRequests. [#87703](https://github.com/grafana/grafana/issues/87703), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Graphite:** Fix alignment of elements in the query editor. [#87662](https://github.com/grafana/grafana/issues/87662), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **DashboardScene:** Fixing major row repeat issues. [#87539](https://github.com/grafana/grafana/issues/87539), [@torkelo](https://github.com/torkelo)
|
||||
- **Alerting:** Do not store series values from past evaluations in state manager for no reason. [#87525](https://github.com/grafana/grafana/issues/87525), [@alexweav](https://github.com/alexweav)
|
||||
- **RBAC:** Update role picker in team page, fix a bug with roles being removed upon team setting update. [#87519](https://github.com/grafana/grafana/issues/87519), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Transformations:** Fix true inner join in `joinByField` transformation. [#87409](https://github.com/grafana/grafana/issues/87409), [@baldm0mma](https://github.com/baldm0mma)
|
||||
- **Alerting:** Do not retry rule evaluations with "input data must be a wide series but got type long" style errors. [#87343](https://github.com/grafana/grafana/issues/87343), [@alexweav](https://github.com/alexweav)
|
||||
- **Tempo:** Fix sorting for nested tables. [#87214](https://github.com/grafana/grafana/issues/87214), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Cloudwatch Logs:** Fix bug where we did not return errors to user. [#87190](https://github.com/grafana/grafana/issues/87190), [@sarahzinger](https://github.com/sarahzinger)
|
||||
- **CloudWatch:** Fix apostrophes in dimension values not being escaped. [#87182](https://github.com/grafana/grafana/issues/87182), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **AnnotationList:** Fix link for annotation with no panel or dashboard. [#87048](https://github.com/grafana/grafana/issues/87048), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Graphite:** Fix splitting expressions in tag_value with template variables. [#86958](https://github.com/grafana/grafana/issues/86958), [@EduardZaydler](https://github.com/EduardZaydler)
|
||||
- **SQL Query Editor:** Fix label-for IDs, associate "Table" label. [#86944](https://github.com/grafana/grafana/issues/86944), [@timo](https://github.com/timo)
|
||||
- **SSO:** Add SSO settings to secrets migrator. [#86913](https://github.com/grafana/grafana/issues/86913), [@dmihai](https://github.com/dmihai)
|
||||
- **Plugins:** Preserve trailing slash in plugin proxy. [#86859](https://github.com/grafana/grafana/issues/86859), [@marefr](https://github.com/marefr)
|
||||
- **TimeSeries:** Improve keyboard focus and fix spacebar override. [#86848](https://github.com/grafana/grafana/issues/86848), [@tskarhed](https://github.com/tskarhed)
|
||||
- **NodeGraph:** Use values from fixedX/fixedY column for layout. [#86643](https://github.com/grafana/grafana/issues/86643), [@timo](https://github.com/timo)
|
||||
- **Alerting:** Prevent simplified routing zero duration GroupInterval and RepeatInterval. [#86561](https://github.com/grafana/grafana/issues/86561), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Loki:** Fix setting of tenant ID. [#86433](https://github.com/grafana/grafana/issues/86433), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **DashboardScene:** Fixes checkbox orienation in save forms. [#86408](https://github.com/grafana/grafana/issues/86408), [@torkelo](https://github.com/torkelo)
|
||||
- **CloudMonitoring:** Correctly interpolate multi-valued template variables in PromQL queries. [#86391](https://github.com/grafana/grafana/issues/86391), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Expressions:** Fix erroneous sorting of metrics and expressions. [#86372](https://github.com/grafana/grafana/issues/86372), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **CloudMonitoring:** Allow a custom group by value. [#86288](https://github.com/grafana/grafana/issues/86288), [@aangelisc](https://github.com/aangelisc)
|
||||
- **DataLinks:** Fixes datalinks with onClick and variables in url not being interpolated . [#86253](https://github.com/grafana/grafana/issues/86253), [@gng0](https://github.com/gng0)
|
||||
- **I18N:** Fix untranslated descriptions in data source picker. [#86216](https://github.com/grafana/grafana/issues/86216), [@joshhunt](https://github.com/joshhunt)
|
||||
- **RBAC:** Fix global role deletion in hosted Grafana. [#85980](https://github.com/grafana/grafana/issues/85980), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Expression:** Fix a bug of the display name of the threshold expression result. [#85912](https://github.com/grafana/grafana/issues/85912), [@lingyufei](https://github.com/lingyufei)
|
||||
- **Alerting:** Fix incorrect display of pending period in alert rule form. [#85893](https://github.com/grafana/grafana/issues/85893), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix redirect after saving a notification template. [#85667](https://github.com/grafana/grafana/issues/85667), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Get oncall metada only when we have alert manager configuration data. [#85622](https://github.com/grafana/grafana/issues/85622), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Return better error for invalid time range on alert queries. [#85611](https://github.com/grafana/grafana/issues/85611), [@alexweav](https://github.com/alexweav)
|
||||
- **CloudWatch:** Fix SageMaker MBP namespace typo. [#85557](https://github.com/grafana/grafana/issues/85557), [@tristanburgess](https://github.com/tristanburgess)
|
||||
- **Alerting:** Only append `/alertmanager` when sending alerts to mimir targets if not already present. [#85543](https://github.com/grafana/grafana/issues/85543), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Set mimir implementation in jsonData by default when creating a new a…. [#85513](https://github.com/grafana/grafana/issues/85513), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Persist silence state immediately on Create/Delete . [#84705](https://github.com/grafana/grafana/issues/84705), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **NodeGraph:** Fix configuring arc colors with mixed case field names. [#84609](https://github.com/grafana/grafana/issues/84609), [@timo](https://github.com/timo)
|
||||
- **Auditing:** Fix Loki URL parsing. (Enterprise)
|
||||
- **Provisioning:** Add override option to role provisioning. (Enterprise)
|
||||
- **Alerting:** Check pointers before use to prevent segfault. (Enterprise)
|
||||
- **Reporting:** Fix UI errors when using linked variables. (Enterprise)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Users that provision alert rules into folders whose titles contain slashes from now on they should escape them:
|
||||
eg. if an alert group contains:
|
||||
`folder: folder_with_/_in_title`
|
||||
it should become:
|
||||
`folder: folder_with_\/_in_title` Issue [#77450](https://github.com/grafana/grafana/issues/77450)
|
||||
|
||||
### Deprecations
|
||||
|
||||
The `grafana.explore.richHistory.activeDatasourceOnly` local storage key is deprecated, and will be removed in Grafana 12. You may experience loss of your Explore query history or autocomplete data if you upgrade to Grafana 12 under 2 weeks of Grafana 11.1. Actual risk of data loss depends on your query history retention policy. Issue [#86250](https://github.com/grafana/grafana/issues/86250)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Select:** Change `Select` group headers to always be visible. [#88178](https://github.com/grafana/grafana/issues/88178), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Select:** Ensure virtualised menu scrolls active option into view when using arrow keys. [#87743](https://github.com/grafana/grafana/issues/87743), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Switch:** Improve disabled active state. [#87694](https://github.com/grafana/grafana/issues/87694), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Button:** Allow disabled button to still be focused. [#87516](https://github.com/grafana/grafana/issues/87516), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **GrafanaUI:** Add `tabular` prop to Text component for tabular numbers. [#87440](https://github.com/grafana/grafana/issues/87440), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
|
||||
<!-- 11.1.0 END -->
|
||||
<!-- 11.0.0 START -->
|
||||
|
||||
# 11.0.0 (2024-05-14)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ARG BASE_IMAGE=alpine:3.19.1
|
||||
ARG JS_IMAGE=node:20-alpine
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.22.4-alpine
|
||||
ARG GO_IMAGE=golang:1.22.7-alpine
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
|
||||
2
Makefile
2
Makefile
@@ -9,7 +9,7 @@ include .bingo/Variables.mk
|
||||
|
||||
|
||||
GO = go
|
||||
GO_VERSION = 1.22.4
|
||||
GO_VERSION = 1.22.7
|
||||
GO_FILES ?= ./pkg/... ./pkg/apiserver/... ./pkg/apimachinery/... ./pkg/promlib/...
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
GO_RACE := $(shell [ -n "$(GO_RACE)" -o -e ".go-race-enabled-locally" ] && echo 1 )
|
||||
|
||||
1
apps/.gitkeep
Normal file
1
apps/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
# workaround for grafana-build quirk
|
||||
@@ -1689,6 +1689,9 @@ ha_engine_address = "127.0.0.1:6379"
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
|
||||
@@ -1546,6 +1546,9 @@ max_annotations_to_keep =
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
;ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
;ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
|
||||
@@ -6,6 +6,24 @@
|
||||
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
|
||||
# Changes are relevant to this script and the support docs.mk GNU Make interface.
|
||||
#
|
||||
# ## 8.1.0 (2024-08-22)
|
||||
#
|
||||
# ### Added
|
||||
#
|
||||
# - Additional website mounts for projects that use the website repository.
|
||||
#
|
||||
# Mounts are required for `make docs` to work in the website repository or with the website project.
|
||||
# The Makefile is also mounted for convenient development of the procedure that repository.
|
||||
#
|
||||
# ## 8.0.1 (2024-07-01)
|
||||
#
|
||||
# ### Fixed
|
||||
#
|
||||
# - Update log suppression to catch new format of website /docs/ homepage REF_NOT_FOUND warnings.
|
||||
#
|
||||
# These warnings are related to missing some pages during the build that are required for the /docs/ homepage.
|
||||
# They were previously suppressed but the log format changed and without this change they reappear in the latest builds.
|
||||
#
|
||||
# ## 8.0.0 (2024-05-28)
|
||||
#
|
||||
# ### Changed
|
||||
@@ -718,6 +736,9 @@ POSIX_HERESTRING
|
||||
|
||||
_repo="$(repo_path website)"
|
||||
volumes="--volume=${_repo}/config:/hugo/config:z"
|
||||
volumes="${volumes} --volume=${_repo}/content/guides:/hugo/content/guides:z"
|
||||
volumes="${volumes} --volume=${_repo}/content/whats-new:/hugo/content/whats-new:z"
|
||||
volumes="${volumes} --volume=${_repo}/Makefile:/hugo/Makefile:z"
|
||||
volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts:z"
|
||||
volumes="${volumes} --volume=${_repo}/scripts:/hugo/scripts:z"
|
||||
fi
|
||||
@@ -905,7 +926,7 @@ EOF
|
||||
-e '/Press Ctrl+C to stop/ d' \
|
||||
-e '/make/ d' \
|
||||
-e '/WARNING: The manual_mount source directory/ d' \
|
||||
-e '/docs\/_index.md .* not found/ d'
|
||||
-e '/"docs\/_index.md" not found/d'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -81,8 +81,8 @@ title: Grafana documentation
|
||||
<h4>Provisioning</h4>
|
||||
<p>Learn how to automate your Grafana configuration.</p>
|
||||
</a>
|
||||
<a href="{{< relref "whatsnew/whats-new-in-v11-0/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v11.0</h4>
|
||||
<a href="{{< relref "whatsnew/whats-new-in-v11-1/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v11.1</h4>
|
||||
<p>Explore the features and enhancements in the latest release.</p>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ To follow these instructions, you need at least one of the following:
|
||||
|
||||
### Steps
|
||||
|
||||
To create an API, complete the following steps:
|
||||
To create an API key, complete the following steps:
|
||||
|
||||
1. Sign in to Grafana.
|
||||
1. Click **Administration** in the left-side menu, **Users and access**, and select **API Keys**.
|
||||
|
||||
@@ -42,4 +42,4 @@ We recommend that you remove all permissions for roles and teams that are not re
|
||||
1. Navigate to Data Source Permissions
|
||||
- Go to the permissions tab of the newly created Loki data source. Here, you'll find the Team LBAC rules section.
|
||||
|
||||
For more information on how to setup Team LBAC rules for a Loki data source, [Add Team LBAC rules]({{< relref "./../create-teamlbac-rules/" >}}).
|
||||
For more information on how to setup Team LBAC rules for a Loki data source, refer to [Create Team LBAC rules for the Loki data source](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/teamlbac/create-teamlbac-rules/).
|
||||
|
||||
@@ -50,6 +50,8 @@ To edit a feature toggle, follow these steps:
|
||||
1. Navigate to the list of feature toggles and select your feature state overrides.
|
||||
1. Click **Save changes** and wait for your Grafana instance to restart with the updated feature toggles.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
{{< admonition type="note" >}}
|
||||
If you don't have the feature toggle management page, enable the `featureToggleAdminPage` feature toggle.
|
||||
|
||||
Editing feature toggles with the feature toggle management page is available now in all tiers of [Grafana Cloud](/docs/grafana-cloud/).
|
||||
{{% /admonition %}}
|
||||
{{< /admonition >}}
|
||||
|
||||
@@ -269,9 +269,8 @@ The _HTTP\*_ tag denotes data sources that communicate using the HTTP protocol,
|
||||
|
||||
#### Custom HTTP headers for data sources
|
||||
|
||||
Data sources managed by Grafanas provisioning can be configured to add HTTP headers to all requests
|
||||
going to that data source. The header name is configured in the `jsonData` field and the header value should be
|
||||
configured in `secureJsonData`.
|
||||
Data sources managed with provisioning can be configured to add HTTP headers to all requests.
|
||||
The header name is configured in the `jsonData` field and the header value is configured in `secureJsonData`.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
@@ -47,7 +47,7 @@ The following list contains role-based access control actions.
|
||||
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.silences:create` | `folders:*`<br>`folders:uid:*` | Create rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:read` | `folders:*`<br>`folders:uid:*` | Read general and rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:read` | `folders:*`<br>`folders:uid:*` | Read all general silences and rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:write` | `folders:*`<br>`folders:uid:*` | Update and expire rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `alert.provisioning.secrets:read` | n/a | Same as `alert.provisioning:read` plus ability to export resources with decrypted secrets. |
|
||||
|
||||
@@ -16,7 +16,7 @@ weight: 114
|
||||
hero:
|
||||
title: Grafana Alerting
|
||||
level: 1
|
||||
image: /media/docs/alerting/alerting-bell-icon.png
|
||||
image: /media/docs/grafana-cloud/alerting-and-irm/grafana-icon-alerting.svg
|
||||
width: 100
|
||||
height: 100
|
||||
description: Grafana Alerting allows you to learn about problems in your systems moments after they occur.
|
||||
|
||||
@@ -83,11 +83,8 @@ Grafana-managed rules are the most flexible alert rule type. They allow you to c
|
||||
Multiple alert instances can be created as a result of one alert rule (also known as a multi-dimensional alerting).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
For Grafana Cloud, there are limits on how many Grafana-managed alert rules you can create. These are as follows:
|
||||
|
||||
- Free: 100 alert rules
|
||||
- Paid: 2000 alert rules
|
||||
{{% /admonition %}}
|
||||
For Grafana Cloud, you can create 100 free Grafana-managed alert rules.
|
||||
{{% /admonition %}}
|
||||
|
||||
Grafana managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
|
||||
|
||||
@@ -256,7 +253,7 @@ You can configure the alert instance state when its evaluation returns no data:
|
||||
| No Data configuration | Description |
|
||||
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| No Data | The default option. Sets alert instance state to `No data`. <br/> The alert rule also creates a new alert instance `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
|
||||
| Alerting | Sets the alert instance state to `Pending` and then transitions to `Alerting` once the [pending period](ref:pending-period) ends. If you sent the pending period to 0, the alert instance state is immediately set to `Alerting`. |
|
||||
| Normal | Sets alert instance state to `Normal`. |
|
||||
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
|
||||
|
||||
@@ -265,7 +262,7 @@ You can also configure the alert instance state when its evaluation returns an e
|
||||
| Error configuration | Description |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Error | The default option. Sets alert instance state to `Error`. <br/> The alert rule also creates a new alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It transitions from `Pending` to `Alerting` after the [pending period](ref:pending-period) has finished. |
|
||||
| Normal | Sets alert instance state to `Normal`. |
|
||||
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
|
||||
|
||||
|
||||
@@ -43,33 +43,35 @@ refs:
|
||||
|
||||
# Configure data source-managed alert rules
|
||||
|
||||
Create alert rules for an external Grafana Mimir or Loki instance that has ruler API enabled; these are called data source-managed alert rules.
|
||||
Create data source-managed alert rules for Grafana Mimir or Grafana Loki data sources, which have been configured to support rule creation.
|
||||
|
||||
To configure your Grafana Mimir or Loki data source for alert rule creation, enable either the Loki Ruler API or the Mimir Ruler API.
|
||||
|
||||
For more information, refer to [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
|
||||
|
||||
**Note**:
|
||||
|
||||
Alert rules for an external Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
|
||||
Alert rules for a Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
|
||||
|
||||
If you delete an alerting resource created in the UI, you can no longer retrieve it.
|
||||
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alert rules.
|
||||
- Verify that you have write permission to the Mimir or Loki data source. Otherwise, you cannot create or update Grafana Mimir or Loki-managed alert rules.
|
||||
|
||||
- For Grafana Mimir and Loki data sources, enable the Ruler API by configuring their respective services.
|
||||
- Enable the Mimir or Loki Ruler API.
|
||||
|
||||
- **Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
|
||||
|
||||
- **Grafana Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
|
||||
|
||||
Watch this video to learn more about how to create a Mimir managed alert rule: {{< vimeo 720001865 >}}
|
||||
Watch this video to learn more about how to create a Mimir-managed alert rule: {{< vimeo 720001865 >}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you do not want to manage alert rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
If you do not want to manage alert rules for a particular Loki or Mimir data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
{{% /admonition %}}
|
||||
|
||||
In the following sections, we’ll guide you through the process of creating your data source-managed alert rules.
|
||||
|
||||
To create a data source-managed alert rule, use the in-product alert creation flow and follow these steps to help you.
|
||||
|
||||
## Set alert rule name
|
||||
|
||||
@@ -32,6 +32,10 @@ All templates should be written in [text/template](https://pkg.go.dev/text/templ
|
||||
|
||||
Each template is evaluated whenever the alert rule is evaluated, and is evaluated for every alert separately. For example, if your alert rule has a templated summary annotation, and the alert rule has 10 firing alerts, then the template will be executed 10 times, once for each alert. You should try to avoid doing expensive computations in your templates as much as possible.
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
Extra whitespace in label templates can break matches with notification policies.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Examples
|
||||
|
||||
The following examples attempt to show the most common use-cases we have seen for templates. You can use these examples verbatim, or adapt them as necessary for your use case. For more information on how to write text/template refer see [the beginner's guide to alert notification templates in Grafana](https://grafana.com/blog/2023/04/05/grafana-alerting-a-beginners-guide-to-templating-alert-notifications/).
|
||||
|
||||
@@ -93,6 +93,15 @@ To remove a silence, complete the following steps.
|
||||
|
||||
> **Note:** You cannot remove a silence manually. Silences that have ended are retained and listed for five days.
|
||||
|
||||
## Rule-specific silences
|
||||
|
||||
Rule-specific silences are silences that apply only to a specific alert rule.
|
||||
They're created when you silence an alert rule directly using the **Silence notifications** action in the UI.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
As opposed to general silences, rule-specific silence access is tied directly to the alert rule they act on. They can be created manually by including the specific label matcher: `__alert_rule_uid__=<alert rule UID>`.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Useful links
|
||||
|
||||
[Aggregation operators](https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators)
|
||||
|
||||
@@ -31,6 +31,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-email/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-email/
|
||||
discord:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-discord/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-discord/
|
||||
telegram:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram/
|
||||
@@ -41,6 +46,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/
|
||||
opsgenie:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie/
|
||||
pagerduty:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/pager-duty/
|
||||
@@ -56,6 +66,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-slack/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-slack/
|
||||
teams:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
|
||||
external-alertmanager:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
|
||||
@@ -144,14 +159,14 @@ The following table lists the contact point integrations supported by Grafana.
|
||||
| Alertmanager | `prometheus-alertmanager` |
|
||||
| Cisco Webex Teams | `webex` |
|
||||
| DingDing | `dingding` |
|
||||
| Discord | `discord` |
|
||||
| [Discord](ref:discord) | `discord` |
|
||||
| [Email](ref:email) | `email` |
|
||||
| Google Chat | `googlechat` |
|
||||
| [Grafana Oncall](ref:oncall) | `oncall` |
|
||||
| Kafka REST Proxy | `kafka` |
|
||||
| Line | `line` |
|
||||
| Microsoft Teams | `teams` |
|
||||
| Opsgenie | `opsgenie` |
|
||||
| [Microsoft Teams](ref:teams) | `teams` |
|
||||
| [Opsgenie](ref:opsgenie) | `opsgenie` |
|
||||
| [Pagerduty](ref:pagerduty) | `pagerduty` |
|
||||
| Pushover | `pushover` |
|
||||
| Sensu Go | `sensugo` |
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns/
|
||||
description: Configure the Grafana Alerting - Amazon SNS integration to receive alert notifications when your alerts are firing.
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Amazon SNS
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Amazon SNS
|
||||
title: Configure Amazon SNS for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Amazon SNS for Alerting
|
||||
|
||||
Use the Grafana Alerting - Amazon SNS integration to send notifications to Amazon SNS when your alerts are firing.
|
||||
|
||||
## Before you begin
|
||||
|
||||
To configure Amazon SNS to receive alert notifications, complete the following steps.
|
||||
|
||||
1. Create a new topic in https://console.aws.amazon.com/sns.
|
||||
1. Open the topic and create a new subscription.
|
||||
1. Choose the protocol HTTPS.
|
||||
1. Copy the URL.
|
||||
|
||||
For more information, refer to [Amazon SNS documentation](https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Amazon SNS integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **AWS SNS**.
|
||||
1. Copy in the URL from above into the **The Amazon SNS API URL** field.
|
||||
1. Click **Test** to check that your integration works.
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Amazon SNS contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-discord/
|
||||
description: Configure the Discord integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Discord
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Discord
|
||||
title: Configure Discord for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Discord for Alerting
|
||||
|
||||
Use the Grafana Alerting - Discord integration to receive alert notifications in your Discord channels when your Grafana alert rules are triggered and resolved.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Create a Webhook to enable Grafana to send alert notifications to Discord channels.
|
||||
|
||||
To create a Webhook in Discord, complete the following steps.
|
||||
|
||||
1. Follow the steps in the [Intro to Webhooks guide](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
|
||||
1. Copy the Webhook URL.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Discord integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Discord**.
|
||||
1. In the **Webhook URL** field, paste in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
A test alert notification should be sent to the Discord channel that you associated with the Webhook.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Discord contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications** click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. Click **Save rule and exit**.
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Email
|
||||
title: Configure email for Alerting
|
||||
weight: 300
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure email for Alerting
|
||||
@@ -75,18 +75,21 @@ To set up email integration, complete the following steps.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Email**.
|
||||
1. Enter the email addresses you want to send notifications to.
|
||||
|
||||
E-mail addresses are case sensitive. Ensure that the e-mail address entered is correct.
|
||||
|
||||
1. Click **Test** to check that your integration works.
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The email contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have more than one contact point, add a new child notification policy rather than edit the default one, so you can route specific alerts to one or multiple email addresses.
|
||||
{{% /admonition %}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat/
|
||||
description: Configure the Google Chat integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Google Chat
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Google Chat
|
||||
title: Configure Google Chat for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Google Chat for Alerting
|
||||
|
||||
Use the Grafana Alerting - Google Chat integration to receive alert notifications in your Google Chat space when your Grafana alert rules are triggered and resolved.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Create a Webhook to enable Grafana to send alert notifications to a Google Chat space.
|
||||
To create a Webhook in Google Chat space, complete the following steps.
|
||||
|
||||
1. Follow the steps in [Google's Chat app guide](https://developers.google.com/workspace/chat/quickstart/webhooks#create_a_webhook).
|
||||
1. Copy the Webhook URL.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Google Chat integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Google Chat**.
|
||||
1. In the **URL** field, paste in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
A test alert notification should be sent to the Google Chat space that you associated with the Webhook.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Google Chat contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications** click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. Click **Save rule and exit**.
|
||||
@@ -18,65 +18,57 @@ labels:
|
||||
- oss
|
||||
menuTitle: Grafana OnCall
|
||||
title: Configure Grafana OnCall for Alerting
|
||||
weight: 300
|
||||
refs:
|
||||
oncall-integration:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/oncall/latest/integrations/grafana-alerting/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/oncall/integrations/grafana-alerting/
|
||||
create-notification-policy:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-notification-policy/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-notification-policy/
|
||||
escalation-chain:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/oncall/latest/configure/escalation-chains-and-routes/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/oncall/configure/escalation-chains-and-routes/
|
||||
weight: 0
|
||||
---
|
||||
|
||||
## Configure Grafana OnCall for Alerting
|
||||
# Configure Grafana OnCall for Alerting
|
||||
|
||||
Use the Grafana Alerting - Grafana OnCall integration to effortlessly connect alerts generated by Grafana Alerting with Grafana OnCall, where you can then route them according to defined escalation chains and schedules.
|
||||
|
||||
You can set up the integration using the Grafana Alerting application or the Grafana OnCall application. For more information on setting it up from the Grafana OnCall application, see [Grafana OnCall documentation](ref:oncall-integration).
|
||||
{{< admonition type="note" >}}
|
||||
You can also configure the integration from Grafana OnCall. For more information, refer to [Grafana OnCall documentation](http://grafana.com/docs/oncall/latest/integrations/grafana-alerting/).
|
||||
{{< /admonition >}}
|
||||
|
||||
### Before you begin
|
||||
## Before you begin
|
||||
|
||||
- Ensure you have Installed and enabled the Grafana OnCall plugin
|
||||
- Ensure your version of Grafana is up-to-date and supports the new features
|
||||
Grafana OnCall is available in Grafana Cloud by default.
|
||||
|
||||
### Procedure
|
||||
If you are using Grafana OSS, [install and enable the Grafana OnCall plugin](http://grafana.com/docs/oncall/latest/set-up/open-source/#install-grafana-oncall-oss). Also, ensure your version of Grafana is up-to-date and supports the new features.
|
||||
|
||||
## Procedure
|
||||
|
||||
To set up the Grafana OnCall integration using the Grafana Alerting application, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts&IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select Grafana OnCall.
|
||||
|
||||
**Note:**
|
||||
1. From the **Integration** list, select **Grafana OnCall**.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
The Grafana OnCall integration is only available for Grafana Alertmanager.
|
||||
{{< /admonition >}}
|
||||
|
||||
1. Choose whether to add a new OnCall integration or add an existing one.
|
||||
|
||||
- If you add a new one, enter an Integration name.
|
||||
- If you add an existing one, choose from the list of available integrations
|
||||
|
||||
- If you add an existing one, choose from the list of available integrations.
|
||||
1. Click **Save contact point**.
|
||||
1. On the contact points list view page, you should see a link to Grafana OnCall.
|
||||
|
||||
1. On the Contact points list view page, you can see the contact point with the Grafana OnCall icon.
|
||||
If the integration is not being used anywhere in the notification policies tree, it has **Unused** as its status in the **Health** column. It won’t receive any notifications, because there are no notifications using that integration.
|
||||
|
||||
If the integration is not yet being used anywhere in the notification policies tree, it will have **Unused** as its status in the **Health** column. It won’t receive any notifications, because there are no notifications using that integration.
|
||||
1. To see the integration details and test the integration, click the link to Grafana OnCall on the contact points list view page.
|
||||
1. Click **Send demo alert** > **Send alert**.
|
||||
1. Go to Grafana OnCall **Alert Groups**. You should see the demo alert.
|
||||
|
||||
1. Connect your contact point to a notification policy.
|
||||
## Next steps
|
||||
|
||||
For more information on connecting your contact point to a notification policy, see
|
||||
[Create notification policy](ref:create-notification-policy).
|
||||
The OnCall contact point is ready to receive alert notifications.
|
||||
|
||||
1. To view your integration in the Grafana OnCall application and set up routes and escalation chains, click the Link next to the integration on the Contact points list view page in the **Type** column.
|
||||
To add the contact point to your alert rule, complete the following next steps:
|
||||
|
||||
This redirects you to the Grafana OnCall integration page in the Grafana OnCall application. From there, you can add [routes and escalation chains](ref:escalation-chain).
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications**, click **Select contact point**.
|
||||
1. From the drop-down menu, select the contact point you created.
|
||||
1. Click **Save rule and exit**.
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie/
|
||||
description: Configure the Opsgenie integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Opsgenie
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Opsgenie
|
||||
title: Configure Opsgenie for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Opsgenie for Alerting
|
||||
|
||||
Use the Grafana Alerting - Opsgenie integration to receive alert notifications in your Opsgenie alert dashboard when your Grafana alert rules are triggered and resolved.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Create an API key to enable Grafana to send alert notifications to Opsgenie alert dashboard.
|
||||
|
||||
To create an API key in Opsgenie, complete the following steps.
|
||||
|
||||
1. Follow the steps in the [API integration guide](https://support.atlassian.com/opsgenie/docs/create-a-default-api-integration/).
|
||||
|
||||
Make sure you turn on the integration.
|
||||
|
||||
1. Copy the API key.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Opsgenie integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the **Integration** list, select **Opsgenie**.
|
||||
1. In the **API key** field, paste in your API key.
|
||||
1. In the **Alert API URL**, enter `https://api.opsgenie.com/v2/alerts`.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
A test alert notification is sent to the Alerts page in Opsgenie.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Opsgenie contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert rule, complete the following steps:
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications**, click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. Click **Save rule and exit**.
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Slack
|
||||
title: Configure Slack for Alerting
|
||||
weight: 300
|
||||
weight: 0
|
||||
refs:
|
||||
nested-policy:
|
||||
- pattern: /docs/grafana/
|
||||
@@ -82,12 +82,13 @@ To create your Slack integration in Grafana Alerting, complete the following ste
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The Slack contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
**Note:**
|
||||
If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to Slack. For more information, refer to [Notification policies](ref:nested-policy).
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
|
||||
description: Configure Microsoft Teams integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Microsoft Teams
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Microsoft Teams
|
||||
title: Configure Microsoft Teams for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Microsoft Teams for Alerting
|
||||
|
||||
Use the Grafana Alerting - Microsoft Teams integration to receive notifications in your team’s channel when your alerts are firing.
|
||||
|
||||
## Before you begin
|
||||
|
||||
To set up Microsoft Teams for integration with Grafana Alerting, create a new workflow that accepts Webhook requests. This allows Grafana to send alert notifications to Microsoft Teams channels.
|
||||
|
||||
### Create a workflow in Microsoft Teams
|
||||
|
||||
1. To create a new workflow, follow the steps in [Create flows in Microsoft Teams](https://learn.microsoft.com/en-us/power-automate/teams/teams-app-create).
|
||||
1. Microsoft provides a template library. You can use the template **Post to a channel when a webhook request is received**.
|
||||
1. At the end of workflow creation wizard, copy the URL that is provided.
|
||||
|
||||
**Note**
|
||||
If you chose a private channel for the target of the workflow, you need to edit workflow before using it. Expand the step "Send each adaptive card", and then expand action "Post your own adaptive card as the Flow bot to a channel". Change "Post as" to User, and save the workflow.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your MS Teams integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Microsoft Teams**.
|
||||
1. In the **URL** field, copy in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
A test alert notification should be sent to the MS Team channel.
|
||||
1. Click **Save** contact point.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Microsoft Teams contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- If Grafana reports that notification was sent successfully but it was not delivered to the channel, check the workflow's run history. You can find it in the workflow details page.
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Telegram
|
||||
title: Configure Telegram for Alerting
|
||||
weight: 300
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Telegram for Alerting
|
||||
@@ -24,7 +24,7 @@ Use the Grafana Alerting - Telegram integration to send [Telegram](https://teleg
|
||||
|
||||
### Telegram bot API token and chat ID
|
||||
|
||||
To integrate Grafana with Telegram, you need to obtain a Telegram **bot API token** and a **chat ID** (i.e., the ID of the Telegram chat where you want to receive the alert notifications).
|
||||
To integrate Grafana with Telegram, you need to get a Telegram **bot API token** and a **chat ID** (the ID of the Telegram chat where you want to receive the alert notifications). To complete the integration, use the browser version of Telegram.
|
||||
|
||||
### Set up your Telegram bot
|
||||
|
||||
@@ -44,29 +44,9 @@ Add the bot to a group chat by following the steps below. Once the bot is added
|
||||
|
||||
1. In the Telegram app, **open a group or start a new one**.
|
||||
1. Search and **add the bot to the group**.
|
||||
1. **Interact with the bot** by sending a dummy message that starts with "`/`". E.g. `/hola @bot_name`.
|
||||
1. Copy the **chat ID** from the URL in your browser's address bar. It should look like this: `https://web.telegram.org/a/#-4266674385`.
|
||||
|
||||
{{< figure src="/media/blog/telegram-grafana-alerting/telegram-screenshot.png" alt="A screenshot that shows a message to a Telegram bot." >}}
|
||||
|
||||
1. To obtain the **chat ID**, send an [HTTP request](https://core.telegram.org/bots/api#getupdates) to the bot. Copy the below URL and replace `{your_bot_api_token}` with your bot API token.
|
||||
|
||||
```
|
||||
https://api.telegram.org/bot{your_bot_api_token}/getUpdates
|
||||
```
|
||||
|
||||
1. **Paste the URL in your browser**.
|
||||
1. If the request is successful, it will return a response in JSON format.
|
||||
|
||||
```
|
||||
...
|
||||
"chat": {
|
||||
"id": -4065678900,
|
||||
"title": "Tony and Hello world bot",
|
||||
"type": "group",
|
||||
...
|
||||
```
|
||||
|
||||
1. Copy the value of the `“id”` that appears under `“chat”`.
|
||||
The chat ID is the sequence of numbers that follows the `#` symbol. For example: `-4266674385`.
|
||||
|
||||
## Procedure
|
||||
|
||||
@@ -83,13 +63,13 @@ To create your Telegram integration in Grafana Alerting, complete the following
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The Telegram contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{<admonition type="note">}}
|
||||
If you have more than one contact point, add a new child notification policy rather than edit the default one, so you can route specific alerts to Telegram.
|
||||
{{</admonition>}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -14,7 +14,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: PagerDuty
|
||||
title: Configure PagerDuty for Alerting
|
||||
weight: 400
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure PagerDuty for Alerting
|
||||
@@ -63,11 +63,13 @@ To create your PagerDuty integration in Grafana Alerting, complete the following
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The PagerDuty contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the Default policy, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{< admonition type="note" >}} If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to PagerDuty. {{< /admonition >}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -21,7 +21,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Webhook notifier
|
||||
title: Configure the webhook notifier for Alerting
|
||||
weight: 200
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure the webhook notifier for Alerting
|
||||
@@ -156,13 +156,13 @@ To create your webhook integration in Grafana Alerting, complete the following s
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The Webhook contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to your webhook.
|
||||
{{< /admonition >}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications, click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -53,7 +53,7 @@ To create a notification template that contains more than one template:
|
||||
|
||||
## Preview notification templates
|
||||
|
||||
Preview how your notification templates will look before using them in your contact points, helping you understand the result of the template you are creating as well as enabling you to fix any errors before saving it.
|
||||
Preview how your notification templates should look before using them in your contact points, helping you understand the result of the template you are creating as well as enabling you to fix any errors before saving it.
|
||||
|
||||
**Note:** This feature is only for Grafana Alertmanager.
|
||||
|
||||
@@ -81,7 +81,7 @@ To preview your notification templates:
|
||||
|
||||
c. Click **Add alert data**.
|
||||
|
||||
d. Click **Refresh preview** to see what your template content will look like and the corresponding payload data.
|
||||
d. Click **Refresh preview** to see what your template content should look like and the corresponding payload data.
|
||||
|
||||
If there are any errors in your template, they are displayed in the Preview and you can correct them before saving.
|
||||
|
||||
@@ -162,6 +162,86 @@ Resolved alerts:
|
||||
{{ template "email.message" . }}
|
||||
```
|
||||
|
||||
## Group multiple alert instances into one email notification
|
||||
|
||||
To make alerts more concise, you can group multiple instances of a firing alert into a single email notification in a table format. This way, you avoid long, repetitive emails and make alerts easier to digest.
|
||||
|
||||
Follow these steps to create a custom notification template that consolidates alert instances into a table.
|
||||
|
||||
1. Modify the alert rule to include an annotation that is referenced in the notification template later on.
|
||||
1. Enter a name for the **custom annotation**: In this example, _ServerInfo_.
|
||||
1. Enter the following code as the value for the annotation. It retrieves the server's instance name and a corresponding metric value, formatted as a table row:
|
||||
|
||||
```
|
||||
{{ index $labels "instance" }}{{- "\t" -}}{{ index $values "A"}}{{- "\n" -}}
|
||||
```
|
||||
|
||||
This line of code returns the labels and their values in the form of a table. Assuming $labels has `{"instance": "node1"}` and $values has `{"A": "123"}`, the output would be:
|
||||
|
||||
```
|
||||
node1 123
|
||||
```
|
||||
|
||||
1. Create a notification template that references the _ServerInfo_ annotation.
|
||||
|
||||
```go
|
||||
{{ define "Table" }}
|
||||
{{- "\nHost\t\tValue\n" -}}
|
||||
{{ range .Alerts -}}
|
||||
{{ range .Annotations.SortedPairs -}}
|
||||
{{ if (eq .Name "ServerInfo") -}}
|
||||
{{ .Value -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
The notification template outputs a list of server information from the "ServerInfo" annotation for each alert instance.
|
||||
|
||||
1. Navigate to your contact point in Grafana
|
||||
1. In the **Message** field, reference the template by name (see **Optional Email settings** section):
|
||||
|
||||
```
|
||||
{{ template "Table" . }}
|
||||
```
|
||||
|
||||
This generates a neatly formatted table in the email, grouping information for all affected servers into a single notification.
|
||||
|
||||
## Conditional notification template
|
||||
|
||||
Template alert notifications based on a label. In this example the label represents a namespace.
|
||||
|
||||
1. Use the following code in your notification template to display different messages based on the namespace:
|
||||
|
||||
```go
|
||||
{{ define "my_conditional_notification" }}
|
||||
{{ if eq .CommonLabels.namespace "namespace-a" }}
|
||||
Alert: CPU limits have reached 80% in namespace-a.
|
||||
{{ else if eq .CommonLabels.namespace "namespace-b" }}
|
||||
Alert: CPU limits have reached 80% in namespace-b.
|
||||
{{ else if eq .CommonLabels.namespace "namespace-c" }}
|
||||
Alert: CPU limits have reached 80% in namespace-c.
|
||||
{{ else }}
|
||||
Alert: CPU limits have reached 80% for {{ .CommonLabels.namespace }} namespace.
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
`.CommonLabels` is a map containing the labels that are common to all the alerts firing.
|
||||
|
||||
Make sure to replace the `.namespace` label with a label that exists in your alert rule.
|
||||
|
||||
1. Replace `namespace-a`, `namespace-b`, and `namespace-c` with your specific namespace values.
|
||||
1. Navigate to your contact point in Grafana
|
||||
1. In the **Message** field, reference the template by name (see **Optional settings** section):
|
||||
|
||||
```
|
||||
{{ template "my_conditional_notification" . }}
|
||||
```
|
||||
|
||||
This template alters the content of alert notifications depending on the namespace value.
|
||||
|
||||
## Template the title of a Slack message
|
||||
|
||||
Template the title of a Slack message to contain the number of firing and resolved alerts:
|
||||
|
||||
@@ -48,22 +48,32 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/rule-evaluation/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/rule-evaluation/
|
||||
group-alert-notifications:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
---
|
||||
|
||||
# Introduction to Alerting
|
||||
|
||||
Whether you’re just starting out or you're a more experienced user of Grafana Alerting, learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your team’s ability to resolve issues quickly. For a hands-on introduction, refer to our [tutorial to get started with Grafana Alerting](http://grafana.com/tutorials/alerting-get-started/).
|
||||
Whether you’re just starting out or you're a more experienced user of Grafana Alerting, learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your team’s ability to resolve issues quickly.
|
||||
|
||||
{{< admonition type="tip" >}}
|
||||
For a hands-on introduction, refer to our [tutorial to get started with Grafana Alerting](http://grafana.com/tutorials/alerting-get-started/).
|
||||
{{< /admonition >}}
|
||||
|
||||
The following diagram gives you an overview of Grafana Alerting and introduces you to some of the fundamental features that are the principles of how Grafana Alerting works.
|
||||
|
||||
{{< figure src="/media/docs/alerting/how-alerting-works.png" max-width="750px" caption="How Alerting works" >}}
|
||||
<br/>
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-configure-notifications-v2.png" max-width="750px" alt="How Grafana Alerting works" >}}
|
||||
|
||||
## How it works at a glance
|
||||
|
||||
- Grafana alerting periodically queries data sources and evaluates the condition defined in the alert rule
|
||||
- Grafana Alerting periodically queries data sources and evaluates the condition defined in the alert rule
|
||||
- If the condition is breached, an alert instance fires
|
||||
- Firing and resolved alert instances are routed to notification policies based on matching labels
|
||||
- Notifications are sent out to the contact points specified in the notification policy
|
||||
- Firing (and resolved) alert instances are sent for notifications, either directly to a contact point or through notification policies for more flexibility
|
||||
|
||||
## Fundamentals
|
||||
|
||||
@@ -73,9 +83,7 @@ The following concepts are key to your understanding of how Grafana Alerting wor
|
||||
|
||||
An [alert rule](ref:alert-rules) consists of one or more queries and expressions that select the data you want to measure. It also contains a condition, which is the threshold that an alert rule must meet or exceed to fire.
|
||||
|
||||
Add labels to uniquely identify your alert rule and configure alert routing. Labels link alert rules to notification policies, so you can easily manage which policy should handle which alerts and who gets notified.
|
||||
|
||||
After alert rules are created, they go through various states and transitions.
|
||||
In the alert rule, choose the contact point or notification policies to determine how to receive the alert notifications.
|
||||
|
||||
### Alert instances
|
||||
|
||||
@@ -91,23 +99,27 @@ A rule using the PromQL expression above creates as many alert instances as the
|
||||
|
||||
{{< figure src="/static/img/docs/alerting/unified/multi-dimensional-alert.png" caption="Multiple alert instances from a single alert rule" >}}
|
||||
|
||||
[Alert rules are frequently evaluated](ref:alert-rule-evaluation) and the state of their alert instances is updated accordingly. Only alert instances that are in a firing or resolved state are routed to notification policies to be handled.
|
||||
|
||||
### Notification policies
|
||||
|
||||
[Notification policies](ref:notification-policies) group alerts and then route them to contact points. They determine when notifications are sent, and how often notifications should be repeated.
|
||||
|
||||
Alert instances are matched to notification policies using label matchers. This provides a flexible way to organize and route alerts to different receivers.
|
||||
|
||||
Each policy consists of a set of label matchers (0 or more) that specify which alert instances (identified by their labels) they handle. Notification policies are defined as a tree structure where the root of the notification policy tree is called the **Default notification policy**. Each policy can have child policies.
|
||||
|
||||
{{< figure src="/media/docs/alerting/notification-routing.png" max-width="750px" caption="Notification policy routing" >}}
|
||||
[Alert rules are frequently evaluated](ref:alert-rule-evaluation) and the state of their alert instances is updated accordingly. Only alert instances that are in a firing or resolved state are sent in notifications.
|
||||
|
||||
### Contact points
|
||||
|
||||
[Contact points](ref:contact-points) determine where notifications are sent. For example, you might have a contact point that sends notifications to an email address, to Slack, to an incident management system (IRM) such as Grafana OnCall or Pagerduty, or to a webhook.
|
||||
[Contact points](ref:contact-points) determine the notification message and where notifications are sent. For example, you might have a contact point that sends notifications to an email address, to Slack, to an incident management system (IRM) such as Grafana OnCall or Pagerduty, or to a webhook.
|
||||
|
||||
Notifications sent from contact points are customizable with notification templates, which can be shared between contact points.
|
||||
In the alert rule, you can choose a contact point to receive the alert notifications or use notification policies instead.
|
||||
|
||||
### Notification policies
|
||||
|
||||
[Notification policies](ref:notification-policies) provide a flexible method to handle alert notifications for larger systems.
|
||||
|
||||
Notification policies routes alerts to contact points via label matching. Each notification policy consists of a set of label matchers (0 or more) that specify which alert instances (identified by their labels) they handle. Notification policies are defined in a tree structure, where the root of the notification policy tree is the **Default notification policy**, which ensures all alert instances are handled.
|
||||
|
||||
{{< figure src="/media/docs/alerting/notification-routing.png" max-width="750px" alt="A diagram displaying how the notification policy tree routes alerts" caption="Routing firing alert instances through notification policies" >}}
|
||||
|
||||
<br/>
|
||||
|
||||
Each notification policy decides where to send the alert (contact point) and when to send the notification (timing options). Additionally, it can [group multiple firing alert instances into a single notification](ref:group-alert-notifications) to reduce alert noise.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-notification-policy-diagram-v5.png" max-width="750px" alt="A diagram of the notification policy component" >}}
|
||||
|
||||
### Silences and mute timings
|
||||
|
||||
@@ -115,16 +127,14 @@ Notifications sent from contact points are customizable with notification templa
|
||||
|
||||
### Architecture
|
||||
|
||||
Grafana Alerting is built on the Prometheus model of designing alerting systems.
|
||||
|
||||
Prometheus-based alerting systems have two main components:
|
||||
Grafana Alerting is built on the Prometheus model of designing alerting systems. Prometheus-based alerting systems have two main components:
|
||||
|
||||
- An alert generator that evaluates alert rules and sends firing and resolved alerts to the alert receiver.
|
||||
- An alert receiver (also known as Alertmanager) that receives the alerts and is responsible for handling them and sending their notifications.
|
||||
|
||||
Grafana doesn’t use Prometheus as its default alert generator because Grafana Alerting needs to work with many other data sources in addition to Prometheus.
|
||||
Grafana Alerting doesn’t use Prometheus as its default alert generator because it works with many other data sources; not just Prometheus.
|
||||
|
||||
However, Grafana can also use Prometheus as an alert generator as well as external Alertmanagers. For more information about how to use distinct alerting systems, refer to the [Grafana alert rule types](ref:alert-rules).
|
||||
However, Grafana can also use Prometheus as an alert generator (refer to [alert rule types](ref:alert-rules)), as well as external Alertmanagers.
|
||||
|
||||
## Design your Alerting system
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@ There are three key components that help you understand how your alerts behave d
|
||||
|
||||
An alert instance can be in either of the following states:
|
||||
|
||||
| State | Description |
|
||||
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Normal** | The state of an alert when the condition (threshold) is not met. |
|
||||
| **Pending** | The state of an alert that has breached the threshold but for less than the [pending period](ref:pending-period). |
|
||||
| **Alerting** | The state of an alert that has breached the threshold for longer than the [pending period](ref:pending-period). |
|
||||
| **NoData** | The state of an alert whose query returns no data or all values are null. You can [change the default behavior](/docs/grafana/latest/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling). |
|
||||
| **Error** | The state of an alert when an error or timeout occurred evaluating the alert rule. You can [change the default behavior](/docs/grafana/latest/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling). |
|
||||
| State | Description |
|
||||
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Normal** | The state of an alert when the condition (threshold) is not met. |
|
||||
| **Pending** | The state of an alert that has breached the threshold but for less than the [pending period](ref:pending-period). |
|
||||
| **Alerting** | The state of an alert that has breached the threshold for longer than the [pending period](ref:pending-period). |
|
||||
| **NoData** | The state of an alert whose query returns no data or all values are null. You can [change the default behavior of the no data state](#modify-the-no-data-and-error-state). |
|
||||
| **Error** | The state of an alert when an error or timeout occurred evaluating the alert rule. You can [change the default behavior of the error state](#modify-the-no-data-and-error-state). |
|
||||
|
||||
{{< figure src="/media/docs/alerting/alert-instance-states-v3.png" caption="Alert instance state diagram" alt="A diagram of the distinct alert instance states and transitions." max-width="750px" >}}
|
||||
|
||||
@@ -64,18 +64,46 @@ Alert instances will be routed for [notifications](ref:notifications) when they
|
||||
|
||||
An alert instance is considered stale if its dimension or series has disappeared from the query results entirely for two evaluation intervals.
|
||||
|
||||
Stale alert instances that are in the **Alerting**, **NoData**, or **Error** states transition to the **Normal** state as **Resolved**, and include the `grafana_state_reason` annotation with the value **MissingSeries**. They are routed for notifications like other resolved alert instances.
|
||||
Stale alert instances that are in the **Alerting**, **NoData**, or **Error** states transition to the **Normal** state as **Resolved**. Once transitioned, these resolved alert instances are routed for notifications like other resolved alerts.
|
||||
|
||||
### Keep last state
|
||||
### Modify the no data and error state
|
||||
|
||||
The "Keep Last State" option helps mitigate temporary data source issues, preventing alerts from unintentionally firing, resolving, and re-firing.
|
||||
|
||||
In [Configure no data and error handling,](ref:no-data-and-error-handling) you can decide to keep the last state of the alert instance when a `NoData` and/or `Error` state is encountered. Just like normal evaluation, the alert instance transitions from `Pending` to `Alerting` after the pending period has elapsed.
|
||||
In [Configure no data and error handling](ref:no-data-and-error-handling), you can change the default behaviour when the evaluation returns no data or an error. You can set the alert instance state to `Alerting`, `Normal`, or keep the last state.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alert-rule-configure-no-data-and-error.png" alt="A screenshot of the `Configure no data and error handling` option in Grafana Alerting." max-width="500px" >}}
|
||||
|
||||
To reduce the number of **No Data** or **Error** state alerts received, try the following.
|
||||
|
||||
1. Use the **Keep last state** option. For more information, refer to the section below. This option allows the alert to retain its last known state when there is no data available, rather than switching to a **No Data** state.
|
||||
1. For **No Data** alerts, you can optimize your alert rule by expanding the time range of the query. However, if the time range is too big, it affects the performance of the query and can lead to errors due to timeout.
|
||||
|
||||
To minimize timeouts resulting in the **Error** state, reduce the time range to request less data every evaluation cycle.
|
||||
|
||||
1. Change the default [evaluation time out](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#evaluation_timeout). The default is set at 30 seconds. To increase the default evaluation timeout, open a support ticket from the [Cloud Portal](https://grafana.com/docs/grafana-cloud/account-management/support/#grafana-cloud-support-options). Note that this should be a last resort, because it may affect the performance of all alert rules and cause missed evaluations if the timeout is too long.
|
||||
|
||||
#### Keep last state
|
||||
|
||||
The "Keep Last State" option helps mitigate temporary data source issues, preventing alerts from unintentionally firing, resolving, and re-firing.
|
||||
|
||||
However, in situations where strict monitoring is critical, relying solely on the "Keep Last State" option may not be appropriate. Instead, consider using an alternative or implementing additional alert rules to ensure that issues with prolonged data source disruptions are detected.
|
||||
|
||||
### `grafana_state_reason` annotation
|
||||
|
||||
Occasionally, an alert instance may be in a state that isn't immediately clear to everyone. For example:
|
||||
|
||||
- Stale alert instances in the `Alerting` state transition to the `Normal` state when the series disappear.
|
||||
- If "no data" handling is configured to transition to a state other than `NoData`.
|
||||
- If "error" handling is configured to transition to a state other than `Error`.
|
||||
- If the alert rule is deleted, paused, or updated in some cases, the alert instance also transitions to the `Normal` state.
|
||||
|
||||
In these situations, the evaluation state may differ from the alert state, and it might be necessary to understand the reason for being in that state when receiving the notification.
|
||||
|
||||
The `grafana_state_reason` annotation is included in these situations, providing the reason in the notifications that explain why the alert instance transitioned to its current state. For example:
|
||||
|
||||
- Stale alert instances in the `Normal` state include the `grafana_state_reason` annotation with the value **MissingSeries**.
|
||||
- If "no data" or "error" handling transitions to the `Normal` state, the `grafana_state_reason` annotation is included with the value **NoData** or **Error**, respectively.
|
||||
- If the alert rule is deleted or paused, the `grafana_state_reason` is set to **Paused** or **RuleDeleted**. For some updates, it is set to **Updated**.
|
||||
|
||||
### Special alerts for `NoData` and `Error`
|
||||
|
||||
When evaluation of an alert rule produces state `NoData` or `Error`, Grafana Alerting generates a new alert instance that have the following additional labels:
|
||||
|
||||
@@ -69,7 +69,7 @@ Grafana supports two different alert rule types: Grafana-managed alert rules and
|
||||
|
||||
## Grafana-managed alert rules
|
||||
|
||||
Grafana-managed alert rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of the [supported data sources](#supported-data-sources), and use multiple data sources in a single alert rule.
|
||||
Grafana-managed alert rules are the most flexible alert rule type. They allow you to create alert rules that can act on data from any of the [supported data sources](#supported-data-sources), and use multiple data sources in a single alert rule. You can also add expressions to transform your data and set alert conditions. Using images in alert notifications is also supported.
|
||||
|
||||
Additionally, you can also add [expressions to transform your data](ref:expression-queries), set custom alert conditions, and include [images in alert notifications](ref:notification-images).
|
||||
|
||||
@@ -87,9 +87,11 @@ Find the public data sources supporting Alerting in the [Grafana Plugins directo
|
||||
|
||||
## Data source-managed alert rules
|
||||
|
||||
Data source-managed alert rules can improve query performance via [recording rules](#recording-rules) and ensure high-availability and fault tolerance when implementing a distributed architecture.
|
||||
Data source-managed alert rules can be used for Grafana Mimir or Grafana Loki data sources which have been configured to support rule creation.
|
||||
|
||||
They are only supported for Prometheus-based or Loki data sources with the Ruler API enabled. For more information, refer to the [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
|
||||
They can improve query performance via [recording rules](#recording-rules) and ensure high-availability and fault tolerance when implementing a distributed architecture.
|
||||
|
||||
They are only supported for Grafana Mimir or Grafana Loki data sources with the Ruler API enabled. For more information, refer to the [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
|
||||
|
||||
{{< figure src="/media/docs/alerting/mimir-managed-alerting-architecture-v2.png" max-width="750px" caption="Mimir-managed alerting architecture" >}}
|
||||
|
||||
|
||||
@@ -20,6 +20,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/
|
||||
group-alert-notifications:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
templates:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/templates/
|
||||
@@ -37,9 +42,9 @@ refs:
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
|
||||
notification-timings:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/#timing-options
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/#timing-options
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/#timing-options
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/#timing-options
|
||||
silences:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-silence/
|
||||
@@ -63,7 +68,9 @@ Choosing how, when, and where to send your alert notifications is an important p
|
||||
|
||||
Start defining your [contact points](ref:contact-points) to specify how to receive your alert notifications. Then, configure your alert rules to send their alerts to either a contact point or use the [Notification Policy Tree](#notification-policies) to flexibly route alerts to contact points.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-configure-notifications.svg" max-width="750px" alt="Configure alerts to send notifications to a contact point or via notification policies" caption="Configure alerts to send notifications to a contact point or via notification policies" >}}
|
||||
<br/>
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-configure-notifications-v2.png" max-width="750px" alt="Configure alert rules to forward firing alerts directly to a contact point or through notification policies" caption="Configure alert rules to forward firing alerts directly to a contact point or through notification policies" >}}
|
||||
|
||||
## How it works at a glance
|
||||
|
||||
@@ -95,21 +102,21 @@ The notification policy tree is responsible for:
|
||||
Each notification policy handles specific tasks:
|
||||
|
||||
- Deciding which contact point receives the alert notification.
|
||||
- Controlling when to send notifications based on its [notification timings](ref:notification-timings).
|
||||
- [Grouping multiple alerts](#group-alert-notifications) into a single notification to reduce alert noise.
|
||||
- Controlling when to send notifications based on its notification timing options.
|
||||
- Grouping multiple alerts into a single notification to reduce alert noise.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-notification-policy-diagram-v2.png" max-width="750px" alt="A diagram of the notification policy component" >}}
|
||||
{{< figure src="/media/docs/alerting/alerting-notification-policy-diagram-v5.png" max-width="750px" alt="A diagram of the notification policy component" >}}
|
||||
|
||||
### Group alert notifications
|
||||
|
||||
When something fails in our system, our alerting setup can easily trigger hundreds or even thousands of alert instances (notifications). Several alert rules often fail simultaneously. Additionally, each alert rule may generate multiple alert instances.
|
||||
|
||||
Grouping alert notifications is commonly necessary to avoid bombarding our alert inbox. Grouping combines similar alert instances in a given period into one single notification.
|
||||
[Grouping alert notifications](ref:group-alert-notifications) is commonly necessary to avoid bombarding our alert inbox. Grouping combines similar alert instances in a given period into one single notification.
|
||||
|
||||
Notification grouping uses:
|
||||
|
||||
- **Matching labels**: Group alert instances of the same type by matching their labels.
|
||||
- **[Notification timings](ref:notification-timings)**: Wait for a specified period before sending the notification, allowing for the grouping of incoming alert instances.
|
||||
- **Labels**: Group alert instances of the same type by using labels.
|
||||
- **Timing options**: Wait for a specified period before sending the notification, allowing for the grouping of incoming alert instances.
|
||||
|
||||
### Templates, silences and mute timings
|
||||
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
description: Learn about how notification policies group alert notifications
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- notification policies
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Group alert notifications
|
||||
menuTitle: Grouping
|
||||
weight: 114
|
||||
refs:
|
||||
alert-labels:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
|
||||
notification-policies:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
|
||||
silences:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-silence/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-silence/
|
||||
---
|
||||
|
||||
# Group alert notifications
|
||||
|
||||
Grouping in Grafana Alerting allows you to batch relevant alerts together into a smaller number of notifications. This is particularly important if notifications are delivered to first-responders, such as engineers on-call, where receiving lots of notifications in a short period of time can be overwhelming. In some cases, it can negatively impact a first-responders ability to respond to an incident. For example, consider a large outage where many of your systems are down. In this case, grouping can be the difference between receiving 1 phone call and 100 phone calls.
|
||||
|
||||
## Group notifications
|
||||
|
||||
Grouping combines similar alert instances within a specific period into a single notification, reducing alert noise.
|
||||
|
||||
In the [notification policy](ref:notification-policies), you can configure how to group multiple alerts into a single notification:
|
||||
|
||||
- The `Group by` option specifies the criteria for grouping incoming alerts within the policy. The default is by alert rule.
|
||||
- [Timing options](#timing-options) determine when and how often to send the notification.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-notification-policy-diagram-with-labels-v3.png" max-width="750px" alt="A diagram about the components of a notification policy, including labels and groups" >}}
|
||||
|
||||
Alert instances are grouped together if they have the same exact label values for the labels configured in the `Group by` option.
|
||||
|
||||
For example, given the `Group by` option set to the `team` label:
|
||||
|
||||
- `alertname:foo, team=frontend`, and `alertname:bar, team=frontend` are in one group.
|
||||
- `alertname:foo, team=backend`, and `alertname:qux, team=backend` are in another group.
|
||||
|
||||
### Group by alert rule or labels
|
||||
|
||||
By default, notification policies in Grafana group alerts by the alert rule. Specifically, they are grouped using the `alertname` and `grafana_folder` labels, as alert rule names are not unique across folders.
|
||||
|
||||
If you want to group alerts by other labels, something other than the alert rule, change the `Group by` option to any other combination of labels.
|
||||
|
||||
### A single group for all alerts
|
||||
|
||||
If you want to group all alerts handled by the notification policy in a single group (without grouping notifications by alert rule or other labels), you can do so by leaving `Group by` empty.
|
||||
|
||||
### Disable grouping
|
||||
|
||||
If you want to receive every alert as a separate notification, you can do so by grouping by a special label called `...`, ensuring that other labels are not present.
|
||||
|
||||
## Timing options
|
||||
|
||||
In the notification policy, you can also configure how often notifications are sent for each [group of alerts](#group-notifications). There are three distinct timers applied to groups within the notification policy:
|
||||
|
||||
- **[Group wait](#group-wait)**: the time to wait before sending the first notification for a new group of alerts.
|
||||
- **[Group interval](#group-interval)**: the time to wait before sending a notification about changes in the alert group.
|
||||
- **[Repeat interval](#repeat-interval)**: the time to wait before sending a notification if the group has not changed since the last notification.
|
||||
|
||||
These timers reduce the number of notifications sent. By delaying the delivery of notifications, incoming alerts can be grouped into just one notification instead of many.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-timing-options-flowchart-v2.png" max-width="750px" alt="A basic sequence diagram of the the notification policy timers" caption="A basic sequence diagram of the notification policy timers" >}}
|
||||
|
||||
<!--
|
||||
flowchart LR
|
||||
A((First alert)) -///-> B
|
||||
B[Group wait <br/> notification] -///-> C
|
||||
B -- no changes -///-> D
|
||||
C[Group interval <br/> notification] -- no changes -///-> D
|
||||
C -- group changes -///-> C
|
||||
D[Repeat interval <br/> notification]
|
||||
-->
|
||||
|
||||
### Group wait
|
||||
|
||||
**Default**: 30 seconds
|
||||
|
||||
Group wait is the duration Grafana waits before sending the first notification for a new group of alerts.
|
||||
|
||||
The longer the group wait, the more time other alerts have to be included in the initial notification of the new group. The shorter the group wait, the earlier the first notification is sent, but at the risk of not including some alerts.
|
||||
|
||||
**Example**
|
||||
|
||||
Consider a notification policy that:
|
||||
|
||||
- Matches all alert instances with the `team` label—matching labels equals to `team=~.+`.
|
||||
- Groups notifications by the `team` label—one group for each distinct `team`.
|
||||
- Sets the Group wait timer to `30s`.
|
||||
|
||||
| Time | Incoming alert instance | Notification policy group | Number of instances | |
|
||||
| ------------------ | ------------------------------- | ------------------------- | ------------------- | ----------------------------------------------------------------------- |
|
||||
| 00:00 | `alert_name=f1` `team=frontend` | `frontend` | 1 | Starts the group wait timer of the `frontend` group. |
|
||||
| 00:10 | `alert_name=f2` `team=frontend` | `frontend` | 2 | |
|
||||
| 00:20 | `alert_name=b1` `team=backend` | `backend` | 1 | Starts the group wait timer of the `backend` group. |
|
||||
| 00:30<sup>\*</sup> | | `frontend` | 2 | Group wait elapsed. <br/> Send initial notification reporting 2 alerts. |
|
||||
| 00:35 | `alert_name=b2` `team=backend` | `backend` | 2 | |
|
||||
| 00:40 | `alert_name=b3` `team=backend` | `backend` | 3 | |
|
||||
| 00:50<sup>\*</sup> | | `backend` | 3 | Group wait elapsed. <br/> Send initial notification reporting 3 alerts. |
|
||||
|
||||
### Group interval
|
||||
|
||||
**Default**: 5 minutes
|
||||
|
||||
If an alert was too late to be included in the first notification due to group wait, it is included in subsequent notifications after group interval.
|
||||
|
||||
Group interval is the duration to wait before sending notifications about group changes. For instance, a group change may be adding a new firing alert to the group, or resolving an existing alert.
|
||||
|
||||
**Example**
|
||||
|
||||
Here are the related excerpts from the previous example:
|
||||
|
||||
| Time | Incoming alert instance | Notification policy group | Number of instances | |
|
||||
| ------------------ | ----------------------- | ------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| 00:30<sup>\*</sup> | | `frontend` | 2 | Group wait elapsed and starts Group interval timer. <br/> Send initial notification reporting 2 alerts. |
|
||||
| 00:50<sup>\*</sup> | | `backend` | 3 | Group wait elapsed and starts Group interval timer. <br/> Send initial notification reporting 3 alerts. |
|
||||
|
||||
And below is the continuation of the example setting the Group interval timer to 5 minutes:
|
||||
|
||||
| Time | Incoming alert instance | Notification policy group | Number of instances | |
|
||||
| ------------------ | ------------------------------- | ------------------------- | ------------------- | ---------------------------------------------------------------------------------------------- |
|
||||
| 01:30 | `alert_name=f3` `team=frontend` | `frontend` | 3 | |
|
||||
| 02:30 | `alert_name=f4` `team=frontend` | `frontend` | 4 | |
|
||||
| 05:30<sup>\*</sup> | | `frontend` | 4 | Group interval elapsed and resets timer. <br/> Send one notification reporting 4 alerts. |
|
||||
| 05:50<sup>\*</sup> | | `backend` | 3 | Group interval elapsed and resets timer. <br/> No group changes, and do not send notification. |
|
||||
| 08:00 | `alert_name=f4` `team=backend` | `backend` | 4 | |
|
||||
| 10:30<sup>\*</sup> | | `frontend` | 4 | Group interval elapsed and resets timer. <br/> No group changes, and do not send notification. |
|
||||
| 10:50<sup>\*</sup> | | `backend` | 4 | Group interval elapsed and resets timer. <br/> Send one notification reporting 4 alerts. |
|
||||
|
||||
**How it works**
|
||||
|
||||
Once the first notification has been sent for a new group of alerts, the group interval timer starts.
|
||||
|
||||
When the group interval timer elapses, the system resets the group interval timer and sends a notification only if there were group changes. This process repeats until there are no more alerts.
|
||||
|
||||
It's important to note that an alert instance exits the group after being resolved and notified of its state change. When no alerts remain, the group is deleted, and then the group wait timer handles the first notification for the next incoming alert once again.
|
||||
|
||||
### Repeat interval
|
||||
|
||||
**Default**: 4 hours
|
||||
|
||||
Repeat interval acts as a reminder that alerts in the group are still firing.
|
||||
|
||||
The repeat interval timer decides how often notifications are sent (or repeated) if the group has not changed since the last notification.
|
||||
|
||||
**How it works**
|
||||
|
||||
Repeat interval is evaluated every time the group interval resets. If the alert group has not changed and the time since the last notification was longer than the repeat interval, then a notification is sent as a reminder that the alerts are still firing.
|
||||
|
||||
Repeat interval must not only be greater than or equal to group interval, but also must be a multiple of Group interval. If Repeat interval is not a multiple of group interval it is coerced into one. For example, if your Group interval is 5 minutes, and your Repeat interval is 9 minutes, the Repeat interval is rounded up to the nearest multiple of 5 which is 10 minutes.
|
||||
|
||||
**Example**
|
||||
|
||||
Here are the related excerpts from the previous example:
|
||||
|
||||
| Time | Incoming alert instance | Notification policy group | Number of instances | |
|
||||
| ------------------ | ----------------------- | ------------------------- | ------------------- | -------------------------------------------------------- |
|
||||
| 05:30<sup>\*</sup> | | `frontend` | 4 | Group interval resets. <br/> Send the last notification. |
|
||||
| 10:50<sup>\*</sup> | | `backend` | 4 | Group interval resets. <br/> Send the last notification. |
|
||||
|
||||
And below is the continuation of the example setting the Repeat interval timer to 4 hours:
|
||||
|
||||
| Time | Incoming alert instance | Notification policy group | Number of instances | |
|
||||
| -------- | ----------------------- | ------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 04:05:30 | | `frontend` | 4 | Group interval resets. The time since the last notification was no longer than the repeat interval. |
|
||||
| 04:10:30 | | `frontend` | 4 | Group interval resets. The time since the last notification was longer than the repeat interval. <br/> Send one notification reminding the 4 firing alerts. |
|
||||
| 04:10:50 | | `backend` | 4 | Group interval resets. The time since the last notification was no longer than the repeat interval. |
|
||||
| 04:15:50 | | `backend` | 4 | Group interval resets. The time since the last notification was longer than the repeat interval. <br/> Send one notification reminding the 4 firing alerts. |
|
||||
@@ -18,130 +18,100 @@ labels:
|
||||
title: Notification policies
|
||||
weight: 113
|
||||
refs:
|
||||
alert-labels:
|
||||
contact-points:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/contact-points/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
|
||||
notification-policies:
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/contact-points/
|
||||
notification-timings:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/#timing-options
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
|
||||
silences:
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/#timing-options
|
||||
mute-timings:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-silence/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/mute-timings/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-silence/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/mute-timings/
|
||||
group-alert-notifications:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
---
|
||||
|
||||
# Notification policies
|
||||
|
||||
Notification policies provide you with a flexible way of routing alerts to various different receivers. Using label matchers, you can modify alert notification delivery without having to update every individual alert rule.
|
||||
Notification policies provide you with a flexible way of designing how to handle notifications and minimize alert noise.
|
||||
|
||||
Learn more about how notification policies work and are structured, so that you can make the most out of setting up your notification policies.
|
||||
Using label matchers, alert instances are [routed to notification policies](#routing). The notification policy can then [group multiple alert instances into a single notification](ref:group-alert-notifications) and deliver it to the contact point.
|
||||
|
||||
## Policy tree
|
||||
{{< figure src="/media/docs/alerting/how-alerting-works.png" max-width="750px" alt="How Alerting works" >}}
|
||||
|
||||
Notification policies are _not_ a list, but rather are structured according to a [tree structure](https://en.wikipedia.org/wiki/Tree_structure). This means that each policy can have child policies, and so on. The root of the notification policy tree is called the **Default notification policy**.
|
||||
Notification policies are _not_ a list, but rather are structured according to a [tree structure](https://en.wikipedia.org/wiki/Tree_structure):
|
||||
|
||||
Each policy consists of a set of label matchers (0 or more) that specify which labels they are or aren't interested in handling.
|
||||
- The root of the notification policy tree is the **Default notification policy**.
|
||||
- Each policy can have child policies.
|
||||
- Each policy can have sibling policies, sharing the same parent and hierarchical level.
|
||||
|
||||
Each policy consists of a set of label matchers (0 or more) that specify which alerts they are or aren't interested in handling. A matching policy refers to a notification policy with label matchers that match the alert instance’s labels.
|
||||
|
||||
{{< docs/shared lookup="alerts/how_label_matching_works.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you haven't configured any label matchers for your notification policy, your notification policy matches _all_ alert instances. This may prevent child policies from being evaluated unless you have enabled **Continue matching siblings** on the notification policy.
|
||||
{{% /admonition %}}
|
||||
{{< figure src="/media/docs/alerting/notification-routing.png" max-width="750px" caption="Matching alert instances with notification policies" alt="Example of a notification policy tree" >}}
|
||||
|
||||
## Routing
|
||||
|
||||
To determine which notification policy handles which alert instances, you have to start by looking at the existing set of notification policies, starting with the default notification policy.
|
||||
To determine which notification policies handle an alert instance, the system looks for matching policies starting from the top of the tree—beginning with the default notification policy.
|
||||
|
||||
If no policies other than the default policy are configured, the default policy handles the alert instance.
|
||||
If a matching policy is found, the system continues to evaluate its child policies in the order they are displayed. If a child policy matches the alert, the system then evaluates its child policies recursively until no more matching child policies are found. In this case, only the deepest matching child policy handles the alert instance.
|
||||
|
||||
If policies other than the default policy are defined, it evaluates those notification policies in the order they are displayed.
|
||||
By default, once a matching policy is found, the system does not continue to look for sibling policies. If you want sibling policies of one matching policy to handle the alert instance as well, then enable **Continue matching siblings** on the particular matching policy.
|
||||
|
||||
If a notification policy has label matchers that match the labels of the alert instance, it descends in to its child policies and, if there are any, continues to look for any child policies that might have label matchers that further narrow down the set of labels, and so forth until no more child policies have been found.
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
If no child policies are defined in a notification policy or if none of the child policies have any label matchers that match the alert instance's labels, the default notification policy is used.
|
||||
The default notification policy matches all alert instances. It always handles alert instances if there are no child policies or if none of the child policies match the alert instance's labels—this prevents any alerts from being missed.
|
||||
|
||||
As soon as a matching policy is found, the system does not continue to look for other matching policies. If you want to continue to look for other policies that may match, enable **Continue matching siblings** on that particular policy.
|
||||
If alerts use multiple labels, these labels must also be present in a notification policy to match and route notifications to a specific contact point.
|
||||
|
||||
Lastly, if none of the notification policies are selected the default notification policy is used.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Routing example
|
||||
{{< collapse title="Routing example" >}}
|
||||
|
||||
Here is an example of a relatively simple notification policy tree and some alert instances.
|
||||
|
||||
{{< figure src="/media/docs/alerting/notification-routing.png" max-width="750px" caption="Notification policy routing" >}}
|
||||
|
||||
Here's a breakdown of how these policies are selected:
|
||||
Here's a breakdown of the previous example:
|
||||
|
||||
**Pod stuck in CrashLoop** does not have a `severity` label, so none of its child policies are matched. It does have a `team=operations` label, so the first policy is matched.
|
||||
|
||||
The `team=security` policy is not evaluated a match was already found and **Continue matching siblings** was not configured for that policy.
|
||||
The `team=security` policy is not a match and **Continue matching siblings** was not configured for that policy.
|
||||
|
||||
**Disk Usage – 80%** has both a `team` and `severity` label, and matches a child policy of the operations team.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
When an alert matches both a parent policy and a child policy (like it does in this case), the routing follows the child policy (`severity`) as it provides a more specific match.
|
||||
{{% /admonition %}}
|
||||
|
||||
**Unauthorized log entry** has a `team` label but does not match the first policy (`team=operations`) since the values are not the same, so it will continue searching and match the `team=security` policy. It does not have any child policies, so the additional `severity=high` label is ignored.
|
||||
|
||||
{{< /collapse >}}
|
||||
|
||||
This routing and tree structure makes it convenient to organize and handle alerts for dedicated teams, while also narrowing down specific cases within the team by applying additional labels.
|
||||
|
||||
## Inheritance
|
||||
|
||||
In addition to child policies being a useful concept for routing alert instances, they also inherit properties from their parent policy. This also applies to any policies that are child policies of the default notification policy.
|
||||
In addition to child policies being a useful concept for routing alert instances, they also inherit properties from their parent policy. This also applies to child policies of the default notification policy.
|
||||
|
||||
The following properties are inherited by child policies:
|
||||
By default, a child policy inherits the following notification properties from its parent:
|
||||
|
||||
- Contact point
|
||||
- Grouping options
|
||||
- Timing options
|
||||
- Mute timings
|
||||
- [Contact point](ref:contact-points)
|
||||
- [Grouping options](ref:group-alert-notifications)
|
||||
- [Timing options](ref:notification-timings)
|
||||
|
||||
Each of these properties can be overwritten by an individual policy if you want to override the inherited properties.
|
||||
Then, each policy can overwrite these properties if needed.
|
||||
|
||||
To inherit a contact point from the parent policy, leave it blank. To override the inherited grouping options, enable **Override grouping**. To override the inherited timing options, enable **Override general timings**.
|
||||
The inheritance of notification properties, together with the routing process, is an effective method for grouping related notifications and handling specific cases through child policies.
|
||||
|
||||
### Inheritance example
|
||||
**Inheritance example**
|
||||
|
||||
The example below shows how the notification policy tree from the previous example allows the child policies of the `team=operations` to inherit its contact point.
|
||||
{{< figure src="/media/docs/alerting/notification-inheritance.png" max-width="750px" alt="Simple example inhering notification settings" >}}
|
||||
|
||||
In this way, you can avoid having to specify the same contact point multiple times for each child policy.
|
||||
|
||||
{{< figure src="/media/docs/alerting/notification-inheritance.png" max-width="750px" caption="Notification policy inheritance" >}}
|
||||
|
||||
## Additional configuration options
|
||||
|
||||
### Grouping
|
||||
|
||||
Grouping is an important feature of Grafana Alerting as it allows you to batch relevant alerts together into a smaller number of notifications. This is particularly important if notifications are delivered to first-responders, such as engineers on-call, where receiving lots of notifications in a short period of time can be overwhelming and in some cases can negatively impact a first-responders ability to respond to an incident. For example, consider a large outage where many of your systems are down. In this case, grouping can be the difference between receiving 1 phone call and 100 phone calls.
|
||||
|
||||
Choose how alerts are grouped together using the Group by option in a notification policy. By default, notification policies in Grafana group alerts together by alert rule using the `alertname` and `grafana_folder` labels (since alert names are not unique across multiple folders). If you want to group alerts by something other than the alert rule, change the grouping to any other combination of labels.
|
||||
|
||||
#### Disable grouping
|
||||
|
||||
If you want to receive every alert as a separate notification, you can do so by grouping by a special label called `...`. This is useful when your alerts are being delivered to an automated system instead of a first-responder.
|
||||
|
||||
#### A single group for all alerts
|
||||
|
||||
If you want to receive all alerts together in a single notification, you can do so by leaving Group by empty.
|
||||
|
||||
### Timing options
|
||||
|
||||
The timing options decide how often notifications are sent for each group of alerts. There are three timers that you need to know about: Group wait, Group interval, and Repeat interval.
|
||||
|
||||
#### Group wait
|
||||
|
||||
Group wait is the amount of time Grafana waits before sending the first notification for a new group of alerts. The longer Group wait is the more time you have for other alerts to arrive. The shorter Group wait is the earlier the first notification is sent, but at the risk of sending incomplete notifications. You should always choose a Group wait that makes the most sense for your use case.
|
||||
|
||||
**Default** 30 seconds
|
||||
|
||||
#### Group interval
|
||||
|
||||
Once the first notification has been sent for a new group of alerts, the Group interval timer starts. This is the amount of wait time before notifications about changes to the group are sent. For example, another firing alert might have just been added to the group while an existing alert might have resolved. If an alert was too late to be included in the first notification due to Group wait, it is included in subsequent notifications after Group interval. Once Group interval has elapsed, Grafana resets the Group interval timer. This repeats until there are no more alerts in the group after which the group is deleted.
|
||||
|
||||
**Default** 5 minutes
|
||||
|
||||
#### Repeat interval
|
||||
|
||||
Repeat interval decides how often notifications are repeated if the group has not changed since the last notification. You can think of these as reminders that some alerts are still firing. Repeat interval is closely related to Group interval, which means your Repeat interval must not only be greater than or equal to Group interval, but also must be a multiple of Group interval. If Repeat interval is not a multiple of Group interval it is coerced into one. For example, if your Group interval is 5 minutes, and your Repeat interval is 9 minutes, the Repeat interval is rounded up to the nearest multiple of 5 which is 10 minutes.
|
||||
|
||||
**Default** 4 hours
|
||||
This example shows how the notification policy tree from the previous example allows the child policies of the `team=operations` to inherit its contact point. In this way, you can avoid specifying the same contact point multiple times for each child policy.
|
||||
|
||||
@@ -17,7 +17,7 @@ labels:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Templates
|
||||
weight: 114
|
||||
weight: 115
|
||||
refs:
|
||||
variables-label-annotation:
|
||||
- pattern: /docs/grafana/
|
||||
@@ -106,6 +106,10 @@ Here are some commonly used built-in [variables](ref:variables-label-annotation)
|
||||
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
Extra whitespace in label templates can break matches with notification policies.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Template annotations
|
||||
|
||||
Both labels and annotations have the same structure: a set of named values; however their intended uses are different. The purpose of annotations is to add additional information to existing alerts.
|
||||
|
||||
@@ -4,49 +4,93 @@ aliases:
|
||||
- ../../alerting/alert-groups/filter-alerts/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alert-groups/filter-alerts/
|
||||
- ../../alerting/alert-groups/view-alert-grouping/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alert-groups/view-alert-grouping/
|
||||
- ../../alerting/unified-alerting/alert-groups/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alert-groups/
|
||||
- ../../alerting/manage-notifications/view-notification-errors/ # /docs/grafana/<GRAFANA_VERSION>/alerting/manage-notifications/view-notification-errors/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/manage-notifications/view-alert-groups/
|
||||
description: Alert groups
|
||||
description: The Groups view lists grouped alerts that are actively triggering notifications.
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerts
|
||||
- errors
|
||||
- notifications
|
||||
- groups
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: View and filter by alert groups
|
||||
title: View the status of notifications
|
||||
weight: 800
|
||||
refs:
|
||||
alertmanager:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/
|
||||
grouping:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/
|
||||
---
|
||||
|
||||
# View and filter by alert groups
|
||||
# View the status of notifications
|
||||
|
||||
Alert groups show grouped alerts from an Alertmanager instance. By default, alert rules are grouped by the label keys for the default policy in notification policies. Grouping common alert rules into a single alert group prevents duplicate alert rules from being fired.
|
||||
The Groups view page lists grouped alerts that are actively triggering notifications.
|
||||
|
||||
You can view alert groups and also filter for alert rules that match specific criteria.
|
||||
By default, Grafana Alerting groups similar firing alerts (or alert instances) to prevent notification overload. For details on how notification grouping works, refer to [Group alert notifications](ref:grouping).
|
||||
|
||||
## View alert groups
|
||||
In the Groups view, you can see alert groups, check the state of their notifications, and also filter for alert instances that match specific criteria. This view is useful for debugging and verifying your grouping settings of notification policies.
|
||||
|
||||
## View alert groups and notification state
|
||||
|
||||
To view alert groups, complete the following steps.
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Groups** to view the list of existing groups.
|
||||
1. From the **Alertmanager** dropdown, select an external Alertmanager as your data source. By default, the `Grafana` Alertmanager is selected.
|
||||
1. From **Custom group by** dropdown, select a combination of labels to view a grouping other than the default. This is useful for debugging and verifying your grouping of notification policies.
|
||||
1. Click **Alerts & IRM** -> **Alerting**.
|
||||
1. Click **Groups** to view the list of groups firing notifications.
|
||||
|
||||
By default, alert groups are grouped by the notification policies grouping.
|
||||
|
||||
Each group displays its label set, contact point, and the number of alert instances (or alerts).
|
||||
|
||||
Then, click on a group to access its alert instances. You can find alert instances by their label set and view their notification state.
|
||||
|
||||
### Notification states
|
||||
|
||||
The notification state of an alert instance can be in one of the following states:
|
||||
|
||||
- **Unprocessed**: The alert is received but its notification has not been processed yet.
|
||||
- **Suppressed**: The alert has been silenced.
|
||||
- **Active**: The alert notification has been handled. The alert is still firing and continues to be managed.
|
||||
|
||||
### Filter alerts
|
||||
|
||||
You can filter by label, state, or Alertmanager:
|
||||
|
||||
- **By label**: In **Search**, enter an existing label to view alerts matching the label. For example, `environment=production,region=~US|EU,severity!=warning`.
|
||||
|
||||
- **By state**: In **States**, select from Active, Suppressed, or Unprocessed states to view alerts matching your selected state. All other alerts are hidden.
|
||||
|
||||
- **By Alertmanager**: In the **Alertmanager** dropdown, select an [external Alertmanager](ref:alertmanager) to view only alert groups for that specific Alertmanager. By default, the `Grafana` Alertmanager is selected.
|
||||
|
||||
### Custom group
|
||||
|
||||
From **Custom group by** dropdown, select a combination of labels to view a grouping other than the default. This helps validate the [grouping settings of your notification policies](ref:grouping).
|
||||
|
||||
If an alert does not contain labels specified either in the grouping of the default policy or the custom grouping, then the alert is added to a catch all group with a header of `No grouping`.
|
||||
|
||||
## Filter alerts
|
||||
## View notification errors
|
||||
|
||||
You can filter by label or state.
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
### Search by label
|
||||
Notification errors are only available with [pre-configured Grafana Alertmanagers](ref:alertmanager).
|
||||
|
||||
In **Search**, enter an existing label to view alerts matching the label.
|
||||
{{% /admonition %}}
|
||||
|
||||
For example, `environment=production,region=~US|EU,severity!=warning`.
|
||||
Notification errors provide information about why they failed to be sent or were not received.
|
||||
|
||||
### Filter by state
|
||||
To view notification errors, navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
|
||||
In **States**, select from Active, Suppressed, or Unprocessed states to view alerts matching your selected state. All other alerts are hidden.
|
||||
Each contact point displays a message about the status of their latest notification deliveries.
|
||||
|
||||
If a contact point is failing, a red message indicates that there are errors delivering notifications. Hover over the error message to see the notification error details.
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/manage-notifications/view-notification-errors/
|
||||
description: View notification errors and understand why they failed to be sent or were not received
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- notification
|
||||
- errors
|
||||
- contact points
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: View notification errors
|
||||
weight: 900
|
||||
---
|
||||
|
||||
# View notification errors
|
||||
|
||||
View notification errors and understand why they failed to be sent or were not received.
|
||||
|
||||
**Note:**
|
||||
This feature only works if you are using Grafana Alertmanager.
|
||||
|
||||
To view notification errors, complete the following steps.
|
||||
|
||||
1. Navigate to Alerting -> Contact points.
|
||||
|
||||
If any contact points are failing, a message at the right-hand corner of the screen alerts the user to the fact that there are errors and how many.
|
||||
|
||||
2. Click on the contact point to view the details of errors for each contact point.
|
||||
|
||||
Error details are displayed if you hover over the Error icon.
|
||||
|
||||
If a contact point has more than one integration, you see all errors for each of the integrations listed.
|
||||
|
||||
3. In the Health column, check the status of the notification.
|
||||
|
||||
This can be either OK, No attempts, or Error.
|
||||
|
||||
## Useful links
|
||||
|
||||
[Receivers API](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json)
|
||||
@@ -18,6 +18,17 @@ labels:
|
||||
- oss
|
||||
title: Configure high availability
|
||||
weight: 600
|
||||
refs:
|
||||
state-history:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/manage-notifications/view-state-health/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/view-state-health/
|
||||
meta-monitoring:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/monitor/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/monitor/
|
||||
---
|
||||
|
||||
# Configure high availability
|
||||
@@ -28,18 +39,13 @@ Grafana Alerting uses the Prometheus model of separating the evaluation of alert
|
||||
|
||||
When running multiple instances of Grafana, all alert rules are evaluated on all instances. You can think of the evaluation of alert rules as being duplicated by the number of running Grafana instances. This is how Grafana Alerting makes sure that as long as at least one Grafana instance is working, alert rules are still be evaluated and notifications for alerts are still sent.
|
||||
|
||||
You can find this duplication in state history and it is a good way to confirm if you are using high availability.
|
||||
You can find this duplication in state history and it is a good way to [verify your high availability setup](#verify-your-high-availability-setup).
|
||||
|
||||
While the alert generator evaluates all alert rules on all instances, the alert receiver makes a best-effort attempt to avoid sending duplicate notifications. Alertmanager chooses availability over consistency, which may result in occasional duplicated or out-of-order notifications. It takes the opinion that duplicate or out-of-order notifications are better than no notifications.
|
||||
While the alert generator evaluates all alert rules on all instances, the alert receiver makes a best-effort attempt to avoid duplicate notifications. The alertmanagers use a gossip protocol to share information between them to prevent sending duplicated notifications.
|
||||
|
||||
The Alertmanager uses a gossip protocol to share information about notifications between Grafana instances. It also gossips silences, which means a silence created on one Grafana instance is replicated to all other Grafana instances. Both notifications and silences are persisted to the database periodically, and during graceful shut down.
|
||||
Alertmanager chooses availability over consistency, which may result in occasional duplicated or out-of-order notifications. It takes the opinion that duplicate or out-of-order notifications are better than no notifications.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
If using a mix of `execute_alerts=false` and `execute_alerts=true` on the HA nodes, since the alert state is not shared amongst the Grafana instances, the instances with `execute_alerts=false` do not show any alert status.
|
||||
This is because the HA settings (`ha_peers`, etc) only apply to the alert notification delivery (i.e. de-duplication of alert notifications, and silences, as mentioned above).
|
||||
|
||||
{{% /admonition %}}
|
||||
Alertmanagers also gossip silences, which means a silence created on one Grafana instance is replicated to all other Grafana instances. Both notifications and silences are persisted to the database periodically, and during graceful shut down.
|
||||
|
||||
## Enable alerting high availability using Memberlist
|
||||
|
||||
@@ -54,8 +60,11 @@ Since gossiping of notifications and silences uses both TCP and UDP port `9094`,
|
||||
You must have at least one (1) Grafana instance added to the `ha_peers` section.
|
||||
1. Set `[ha_listen_address]` to the instance IP address using a format of `host:port` (or the [Pod's](https://kubernetes.io/docs/concepts/workloads/pods/) IP in the case of using Kubernetes).
|
||||
By default, it is set to listen to all interfaces (`0.0.0.0`).
|
||||
1. Set `[ha_advertise_address]` to the instance's hostname or IP address in the format "host:port". Use this setting when the instance is behind NAT (Network Address Translation), such as in Docker Swarm or Kubernetes service, where external and internal addresses differ. This address helps other cluster instances communicate with it. The setting is optional.
|
||||
1. Set `[ha_peer_timeout]` in the `[unified_alerting]` section of the custom.ini to specify the time to wait for an instance to send a notification via the Alertmanager. The default value is 15s, but it may increase if Grafana servers are located in different geographic regions or if the network latency between them is high.
|
||||
|
||||
For a demo, see this [example using Docker Compose](https://github.com/grafana/alerting-ha-docker-examples/tree/main/memberlist).
|
||||
|
||||
## Enable alerting high availability using Redis
|
||||
|
||||
As an alternative to Memberlist, you can use Redis for high availability. This is useful if you want to have a central
|
||||
@@ -67,20 +76,9 @@ database for HA and cannot support the meshing of all Grafana servers.
|
||||
1. Optional: Set the username and password if authentication is enabled on the Redis server using `ha_redis_username` and `ha_redis_password`.
|
||||
1. Optional: Set `ha_redis_prefix` to something unique if you plan to share the Redis server with multiple Grafana instances.
|
||||
1. Optional: Set `ha_redis_tls_enabled` to `true` and configure the corresponding `ha_redis_tls_*` fields to secure communications between Grafana and Redis with Transport Layer Security (TLS).
|
||||
1. Set `[ha_advertise_address]` to `ha_advertise_address = "${POD_IP}:9094"` This is required if the instance doesn't have an IP address that is part of RFC 6890 with a default route.
|
||||
|
||||
The following metrics can be used for meta monitoring, exposed by the `/metrics` endpoint in Grafana:
|
||||
|
||||
| Metric | Description |
|
||||
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| alertmanager_cluster_messages_received_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_received_size_total | Total size of cluster messages received. |
|
||||
| alertmanager_cluster_messages_sent_total | Total number of cluster messages sent. |
|
||||
| alertmanager_cluster_messages_sent_size_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_publish_failures_total | Total number of messages that failed to be published. |
|
||||
| alertmanager_cluster_members | Number indicating current number of members in cluster. |
|
||||
| alertmanager_peer_position | Position the Alertmanager instance believes it's in. The position determines a peer's behavior in the cluster. |
|
||||
| alertmanager_cluster_pings_seconds | Histogram of latencies for ping messages. |
|
||||
| alertmanager_cluster_pings_failures_total | Total number of failed pings. |
|
||||
For a demo, see this [example using Docker Compose](https://github.com/grafana/alerting-ha-docker-examples/tree/main/redis).
|
||||
|
||||
## Enable alerting high availability using Kubernetes
|
||||
|
||||
@@ -148,3 +146,58 @@ The following metrics can be used for meta monitoring, exposed by the `/metrics`
|
||||
ha_advertise_address = "${POD_IP}:9094"
|
||||
ha_peer_timeout = 15s
|
||||
```
|
||||
|
||||
## Verify your high availability setup
|
||||
|
||||
When running multiple Grafana instances, all alert rules are evaluated on every instance. This multiple evaluation of alert rules is visible in the [state history](ref:state-history) and provides a straightforward way to verify that your high availability configuration is working correctly.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
If using a mix of `execute_alerts=false` and `execute_alerts=true` on the HA nodes, since the alert state is not shared amongst the Grafana instances, the instances with `execute_alerts=false` do not show any alert status.
|
||||
|
||||
The HA settings (`ha_peers`, etc.) apply only to communication between alertmanagers, synchronizing silences and attempting to avoid duplicate notifications, as described in the introduction.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also confirm your high availability setup by monitoring Alertmanager metrics exposed by Grafana.
|
||||
|
||||
| Metric | Description |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| alertmanager_cluster_members | Number indicating current number of members in cluster. |
|
||||
| alertmanager_cluster_messages_received_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_received_size_total | Total size of cluster messages received. |
|
||||
| alertmanager_cluster_messages_sent_total | Total number of cluster messages sent. |
|
||||
| alertmanager_cluster_messages_sent_size_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_publish_failures_total | Total number of messages that failed to be published. |
|
||||
| alertmanager_cluster_pings_seconds | Histogram of latencies for ping messages. |
|
||||
| alertmanager_cluster_pings_failures_total | Total number of failed pings. |
|
||||
| alertmanager_peer_position | The position an Alertmanager instance believes it holds, which defines its role in the cluster. Peers should be numbered sequentially, starting from zero. |
|
||||
|
||||
You can confirm the number of Grafana instances in your alerting high availability setup by querying the `alertmanager_cluster_members` and `alertmanager_peer_position` metrics.
|
||||
|
||||
Note that these alerting high availability metrics are exposed via the `/metrics` endpoint in Grafana, and are not automatically collected or displayed. If you have a Prometheus instance connected to Grafana, add a `scrape_config` to scrape Grafana metrics and then query these metrics in Explore.
|
||||
|
||||
```yaml
|
||||
- job_name: grafana
|
||||
honor_timestamps: true
|
||||
scrape_interval: 15s
|
||||
scrape_timeout: 10s
|
||||
metrics_path: /metrics
|
||||
scheme: http
|
||||
follow_redirects: true
|
||||
static_configs:
|
||||
- targets:
|
||||
- grafana:3000
|
||||
```
|
||||
|
||||
For more information on monitoring alerting metrics, refer to [Alerting meta-monitoring](ref:meta-monitoring). For a demo, see [alerting high availability examples using Docker Compose](https://github.com/grafana/alerting-ha-docker-examples/).
|
||||
|
||||
## Prevent duplicate notifications
|
||||
|
||||
In high-availability mode, each Grafana instance runs its own pre-configured alertmanager to handle alert notifications.
|
||||
|
||||
When multiple Grafana instances are running, all alert rules are evaluated on each instance. By default, each instance sends firing alerts to its respective alertmanager. This results in notification handling being duplicated across all running Grafana instances.
|
||||
|
||||
Alertmanagers in HA mode communicate with each other to coordinate notification delivery. However, this setup can sometimes lead to duplicated or out-of-order notifications. By design, HA prioritizes sending duplicate notifications over the risk of missing notifications.
|
||||
|
||||
To avoid duplicate notifications, you can configure a shared alertmanager to manage notifications for all Grafana instances. For more information, refer to [add an external alertmanager](/docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/).
|
||||
|
||||
@@ -45,7 +45,7 @@ Grafana Alerting has the following permissions.
|
||||
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder. |
|
||||
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.silences:create` | `folders:*`<br>`folders:uid:*` | Create rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:read` | `folders:*`<br>`folders:uid:*` | Read general and rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:read` | `folders:*`<br>`folders:uid:*` | Read all general silences and rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:write` | `folders:*`<br>`folders:uid:*` | Update and expire rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and data source are not required. |
|
||||
| `alert.provisioning.secrets:read` | n/a | Same as `alert.provisioning:read` plus ability to export resources with decrypted secrets. |
|
||||
|
||||
@@ -18,22 +18,37 @@ weight: 200
|
||||
|
||||
## Manage access using folders or data sources
|
||||
|
||||
You can further customize access for alert rules by assigning permissions to individual folders or data sources, regardless of role assigned.
|
||||
You can extend the access provided by a role to alert rules and rule-specific silences by assigning permissions to individual folders or data sources.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Data source query permissions are required to create or modify an alert rule using that data source.
|
||||
{{< /admonition >}}
|
||||
|
||||
This allows different users, teams, or service accounts to have customized access to modify or silence alert rules in specific folders or using specific data sources.
|
||||
|
||||
Details on the additional access provided by folder permissions are below.
|
||||
|
||||
| Folder permission | Additional Access |
|
||||
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| View | Read access to all general silences. Read access to alert rules and their rule-specific silences _only_ in the given folder and subfolders. |
|
||||
| Edit | View access and write access to alert rules and their rule-specific silences _only_ in the given folder and subfolders. |
|
||||
| Admin | Same additional access as Edit. |
|
||||
|
||||
Some example combinations:
|
||||
|
||||
| Role | Folder permission | Access |
|
||||
| ------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| No Basic Role | - | None. No access to alert rules or rule-specific silences in the folder. |
|
||||
| No Basic Role | View | Read access to all general silences. Read access to alert rules and their rule-specific silences _only_ in the given folder and subfolders. |
|
||||
| No Basic Role | Edit | Above access and write access to alert rules (given necessary data source query permissions) and their rule-specific silences _only_ in the given folder and subfolders. |
|
||||
| Viewer | - | Read access to alert rules and silences in all folders. |
|
||||
| Viewer | Edit | Read access to alert rules and silences in all folders. Write access to alert rules and their rule-specific silences _only_ in the given folder and subfolders. |
|
||||
| Editor | View | Read and write access to alert rules and silences in all folders. Access can only be extended. |
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
You can't use folders to customize access to notification resources.
|
||||
{{< /admonition >}}
|
||||
|
||||
Details of how role access can combine with folder permissions for Grafana Alerting are below.
|
||||
|
||||
| Role | Folder | Access |
|
||||
| ------ | ------ | ---------------------------------------------------------------------------------------- |
|
||||
| Admin | - | Write access to alert rules in all folders. |
|
||||
| Editor | - | Write access to alert rules in all folders. |
|
||||
| Viewer | Admin | Write access to alert rules **only** in the folders where the Admin permission is added. |
|
||||
| Viewer | Edit | Write access to alert rules **only** in the folders where the Edit permission is added. |
|
||||
| Viewer | View | Read access to alert rules in all folders. |
|
||||
|
||||
## Folder permissions
|
||||
|
||||
To manage folder permissions, complete the following steps.
|
||||
|
||||
@@ -43,19 +43,19 @@ Fixed roles provide users more granular access to create, view, and update Alert
|
||||
|
||||
Details of the fixed roles and the access they provide for Grafana Alerting are below.
|
||||
|
||||
| Fixed role | Permissions | Description |
|
||||
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `fixed:alerting.instances:writer` | All permissions from `fixed:alerting.instances:reader` and<br> `alert.instances:create`<br>`alert.instances:write` for organization scope <br> `alert.instances.external:write` for scope `datasources:*` | Create, update and expire all silences. |
|
||||
| `fixed:alerting.instances:reader` | `alert.instances:read` for organization scope <br> `alert.instances.external:read` for scope `datasources:*` | Read all alerts and silences. |
|
||||
| `fixed:alerting.notifications:writer` | All permissions from `fixed:alerting.notifications:reader` and<br>`alert.notifications:write`for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Create, update, and delete contact points, templates, mute timings and notification policies for Grafana and external Alertmanager. |
|
||||
| `fixed:alerting.notifications:reader` | `alert.notifications:read` for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Read all Grafana and Alertmanager contact points, templates, and notification policies. |
|
||||
| `fixed:alerting.rules:writer` | All permissions from `fixed:alerting.rules:reader` and <br> `alert.rule:create` <br> `alert.rule:write` <br> `alert.rule:delete` <br> `alert.silences:create` <br> `alert.silences:write` for scope `folders:*` <br> `alert.rules.external:write` for scope `datasources:*` | Create, update, and delete all alert rules and manage rule-specific silences. |
|
||||
| `fixed:alerting.rules:reader` | `alert.rule:read`, `alert.silences:read` for scope `folders:*` <br> `alert.rules.external:read` for scope `datasources:*` <br> `alert.notifications.time-intervals:read` <br> `alert.notifications.receivers:list` | Read all alert rules and read rule-specific silences. |
|
||||
| `fixed:alerting:writer` | All permissions from `fixed:alerting.rules:writer` <br>`fixed:alerting.instances:writer`<br>`fixed:alerting.notifications:writer` | Create, update, and delete all alert rules, silences, contact points, templates, mute timings, and notification policies. |
|
||||
| `fixed:alerting:reader` | All permissions from `fixed:alerting.rules:reader` <br>`fixed:alerting.instances:reader`<br>`fixed:alerting.notifications:reader` | Read-only permissions for all alert rules, alerts, contact points, and notification policies. |
|
||||
| `fixed:alerting.provisioning.secrets:reader` | `alert.provisioning:read` and `alert.provisioning.secrets:read` | Read-only permissions for Provisioning API and let export resources with decrypted secrets. |
|
||||
| `fixed:alerting.provisioning:writer` | `alert.provisioning:read` and `alert.provisioning:write` | Create, update and delete Grafana alert rules, notification policies, contact points, templates, etc via provisioning API. |
|
||||
| `fixed:alerting.provisioning.status:writer` | `alert.provisioning.provenance:write` | Set provenance status to alert rules, notification policies, contact points, etc. Should be used together with regular writer roles. |
|
||||
| Display name in UI / Fixed role | Permissions | Description |
|
||||
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Silences Writer: `fixed:alerting.instances:writer` | All permissions from `fixed:alerting.instances:reader` and<br> `alert.instances:create`<br>`alert.instances:write` for organization scope <br> `alert.instances.external:write` for scope `datasources:*` | Add and update silences in Grafana and external providers. |
|
||||
| Instances and Silences Reader: `fixed:alerting.instances:reader` | `alert.instances:read` for organization scope <br> `alert.instances.external:read` for scope `datasources:*` | Read alert instances and silences in Grafana and external providers. |
|
||||
| Notifications Writer: `fixed:alerting.notifications:writer` | All permissions from `fixed:alerting.notifications:reader` and<br>`alert.notifications:write`for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Add, update, and delete notification policies and contact points in Grafana and external providers. |
|
||||
| Notifications Reader: `fixed:alerting.notifications:reader` | `alert.notifications:read` for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Read notification policies and contact points in Grafana and external providers. |
|
||||
| Rules Writer: `fixed:alerting.rules:writer` | All permissions from `fixed:alerting.rules:reader` and <br> `alert.rule:create` <br> `alert.rule:write` <br> `alert.rule:delete` <br> `alert.silences:create` <br> `alert.silences:write` for scope `folders:*` <br> `alert.rules.external:write` for scope `datasources:*` | Create, update, and delete all alert rules and manage rule-specific silences. |
|
||||
| Rules Reader: `fixed:alerting.rules:reader` | `alert.rule:read`, `alert.silences:read` for scope `folders:*` <br> `alert.rules.external:read` for scope `datasources:*` <br> `alert.notifications.time-intervals:read` <br> `alert.notifications.receivers:list` | Read all alert rules and rule-specific silences in Grafana and external providers. |
|
||||
| Full access: `fixed:alerting:writer` | All permissions from `fixed:alerting.rules:writer` <br>`fixed:alerting.instances:writer`<br>`fixed:alerting.notifications:writer` | Add, update, and delete alert rules, silences, contact points, and notification policies in Grafana and external providers. |
|
||||
| Full read-only access: `fixed:alerting:reader` | All permissions from `fixed:alerting.rules:reader` <br>`fixed:alerting.instances:reader`<br>`fixed:alerting.notifications:reader` | Read alert rules, alert instances, silences, contact points, and notification policies in Grafana and external providers. |
|
||||
| Read via Provisioning API + Export Secrets: `fixed:alerting.provisioning.secrets:reader` | `alert.provisioning:read` and `alert.provisioning.secrets:read` | Read alert rules, alert instances, silences, contact points, and notification policies using the provisioning API and use export with decrypted secrets. |
|
||||
| Access to alert rules provisioning API: `fixed:alerting.provisioning:writer` | `alert.provisioning:read` and `alert.provisioning:write` | Manage all alert rules, notification policies, contact points, templates, in the organization using the provisioning API. |
|
||||
| Set provisioning status: `fixed:alerting.provisioning.status:writer` | `alert.provisioning.provenance:write` | Set provisioning rules for Alerting resources. Should be used together with other regular roles (Notifications Writer and/or Rules Writer.) |
|
||||
|
||||
## Create custom roles
|
||||
|
||||
|
||||
@@ -42,19 +42,17 @@ To assign roles, admins need to complete the following steps.
|
||||
|
||||
## Manage access using folder permissions
|
||||
|
||||
You can further customize access for alert rules by assigning permissions to individual folders.
|
||||
You can extend the access provided by a role to alert rules and rule-specific silences by assigning permissions to individual folders.
|
||||
|
||||
This prevents every user from having access to modify all alert rules and gives them access to the folders with the alert rules they're working on.
|
||||
This allows different users, teams, or service accounts to have customized access to modify or silence alert rules in specific folders.
|
||||
|
||||
Details on the adding folder permissions as well as roles and the access that provides for Grafana Alerting is below.
|
||||
Refer to the following table for details on the additional access provided by folder permissions:
|
||||
|
||||
| Role | Folder permission | Access |
|
||||
| ------ | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Admin | - | Write access to alert rules in all folders. |
|
||||
| Editor | - | Write access to alert rules in all folders. |
|
||||
| Viewer | Admin | Read access to alert rules in all folders. Write access to alert rules **only** in the folders where the Admin permission is added. |
|
||||
| Viewer | Editor | Read access to alert rules in all folders. Write access to alert rules **only** in the folders where the Editor permission is added. |
|
||||
| Viewer | Viewer | Read access to alert rules in all folders. |
|
||||
| Folder permission | Additional Access |
|
||||
| ----------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| View | No additional access: all permissions already contained in Viewer role. |
|
||||
| Edit | Write access to alert rules and their rule-specific silences _only_ in the given folder and subfolders. |
|
||||
| Admin | Same additional access as Edit. |
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
You can't use folders to customize access to notification resources.
|
||||
|
||||
@@ -81,7 +81,7 @@ Grafana legacy alerting (dashboard alerts) has been deprecated since Grafana v9.
|
||||
|
||||
#### Migration path
|
||||
|
||||
The new Grafana Alerting was introduced in Grafana 8 and is a superset of legacy alerting. Learn how to migrate your alerts in the [Upgrade Alerting documentation]({{< relref "./v10.4/alerting/set-up/migrating-alerts/" >}}).
|
||||
The new Grafana Alerting was introduced in Grafana 8 and is a superset of legacy alerting. Learn how to migrate your alerts in the [Upgrade Alerting documentation](https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts/).
|
||||
|
||||
### API keys are migrating to service accounts
|
||||
|
||||
|
||||
@@ -17,46 +17,56 @@ title: Dashboard URL variables
|
||||
description: Use variables in dashboard URLs to add more context to your links
|
||||
weight: 250
|
||||
refs:
|
||||
add-ad-hoc-filters:
|
||||
ad-hoc-filters:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#add-ad-hoc-filters
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#add-ad-hoc-filters
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/add-template-variables/#add-ad-hoc-filters
|
||||
manage-dashboard-links:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/manage-dashboard-links/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/manage-dashboard-links/
|
||||
linking-overview:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
|
||||
template-and-variables:
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/manage-dashboard-links/
|
||||
variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/
|
||||
---
|
||||
|
||||
# Dashboard URL variables
|
||||
|
||||
Grafana can apply variable values passed as query parameters in dashboard URLs.
|
||||
For more information, refer to [Manage dashboard links](ref:manage-dashboard-links) and [Templates and variables][].
|
||||
Dashboard URL [variables](ref:variables) allow you to provide more context when you share a dashboard URL.
|
||||
|
||||
## Passing variables as query parameters
|
||||
For example, you could share a basic URL to your dashboard that looks like this:
|
||||
|
||||
Grafana interprets query string parameters prefixed with `var-` as variables in the given dashboard.
|
||||
```
|
||||
https://${your-domain}/path/to/your/dashboard
|
||||
```
|
||||
|
||||
For example, in this URL:
|
||||
This allows someone to navigate to the dashboard, but doesn't provide any helpful context that might be available.
|
||||
|
||||
Instead, you can add dashboard variables, passed as query parameters in the dashboard URL, to provide a URL like this:
|
||||
|
||||
```
|
||||
https://${your-domain}/path/to/your/dashboard?var-example=value
|
||||
```
|
||||
|
||||
The query parameter `var-example=value` represents the dashboard variable `example` with a value of `value`.
|
||||
This allows you to provide added context to the dashboard when someone navigates to it.
|
||||
|
||||
### Passing multiple values for a variable
|
||||
## Variables as query parameters
|
||||
|
||||
Grafana interprets query string parameters prefixed with `var-` as variables in the given dashboard.
|
||||
|
||||
For example:
|
||||
|
||||
```
|
||||
https://${your-domain}/path/to/your/dashboard?var-example=value
|
||||
```
|
||||
|
||||
In this URL, the query parameter `var-example=value` represents the dashboard variable `example` with a value of `value`.
|
||||
|
||||
### Multiple values for a variable
|
||||
|
||||
To pass multiple values, repeat the variable parameter once for each value:
|
||||
|
||||
@@ -68,34 +78,38 @@ Grafana interprets `var-example=value1&var-example=value2` as the dashboard vari
|
||||
|
||||
### Example
|
||||
|
||||
This example in [Grafana Play](https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1h) passes the variable `server` with multiple values, and the variables `app` and `interval` with a single value each.
|
||||
[This dashboard in Grafana Play](https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1h) passes the variable `server` with multiple values, and the variables `app` and `interval` with a single value each.
|
||||
|
||||
## Adding variables to dashboard links
|
||||
## Ad hoc filters
|
||||
|
||||
Grafana can add variables to dashboard links when you generate them from a dashboard's settings. For more information and steps to add variables, refer to [Manage dashboard links](ref:manage-dashboard-links).
|
||||
Ad hoc filters apply key/value filters to all metric queries that use the specified data source. For more information, refer to [Add ad hoc filters](ref:ad-hoc-filters).
|
||||
|
||||
## Passing ad hoc filters
|
||||
To pass an ad hoc filter as a query parameter, use the variable syntax to pass the ad hoc filter variable. Then provide the key, operator, and value as a pipe-separated list.
|
||||
|
||||
Ad hoc filters apply key/value filters to all metric queries that use a specified data source. For more information, refer to [Add ad hoc filters](ref:add-ad-hoc-filters).
|
||||
|
||||
To pass an ad hoc filter as a query parameter, use the variable syntax to pass the ad hoc filter variable, and also provide the key, the operator as the value, and the value as a pipe-separated list.
|
||||
|
||||
For example, in this URL:
|
||||
For example:
|
||||
|
||||
```
|
||||
https://${your-domain}/path/to/your/dashboard?var-adhoc=example_key|=|example_value
|
||||
```
|
||||
|
||||
The query parameter `var-adhoc=key|=|value` applies the ad hoc filter configured as the `adhoc` dashboard variable using the `example_key` key, the `=` operator, and the `example_value` value.
|
||||
In this URL, the query parameter `var-adhoc=key|=|value` applies the ad hoc filter configured as the `adhoc` dashboard variable using the `example_key` key, the `=` operator, and the `example_value` value.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
When sharing URLs with ad hoc filters, remember to encode the URL. In the above example, replace the pipes (`|`) with `%7C` and the equality operator (`=`) with `%3D`.
|
||||
{{% /admonition %}}
|
||||
{{< admonition type="note" >}}
|
||||
When sharing URLs with ad hoc filters, remember to encode the URL. In the preceding example, replace the pipes (`|`) with `%7C` and the equality operator (`=`) with `%3D`.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Example
|
||||
|
||||
[This example in Grafana Play](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica) passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
|
||||
[This dashboard in Grafana Play](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica) passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
|
||||
|
||||
## Controlling time range using the URL
|
||||
## Time range control using the URL
|
||||
|
||||
To set a dashboard's time range, use the `from`, `to`, `time`, and `time.window` query parameters. Because these are not variables, they do not require the `var-` prefix. For more information, see the [Linking overview](ref:linking-overview).
|
||||
{{< docs/shared lookup="dashboards/time-range-URLs.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Variables in dashboard links
|
||||
|
||||
When you create dashboard links the dashboard settings, you can have current dashboard variables included in the link by selecting that option:
|
||||
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-link-variables-11.1.png" max-width="500px" alt="Dashboard link page with variables option selected" >}}
|
||||
|
||||
For steps to add variables to dashboard links, refer to [Manage dashboard links](ref:manage-dashboard-links).
|
||||
|
||||
@@ -57,7 +57,6 @@ In the following JSON, id is shown as null which is the default value assigned t
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"time_options": [],
|
||||
"refresh_intervals": []
|
||||
},
|
||||
"templating": {
|
||||
@@ -136,17 +135,6 @@ The grid has a negative gravity that moves panels up if there is empty space abo
|
||||
"now": true,
|
||||
"hidden": false,
|
||||
"nowDelay": "",
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
],
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
@@ -174,7 +162,6 @@ Usage of the fields is explained below:
|
||||
| **now** | |
|
||||
| **hidden** | whether timepicker is hidden or not |
|
||||
| **nowDelay** | override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values. |
|
||||
| **time_options** | options available in the time picker dropdown |
|
||||
| **refresh_intervals** | interval options available in the refresh picker dropdown |
|
||||
| **status** | |
|
||||
| **type** | |
|
||||
|
||||
@@ -26,6 +26,10 @@ Grafana automatically scales dashboards to any resolution, which makes them perf
|
||||
|
||||
You can access the Playlist feature from Grafana's side menu, in the Dashboards submenu.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
You must have at least Editor role permissions to create and manage playlists.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Access, share, and control a playlist
|
||||
|
||||
Use the information in this section to access existing playlists. Start and control the display of a playlist using one of the five available modes.
|
||||
|
||||
@@ -76,9 +76,9 @@ refs:
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/use-dashboards/#set-dashboard-time-range
|
||||
send-report:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/reporting/#send-a-report
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/reporting/#send-a-report
|
||||
smtp:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#smtp
|
||||
@@ -129,6 +129,7 @@ Only organization administrators can create reports by default. You can customiz
|
||||
- If you selected the PDF format option:
|
||||
- Select an orientation for the report: **Portrait** or **Landscape**.
|
||||
- Select a layout for the generated report: **Simple** or **Grid**. The simple layout renders each panel as full-width across the PDF. The grid layout renders the PDF with the same panel arrangement and width as the source dashboard.
|
||||
- Select a zoom level for the report. Zoom in to enlarge text in your PDF, or zoom out to see more data (like table columns) per panel.
|
||||
- Click **Preview PDF** to view a rendered PDF with the options you selected.
|
||||
1. Schedule report.
|
||||
- Enter scheduling information. Options vary depending on the frequency selected.
|
||||
@@ -334,11 +335,11 @@ You can customize the branding options.
|
||||
|
||||
Report branding:
|
||||
|
||||
- **Company logo:** Company logo displayed in the report PDF. It can be configured by specifying a URL, or by uploading a file. Defaults to the Grafana logo.
|
||||
- **Company logo:** Company logo displayed in the report PDF. It can be configured by specifying a URL, or by uploading a file. The maximum file size is 16 MB. Defaults to the Grafana logo.
|
||||
|
||||
Email branding:
|
||||
|
||||
- **Company logo:** Company logo displayed in the report email. It can be configured by specifying a URL, or by uploading a file. Defaults to the Grafana logo.
|
||||
- **Company logo:** Company logo displayed in the report email. It can be configured by specifying a URL, or by uploading a file. The maximum file size is 16 MB. Defaults to the Grafana logo.
|
||||
- **Email footer:** Toggle to enable the report email footer. Select **Sent by** or **None**.
|
||||
- **Footer link text:** Text of the link in the report email footer. Defaults to `Grafana`.
|
||||
- **Footer link URL:** Link of the report email footer.
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
---
|
||||
aliases:
|
||||
- ../features/dashboard/dashboards/
|
||||
- dashboard-manage/
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
aliases:
|
||||
- ../features/dashboard/dashboards/
|
||||
- ../panels/working-with-panels/organize-dashboard/
|
||||
- ../reference/dashboard_folders/
|
||||
- dashboard-folders/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
aliases:
|
||||
- ../features/dashboard/dashboards/
|
||||
- ../reference/search/
|
||||
- dashboard-ui/
|
||||
- dashboard-ui/dashboard-header/
|
||||
@@ -241,8 +240,4 @@ Selecting the **Auto** interval schedules a refresh based on the query time rang
|
||||
|
||||
### Control the time range using a URL
|
||||
|
||||
You can control the time range of a dashboard by providing the following query parameters in the dashboard URL:
|
||||
|
||||
- `from`: Defines the lower limit of the time range, specified in `ms`, `epoch`, or [relative time](#relative-time-range)
|
||||
- `to`: Defines the upper limit of the time range, specified in `ms`, `epoch`, or [relative time](#relative-time-range)
|
||||
- `time` and `time.window`: Defines a time range from `time-time.window/2` to `time+time.window/2`. Both parameters should be specified in `ms`. For example `?time=1500000000000&time.window=10000` results in 10s time range from 1499999995000 to 1500000005000
|
||||
{{< docs/shared lookup="dashboards/time-range-URLs.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
@@ -223,7 +223,7 @@ groupByNode(summarize(movingAverage(apps.$app.$server.counters.requests.count, 5
|
||||
_Ad hoc filters_ enable you to add key/value filters that are automatically added to all metric queries that use the specified data source. Unlike other variables, you do not use ad hoc filters in queries. Instead, you use ad hoc filters to write filters for existing queries.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Ad hoc filter variables only work with Prometheus, Loki, InfluxDB, and Elasticsearch data sources.
|
||||
Not all data sources support ad hoc filters. Examples of those that do include Prometheus, Loki, InfluxDB, and Elasticsearch.
|
||||
{{% /admonition %}}
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
|
||||
@@ -76,7 +76,7 @@ Once you've added the Loki data source, you can [configure it](#configure-the-da
|
||||
To troubleshoot configuration and other issues, check the log file located at `/var/log/grafana/grafana.log` on Unix systems, or in `<grafana_install_dir>/data/log` on other platforms and manual installations.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Provision the Loki data source
|
||||
## Provision the data source
|
||||
|
||||
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
||||
For more information about provisioning, and for available configuration options, refer to [Provisioning Grafana](ref:provisioning-data-sources).
|
||||
|
||||
@@ -171,6 +171,8 @@ The following options are the same for both **Builder** and **Code** mode:
|
||||
|
||||
- **Line limit** -Defines the upper limit for the number of log lines returned by a query. The default is `1000`
|
||||
|
||||
- **Direction** - Determines the search order. **Backward** is a backward search starting at the end of the time range. **Forward** is a forward search starting at the beginning of the time range. The default is **Backward**
|
||||
|
||||
- **Step** Sets the step parameter of Loki metrics queries. The default value equals to the value of `$__interval` variable, which is calculated using the time range and the width of the graph (the number of pixels).
|
||||
|
||||
- **Resolution** Deprecated. Sets the step parameter of Loki metrics range queries. With a resolution of `1/1`, each pixel corresponds to one data point. `1/2` retrieves one data point for every other pixel, `1/10` retrieves one data point per 10 pixels, and so on. Lower resolutions perform better.
|
||||
|
||||
@@ -247,6 +247,10 @@ The resulting table panel:
|
||||
|
||||
## Use time series queries
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Store timestamps in UTC to avoid issues with time shifts in Grafana when using non-UTC timezones.
|
||||
{{< /admonition >}}
|
||||
|
||||
If you set the **Format** setting in the query editor to **Time series**, then the query must have a column named `time` that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds.
|
||||
Result sets of time series queries must also be sorted by time for panels to properly visualize the result.
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ For instructions on how to add a data source to Grafana, refer to the [administr
|
||||
Only users with the organization administrator role can add data sources.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
{{< docs/play title="MySQL: Cities of the World Sample Data Set" url="https://play.grafana.org/d/8JOvPQr7k/" >}}
|
||||
{{< docs/play title="MySQL Overview" url="https://play.grafana.org/d/edyh1ib7db6rkb/mysql-overview" >}}
|
||||
|
||||
## Configure the data source
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ For instructions on how to add a data source to Grafana, refer to the [administr
|
||||
Only users with the organization `administrator` role can add data sources and edit existing data sources.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
Once you've added the Prometheus data source, you can [configure it](ref:configure-prometheus-data-source) so that your Grafana instance's users can create queries in its [query editor]({{< relref "./query-editor" >}}) when they [build dashboards](ref:build-dashboards), use [Explore](ref:explore), and [annotate visualizations][annotate visualizations].
|
||||
Once you've added the Prometheus data source, you can [configure it](ref:configure-prometheus-data-source) so that your Grafana instance's users can create queries in its [query editor]({{< relref "./query-editor" >}}) when they [build dashboards](ref:build-dashboards), use [Explore](ref:explore), and [annotate visualizations](ref:annotate-visualizations).
|
||||
|
||||
The following guides will help you get started with the Prometheus data source:
|
||||
|
||||
@@ -152,10 +152,10 @@ We also bundle a dashboard within Grafana so you can start viewing your metrics
|
||||
|
||||
**To import the bundled dashboard:**
|
||||
|
||||
1. Navigate to the data source's [configuration page](#configure-the-data-source).
|
||||
1. Navigate to the data source's [configuration page](ref:configure-prometheus-data-source).
|
||||
1. Select the **Dashboards** tab.
|
||||
|
||||
This displays dashboards for Grafana and Prometheus.
|
||||
This displays dashboards for Grafana and Prometheus.
|
||||
|
||||
1. Select **Import** for the dashboard to import.
|
||||
|
||||
|
||||
@@ -63,15 +63,19 @@ The first option to configure is the name of your connection:
|
||||
|
||||
- **Default** - Toggle to select as the default name in dashboard panels. When you go to a dashboard panel this will be the default selected data source.
|
||||
|
||||
### HTTP section
|
||||
### Connection section
|
||||
|
||||
- **URL** - The URL of your Prometheus server. If your Prometheus server is local, use `<http://localhost:9090>`. If it is on a server within a network, this is the URL with port where you are running Prometheus. Example: `<http://prometheus.example.orgname:9090>`.
|
||||
- **Prometheus server URL** - The URL of your Prometheus server. If your Prometheus server is local, use `http://localhost:9090`. If it is on a server within a network, this is the URL with port where you are running Prometheus. Example: `http://prometheus.example.orgname:9090`.
|
||||
|
||||
- **Allowed cookies** - Specify cookies by name that should be forwarded to the data source. The Grafana proxy deletes all forwarded cookies by default.
|
||||
{{< admonition type="note" >}}
|
||||
|
||||
- **Timeout** - The HTTP request timeout. This must be in seconds. There is no default, so this setting is up to you.
|
||||
If you're running Grafana and Prometheus together in different container environments, each localhost refers to its own container - if the server URL is localhost:9090, that means port 9090 inside the Grafana container, not port 9090 on the host machine.
|
||||
|
||||
### Auth section
|
||||
You should use the IP address of the Prometheus container, or the hostname if you are using Docker Compose. Alternatively, you can consider `http://host.docker.internal:9090`.
|
||||
|
||||
{{< /admonition >}}
|
||||
|
||||
### Authentication section
|
||||
|
||||
There are several authentication methods you can choose in the Authentication section.
|
||||
|
||||
@@ -99,10 +103,16 @@ Use TLS (Transport Layer Security) for an additional layer of security when work
|
||||
|
||||
- **Value** - The value of the header.
|
||||
|
||||
## Additional settings
|
||||
## Advanced settings
|
||||
|
||||
Following are additional configuration options.
|
||||
|
||||
### Advanced HTTP settings
|
||||
|
||||
- **Allowed cookies** - Specify cookies by name that should be forwarded to the data source. The Grafana proxy deletes all forwarded cookies by default.
|
||||
|
||||
- **Timeout** - The HTTP request timeout. This must be in seconds. The default is 30 seconds.
|
||||
|
||||
### Alerting
|
||||
|
||||
- **Manage alerts via Alerting UI** - Toggle to enable `Alertmanager` integration for this data source.
|
||||
@@ -121,12 +131,14 @@ Following are additional configuration options.
|
||||
|
||||
### Performance
|
||||
|
||||
- **Prometheus type** - The type of your Prometheus server. There are four options: `Prometheus`, `Cortex`, `Thanos`, `Mimir`.
|
||||
- **Prometheus type** - The type of your Prometheus server. There are four options: `Prometheus`, `Cortex`, `Mimir`, and `Thanos`.
|
||||
|
||||
- **Version** Select the version you are using. Once the Prometheus type has been selected, a list of versions auto-populates using the Prometheus [buildinfo](https://semver.org/) API. The `Cortex` Prometheus type does not support this API so you will need to manually add the version.
|
||||
- **Cache level** - The browser caching level for editor queries. There are four options: `Low`, `Medium`, `High`, or `None`.
|
||||
|
||||
- **Incremental querying (beta)** - Changes the default behavior of relative queries to always request fresh data from the Prometheus instance. Enable this option to decrease database and network load.
|
||||
|
||||
- **Disable recording rules (beta)** - Toggle on to disable the recording rules. Enable this option to improve dashboard performance.
|
||||
|
||||
### Other
|
||||
|
||||
- **Custom query parameters** - Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'.
|
||||
|
||||
@@ -21,24 +21,24 @@ weight: 1150
|
||||
refs:
|
||||
flame-graph:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/flame-graph/
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/flame-graph/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/flame-graph/
|
||||
destination: https://grafana.com/docs/grafana-cloud/visualizations/panels-visualizations/visualizations/flame-graph/
|
||||
configure-tempo-data-source:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/
|
||||
destination: https://grafana.com/docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/
|
||||
explore:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
provisioning-data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#datasources
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#datasources
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#datasources
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#datasources
|
||||
---
|
||||
|
||||
# Grafana Pyroscope data source
|
||||
@@ -73,9 +73,9 @@ For more information, refer to the [Traces to profile section](ref:configure-tem
|
||||
|
||||
{{< youtube id="AG8VzfFMLxo" >}}
|
||||
|
||||
## Provision the Grafana Pyroscope data source
|
||||
## Provision the Pyroscope data source
|
||||
|
||||
You can modify the Grafana configuration files to provision the Grafana Pyroscope data source.
|
||||
You can modify the Grafana configuration files to provision the Pyroscope data source.
|
||||
To learn more, and to view the available provisioning settings, refer to [provisioning documentation](ref:provisioning-data-sources).
|
||||
|
||||
Here is an example configuration:
|
||||
|
||||
@@ -42,16 +42,89 @@ To configure basic settings for the data source, complete the following steps:
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Grafana Pyroscope` in the search bar.
|
||||
1. Select **Add new data source**.
|
||||
1. Click **Grafana Pyroscope** to display the **Settings** tab of the data source.
|
||||
1. Set the data source's basic configuration options.
|
||||
1. Select **Save & test**.
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
## Configuration options
|
||||
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Name` | A name to specify the data source in panels, queries, and Explore. |
|
||||
| `Default` | The default data source will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Grafana Pyroscope instance, for example, `http://localhost:4100`. |
|
||||
| `Basic Auth` | Enable basic authentication to the data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
| `Minimal step` | Used for queries returning timeseries data. The Pyroscope backend, similar to Prometheus, scrapes profiles at certain intervals. To prevent querying at smaller interval, use Minimal step same or higher than your Pyroscope scrape interval. This prevents returning too many data points to the frontend. |
|
||||
You can configure several options for the Pyroscope data source, including the name, HTTP, authentication, querying, and private data source connect.
|
||||
|
||||
If you make any changes, select **Save & test** to preserve those changes.
|
||||
|
||||

|
||||
|
||||
### Name and default
|
||||
|
||||
**Name**
|
||||
: Enter a name to specify the data source in panels, queries, and Explore.
|
||||
|
||||
**Default**
|
||||
: The default data source is pre-selected for new panels.
|
||||
|
||||
### HTTP
|
||||
|
||||
The HTTP section is shown in number 1 in the screenshot.
|
||||
|
||||
**URL**
|
||||
: The URL of the Grafana Pyroscope instance, for example, `https://localhost:4100`.
|
||||
|
||||
**Allowed cookies**
|
||||
: The Grafana Proxy deletes forwarded cookies. Use this field to specify cookies by name that should be forwarded to the data source.
|
||||
|
||||
**Timeout**
|
||||
: HTTP request timeout in seconds.
|
||||
|
||||
### Auth
|
||||
|
||||
The Auth section is shown in number 2 in the screenshot.
|
||||
|
||||
**Basic auth**
|
||||
: Enable basic authentication to the data source. When activated, it provides **User** and **Password** fields.
|
||||
|
||||
**With Credentials**
|
||||
: Whether credentials, such as cookies or auth headers, should be sent with cross-site requests.
|
||||
|
||||
**TLS Client Auth**
|
||||
: Toggle on to use client authentication. When enabled, it adds the **Server name**, **Client cert**, and **Client key** fields. The client provides a certificate that is validated by the server to establish the client's trusted identity. The client key encrypts the data between client and server. These details are encrypted and stored in the Grafana database.
|
||||
|
||||
**With CA Cert**
|
||||
: Activate this option to verify self-signed TLS certificates.
|
||||
|
||||
**Skip TLS Verify**
|
||||
: When activated, it bypasses TLS certificate verification.
|
||||
|
||||
**Forward OAuth Identity**
|
||||
: When activated, the user’s upstream OAuth 2.0 identity is forwarded to the data source along with their access token.
|
||||
|
||||
**Custom HTTP Headers**
|
||||
: Select Add header to add Header and Value fields.
|
||||
|
||||
**Header**
|
||||
: Add a custom header. This allows custom headers to be passed based on the needs of your Pyroscope instance.
|
||||
|
||||
**Value**
|
||||
: The value of the header.
|
||||
|
||||
### Querying
|
||||
|
||||
The **Querying** section is shown in number 3 in the screenshot.
|
||||
|
||||
**Minimum step** is used for queries returning time-series data. The default value is 15 seconds.
|
||||
|
||||
Adjusting this option can help prevent gaps when you zoom in to profiling data.
|
||||
|
||||
### Private data source connect
|
||||
|
||||
The **Private data source connect** section is shown in number 4 in the screenshot.
|
||||
|
||||
This feature is only available in Grafana Cloud.
|
||||
|
||||
This option lets you query data that lives within a secured network without opening the network to inbound traffic from Grafana Cloud.
|
||||
|
||||
Use the drop-down box to select a configured private data sources.
|
||||
|
||||
Select **Manage private data source connect** to configure and manage any private data sources you have configured.
|
||||
|
||||
For more information, refer to [Private data source connect](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/).
|
||||
|
||||
@@ -31,22 +31,22 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/node-graph/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/node-graph/
|
||||
destination: https://grafana.com/docs/grafana-cloud/visualizations/panels-visualizations/visualizations/node-graph/
|
||||
configure-tempo-data-source:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/#provision-the-data-source
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/#provision-the-data-source
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/#provision-the-data-source
|
||||
destination: https://grafana.com/docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/
|
||||
exemplars:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/fundamentals/exemplars/
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/fundamentals/exemplars/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/fundamentals/exemplars/
|
||||
destination: https://grafana.com/docs/grafana/<GRAFANA_VERSION>/fundamentals/exemplars/
|
||||
variable-syntax:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/variable-syntax/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/variable-syntax/
|
||||
destination: https://grafana.com/docs/grafana-cloud/visualizations/dashboards/variables/variable-syntax/
|
||||
explore-trace-integration:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/trace-integration/
|
||||
|
||||
@@ -84,9 +84,9 @@ This video explains how to add data sources, including Loki, Tempo, and Mimir, t
|
||||
|
||||
## Trace to logs
|
||||
|
||||

|
||||
The **Trace to logs** setting configures [trace to logs](ref:explore-trace-integration) that's available when you integrate Grafana with Tempo.
|
||||
|
||||
The **Trace to logs** setting configures the [trace to logs feature](ref:explore-trace-integration) that is available when you integrate Grafana with Tempo.
|
||||

|
||||
|
||||
There are two ways to configure the trace to logs feature:
|
||||
|
||||
@@ -100,8 +100,9 @@ There are two ways to configure the trace to logs feature:
|
||||
You can also click **Open advanced data source picker** to see more options, including adding a data source.
|
||||
|
||||
1. Set start and end time shift. As the logs timestamps may not exactly match the timestamps of the spans in trace it may be necessary to search in larger or shifted time range to find the desired logs.
|
||||
1. Select which tags to use in the logs query. The tags you configure must be present in the span's attributes or resources for a trace to logs span link to appear. You can optionally configure a new name for the tag. This is useful, for example, if the tag has dots in the name and the target data source does not allow using dots in labels. In that case, you can for example remap `http.status` (the span attribute) to `http_status` (the data source field). "Data source" in this context can refer to Loki, or another log data source.
|
||||
1. Optionally switch on the **Filter by trace ID** and/or **Filter by span ID** setting to further filter the logs if your logs consistently contain trace or span IDs.
|
||||
1. Select which tags to use in the logs query.
|
||||
The tags you configure must be present in the span's attributes or resources for a trace to logs span link to appear. You can optionally configure a new name for the tag. This is useful, for example, if the tag has dots in the name and the target data source does not allow using dots in labels. In that case, you can for example remap `http.status` (the span attribute) to `http_status` (the data source field). "Data source" in this context can refer to Loki, or another log data source.
|
||||
1. Optional: If your logs consistently trace or span IDs, you can use one or both of the **Filter by trace ID** and **Filter by span ID** settings.
|
||||
|
||||
### Configure a custom query
|
||||
|
||||
@@ -141,19 +142,33 @@ There are two ways to configure the trace to metrics feature:
|
||||
- Use a basic configuration with a default query, or
|
||||
- Configure one or more custom queries where you can use a [template language](ref:variable-syntax) to interpolate variables from the trace or span.
|
||||
|
||||
### Simple config
|
||||
Refer to the Trace to metrics configuration options section to learn about the available options.
|
||||
|
||||
### Set up a simple configuration
|
||||
|
||||
To use a simple configuration, follow these steps:
|
||||
|
||||
1. Select a metrics data source from the **Data source** drop-down.
|
||||
1. Optional: Change **Span start time shift** and **Span end time shift**. You can change one or both of these settings. The default start time shift is -2 minutes and 2 minutes for end time shift.
|
||||
1. Optional: Choose any tags to use in the query. If left blank, the default values of `cluster`, `hostname`, `namespace`, `pod`, `service.name` and `service.namespace` are used.
|
||||
|
||||
The tags you configure must be present in the spans attributes or resources for a trace to metrics span link to appear. You can optionally configure a new name for the tag. This is useful for example if the tag has dots in the name and the target data source doesn't allow using dots in labels. In that case you can for example remap `service.name` to `service_name`.
|
||||
|
||||
1. Do not select **Add query**.
|
||||
1. Don't select **Add query**.
|
||||
1. Select **Save and Test**.
|
||||
|
||||
### Custom queries
|
||||
### Set up custom queries
|
||||
|
||||
To use custom queries, you need to configure the tags you’d like to include in the linked queries.
|
||||
For each tag, the key is the span attribute name.
|
||||
In cases where the attribute name would result in an invalid metrics query or doesn’t exactly match the desired label name, you can enter the label name as the second value.
|
||||
For example, you could map the attribute `k8s.pod` to the label `pod`.
|
||||
|
||||
You can interpolate the configured tags using the `$__tags` keyword.
|
||||
For example, when you configure the query `requests_total{$__tags}` with the tags `k8s.pod=pod` and `cluster`, it results in `requests_total{pod="nginx-554b9", cluster="us-east-1"}`.
|
||||
The label values are dynamically inserted based on the span attributes’ values.
|
||||
|
||||
You can link to any metric you’d like, but metrics for span durations, counts, and errors filtered by service or span are a great starting point.
|
||||
|
||||
To use custom queries with the configuration, follow these steps:
|
||||
|
||||
@@ -174,7 +189,7 @@ To use custom queries with the configuration, follow these steps:
|
||||
|
||||
1. Select **Save and Test**.
|
||||
|
||||
### Configure trace to metrics
|
||||
### Trace to metrics configuration options
|
||||
|
||||
| Setting name | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@@ -273,8 +288,8 @@ datasources:
|
||||
# Field with an internal link pointing to a logs data source in Grafana.
|
||||
# datasourceUid value must match the uid value of the logs data source.
|
||||
datasourceUid: 'loki'
|
||||
spanStartTimeShift: '1h'
|
||||
spanEndTimeShift: '-1h'
|
||||
spanStartTimeShift: '-1h'
|
||||
spanEndTimeShift: '1h'
|
||||
tags: ['job', 'instance', 'pod', 'namespace']
|
||||
filterByTraceID: false
|
||||
filterBySpanID: false
|
||||
|
||||
@@ -72,7 +72,7 @@ You use the Service Graph to detect performance issues; track increases in error
|
||||
|
||||
## Display the Service Graph
|
||||
|
||||
1. [Configure Grafana Agent](/docs/tempo/latest/configuration/grafana-agent/) or [Tempo or GET](/docs/tempo/latest/metrics-generator/service_graphs/#tempo) to generate Service Graph data.
|
||||
1. [Configure Grafana Alloy](https://grafana.com/docs/tempo/latest/configuration/grafana-alloy/) or [Tempo or GET](https://grafana.com/docs/tempo/latest/metrics-generator/service_graphs/#tempo) to generate Service Graph data.
|
||||
1. Link a Prometheus data source in the Tempo data source's [Service Graph]({{< relref "./configure-tempo-data-source#configure-service-graph" >}}) settings.
|
||||
1. Navigate to [Explore](ref:explore).
|
||||
1. Select the Tempo data source.
|
||||
|
||||
@@ -61,7 +61,12 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
|
||||
---
|
||||
|
||||
# Span Filters
|
||||
# Span filters
|
||||
|
||||
When working with traces, especially those comprising a vast number of spans, pinpointing specific spans of interest can be a daunting task.
|
||||
This is where span filtering comes in.
|
||||
Located above the trace view, span filters allow you to refine the spans displayed based on specific criteria.
|
||||
Whether you’re looking to identify spans from a certain service, those exceeding a particular duration, or spans tagged with specific attributes, span filtering streamlines the process.
|
||||
|
||||
Using span filters, you can filter your spans in the trace timeline viewer. The more filters you add, the more specific are the filtered spans.
|
||||
|
||||
@@ -74,6 +79,27 @@ You can add one or more of the following filters:
|
||||
- Duration
|
||||
- Tags (which include tags, process tags, and log fields)
|
||||
|
||||
To only show the spans you have matched, select the `Show matches only` toggle.
|
||||
{{< youtube id="VP2XV3IIc80" >}}
|
||||
|
||||
<!-- Adding these in case they are needed. -->
|
||||
## Use span filters
|
||||
|
||||
You can access span filters from within the trace view. You can add one or more filters.
|
||||
The more filters you add, the more specific data that you are filtering.
|
||||
|
||||
1. Expand a trace to view individual spans.
|
||||
1. Select a span to view the span details.
|
||||
1. Select **Span Filters** to display the available filters.
|
||||
|
||||

|
||||
|
||||
Query results in the span view update as you select filters.
|
||||
|
||||
### Show matches only
|
||||
|
||||
For a more focused view, the **Show matches only** toggle ensures only the spans meeting your criteria are displayed. This is particularly useful when sifting through thousands of spans, allowing you to zero in on those that truly matter.
|
||||
For instance, if you’re keen on understanding why a specific request is lagging, or if you’re on the hunt for spans without a certain tag, span filtering is your go-to tool.
|
||||
It even lets you search for spans based on specific tag keys, like cluster.
|
||||
|
||||
### Remove a filter
|
||||
|
||||
To remove a filter, select the **X** next to the line item.
|
||||
|
||||
@@ -80,40 +80,41 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
- [Admin API]({{< relref "admin/" >}})
|
||||
- [Alerting API (unstable)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json)
|
||||
- [Alerting Provisioning API]({{< relref "alerting_provisioning/" >}})
|
||||
- [Alerting provisioning API]({{< relref "alerting_provisioning/" >}})
|
||||
- [Annotations API]({{< relref "annotations/" >}})
|
||||
- [Correlations API]({{< relref "correlations/" >}})
|
||||
- [Dashboard API]({{< relref "dashboard/" >}})
|
||||
- [Dashboard Permissions API]({{< relref "dashboard_permissions/" >}})
|
||||
- [Dashboard Versions API]({{< relref "dashboard_versions/" >}})
|
||||
- [Dashboard permissions API]({{< relref "dashboard_permissions/" >}})
|
||||
- [Dashboard versions API]({{< relref "dashboard_versions/" >}})
|
||||
- [Data source API]({{< relref "data_source/" >}})
|
||||
- [Folder API]({{< relref "folder/" >}})
|
||||
- [Folder Permissions API]({{< relref "folder_permissions/" >}})
|
||||
- [Folder/Dashboard Search API]({{< relref "folder_dashboard_search/" >}})
|
||||
- [Library Element API]({{< relref "library_element/" >}})
|
||||
- [Folder permissions API]({{< relref "folder_permissions/" >}})
|
||||
- [Folder/Dashboard search API]({{< relref "folder_dashboard_search/" >}})
|
||||
- [Library element API]({{< relref "library_element/" >}})
|
||||
- [Organization API]({{< relref "org/" >}})
|
||||
- [Other API]({{< relref "other/" >}})
|
||||
- [Playlists API]({{< relref "playlist/" >}})
|
||||
- [Preferences API]({{< relref "preferences/" >}})
|
||||
- [Short URL API]({{< relref "short_url/" >}})
|
||||
- [Public dashboard API]({{< relref "dashboard_public/" >}})
|
||||
- [Query history API]({{< relref "query_history/" >}})
|
||||
- [Service account API]({{< relref "serviceaccount/" >}})
|
||||
- [Short URL API]({{< relref "short_url/" >}})
|
||||
- [Snapshot API]({{< relref "snapshot/" >}})
|
||||
- [SSO settings API]({{< relref "sso-settings/" >}})
|
||||
- [Team API]({{< relref "team/" >}})
|
||||
- [User API]({{< relref "user/" >}})
|
||||
|
||||
## Deprecated HTTP APIs
|
||||
|
||||
- [Alerting Notification Channels API]({{< relref "alerting_notification_channels/" >}})
|
||||
- [Alerting API]({{< relref "alerting/" >}})
|
||||
- [Authentication API]({{< relref "auth/" >}})
|
||||
|
||||
## Grafana Enterprise HTTP APIs
|
||||
|
||||
Grafana Enterprise includes all of the Grafana OSS APIs as well as those that follow:
|
||||
|
||||
- [Role-based access control API]({{< relref "access_control/" >}})
|
||||
- [Data source permissions API]({{< relref "datasource_permissions/" >}})
|
||||
- [Team sync API]({{< relref "team_sync/" >}})
|
||||
- [License API]({{< relref "licensing/" >}})
|
||||
- [Reporting API]({{< relref "reporting/" >}})
|
||||
- [Query and resource caching API]({{< relref "query_and_resource_caching/" >}})
|
||||
- [Reporting API]({{< relref "reporting/" >}})
|
||||
- [Role-based access control API]({{< relref "access_control/" >}})
|
||||
- [Team sync API]({{< relref "team_sync/" >}})
|
||||
|
||||
@@ -217,31 +217,7 @@ Content-Length: 1300
|
||||
Content-Length: 46
|
||||
|
||||
```
|
||||
|
||||
JSON response body schema:
|
||||
|
||||
- **message** - Message explaining the reason for the request failure.
|
||||
|
||||
## Restore dashboard by dashboard UID
|
||||
|
||||
`POST /api/dashboards/uid/:uid/restore`
|
||||
|
||||
Restores a dashboard to a given dashboard version using `uid`.
|
||||
|
||||
**Example request for restoring a dashboard version**:
|
||||
|
||||
```http
|
||||
POST /api/dashboards/uid/QA7wKklGz/restore
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
{
|
||||
"version": 1
|
||||
}
|
||||
```
|
||||
|
||||
JSON body schema:
|
||||
|
||||
JSON response body schema:
|
||||
|
||||
- **message** - Message explaining the reason for the request failure.
|
||||
@@ -328,31 +304,7 @@ Content-Length: 1300
|
||||
|
||||
**Example response (JSON diff)**:
|
||||
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** - OK
|
||||
- **400** - Bad request (invalid JSON sent)
|
||||
- **401** - Unauthorized
|
||||
- **404** - Not found
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
]
|
||||
},
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: 'HTTP Preferences API '
|
||||
title: 'Preferences API'
|
||||
---
|
||||
|
||||
# User and Org Preferences API
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: 'HTTP Snapshot API '
|
||||
title: 'Snapshot API'
|
||||
---
|
||||
|
||||
# Snapshot API
|
||||
|
||||
@@ -10,141 +10,53 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Explore
|
||||
title: Explore
|
||||
weight: 90
|
||||
hero:
|
||||
title: Explore
|
||||
level: 1
|
||||
width: 110
|
||||
height: 110
|
||||
description: >-
|
||||
Use Explore to query, collect, and analyze data for detailed real-time data analysis.
|
||||
cards:
|
||||
title_class: pt-0 lh-1
|
||||
items:
|
||||
- title: Get started with Explore
|
||||
href: ./get-started-with-explore/
|
||||
description: Get started using Explore to create queries and do real-time analysis on your data.
|
||||
height: 24
|
||||
- title: Query management
|
||||
href: ./query-management/
|
||||
description: Learn how to manage queries in Explore.
|
||||
height: 24
|
||||
- title: Query inspector in Explore
|
||||
href: ./explore-inspector/
|
||||
description: Learn how to use the Query inspector to troubleshoot issues with your queries.
|
||||
height: 24
|
||||
- title: Logs in Explore
|
||||
href: ./logs-integration/
|
||||
description: Learn about working with logs and log data in Explore.
|
||||
height: 24
|
||||
- title: Traces in Explore
|
||||
href: ./trace-integration/
|
||||
description: Learn about working with traces and tracing data in Explore.
|
||||
height: 24
|
||||
- title: Correlations editor in Explore
|
||||
href: ./correlations-editor-in-explore/
|
||||
description: Learn how to create and use Correlations.
|
||||
height: 24
|
||||
---
|
||||
|
||||
# Explore
|
||||
{{< docs/hero-simple key="hero" >}}
|
||||
|
||||
Grafana's dashboard UI is all about building dashboards for visualization. Explore strips away the dashboard and panel options so that you can focus on the query. It helps you iterate until you have a working query and then think about building a dashboard.
|
||||
---
|
||||
|
||||
> Refer to [Role-based access control]({{< relref "../administration/roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with role-based permissions.
|
||||
## Overview
|
||||
|
||||
If you just want to explore your data and do not want to create a dashboard, then Explore makes this much easier. If your data source supports graph and table data, then Explore shows the results both as a graph and a table. This allows you to see trends in the data and more details at the same time. See also:
|
||||
Explore is your starting point for querying, analyzing, and aggregating data in Grafana. You can quickly begin creating queries to start analyzing data without having to create a dashboard or customize a visualization.
|
||||
|
||||
- [Query management in Explore]({{< relref "query-management/" >}})
|
||||
- [Logs integration in Explore]({{< relref "logs-integration/" >}})
|
||||
- [Trace integration in Explore]({{< relref "trace-integration/" >}})
|
||||
- [Explore metrics]({{< relref "explore-metrics/" >}})
|
||||
- [Correlations Editor in Explore]({{< relref "correlations-editor-in-explore/" >}})
|
||||
- [Inspector in Explore]({{< relref "explore-inspector/" >}})
|
||||
## Explore
|
||||
|
||||
## Start exploring
|
||||
|
||||
{{< youtube id="1q3YzX2DDM4" >}}
|
||||
|
||||
> Refer to [Role-based access Control]({{< relref "../administration/roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can manage Explore with role-based permissions.
|
||||
|
||||
In order to access Explore, you must have an editor or an administrator role, unless the [viewers_can_edit option]({{< relref "../setup-grafana/configure-grafana/#viewers_can_edit" >}}) is enabled. Refer to [About users and permissions]({{< relref "../administration/roles-and-permissions/" >}}) for more information on what each role has access to.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you are using Grafana Cloud, open a [support ticket in the Cloud Portal](/profile/org#support) to enable the `viewers_can_edit` option
|
||||
{{% /admonition %}}
|
||||
|
||||
To access Explore:
|
||||
|
||||
1. Click on the Explore icon on the menu bar.
|
||||
|
||||
An empty Explore tab opens.
|
||||
|
||||
Alternately to start with an existing query in a panel, choose the Explore option from the Panel menu. This opens an Explore tab with the query from the panel and allows you to tweak or iterate in the query outside of your dashboard.
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-panel-menu-10.1.png" class="docs-image--no-shadow" max-width= "650px" caption="Screenshot of the panel menu including the Explore option" >}}
|
||||
|
||||
1. Choose your data source from the drop-down in the top left.
|
||||
|
||||
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only).
|
||||
|
||||
1. Write the query using a query editor provided by the selected data source. Please check [data sources documentation]({{< relref "../datasources" >}}) to see how to use various query editors.
|
||||
1. For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../panels-visualizations/query-transform-data" >}}).
|
||||
1. Run the query using the button in the top right corner.
|
||||
|
||||
## Split and compare
|
||||
|
||||
The split view provides an easy way to compare visualizations side-by-side or to look at related data together on one page.
|
||||
|
||||
To open the split view:
|
||||
|
||||
1. Click the split button to duplicate the current query and split the page into two side-by-side queries.
|
||||
|
||||
It is possible to select another data source for the new query which for example, allows you to compare the same query for two different servers or to compare the staging environment to the production environment.
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-explore-split-10.1.png" max-width= "950px" caption="Screenshot of Explore screen split" >}}
|
||||
|
||||
In split view, timepickers for both panels can be linked (if you change one, the other gets changed as well) by clicking on one of the time-sync buttons attached to the timepickers. Linking of timepickers helps with keeping the start and the end times of the split view queries in sync. It ensures that you’re looking at the same time interval in both split panels.
|
||||
|
||||
To close the newly created query, click on the Close Split button.
|
||||
|
||||
## Content outline
|
||||
|
||||
The content outline is a side navigation bar that keeps track of the queries and visualization panels you created in Explore. It allows you to navigate between them quickly.
|
||||
|
||||
The content outline also works in a split view. When you are in split view, the content outline is generated for each pane.
|
||||
|
||||
To open the content outline:
|
||||
|
||||
1. Click the Outline button in the top left corner of the Explore screen.
|
||||
|
||||
You can then click on any panel icon in the content outline to navigate to that panel.
|
||||
|
||||
## Share Explore URLs
|
||||
|
||||
When using Explore, the URL in the browser address bar updates as you make changes to the queries. You can share or bookmark this URL.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Explore may generate relatively long URLs, some tools, like messaging or videoconferencing apps, may truncate messages to a fixed length. In such cases Explore will display a warning message and load a default state. If you encounter issues when sharing Explore links in such apps, you can generate shortened links. See [Share shortened link](#share-shortened-link) for more information.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Generating Explore URLs from external tools
|
||||
|
||||
Because Explore URLs have a defined structure, you can build a URL from external tools and open it in Grafana. The URL structure is:
|
||||
|
||||
```
|
||||
http://<grafana_url>/explore?panes=<panes>&schemaVersion=<schema_version>&orgId=<org_id>
|
||||
```
|
||||
|
||||
where:
|
||||
|
||||
- `org_id` is the organization ID
|
||||
- `schema_version` is the schema version (should be set to the latest version which is `1`)
|
||||
- `panes` is a url-encoded JSON object of panes, where each key is the pane ID and each value is an object matching the following schema:
|
||||
|
||||
```
|
||||
{
|
||||
datasource: string; // the pane's root datasource UID, or `-- Mixed --` for mixed datasources
|
||||
queries: {
|
||||
refId: string; // an alphanumeric identifier for this query, must be unique within the pane, i.e. "A", "B", "C", etc.
|
||||
datasource: {
|
||||
uid: string; // the query's datasource UID ie: "AD7864H6422"
|
||||
type: string; // the query's datasource type-id, i.e: "loki"
|
||||
}
|
||||
// ... any other datasource-specific query parameters
|
||||
}[]; // array of queries for this pane
|
||||
range: {
|
||||
from: string; // the start time, in milliseconds since epoch
|
||||
to: string; // the end time, in milliseconds since epoch
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
The `from` and `to` also accept relative ranges defined in [Time units and relative ranges]({{< relref "../dashboards/use-dashboards/#time-units-and-relative-ranges" >}}).
|
||||
{{% /admonition %}}
|
||||
|
||||
## Share shortened link
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana 7.3 and later versions.
|
||||
{{% /admonition %}}
|
||||
|
||||
The Share shortened link capability allows you to create smaller and simpler URLs of the format /goto/:uid instead of using longer URLs with query parameters. To create a shortened link to the executed query, click the **Share** option in the Explore toolbar.
|
||||
|
||||
A shortened link that is not accessed will automatically get deleted after a [configurable period](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#short_links) (defaulting to seven days). If a link is used at least once, it won't be deleted.
|
||||
|
||||
### Sharing shortened links with absolute time
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana 10.3 and later versions.
|
||||
{{% /admonition %}}
|
||||
|
||||
Short links have two options - keeping relative time (for example, from two hours ago to now) or absolute time (for example, from 8am to 10am). Sharing a shortened link by default will copy the time range selected, relative or absolute. Clicking the dropdown button next to the share shortened link button and selecting one of the options under "Time-Sync URL Links" will allow you to create a short link with the absolute time - meaning anyone receiving the link will see the same data you are seeing, even if they open the link at another time. This will not affect your selected time range.
|
||||
{{< card-grid key="cards" type="simple" >}}
|
||||
|
||||
@@ -4,7 +4,7 @@ labels:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Correlations Editor in Explore
|
||||
weight: 400
|
||||
weight: 20
|
||||
---
|
||||
|
||||
# Correlations Editor in Explore
|
||||
|
||||
@@ -1,97 +1,87 @@
|
||||
---
|
||||
description: Learn more about the Query inspector in Grafana Explore.
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Inspector in Explore
|
||||
weight: 400
|
||||
keywords:
|
||||
- Explore
|
||||
title: Query inspector in Explore
|
||||
weight: 15
|
||||
---
|
||||
|
||||
# Inspector in Explore
|
||||
# Query inspector in Explore
|
||||
|
||||
The inspector helps you understand and troubleshoot your queries. You can inspect the raw data, export that data to a comma-separated values (CSV) file, export log results in TXT format, and view query requests.
|
||||
The Query inspector in Grafana Explore gives you detailed statistics regarding your query, which helps you understand and troubleshoot issues with your queries. Query inspector also lets you inspect raw data, export data to a comma-separated values (CSV) file, export log results in TXT format, and view query requests.
|
||||
|
||||
## Inspector UI
|
||||
## Query inspector UI
|
||||
|
||||
The inspector has following tabs:
|
||||
|
||||
- **Stats tab -** Shows how long your query takes and how much it returns.
|
||||
- **Query tab -** Shows you the requests to the server sent when Grafana queries the data source.
|
||||
- **JSON tab -** Allows you to view and copy the data JSON and data frame structure JSON.
|
||||
- **Data tab -** Shows the raw data returned by the query.
|
||||
- **Error tab -** Shows the error. Only visible when query returns error.
|
||||
|
||||
## Inspector tasks
|
||||
|
||||
You can perform a variety of tasks in the Explore inspector.
|
||||
|
||||
### Open the Inspector
|
||||
To open Query inspector:
|
||||
|
||||
1. Go to the Explore page.
|
||||
1. Run the query you would like to inspect.
|
||||
1. Click the **Inspector** button.
|
||||
1. Click **Query inspector**.
|
||||
|
||||
The inspector pane opens on the bottom of the screen.
|
||||
The Query inspector pane opens on the bottom of the Explore page, where you see the following tabs:
|
||||
|
||||
### Inspect raw query results
|
||||
- **Stats tab -** Shows statistics regarding the query, including the amount of time it takes to run the query, data processing time and the amount of data returned.
|
||||
- **Query tab -** Provides raw request and response data and time when Grafana queries the data source.
|
||||
- **JSON tab -** Allows you to view and copy the JSON data and the JSON data frame structure.
|
||||
- **Data tab -** Shows the raw data returned by the query. You can download the information to a CSV file.
|
||||
- **Error tab -** Shows any errors. _Only visible if the query returns an error._
|
||||
|
||||
You can view raw query results, that is the data returned by the query in a table.
|
||||
## Query inspector Stats tab
|
||||
|
||||
In the **Inspector** tab, click the **Data** tab.
|
||||
You can inspect query performance in the **Stats tab**, which displays statistics that tell you how long your query takes, how many queries you send, the number of rows returned and trace IDs. This information can help you troubleshoot your queries, especially if any of the numbers are unexpectedly high or low.
|
||||
|
||||
For multiple queries or for queries multiple nodes, there are additional options.
|
||||
1. Open the inspector.
|
||||
1. Click the **Stats tab**.
|
||||
|
||||
- **Show data frame:** Select the result set data you want to view.
|
||||
- **Series joined by time:** View the raw data from all of your queries at once, one result set per column. You can click a column heading to sort the data.
|
||||
Statistics display in read-only format.
|
||||
|
||||
### Download raw query results as CSV
|
||||
## Query inspector Query tab
|
||||
|
||||
Grafana generates a CSV file in your default browser download location. You can open it in the viewer of your choice.
|
||||
View raw request and response in the Query tab.
|
||||
|
||||
1. In the **Inspector** tab, get raw query results by following the instructions [described in Inspect raw query results](#inspect-raw-query-results).
|
||||
1. Refine query settings until you can see the raw data that you want to export.
|
||||
1. Click **Download CSV**.
|
||||
1. Open the Query inspector and click the **Query tab**.
|
||||
1. Click **Refresh**.
|
||||
|
||||
In order to download a CSV file specifically formatted for Excel, expand **Data options** and then enable the **Download for Excel** toggle before you click the **Download CSV** option.
|
||||
Grafana sends the query to the server and displays the result. You can drill down on specific portions of the query, expand or collapse all of it. Click **Copy to clipboard** to copy the data to use in other applications.
|
||||
|
||||
## Query inspector JSON tab
|
||||
|
||||
View data results as JSON and as data frame JSON models in the **JSON tab**.
|
||||
|
||||
1. Open the Query inspector and click the **JSON tab**.
|
||||
1. Choose one of the following options from the **Select source** dropdown menu:
|
||||
- **Panel data -** Displays a JSON object representing the data retrieved by the visualization from Explore.
|
||||
- **DataFrame JSON (from query) -** Displays the raw data result set without transformations and field configuration applied.
|
||||
|
||||
## Query inspector Data tab
|
||||
|
||||
View, inspect and download raw query results in the **Data tab**.
|
||||
|
||||
1. Open the Query inspector and click the **Data** tab.
|
||||
1. Click **Data options** to to view options under **Show data frame**.
|
||||
1. Select a data results set from the dropdown menu.
|
||||
1. For multiple queries or for queries multiple nodes, you can select **Series joined by time** from the dropdown to view the raw data from all of your queries at once, one result set per column. You can click any column heading to sort the data.
|
||||
1. Toggle **Formatted data** to match the format in the panel.
|
||||
1. Toggle **Download for Excel** to download a CSV file specifically formatted for Excel.
|
||||
1. To download the results to a CSV file click **Download CSV** in the upper right of the Query inspector pane.
|
||||
|
||||
### Download log results as TXT
|
||||
|
||||
Grafana generates a TXT file in your default browser download location. You can open it in the viewer of your choice.
|
||||
Based on the type of data source (Loki, for example), or when logs are present in the results set, Grafana generates a TXT file of log raw data results in your default browser download location. You can open it in the viewer of your choice.
|
||||
|
||||
1. Open the inspector.
|
||||
1. Inspect the log query results as described above.
|
||||
1. Click **Query inspector**.
|
||||
1. Click the **Data tab** to view log query results.
|
||||
1. Click **Download logs**.
|
||||
|
||||
### Download trace results
|
||||
|
||||
Based on the data source type, Grafana generates a JSON file for the trace results in one of the supported formats: Jaeger, Zipkin, or OTLP formats.
|
||||
Based on the data source type (Tempo, for example), Grafana generates a JSON file for trace results in one of these supported formats: Jaeger, Zipkin, or OTLP.
|
||||
|
||||
1. Open the inspector.
|
||||
1. Inspect the trace query results [as described above](#inspect-raw-query-results).
|
||||
1. Click **Query inspector**.
|
||||
1. Click the **Data tab** to view traces results.
|
||||
1. Click **Download traces**.
|
||||
|
||||
### Inspect query performance
|
||||
|
||||
The Stats tab displays statistics that tell you how long your query takes, how many queries you send, and the number of rows returned. This information can help you troubleshoot your queries, especially if any of the numbers are unexpectedly high or low.
|
||||
|
||||
1. Open the inspector.
|
||||
1. Navigate to the **Stats** tab.
|
||||
|
||||
Statistics are displayed in read-only format.
|
||||
|
||||
### View JSON model
|
||||
|
||||
You can explore and export data as well as data frame JSON models.
|
||||
|
||||
1. In the Inspector panel, click the **JSON** tab.
|
||||
1. From the Select source dropdown, choose one of the following options:
|
||||
- **Data -** Displays a JSON object representing the data that was returned to Explore.
|
||||
- **DataFrame structure -** Displays the raw result set.
|
||||
1. You can expand or collapse portions of the JSON to view separate sections. You can also click the **Copy to clipboard** option to copy JSON body and paste it into another application.
|
||||
|
||||
### View raw request and response to data source
|
||||
|
||||
1. Open the panel inspector and then click the **Query** tab.
|
||||
1. Click **Refresh**.
|
||||
|
||||
Grafana sends the query to the server and displays the result. You can drill down on specific portions of the query, expand or collapse all of it, or copy the data to the clipboard to use in other applications.
|
||||
|
||||
208
docs/sources/explore/get-started-with-explore.md
Normal file
208
docs/sources/explore/get-started-with-explore.md
Normal file
@@ -0,0 +1,208 @@
|
||||
---
|
||||
aliases:
|
||||
-
|
||||
keywords:
|
||||
- explore
|
||||
- loki
|
||||
- logs
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Get started with Explore
|
||||
weight: 5
|
||||
---
|
||||
|
||||
# Get started with Explore
|
||||
|
||||
Explore is your gateway for querying, analyzing, and aggregating data in Grafana. It allows you to visually explore and iterate until you develop a working query or set of queries for building visualizations and conducting data analysis. If your data source supports graph and table data, there's no need to create a dashboard, as Explore can display the results in both formats. This facilitates quick, detailed, real-time data analysis.
|
||||
|
||||
With Explore you can:
|
||||
|
||||
- Create visualizations to integrate into your dashboards.
|
||||
- Create queries using mixed data sources.
|
||||
- Create multiple queries within a single interface.
|
||||
- Understand the shape of your data across various data sources.
|
||||
- Perform real time data exploration and analysis.
|
||||
|
||||
Key features include:
|
||||
|
||||
- Query editor, based on specific data source, to create and iterate queries.
|
||||
- [Query history](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/query-management/) to track and maintain your queries.
|
||||
- [Query inspector](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/) to help troubleshoot query performance.
|
||||
|
||||
Watch the following video to get started using Explore:
|
||||
|
||||
{{< youtube id="1q3YzX2DDM4" >}}
|
||||
|
||||
## Before you begin
|
||||
|
||||
In order to access Explore, you must have either the `editor` or `administrator` role, unless the [`viewers_can_edit` option](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#viewers_can_edit) is enabled. Refer to [Role and permissions](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/) for more information on what each role can access.
|
||||
|
||||
Refer to [Role-based access control (RBAC)](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/) in Grafana Enterprise to understand how you can manage Explore with role-based permissions.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
If you are using Grafana Cloud, open a [support ticket in the Cloud Portal](/https://grafana.com/auth/sign-in) to enable the `viewers_can_edit` option.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Explore elements
|
||||
|
||||
Explore consists of a toolbar, outline, query editor, the ability to add multiple queries, a query history and a query inspector.
|
||||
|
||||
- **Outline** - Keeps track of the queries and visualization panels created in Explore. Refer to [Content outline](#content-outline) for more detail.
|
||||
|
||||
- **Toolbar** - Provides quick access to frequently used tools and settings.
|
||||
|
||||
- **Data source picker** - Select a data source from the dropdown menu, or use absolute time.
|
||||
- **Split** - Click to compare visualizations side by side. Refer to [Split and compare](#split-and-compare) for additional detail.
|
||||
- **Add** - Click to add your exploration to a dashboard. You can also use this to declare an incident,create a forecast, detect outliers and to run an investigation.
|
||||
- **Time picker** - Select a time range form the time picker. You can also enter an absolute time range. Refer to [Time picker](#time-picker) for more information.
|
||||
- **Run query** - Click to run your query.
|
||||
|
||||
- **Query editor** - Interface where you construct the query for a specific data source. Query editor elements differ based on data source. In order to run queries across multiple data sources you need to select **Mixed** from the data source picker.
|
||||
|
||||
- **+Add query** - Add additional queries.
|
||||
- **Query history** - Query history contains the list of queries that you created in Explore. Refer to [Query history](/docs/grafana/<GRAFANA_VERSION>/explore/query-management/#query-history) for detailed information on working with your query history.
|
||||
- **Query inspector** - Provides detailed statistics regarding your query. Inspector functions as a kind of debugging tool that "inspects" your query. It provides query statistics under **Stats**, request response time under **Query**, data frame details under **{} JSON**, and the shape of your data under **Data**. Refer to [Query inspector in Explore](/docs/grafana/latest/explore/explore-inspector/) for additional information.
|
||||
|
||||
## Access Explore
|
||||
|
||||
To access Explore:
|
||||
|
||||
1. Click on **Explore** in the left side menu.
|
||||
|
||||
To start with an existing query from a dashboard panel, select the Explore option from the Panel menu in the upper right. This opens an Explore page with the panel's query, enabling you to tweak or iterate the query outside your dashboard.
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-panel-menu-10.1.png" class="docs-image--no-shadow" caption="Panel menu with Explore option" >}}
|
||||
|
||||
1. Select a data source from the drop-down in the upper left.
|
||||
|
||||
1. Using the query editor provided for the specific data source, begin writing your query. Each query editor differs based on each data source's unique elements.
|
||||
|
||||
Some query editors provide a **Kick start your query** option, which gives you a list of basic pre-written queries. Refer to [Use query editors](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/#use-query-editors) to see how to use various query editors. For general information on querying data sources in Grafana, refer to [Query and transform data](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/).
|
||||
|
||||
Based on specific data source, certain query editors allow you to select the label or labels to add to your query. Labels are fields that consist of key/value pairs representing information in the data. Some data sources allow for selecting fields.
|
||||
|
||||
1. Click **Run query** in the upper right to run your query.
|
||||
|
||||
## Content outline
|
||||
|
||||
The content outline is a side navigation bar that keeps track of the queries and visualizations you created in Explore. It allows you to navigate between them quickly.
|
||||
|
||||
The content outline works in a split view, with a separate outline generated for each pane.
|
||||
|
||||
To open the content outline:
|
||||
|
||||
1. Click the Outline button in the top left corner of the Explore screen.
|
||||
|
||||
You can then click on any panel icon in the content outline to navigate to that panel.
|
||||
|
||||
## Split and compare
|
||||
|
||||
The split view enables easy side-by-side comparison of visualizations or simultaneous viewing of related data on a single page.
|
||||
|
||||
To open the split view:
|
||||
|
||||
1. Click the split button to duplicate the current query and split the page into two side-by-side queries.
|
||||
1. Run and re-run queries as often as needed.
|
||||
|
||||
You can select a different data source, or different metrics and label filters for the new query, allowing you to compare the same query across two different servers or compare the staging environment with the production environment.
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-explore-split-10.1.png" max-width= "950px" caption="Screenshot of Explore screen split" >}}
|
||||
|
||||
You can also link the time pickers for both panels by clicking on one of the time-sync buttons attached to the time pickers. When linked, changing the time in one panel automatically updates the other, keeping the start and end times synchronized. This ensures that both split panels display data for the same time interval.
|
||||
|
||||
Click **Close** to quit split view.
|
||||
|
||||
## Time picker
|
||||
|
||||
Use the time picker to select a time range for your query. The default is **last hour**. You can select a different option from the dropdown or use an absolute time range. You can also change the timezone associated with the query, or use a fiscal year.
|
||||
|
||||
1. Click **Change time settings** to change the timezone or apply a fiscal year.
|
||||
|
||||
Refer to [Set dashboard time range](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/use-dashboards/#set-dashboard-time-range) for more information on absolute and relative time ranges. You can also [control the time range using a URL](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/use-dashboards/#control-the-time-range-using-a-url).
|
||||
|
||||
## Mixed data source
|
||||
|
||||
Select **Mixed** from the data source dropdown to run queries across multiple data sources in the same panel. When you select Mixed, you can select a different data source for each new query that you add.
|
||||
|
||||
## Share Explore URLs
|
||||
|
||||
When using Explore, the URL in the browser address bar updates as you make changes to the queries. You can share or bookmark this URL.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Explore may generate long URLs, which some tools, like messaging or videoconferencing applications, might truncate due to fixed message lengths. In such cases, Explore displays a warning and loads a default state.
|
||||
If you encounter issues when sharing Explore links in these applications, you can generate shortened links. See [Share shortened link](#share-shortened-link) for more information.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Generate Explore URLs from external tools
|
||||
|
||||
Because Explore URLs have a defined structure, you can build a URL from external tools and open it in Grafana. The URL structure is:
|
||||
|
||||
```
|
||||
http://<grafana_url>/explore?panes=<panes>&schemaVersion=<schema_version>&orgId=<org_id>
|
||||
```
|
||||
|
||||
where:
|
||||
|
||||
- `org_id` is the organization ID
|
||||
- `schema_version` is the schema version (should be set to the latest version which is `1`)
|
||||
- `panes` is a URL-encoded JSON object of panes, where each key is the pane ID and each value is an object matching the following schema:
|
||||
|
||||
```
|
||||
{
|
||||
datasource: string; // the pane's root datasource UID, or `-- Mixed --` for mixed datasources
|
||||
queries: {
|
||||
refId: string; // an alphanumeric identifier for this query, must be unique within the pane, i.e. "A", "B", "C", etc.
|
||||
datasource: {
|
||||
uid: string; // the query's datasource UID ie: "AD7864H6422"
|
||||
type: string; // the query's datasource type-id, i.e: "loki"
|
||||
}
|
||||
// ... any other datasource-specific query parameters
|
||||
}[]; // array of queries for this pane
|
||||
range: {
|
||||
from: string; // the start time, in milliseconds since epoch
|
||||
to: string; // the end time, in milliseconds since epoch
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
The `from` and `to` also accept relative ranges defined in [Time units and relative ranges](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/use-dashboards/#time-units-and-relative-ranges).
|
||||
{{< /admonition >}}
|
||||
|
||||
## Share shortened link
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in Grafana 7.3 and later versions.
|
||||
{{< /admonition >}}
|
||||
|
||||
The Share shortened link capability allows you to create smaller and simpler URLs of the format `/goto/:uid` instead of using longer URLs with query parameters. To create a shortened link to the executed query, click the **Share** option in the Explore toolbar.
|
||||
|
||||
A shortened link that's not accessed automatically gets deleted after a [configurable period](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#short_links), which defaults to seven days. However, if the link is accessed at least once, it will not be deleted.
|
||||
|
||||
### Share shortened links with absolute time
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in Grafana 10.3 and later versions.
|
||||
{{< /admonition >}}
|
||||
|
||||
Shortened links have two options: relative time (e.g., from two hours ago to now) or absolute time (e.g., from 8am to 10am). By default, sharing a shortened link copies the selected time range, whether it's relative or absolute.
|
||||
|
||||
To create a short link with an absolute time:
|
||||
|
||||
1. Click the dropdown button next to the share shortened link button.
|
||||
1. Select one of the options under **Time-Sync URL Links**.
|
||||
|
||||
This ensures that anyone receiving the link will see the same data you see, regardless of when they open it. Your selected time range will remain unaffected.
|
||||
|
||||
## Next steps
|
||||
|
||||
Now that you are familiar with Explore you can:
|
||||
|
||||
- [Build dashboards](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/)
|
||||
- Create a wide variety of [visualizations](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/)
|
||||
- [Work with logs](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/logs-integration/)
|
||||
- [Work with traces](https://grafana.com/docs/grafana/<GRAFANA_VERSION>)
|
||||
- [Create and use correlations](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/correlations-editor-in-explore/)
|
||||
@@ -9,88 +9,96 @@ labels:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Logs in Explore
|
||||
weight: 15
|
||||
weight: 25
|
||||
---
|
||||
|
||||
# Logs in Explore
|
||||
|
||||
Explore is a powerful tool for logging and log analysis. It allows you to investigate logs from different data sources including:
|
||||
|
||||
- [Loki]({{< relref "../datasources/loki" >}})
|
||||
- [Elasticsearch]({{< relref "../datasources/elasticsearch" >}})
|
||||
- [Cloudwatch]({{< relref "../datasources/aws-cloudwatch" >}})
|
||||
- [InfluxDB]({{< relref "../datasources/influxdb" >}})
|
||||
- [Azure Monitor]({{< relref "../datasources/azure-monitor" >}})
|
||||
- [Loki](/docs/grafana/<GRAFANA_VERSION>/datasources/loki/)
|
||||
- [Elasticsearch](/docs/grafana/<GRAFANA_VERSION>/datasources/elasticsearch/)
|
||||
- [Cloudwatch](/docs/grafana/<GRAFANA_VERSION>/datasources/aws-cloudwatch/)
|
||||
- [InfluxDB](/docs/grafana/<GRAFANA_VERSION>/datasources/influxdb/)
|
||||
- [Azure Monitor](/docs/grafana/<GRAFANA_VERSION>/datasources/azure-monitor/)
|
||||
- [ClickHouse](https://github.com/grafana/clickhouse-datasource)
|
||||
|
||||
With Explore, you can efficiently monitor, troubleshoot, and respond to incidents by analyzing your logs and identifying the root causes. It also helps you to correlate logs with other telemetry signals such as metrics, traces or profiles, by viewing them side-by-side.
|
||||
|
||||
The results of log queries are displayed as individual log lines and as a graph showing the logs volume for the selected time period.
|
||||
The results of log queries display as individual log lines and as a graph showing the logs volume for the selected time period.
|
||||
|
||||
## Logs volume
|
||||
|
||||
When working with data sources that support a full range logs volume, Explore automatically displays a graph showing the log distribution for all the entered log queries. This feature is currently supported by Elasticsearch and Loki data sources.
|
||||
When working with data sources that support a full range logs volume, Explore automatically displays a graph showing the log distribution for all submitted log queries. This feature is currently supported by the Elasticsearch and Loki data sources.
|
||||
|
||||
> **Note:** In Loki, this full range log volume is rendered by a metric query which can be expensive depending on time range queried. This query can be particularly challenging to process for smaller Loki installations. To mitigate this, we recommend using a proxy like [nginx](https://www.nginx.com/) in front of Loki to set a custom timeout (for example, 10 seconds) for these queries. Log volume histogram queries can be identified by looking for queries with the HTTP header `X-Query-Tags` with value `Source=logvolhist`; these headers are added by Grafana to all log volume histogram queries.
|
||||
{{< admonition type="note" >}}
|
||||
In Loki, generating the full range log volume via a metric query can be resource-intensive, depending on the time range queried. This is especially challenging for smaller Loki installations. To mitigate this, we recommend that you use a proxy like [nginx](https://www.nginx.com/) in front of Loki with a timeout like 10ss. Log volume histogram queries can be identified by looking for queries with the HTTP header `X-Query-Tags` with value `Source=logvolhist`; these headers are added by Grafana to all log volume histogram queries.
|
||||
{{< /admonition >}}
|
||||
|
||||
If the data source does not support loading the full range logs volume, the logs model calculates a time series by counting log rows and organizing them into buckets based on an automatically calculated time interval. The timestamp of the first log row is used to anchor the start of the logs volume in the results. The end of the time series is anchored to the time picker's **To** range. This way, you can still analyze and visualize log data efficiently even when the data source doesn't offer full range support.
|
||||
If the data source doesn't support loading the full range logs volume, the logs model calculates a time series by counting log rows and organizing them into buckets based on an automatically calculated time interval. The timestamp of the first log row is used to anchor the start of the logs volume in the results. The end of the time series is anchored to the time picker's **To** range. This way, you can still analyze and visualize log data efficiently even when the data source doesn't offer full range support.
|
||||
|
||||
## Logs
|
||||
|
||||
In the following sections, you will find detailed explanations of how to visualize and interact with individual logs in Explore.
|
||||
The following sections provide detailed explanations on how to visualize and interact with individual logs in Explore.
|
||||
|
||||
### Logs navigation
|
||||
|
||||
Logs navigation, at the right side of the log lines, can be used to easily request additional logs. You can do this by clicking the **Older logs** button at the bottom of the navigation. This is especially useful when you reach the line limit and you want to see more logs. Each request that is run from the navigation is then displayed in the navigation as separate page. Every page shows `from` and `to` timestamps of the incoming log lines. You can see previous results by clicking on each page. Explore caches the last five requests run from the logs navigation, so you're not re-running the same queries when clicking on the pages, saving time and resources.
|
||||
Logs navigation, located at the right side of the log lines, can be used to easily request additional logs by clicking **Older logs** at the bottom of the navigation. This is especially useful when you reach the line limit and you want to see more logs. Each request run from the navigation displays in the navigation as separate page. Every page shows `from` and `to` timestamps of the incoming log lines. You can see previous results by clicking on each page. Explore caches the last five requests run from the logs navigation so you're not re-running the same queries when clicking on the pages, saving time and resources.
|
||||
|
||||

|
||||
|
||||
### Visualization options
|
||||
|
||||
You can customize how logs are displayed and select which columns are shown.
|
||||
You have the option to customize the display of logs and choose which columns to show. Following is a list of available options.
|
||||
|
||||
| Option | Description |
|
||||
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Time** | Shows or hides the time column. This is the timestamp associated with the log line as reported from the data source. |
|
||||
| **Unique labels** | Shows or hides the unique labels column that includes only non-common labels. All common labels are displayed above. |
|
||||
| **Wrap lines** | Set this to `true` if you want the display to use line wrapping. If set to `false`, it will result in horizontal scrolling. |
|
||||
| **Prettify JSON** | Set this to `true` to pretty print all JSON logs. This setting does not affect logs in any format other than JSON. |
|
||||
| **Deduplication** | Log data can be very repetitive and Explore can help by hiding duplicate log lines. There are a few different deduplication algorithms that you can use **Exact** matches are done on the whole line except for date fields. **Numbers** matches are done on the line after stripping out numbers such as durations, IP addresses, and so on. **Signature** is the most aggressive deduplication as it strips all letters and numbers and matches on the remaining whitespace and punctuation. |
|
||||
| **Display results order** | You can change the order of received logs from the default descending order (newest first) to ascending order (oldest first). |
|
||||
| Option | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Time** | Shows or hides the time column. This is the timestamp associated with the log line as reported from the data source. |
|
||||
| **Unique labels** | Shows or hides the unique labels column that includes only non-common labels. All common labels are displayed above. |
|
||||
| **Wrap lines** | Set this to `true` if you want the display to use line wrapping. If set to `false`, it will result in horizontal scrolling. |
|
||||
| **Prettify JSON** | Set this to `true` to pretty print all JSON logs. This setting does not affect logs in any format other than JSON. |
|
||||
| **Deduplication** | Log data can be very repetitive. Explore hides duplicate log lines using a few different deduplication algorithms. **Exact** matches are done on the whole line except for date fields. **Numbers** matches are done on the line after stripping out numbers such as durations, IP addresses, and so on. **Signature** is the most aggressive deduplication as it strips all letters and numbers and matches on the remaining whitespace and punctuation. |
|
||||
| **Display results order** | You can change the order of received logs from the default descending order (newest first) to ascending order (oldest first). |
|
||||
|
||||
### Download log lines
|
||||
|
||||
To download log results in either `txt` or `json` format, simply use the **Download** button. This feature allows you to save the log data for further analysis or to share it with others in a convenient and accessible format.
|
||||
Click **Download** to download log results in either `TXT` or `JSON` format. This feature allows you to save log data for further analysis or to share it with others in a convenient and accessible format.
|
||||
|
||||
### Log result meta information
|
||||
|
||||
Above the received log lines you can find essential meta information, including:
|
||||
The following meta information displays above the retrieved log lines:
|
||||
|
||||
- **Number of received logs**: Indicates the total count of logs received for the current query or time range.
|
||||
- **Error**: Displays possible error in your log results
|
||||
- **Common labels**: Shows common labels.
|
||||
- **Total bytes processed**: Represents the cumulative size of the log data processed in bytes.
|
||||
- **Number of received logs -** Indicates the total count of logs received for the current query or time range.
|
||||
- **Error -** Displays any errors in your log results.
|
||||
- **Common labels -** Displays common labels.
|
||||
- **Total bytes processed -** Represents the cumulative size of the log data processed in bytes.
|
||||
|
||||
> **Note:** The availability of certain meta information may depend on the data source, and as a result, you may only see some of these details for specific data sources.
|
||||
{{< admonition type="note" >}}
|
||||
The availability of certain metadata may vary depending on the data source, so you might only see details related to those specific data sources.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Escaping newlines
|
||||
|
||||
Explore automatically detects some incorrectly escaped sequences in log lines, such as newlines (`\n`, `\r`) or tabs (`\t`). When it detects such sequences, Explore provides an "Escape newlines" option.
|
||||
Explore automatically detects some incorrectly escaped sequences in log lines, such as newlines (`\n`, `\r`) or tabs (`\t`). When it detects such sequences, Explore provides an **Escape newlines** option.
|
||||
|
||||
To automatically fix incorrectly escaped sequences that Explore has detected:
|
||||
|
||||
1. Click "Escape newlines" to replace the sequences.
|
||||
2. Manually review the replacements to confirm their correctness.
|
||||
1. Click **Escape newlines** to replace the sequences.
|
||||
2. Review returned log lines.
|
||||
|
||||
Explore replaces these sequences. When it does so, the option will change from "Escape newlines" to "Remove escaping". Evaluate the changes as the parsing may not be accurate based on the input received. You can revert the replacements by clicking "Remove escaping".
|
||||
Explore replaces these sequences, changing the option from **Escape newlines** to **Remove escaping**. Assess the changes, as the parsing may not be accurate based on the input. To revert the replacements, click **Remove escaping**.
|
||||
|
||||
### Log level
|
||||
|
||||
For the logs where a `level` label is specified, we use the value of this label to determine the log level and update color of each log line accordingly. If the log doesn't have specified level label, we try to find out if its content matches any of the supported expressions (see below for more information). The log level is always determined by the first match. In the case where Grafana is not able to infer a log level field, it will be visualized with an unknown log level.
|
||||
For logs where a `level` label is specified, the value of this label is used to determine the log level and update the color of each log line accordingly.
|
||||
If the log doesn't have a specified level label, Grafana attempts to determine if its content matches any of the supported expressions.
|
||||
Refer to the following table for more information. The log level is always determined by the first match. If Grafana isn't able to infer a log level field, it gets visualized as an unknown log level.
|
||||
|
||||
> **Tip:** If you use a Loki data source and the "level" is part of your log line, you can use parsers (JSON, logfmt, regex,..) to extract the level information into a level label that is used to determine the level value. This will allow the histogram to show the various log levels as separate bars.
|
||||
{{< admonition type="tip" >}}
|
||||
When using the Loki data source, if `level` is part of your log line, you can use parsers such as `json`, `logfmt`, or `regex` to extract the level information into a level label. This label is used to determine the level value, allowing the histogram to display the various log levels as separate bars.
|
||||
{{< /admonition >}}
|
||||
|
||||
**Supported log levels and mapping of log level abbreviation and expressions:**
|
||||
**Log levels supported and mapping of log level abbreviation and expressions:**
|
||||
|
||||
| Log level | Color | Supported expressions |
|
||||
| :-------- | :--------- | ---------------------------------------------- |
|
||||
@@ -104,66 +112,76 @@ For the logs where a `level` label is specified, we use the value of this label
|
||||
|
||||
### Highlight searched words
|
||||
|
||||
When your query includes specific words or expressions to search for, Explore will highlight these in the log lines for better visibility. This highlighting feature makes it easier to identify and focus on the relevant content in your logs.
|
||||
When your query includes specific words or expressions for keyword search, Explore highlights them in log lines to enhance visibility. This highlighting feature facilitates easier identification and focus on the relevant content within your logs.
|
||||
|
||||
> **Note:** The ability to highlight search words may vary depending on the data source. For some data sources, the highlighting of search words may not be available.
|
||||
{{< admonition type="note" >}}
|
||||
The ability to highlight search words varies depending on data source. For some data sources, the highlighting of search words may not be available.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Log details view
|
||||
|
||||
In Explore, each log line has an expandable section called **Log details** that can be opened by clicking on the log line. The Log details view provides additional information and exploration options in the form of **Fields** and **Links** attached to the log lines, enabling a more robust interaction and analysis.
|
||||
In Explore, each log line has an expandable section called **Log details** that you open by clicking on the log line. The Log details view provides additional information and exploration options in the form of **Fields** and **Links** attached to the log lines, enabling a more robust interaction and analysis.
|
||||
|
||||
#### Fields
|
||||
|
||||
Within the Log details view, you have the ability to filter displayed fields in two ways: a positive filter (to focus on an specific field) and a negative filter (to exclude certain fields). These filters will update the corresponding query that produced the log line, adding equality and inequality expressions accordingly. If the data source has support, as it's the case for Loki and Elasticsearch, log details will check if the field is already present in the current query showing and active state (for positive filters only), allowing you to toggle it off the query, or changing the filter expression from positive to negative.
|
||||
Within the **Log details** view, you have the ability to filter the displayed fields in two ways: a positive filter, which focuses on an specific field and a negative filter, which excludes certain fields.
|
||||
These filters modify the corresponding query that generated the log line, incorporating equality and inequality expressions accordingly.
|
||||
|
||||
Additionally, you can select a subset of fields to visualize in the logs list instead of the complete log line by clicking on the eye icon. Finally, each field has a stats icon to display ad-hoc statistics in relation to all displayed logs.
|
||||
If the data source supports it, as is the case with Loki and Elasticsearch, log details will verify whether the field is already included in the current query, indicating an active state for positive filters. This enables you to toggle it off from the query or convert the filter expression from positive to negative as necessary.
|
||||
|
||||
Click the **eye icon** to select a subset of fields to visualize in the logs list instead of the complete log line.
|
||||
|
||||
Each field has a **stats icon**, which displays ad-hoc statistics in relation to all displayed logs.
|
||||
|
||||
#### Links
|
||||
|
||||
Grafana offers the functionality of data links or correlations, enabling you to convert any part of a log message into an internal or external link. These links can be used to navigate to related data or external resources, providing a seamless and convenient way to explore further information.
|
||||
Grafana provides data links or correlations, allowing you to convert any part of a log message into an internal or external link. These links enable you to navigate to related data or external resources, offering a seamless and convenient way to explore additional information.
|
||||
|
||||
{{< figure src="/static/img/docs/explore/data-link-9-4.png" max-width="800px" caption="Data link in Explore" >}}
|
||||
|
||||
### Log context
|
||||
|
||||
Log context is a feature that allows you to display additional lines of context surrounding a log entry that matches a particular search query. This can be helpful in understanding the log entry's context, and is similar to the `-C` parameter in the `grep` command.
|
||||
Log context is a feature that displays additional lines of context surrounding a log entry that matches a specific search query. This helps in understanding the context of the log entry and is similar to the `-C` parameter in the `grep` command.
|
||||
|
||||
You may encounter long lines of text that make it difficult to read and analyze the context around each log entry. This is where the **Wrap lines** toggle can come in handy. By enabling this toggle, Grafana will automatically wrap long lines of text so that they fit within the visible width of the viewer. This can make it easier to read and understand the log entries.
|
||||
Toggle **Wrap lines** if you encounter long lines of text that make it difficult to read and analyze the context around log entries. By enabling this toggle, Grafana automatically wraps long lines of text to fit within the visible width of the viewer, making the log entries easier to read and understand.
|
||||
|
||||
The **Open in split view** button allows you to execute the context query for a log entry in a split screen in the Explore view. Clicking this button will open a new Explore pane with the context query displayed alongside the log entry, making it easier to analyze and understand the surrounding context.
|
||||
Click **Open in split view** to execute the context query for a log entry in a split screen in the Explore view. Clicking this button opens a new Explore pane with the context query displayed alongside the log entry, making it easier to analyze and understand the surrounding context.
|
||||
|
||||
The log context query can also be opened in a new browser tab by pressing the Cmd/Ctrl button while clicking on the button to open the context modal. When opened in a new tab, the previously selected filters are applied as well.
|
||||
Use Command-click or Ctrl+click to open the log context query in a new browser to view the context model. All previously selected filters get applied.
|
||||
|
||||
### Copy log line
|
||||
|
||||
You can easily copy the content of a selected log line to your clipboard by clicking on the `Copy log line` button.
|
||||
Click **Copy log line** to copy the content of a selected log line to the clipboard.
|
||||
|
||||
### Copy link to log line
|
||||
|
||||
Linking of log lines in Grafana allows you to quickly navigate to specific log entries for precise analysis. By clicking the **Copy shortlink** button for a log line, you can generate and copy a [short URL]({{< relref "../developers/http_api/short_url/" >}}) that provides direct access to the exact log entry within an absolute time range. When you open the link, Grafana will automatically scroll to the corresponding log line and highlight it with a blue background, making it easy to identify and focus on the relevant information.
|
||||
Linking log lines in Grafana allows you to quickly navigate to specific log entries for detailed and precise analysis. Click **Copy shortlink** to generate and copy a [short URL](/docs/grafana/<GRAFANA_VERSION>/developers/http_api/short_url/) that provides direct access to the exact log entry within an absolute time range. When you open the link, Grafana automatically scrolls to the corresponding log line and highlights it in blue, making it easy to identify and focus on relevant information.
|
||||
|
||||
> **Note:** This is currently only supported in Loki and other data sources that provide an `id` field.
|
||||
{{< admonition type="note" >}}
|
||||
The short URL feature is currently only supported in Loki and other data sources that provide an `id` field.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Live tailing
|
||||
|
||||
To view real-time logs from supported data sources, you can leverage the Live tailing feature in Explore.
|
||||
Use the **Live tail** feature to view real-time logs from data sources.
|
||||
|
||||
1. Click the **Live** button in the Explore toolbar to switch to Live tail view.
|
||||
2. While in Live tail view, new logs will appear from the bottom of the screen, and they will have a fading contrasting background, allowing you to easily track what's new.
|
||||
3. If you wish to pause the Live tailing and explore previous logs without any interruptions, you can do so by clicking the **Pause** button or simply scrolling through the logs view.
|
||||
4. To clear the view and remove all logs from the display, click on the **Clear logs** button. This action will reset the log view and provide you with a clean slate to continue your log analysis.
|
||||
5. To resume Live tailing and continue viewing real-time logs, click the **Resume** button.
|
||||
6. If you want to exit Live tailing and return to the standard Explore view, click the **Stop** button.
|
||||
1. Click **Live** in the Explore toolbar to switch to Live tail view.
|
||||
1. In **Live tail view**, new logs appear at the bottom of the screen, and have a contrasting background, allowing you to easily track what's new.
|
||||
1. Click **Pause** to pause live tailing and explore previous logs without interruptions. or simply scroll through the logs view.
|
||||
1. Click **Clear logs** to remove all displayed logs. This action resets the log view and provides a clean slate to continue your log analysis
|
||||
1. Click **Resume** to resume live tailing and continue viewing real-time logs.
|
||||
1. Click **Stop** to exit live tailing and return to the standard Explore view.
|
||||
|
||||
Using the Live tailing feature, you can keep a close eye on the latest logs as they come in, making it easier to monitor real-time events and detect issues promptly.
|
||||
The **Live tailing feature** allows you to monitor the latest logs in real-time, making it easier to track events as they occur and promptly detect issues.
|
||||
|
||||
{{< video-embed src="/static/img/docs/v95/explore_live_tailing.mp4" >}}
|
||||
|
||||
### Logs sample
|
||||
|
||||
If the selected data source implements logs sample, and supports both log and metric queries, then for metric queries you will be able to automatically see samples of log lines that contributed to visualized metrics. This feature is currently supported by Loki data sources.
|
||||
If the selected data source supports log samples and both log and metric queries, you will automatically see log line samples that contribute to the visualized metrics for metric queries. **This feature is currently only supported by the Loki data source.**
|
||||
|
||||
### Switch from metrics to logs
|
||||
|
||||
If you are coming from a metrics data source that implements `DataSourceWithQueryExportSupport` (such as Prometheus) to a logging data source that supports `DataSourceWithQueryImportSupport` (such as Loki), then it will keep the labels from your query that exist in the logs and use those to query the log streams.
|
||||
If you are transitioning from a metrics data source that implements `DataSourceWithQueryExportSupport` (such as Prometheus) to a logging data source that supports `DataSourceWithQueryImportSupport` (such as Loki), Explore retains the labels from your query that exist in the logs and use them to query the log streams.
|
||||
|
||||
For example, the following Prometheus query `grafana_alerting_active_alerts{job="grafana"}` after switching to the Loki data source, will change to `{job="grafana"}`. This will return a chunk of logs in the selected time range that can be grepped/text searched.
|
||||
For example, after switching to the Loki data source, the Prometheus query `grafana_alerting_active_alerts{job="grafana"}` changes to `{job="grafana"}`. This will retrieve a set of logs within the specified time range, which can be searched using grep or text search.
|
||||
|
||||
@@ -8,77 +8,87 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Query management
|
||||
title: Query management in Explore
|
||||
weight: 10
|
||||
---
|
||||
|
||||
# Query management in Explore
|
||||
|
||||
To help with debugging queries, Explore allows you to investigate query requests and responses, as well as query statistics, via the Query inspector.
|
||||
This functionality is similar to the panel inspector tasks [Inspect query performance]({{< relref "../panels-visualizations/panel-inspector/#inspect-query-performance" >}}) and
|
||||
[Inspect query request and response data]({{< relref "../panels-visualizations/panel-inspector/#inspect-query-request-and-response-data" >}}).
|
||||
Grafana Explore provides a variety of tools to help manage your queries.
|
||||
|
||||
{{< figure src="/static/img/docs/v71/query_inspector_explore.png" class="docs-image--no-shadow" max-width= "550px" caption="Screenshot of the query inspector button in Explore" >}}
|
||||
{{% admonition type="note" %}}
|
||||
For help with debugging queries, Explore allows you to investigate query requests and responses, as well as query statistics, via the Query inspector. Refer to [Query inspector in Explore](/docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/) for more information.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Query history
|
||||
|
||||
Query history is a list of queries that you used in Explore. The history is stored in the Grafana database and it is not shared with other users. The retention period for queries in history is two weeks. Queries older than two weeks are automatically deleted. To open and interact with your history, click the **Query history** button in Explore.
|
||||
Query history contains the list of queries that you created in Explore. This history is stored in the Grafana database and isn't shared with other users. The retention period for a query history is **two weeks**. Queries older than two weeks are automatically deleted.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Starred queries are not subject to the two weeks retention period and they are not deleted.
|
||||
Starred queries aren't subject to the two-week retention period and aren't deleted.
|
||||
{{% /admonition %}}
|
||||
|
||||
### View query history
|
||||
To view your query history:
|
||||
|
||||
Query history lets you view the history of your querying. For each individual query, you can:
|
||||
1. Go to the Explore page.
|
||||
1. Click **Query history**.
|
||||
|
||||
- Run a query.
|
||||
The Query history pane opens at the bottom of the page, and contains the following tabs:
|
||||
|
||||
- **Query history tab-** Contains a history of all your queries, with options for searching and managing them.
|
||||
- **Starred tab -** Contains all of your starred queries.
|
||||
- **Settings tab-** Provides customizable options for your query history.
|
||||
|
||||
### Query history tab
|
||||
|
||||
The Query history depicts a history of your queries for the past two weeks, unless the query is starred, which means it doesn't get deleted. For each individual query, you can:
|
||||
|
||||
- Run and re-run the query.
|
||||
- Create and/or edit a comment.
|
||||
- Copy a query to the clipboard.
|
||||
- Copy a shortened link with the query to the clipboard.
|
||||
- Delete a query.
|
||||
- Star a query.
|
||||
|
||||
### Manage favorite queries
|
||||
By default, query history shows you newest queries first. Click the sort box in the upper right to change to **Oldest first** to older queries first. You can search your queries using keywords.
|
||||
|
||||
All queries that have been starred in the Query history tab are displayed in the Starred tab. This allows you to access your favorite queries faster and to reuse these queries without typing them from scratch.
|
||||
### Query history Starred tab
|
||||
|
||||
### Sort query history
|
||||
All starred queries are displayed in the **Starred** tab. This gives quick access to key or favorite queries without having to rewrite them.
|
||||
|
||||
By default, query history shows you the most recent queries. You can sort your history by date or by data source name in ascending or descending order.
|
||||
You also have the option to switch the data source and run a starred query.
|
||||
|
||||
1. Click the **Sort queries by** field.
|
||||
1. Select one of the following options:
|
||||
- Newest first
|
||||
- Oldest first
|
||||
#### Filter query history
|
||||
|
||||
### Filter query history
|
||||
|
||||
Filter query history in Query history and Starred tab by data source name:
|
||||
Filter query history in both the **Query history** and **Starred** tabs by data source name:
|
||||
|
||||
1. Click the **Filter queries for specific data source(s)** field.
|
||||
1. Select the data source for which you would like to filter your history. You can select multiple data sources.
|
||||
1. Select the data source in the dropdown by which you want to filter your history. You can select multiple data sources.
|
||||
|
||||
> **Note:** Queries ran using the Mixed data source will appear only when filtering for Mixed and not when filtering by their individual data sources.
|
||||
{{% admonition type="note" %}}
|
||||
Queries with the **Mixed** data source appear only when filtering for "Mixed" and not when filtering by individual data source.
|
||||
{{% /admonition %}}
|
||||
|
||||
In **Query history** tab it is also possible to filter queries by date using the slider:
|
||||
You can also filter queries by date using the vertical slider:
|
||||
|
||||
- Use vertical slider to filter queries by date.
|
||||
- By dragging bottom handle, adjust start date.
|
||||
- By dragging top handle, adjust end date.
|
||||
- Drag the bottom circle to adjust the start date.
|
||||
- Drag the top circle to adjust the end date.
|
||||
|
||||
### Search in query history
|
||||
#### Search in query history
|
||||
|
||||
You can search in your history across queries and your comments. Search is possible for queries in the Query history tab and Starred tab.
|
||||
Use **Search queries** in both the **Query history** and **Starred** tabs to search your query history and comments using keywords.
|
||||
|
||||
1. Click the **Search queries** field.
|
||||
1. Type the term you are searching for into search field.
|
||||
1. Click in the **Search queries** field.
|
||||
1. Type the keyword(s) or term you are want to search for in search field.
|
||||
|
||||
### Query history settings
|
||||
### Query history Settings tab
|
||||
|
||||
You can customize the query history in the Settings tab. Options are described in the table below.
|
||||
You can customize your query history in the **Settings** tab.
|
||||
|
||||
| Setting | Default value |
|
||||
| ----------------------------- | ----------------- |
|
||||
| Change the default active tab | Query history tab |
|
||||
Toggle **Change the default active tab from "Query history" to "Starred"** to make the **Starred tab** the default active tab.
|
||||
|
||||
> **Note:** Query history settings are global, and applied to both panels in split mode.
|
||||
{{% admonition type="note" %}}
|
||||
Query history settings are global, and applied to both panels in split mode.
|
||||
{{% /admonition %}}
|
||||
|
||||
<!-- All queries that have been starred in the Query history tab are displayed in the Starred tab. This allows you to access your favorite queries faster and to reuse these queries without typing them from scratch. -->
|
||||
|
||||
18
docs/sources/explore/simplified-exploration/_index.md
Normal file
18
docs/sources/explore/simplified-exploration/_index.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
description: Use your telemetry data to explore and determine the root cause of issues without performing queries.
|
||||
keywords:
|
||||
- Simplified exploration
|
||||
- queryless
|
||||
- Explore apps
|
||||
title: Simplified exploration
|
||||
menuTitle: Simplified exploration
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Simplified exploration
|
||||
|
||||
Introducing the Grafana Explore apps, designed for effortless data exploration through intuitive, queryless interactions.
|
||||
|
||||
Easily explore telemetry signals with these specialized tools, tailored specifically for the Grafana databases to provide quick and accurate insights.
|
||||
|
||||
{{< section >}}
|
||||
@@ -6,7 +6,9 @@ labels:
|
||||
- oss
|
||||
title: Explore Metrics
|
||||
aliases:
|
||||
description: This topic describes the Explore Metrics feature
|
||||
- ../explore-metrics/ # /docs/grafana/latest/explore/explore-metrics/
|
||||
canonical: https://grafana.com/docs/grafana/latest/explore/simplified-exploration/metrics/
|
||||
description: Explore Metrics lets you browse Prometheus-compatible metrics using an intuitive, queryless experience.
|
||||
weight: 200
|
||||
---
|
||||
|
||||
@@ -14,18 +16,16 @@ weight: 200
|
||||
|
||||
Grafana Explore Metrics is a query-less experience for browsing **Prometheus-compatible** metrics. Quickly find related metrics with just a few simple clicks, without needing to write PromQL queries to retrieve metrics.
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
Explore Metrics is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
|
||||
{{% /admonition %}}
|
||||
|
||||
With Explore Metrics, you can:
|
||||
|
||||
- easily slice and dice metrics based on their labels, so you can immediately see anomalies and identify issues
|
||||
- see the right visualization for your metric based on its type (gauge vs. counter, for example) without building it yourself
|
||||
- surface other metrics relevant to the current metric
|
||||
- “explore in a drawer” - expand a drawer over a dashboard with more content so you don’t lose your place
|
||||
- view a history of user steps when navigating through metrics and their filters
|
||||
<!-- - easily pivot to other related telemetry, including logs or traces -->
|
||||
- Easily segment metrics based on their labels, so you can immediately spot anomalies and identify issues.
|
||||
- Automatically display the optimal visualization for each metric type (gauge vs. counter, for example) without manual setup.
|
||||
- Uncover related metrics relevant to the one you're viewing.
|
||||
- “Explore in a drawer” - overlay additional content on your dashboard without losing your current view.
|
||||
- View a history of user steps when navigating through metrics and their filters.
|
||||
- Seamlessly pivot to related telemetry, including log data.
|
||||
|
||||
{{< docs/play title="Explore Metrics" url="https://play.grafana.org/explore/metrics/trail?from=now-1h&to=now&var-ds=grafanacloud-demoinfra-prom&var-filters=&refresh=&metricPrefix=all" >}}
|
||||
|
||||
You can access Explore Metrics either as a standalone experience or as part of Grafana dashboards.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
---
|
||||
description: Tracing in Explore
|
||||
keywords:
|
||||
- explore
|
||||
- trace
|
||||
@@ -8,167 +7,161 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Tracing in Explore
|
||||
weight: 20
|
||||
title: Traces in Explore
|
||||
weight: 40
|
||||
---
|
||||
|
||||
# Tracing in Explore
|
||||
# Traces in Explore
|
||||
|
||||
You can use Explore to query and visualize traces from tracing data sources.
|
||||
You can use Explore to query and visualize traces from tracing data sources. Supported data sources include:
|
||||
|
||||
Supported data sources are:
|
||||
|
||||
- [Tempo]({{< relref "../datasources/tempo/" >}}) (supported ingestion formats: OpenTelemetry, Jaeger, and Zipkin)
|
||||
- [Jaeger]({{< relref "../datasources/jaeger/" >}})
|
||||
- [Zipkin]({{< relref "../datasources/zipkin/" >}})
|
||||
- [Tempo](/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/)
|
||||
- [Jaeger](/docs/grafana/<GRAFANA_VERSION>/datasources/jaeger/)
|
||||
- [Zipkin](/docs/grafana/<GRAFANA_VERSION>/datasources/zipkin/)
|
||||
- [X-Ray](https://grafana.com/grafana/plugins/grafana-x-ray-datasource)
|
||||
- [Azure Monitor Application Insights]({{< relref "../datasources/azure-monitor/" >}})
|
||||
- [Azure Monitor](/docs/grafana/latest/datasources/azure-monitor/)
|
||||
- [ClickHouse](https://github.com/grafana/clickhouse-datasource)
|
||||
- [New Relic](https://grafana.com/grafana/plugins/grafana-newrelic-datasource)
|
||||
- [Infinity](https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource)
|
||||
- [New Relic](/docs/plugins/grafana-newrelic-datasource/latest/)
|
||||
- [Infinity](/docs/plugins/yesoreyeram-infinity-datasource/latest/)
|
||||
|
||||
For information on how to configure queries for the data sources listed above, refer to the documentation for specific data source.
|
||||
Here are some references to learn more about traces and how you can use them:
|
||||
|
||||
## Query editor
|
||||
- [Introduction to tracing](https://grafana.com/docs/tempo/<TEMPO_VERSION>/introduction/)
|
||||
- [Trace structure](https://grafana.com/docs/tempo/<TEMPO_VERSION>/traceql/trace-structure/#trace-structure)
|
||||
- [Traces and telemetry](https://grafana.com/docs/tempo/<TEMPO_VERSION>/introduction/telemetry/)
|
||||
- [Using traces to find solutions to problems](https://grafana.com/docs/tempo/<TEMPO_VERSION>/introduction/solutions-with-traces/)
|
||||
- [Best practices for tracing](/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/tracing-best-practices/)
|
||||
|
||||
You can query and search tracing data using a data source's query editor.
|
||||
## Query editors
|
||||
|
||||
Each data source can have it's own query editor. The query editor for the Tempo data source is slightly different than the query editor for the Jaeger data source.
|
||||
You can query and search tracing data using a data source's query editor. Note that data sources in Grafana have unique query editors.
|
||||
|
||||
For information on querying each data source, refer to their documentation:
|
||||
|
||||
- [Tempo query editor]({{< relref "../datasources/tempo/query-editor" >}})
|
||||
- [Jaeger query editor]({{< relref "../datasources/jaeger/#query-the-data-source" >}})
|
||||
- [Zipkin query editor]({{< relref "../datasources/zipkin/#query-the-data-source" >}})
|
||||
- [Azure Monitor Application Insights query editor]({{< relref "../datasources/azure-monitor/query-editor/#query-application-insights-traces" >}})
|
||||
- [ClickHouse query editor](https://clickhouse.com/docs/en/integrations/grafana/query-builder#traces)
|
||||
For information on how to use the query editor to create queries for tracing data sources, refer to the documentation for each individual data source.
|
||||
|
||||
## Trace view
|
||||
|
||||
This section explains the elements of the Trace View.
|
||||
Grafana's trace view provides an overview of a request as it travels through your system. The following sections provide detail on various elements of the trace view.
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the trace view" >}}
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view.png" class="docs-image--no-shadow" max-width= "900px" caption="Trace view" >}}
|
||||
|
||||
### Header
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-header.png" class="docs-image--no-shadow" max-width= "750px" caption="Screenshot of the trace view header" >}}
|
||||
The trace view header includes the following:
|
||||
|
||||
- Header title: Shows the name of the root span and trace ID.
|
||||
- Search: Highlights spans containing the searched text.
|
||||
- Metadata: Various metadata about the trace.
|
||||
- **Header title** - Shows the name of the root span and trace ID.
|
||||
- **Search** - Highlights spans containing the searched text.
|
||||
- **Metadata** - Various metadata about the trace.
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-header.png" class="docs-image--no-shadow" max-width= "750px" caption="Trace view header" >}}
|
||||
|
||||
### Minimap
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-minimap.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the trace view minimap" >}}
|
||||
**Minimap** displays a condensed view of the trace timeline. Drag your mouse over the minimap to zoom into a smaller time range. This also updates the main timeline, making it easier to view shorter spans
|
||||
When zoomed in, hovering over the minimap displays **Reset selection**, which resets the zoom.
|
||||
|
||||
Shows condensed view or the trace timeline. Drag your mouse over the minimap to zoom into smaller time range. Zooming will also update the main timeline, so it is easy to see shorter spans. Hovering over the minimap, when zoomed, will show Reset Selection button which resets the zoom.
|
||||
|
||||
### Span filters
|
||||
|
||||

|
||||
|
||||
Using span filters, you can filter your spans in the trace timeline viewer. The more filters you add, the more specific are the filtered spans.
|
||||
|
||||
You can add one or more of the following filters:
|
||||
|
||||
- Resource service name
|
||||
- Span name
|
||||
- Duration
|
||||
- Tags (which include tags, process tags, and log fields)
|
||||
|
||||
To only show the spans you have matched, you can press the `Show matches only` toggle.
|
||||
|
||||
{{< youtube id="VP2XV3IIc80" >}}
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-minimap.png" class="docs-image--no-shadow" max-width= "900px" caption="Trace view minimap example" >}}
|
||||
|
||||
### Timeline
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-timeline.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the trace view timeline" >}}
|
||||
Timeline shows list of spans within the trace. Each span row consists of the following components:
|
||||
|
||||
Shows list of spans within the trace. Each span row consists of these components:
|
||||
- **Expand children** - Expands or collapses all the children spans of the selected span.
|
||||
- **Service name** - Name of the service logged the span.
|
||||
- **Operation name** - Name of the operation that this span represents.
|
||||
- **Span duration bar** - Visual representation of the operation duration within the trace.
|
||||
|
||||
- Expand children button: Expands or collapses all the children spans of selected span.
|
||||
- Service name: Name of the service logged the span.
|
||||
- Operation name: Name of the operation that this span represents.
|
||||
- Span duration bar: Visual representation of the operation duration within the trace.
|
||||
Click anywhere on the span row to reveal span details.
|
||||
|
||||
Clicking anywhere on the span row shows span details.
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-timeline.png" class="docs-image--no-shadow" max-width= "900px" caption="Trace view timeline" >}}
|
||||
|
||||
### Span details
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-span-details.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the trace view span details" >}}
|
||||
Traces are composed of one or more spans.
|
||||
A span is a unit of work within a trace that has a start time relative to the beginning of the trace, a duration and an operation name for the unit of work.
|
||||
It usually has a reference to a parent span, unless it’s the first span, the root span, in a trace.
|
||||
It frequently includes key/value attributes that are relevant to the span itself, for example the HTTP method used in the request, as well as other metadata such as the service name, sub-span events, or links to other spans.
|
||||
|
||||
- Operation name.
|
||||
- Span metadata.
|
||||
- Tags: Any tags associated with this span.
|
||||
- Process metadata: Metadata about the process that logged this span.
|
||||
- Logs: List of logs logged by this span and associated key values. In case of Zipkin logs section shows Zipkin annotations.
|
||||
You can expand any span in a trace and view the details, including the span and resource attributes.
|
||||
|
||||
For more information about spans and traces, refer to [Introduction to tracing](https://grafana.com/docs/tempo/latest/introduction/) in the Tempo documentation.
|
||||
|
||||
Span details include:
|
||||
|
||||
- **Span attributes** - Key/value pairs that provides context for spans. For example, if the span deals with calling another service via HTTP, an attribute could include the HTTP URL (maybe as the span attribute key `http.url`) and the HTTP status code returned (as the span attribute `http.status_code`).
|
||||
|
||||
- **Resource attributes** - Key/value pairs that describe the context of how the span was collected.
|
||||
|
||||
Refer to [Span and resource attributes](/docs/tempo/<TEMPO_VERSION>/operations/best-practices/#span-and-resource-attributes) for more detail.
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-span-details.png" class="docs-image--no-shadow" max-width= "900px" caption="Trace view span details" >}}
|
||||
|
||||
### Span filters
|
||||
|
||||
Span filters allow you to refine the spans displayed in the trace timeline viewer.
|
||||
The more filters you add, the more specific the filtered spans become.
|
||||
Click on a trace to access Span filters.
|
||||
|
||||

|
||||
|
||||
You can add one or more of the following filters:
|
||||
|
||||
- **Service name** - Filter by selecting a service name from the dropdown.
|
||||
- **Span name** - Filter by selecting a span name from the dropdown.
|
||||
- **Duration** - Filter by duration. Accepted units include ns, us, ms, s, m, h.
|
||||
- **Tags** - Filter by tags, process tags, or log fields in your span.
|
||||
|
||||
To only show the spans you have matched, toggle **Show matches only**.
|
||||
|
||||
Refer to [Span filters](/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/span-filters/) for more in depth information.
|
||||
|
||||
Watch the following video to learn more about filtering trace spans in Grafana:
|
||||
{{< youtube id="VP2XV3IIc80" >}}
|
||||
|
||||
### Trace to logs
|
||||
|
||||
You can navigate from a span in a trace view directly to logs relevant for that span. This feature is available for Tempo, Jaeger, and Zipkin data sources. Refer to their [relevant documentation](/docs/grafana/latest/datasources/tempo/#trace-to-logs) for configuration instructions.
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-trace-to-logs.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the trace view in Explore with icon next to the spans" >}}
|
||||
You can navigate from a span in a trace view directly to logs relevant for that span.
|
||||
This feature is available for the Tempo, Jaeger, and Zipkin data sources.
|
||||
Refer to each individual data source's documentation for configuration instructions.
|
||||
|
||||
Click the document icon to open a split view in Explore with the configured data source and query relevant logs for the span.
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-trace-view-trace-to-logs.png" class="docs-image--no-shadow" max-width= "900px" caption="Trace to logs" >}}
|
||||
|
||||
### Trace to metrics
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
This feature is currently in beta and behind the `traceToMetrics` feature toggle.
|
||||
{{% /admonition %}}
|
||||
You can navigate from a span in a trace view directly to metrics relevant for that span.
|
||||
This feature is available for the Tempo, Jaeger, and Zipkin data sources.
|
||||
|
||||
You can navigate from a span in a trace view directly to metrics relevant for that span. This feature is available for Tempo, Jaeger, and Zipkin data sources. Refer to their [relevant documentation](/docs/grafana/latest/datasources/tempo/configure-tempo-data-source/#trace-to-metrics) for configuration instructions.
|
||||
Refer to each individual data source's documentation for configuration instructions.
|
||||
For Tempo, refer to [Trace to metrics configuration](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/#trace-to-metrics).
|
||||
|
||||
### Trace to profiles
|
||||
|
||||
Using Trace to profiles, you can use Grafana’s ability to correlate different signals by adding the functionality to link between traces and profiles.
|
||||
Refer to the [relevant documentation](/docs/grafana/latest/datasources/tempo/configure-tempo-data-source#trace-to-profiles) for configuration instructions.
|
||||
|
||||
For Tempo refer to [Trace to profiles](/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source#trace-to-profiles) for configuration instructions.
|
||||
|
||||
{{< figure src="/static/img/docs/tempo/profiles/tempo-trace-to-profile.png" max-width="900px" class="docs-image--no-shadow" alt="Selecting a link in the span queries the profile data source" >}}
|
||||
|
||||
## Node graph
|
||||
|
||||
You can optionally expand the node graph for the displayed trace. Depending on the data source, this can show spans of the trace as nodes in the graph, or as some additional context like service graph based on the current trace.
|
||||
You can also expand the node graph for a displayed trace. If the data source supports it, this displays spans of the trace as nodes in the graph, or provides additional context, such as a service graph based on the current trace.
|
||||
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-node-graph.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the node graph" >}}
|
||||
Refer to [Node graph](/docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/node-graph/) for additional information.
|
||||
|
||||
## Service Graph
|
||||
{{< admonition type="note" >}}
|
||||
The node graph requires data to be returned from the data source in a specific format to display correctly. Refer to [Data API](/docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/node-graph/#data-api), [Nodes data frame structure](/docs/grafana/latest/panels-visualizations/visualizations/node-graph/#nodes-data-frame-structure) and [Node graph data requirements](/docs/grafana/latest/panels-visualizations/visualizations/node-graph/#data-requirements) for additional information and configuration instructions.
|
||||
{{< /admonition >}}
|
||||
|
||||
The Service Graph visualizes the span metrics (traces data for rates, error rates, and durations (RED)) and service graphs.
|
||||
Once the requirements are set up, this pre-configured view is immediately available.
|
||||
{{< figure src="/media/docs/tempo/screenshot-grafana-node-graph.png" class="docs-image--no-shadow" max-width= "900px" caption="Node graph" >}}
|
||||
|
||||
For more information, refer to the [Service Graph view section]({{< relref "../datasources/tempo/#open-the-service-graph-view" >}}) of the Tempo data source page and the [service graph view page](/docs/tempo/latest/metrics-generator/service-graph-view/) in the Tempo documentation.
|
||||
## Service graph
|
||||
|
||||
{{< figure src="/static/img/docs/grafana-cloud/apm-overview.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the Service Graph view" >}}
|
||||
A service graph visualizes span metrics, including rates, error rates, and durations (RED), along with service relationships. Once the requirements are configured, this pre-configured view is immediately available.
|
||||
|
||||
## Data API
|
||||
For additional information refer to the following documentation:
|
||||
|
||||
This visualization needs a specific shape of the data to be returned from the data source in order to correctly display it.
|
||||
- [Service Graph and Service Graph view](/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/service-graph/)
|
||||
- [Service graph view](/docs/tempo/<TEMPO_VERSION>/metrics-generator/service-graph-view/) in Tempo documentation
|
||||
|
||||
Data source needs to return data frame and set `frame.meta.preferredVisualisationType = 'trace'`.
|
||||
|
||||
### Data frame structure
|
||||
|
||||
Required fields:
|
||||
|
||||
| Field name | Type | Description |
|
||||
| ------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| traceID | string | Identifier for the entire trace. There should be only one trace in the data frame. |
|
||||
| spanID | string | Identifier for the current span. SpanIDs should be unique per trace. |
|
||||
| parentSpanID | string | SpanID of the parent span to create child parent relationship in the trace view. Can be `undefined` for root span without a parent. |
|
||||
| serviceName | string | Name of the service this span is part of. |
|
||||
| serviceTags | TraceKeyValuePair[] | List of tags relevant for the service. |
|
||||
| startTime | number | Start time of the span in millisecond epoch time. |
|
||||
| duration | number | Duration of the span in milliseconds. |
|
||||
|
||||
Optional fields:
|
||||
|
||||
| Field name | Type | Description |
|
||||
| -------------- | ------------------- | ------------------------------------------------------------------ |
|
||||
| logs | TraceLog[] | List of logs associated with the current span. |
|
||||
| tags | TraceKeyValuePair[] | List of tags associated with the current span. |
|
||||
| warnings | string[] | List of warnings associated with the current span. |
|
||||
| stackTraces | string[] | List of stack traces associated with the current span. |
|
||||
| errorIconColor | string | Color of the error icon in case span is tagged with `error: true`. |
|
||||
|
||||
For details about the types see [TraceSpanRow](https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/types/trace.ts#L28), [TraceKeyValuePair](https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/types/trace.ts#L4) and [TraceLog](https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/types/trace.ts#L12).
|
||||
{{< figure src="/static/img/docs/grafana-cloud/apm-overview.png" class="docs-image--no-shadow" max-width= "900px" caption="Service graph view" >}}
|
||||
|
||||
@@ -106,17 +106,17 @@ The following image shows the two metrics associated with the endpoint. The HELP
|
||||
|
||||
The 'MyApp' metrics are available in an HTTP endpoint, but how do they get to Grafana, and subsequently, into a dashboard? The process of recording and transmitting the readings of an application or piece of infrastructure is known as _telemetry_. Telemetry is critical to observability because it helps you understand exactly what's going on in your infrastructure. The metrics introduced previously, for example, `MyAppnodejs_active_requests_total`, are telemetry data.
|
||||
|
||||
To get metrics into Grafana, you can use either the Prometheus software or [Grafana Agent](/docs/agent/latest/) to scrape metrics. Grafana Agent collects and forwards the telemetry data to open-source deployments of the Grafana Stack, Grafana Cloud, or Grafana Enterprise, where your data can be analyzed. For example, you can configure Grafana Agent to pull the data from 'MyApp' every five seconds and send the results to Grafana Cloud.
|
||||
To get metrics into Grafana, you can use either the Prometheus software or [Grafana Alloy](https://grafana.com/docs/alloy/latest/) to scrape metrics. Grafana Alloy collects and forwards the telemetry data to open-source deployments of the Grafana Stack, Grafana Cloud, or Grafana Enterprise, where your data can be analyzed. For example, you can configure Grafana Alloy to pull the data from 'MyApp' every five seconds and send the results to Grafana Cloud.
|
||||
|
||||
Metrics data is only one type of telemetry data; the other kinds are logs and traces. Using Grafana Agent can be a great option to send telemetry data because as you scale your observability practices to include logs and traces, which Grafana Agent also supports, you've got a solution already in place.
|
||||
Metrics data is only one type of telemetry data; the other kinds are logs and traces. Using Grafana Alloy can be a great option to send telemetry data because as you scale your observability practices to include logs and traces, which Grafana Alloy also supports, you've got a solution already in place.
|
||||
|
||||
The following image illustrates how Grafana Agent works as an intermediary between 'MyApp' and Grafana Cloud.
|
||||
The following image illustrates how Grafana Alloy works as an intermediary between 'MyApp' and Grafana Cloud.
|
||||
|
||||
{{< figure src="/media/docs/grafana/intro-prometheus/grafana-agent.png" max-width="750px" caption="Grafana Agent" >}}
|
||||
{{< figure src="/media/docs/alloy/flow-diagram-small-alloy.png" alt="Grafana Alloy" caption="Grafana Alloy" >}}
|
||||
|
||||
## Bringing it together
|
||||
|
||||
The combination of Prometheus and Grafana Agent gives you control over the metrics you want to report, where they come from, and where they’re going. Once the data is in Grafana, it can be stored in a Grafana Mimir database. Grafana dashboards consist of visualizations populated by data queried from the Prometheus data source. The PromQL query filters and aggregates the data to provide you the insight you need. With those steps, we’ve gone from raw numbers, generated by software, into Prometheus, delivered to Grafana, queried by PromQL, and visualized by Grafana.
|
||||
The combination of Prometheus and Grafana Alloy gives you control over the metrics you want to report, where they come from, and where they’re going. Once the data is in Grafana, it can be stored in a Grafana Mimir database. Grafana dashboards consist of visualizations populated by data queried from the Prometheus data source. The PromQL query filters and aggregates the data to provide you the insight you need. With those steps, we’ve gone from raw numbers, generated by software, into Prometheus, delivered to Grafana, queried by PromQL, and visualized by Grafana.
|
||||
|
||||
## What’s next?
|
||||
|
||||
|
||||
@@ -84,7 +84,9 @@ In addition to Grafana, Grafana Labs also provides the following open source pro
|
||||
|
||||
**Grafana Beyla:** Grafana Beyla is an eBPF-based application auto-instrumentation tool for application observability. eBPF is used to automatically inspect application executables and the OS networking layer as well as capture basic trace spans related to web transactions and Rate-Errors-Duration (RED) metrics for Linux HTTP/S and gRPC services. All data capture occurs without any modifications to application code or configuration. For more information about Grafana Beyla, refer to [Grafana Beyla documentation](/docs/beyla/latest/).
|
||||
|
||||
**Grafana Agent:** Grafana Agent is a vendor-neutral, batteries-included telemetry collector with configuration inspired by Terraform. It is designed to be flexible, performant, and compatible with multiple ecosystems such as Prometheus and OpenTelemetry. For more information about Grafana Agent, refer to [Grafana Agent documentation](/docs/agent/latest/).
|
||||
**Grafana Alloy:** Grafana Alloy is a flexible, high performance, vendor-neutral distribution of the [OpenTelemetry][] (OTel) Collector.
|
||||
It's fully compatible with the most popular open source observability standards such as OpenTelemetry (OTel) and Prometheus.
|
||||
For more information about Grafana Alloy, refer to the [Grafana Alloy documentation](https://grafana.com/docs/alloy/latest/).
|
||||
|
||||
**Grafana k6:** Grafana k6 is an open-source load testing tool that makes performance testing easy and productive for engineering teams. For more information about Grafana k6, refer to [Grafana k6 documentation](/docs/k6/latest/).
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ To learn more about Grafana Enterprise, refer to [our product page](/enterprise)
|
||||
|
||||
## Enterprise features in Grafana Cloud
|
||||
|
||||
Many Grafana Enterprise features are also available in [Grafana Cloud](/docs/grafana-cloud) Free, Pro, and Advanced accounts. For details, refer to [the Grafana Cloud features table](/pricing/#featuresTable).
|
||||
Many Grafana Enterprise features are also available in [Grafana Cloud](/docs/grafana-cloud) Free, Pro, and Advanced accounts. For details, refer to [Grafana Cloud pricing](/pricing/#featuresTable).
|
||||
|
||||
To migrate to Grafana Cloud, refer to [Migrate from Grafana Enterprise to Grafana Cloud](/docs/grafana-cloud/account-management/e2c-guide/).
|
||||
|
||||
@@ -79,12 +79,10 @@ With a Grafana Enterprise license, you also get access to premium data sources,
|
||||
- [Azure Devops](/grafana/plugins/grafana-azuredevops-datasource)
|
||||
- [Databricks](/grafana/plugins/grafana-databricks-datasource)
|
||||
- [DataDog](/grafana/plugins/grafana-datadog-datasource)
|
||||
- [Databricks](/grafana/plugins/grafana-databricks-datasource/)
|
||||
- [Dynatrace](/grafana/plugins/grafana-dynatrace-datasource)
|
||||
- [Gitlab](/grafana/plugins/grafana-gitlab-datasource)
|
||||
- [Honeycomb](/grafana/plugins/grafana-honeycomb-datasource)
|
||||
- [Jira](/grafana/plugins/grafana-jira-datasource)
|
||||
- [k6 Cloud App](/grafana/plugins/grafana-k6-app)
|
||||
- [MongoDB](/grafana/plugins/grafana-mongodb-datasource)
|
||||
- [New Relic](/grafana/plugins/grafana-newrelic-datasource)
|
||||
- [Oracle Database](/grafana/plugins/grafana-oracle-datasource)
|
||||
|
||||
@@ -219,7 +219,6 @@ To access values and labels from other fields use:
|
||||
| --------------------------------- | ------------------------------------------ |
|
||||
| `__data.fields[i]` | Value of field `i` (on the same row) |
|
||||
| `__data.fields["NameOfField"]` | Value of field using name instead of index |
|
||||
| `__data.fields["NameOfField"]` | Value of field using name instead of index |
|
||||
| `__data.fields[1].labels.cluster` | Access labels of another field |
|
||||
|
||||
### Template variables
|
||||
|
||||
@@ -237,6 +237,8 @@ Select one of the following schemes:
|
||||
| Multiple continuous colors (by value) | Grafana automatically assigns colors based on the percentage of a value relative to the min and the max of the field or series. For some visualizations, you also need to choose if the color is set by the **Last**, **Min**, or **Max** value of the field or series. Select from: **Green-Yellow-Red**, **Red-Yellow-Green**, **Blue-Yellow-Red**, **Yellow-Red**, **Blue-Purple**, and **Yellow-Blue**. |
|
||||
| Single continuous color (by value) | Grafana automatically assigns shades of one color based on the percentage of a value relative to the min and the max of the field or series. For some visualizations, you also need to choose if the color is set by the **Last**, **Min**, or **Max** value of the field or series. Select from: **Blues**, **Reds**, **Greens**, and **Purples**. |
|
||||
|
||||
You can also use the legend to open the color picker by clicking the legend series color icon. Setting color this way automatically creates an override rule that set's a specific color for a specific series.
|
||||
|
||||
### No value
|
||||
|
||||
Enter what Grafana should display if the field value is empty or null. The default value is a hyphen (-).
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
aliases:
|
||||
- ../dashboards/add-organize-panels/
|
||||
- ../dashboards/dashboard-create/
|
||||
- ../features/dashboard/dashboards/
|
||||
- ../panels/add-panels-dynamically/about-repeating-panels-rows/
|
||||
- ../panels/add-panels-dynamically/configure-repeating-panels/
|
||||
- ../panels/add-panels-dynamically/configure-repeating-rows/
|
||||
|
||||
@@ -124,7 +124,7 @@ So if you have numbers with labels like `{host=web01}` in `$A` and another numbe
|
||||
|
||||
- An item with no labels will join to anything.
|
||||
- If both `$A` and `$B` each contain only one item (one series, or one number), they will join.
|
||||
- If labels are exact math they will join.
|
||||
- If labels are exact match they will join.
|
||||
- If labels are a subset of the other, for example and item in `$A` is labeled `{host=A,dc=MIA}` and item in `$B` is labeled `{host=A}` they will join.
|
||||
- Currently, if within a variable such as `$A` there are different tag _keys_ for each item, the join behavior is undefined.
|
||||
|
||||
|
||||
@@ -46,17 +46,12 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/table/#sparkline
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/table/#sparkline
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/table/#sparkline
|
||||
calculation-types:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/calculation-types/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/calculation-types/
|
||||
heatmap-panel:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/heatmap/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/heatmap/
|
||||
configuration-file:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#configuration-file-location
|
||||
@@ -64,9 +59,9 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#configuration-file-location
|
||||
dashboard-variable:
|
||||
- pattern: /docs/grafana/
|
||||
destination: docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/
|
||||
feature-toggle:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#feature_toggles
|
||||
@@ -76,12 +71,12 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/table/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/table/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/table/
|
||||
time-series-panel:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/time-series/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/time-series/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/time-series/
|
||||
---
|
||||
|
||||
# Transform data
|
||||
@@ -119,7 +114,7 @@ The following steps guide you in adding a transformation to data. This documenta
|
||||
1. Click the **Transform** tab.
|
||||
1. Click a transformation.
|
||||
A transformation row appears where you configure the transformation options. For more information about how to configure a transformation, refer to [Transformation functions](#transformation-functions).
|
||||
For information about available calculations, refer to [Calculation types](ref:calculation-types).
|
||||
For information about available calculations, refer to [Calculation types][].
|
||||
1. To apply another transformation, click **Add transformation**.
|
||||
This transformation acts on the result set returned by the previous transformation.
|
||||
{{< figure src="/static/img/docs/transformations/transformations-7-0.png" class="docs-image--no-shadow" max-width= "1100px" alt="Transform tab in the panel editor" >}}
|
||||
@@ -191,7 +186,7 @@ Use this transformation to add a new field calculated from two other fields. Eac
|
||||
- **Variance** - Calculates the moving variance.
|
||||
- **Row index** - Insert a field with the row index.
|
||||
- **Field name** - Select the names of fields you want to use in the calculation for the new field.
|
||||
- **Calculation** - If you select **Reduce row** mode, then the **Calculation** field appears. Click in the field to see a list of calculation choices you can use to create the new field. For information about available calculations, refer to [Calculation types](ref:calculation-types).
|
||||
- **Calculation** - If you select **Reduce row** mode, then the **Calculation** field appears. Click in the field to see a list of calculation choices you can use to create the new field. For information about available calculations, refer to [Calculation types][].
|
||||
- **Operation** - If you select **Binary operation** or **Unary operation** mode, then the **Operation** fields appear. These fields allow you to apply basic math operations on values in a single row from selected fields. You can also use numerical values for binary operations.
|
||||
- **As percentile** - If you select **Row index** mode, then the **As percentile** switch appears. This switch allows you to transform the row index as a percentage of the total number of rows.
|
||||
- **Alias** - (Optional) Enter the name of your new field. If you leave this blank, then the field will be named to match the calculation.
|
||||
@@ -303,6 +298,9 @@ This transformation has the following options:
|
||||
- **Numeric** - attempts to make the values numbers
|
||||
- **String** - will make the values strings
|
||||
- **Time** - attempts to parse the values as time
|
||||
- The input will be parsed according to the [Moment.js parsing format](https://momentjs.com/docs/#/parsing/)
|
||||
- It will parse the numeric input as a Unix epoch timestamp in milliseconds.
|
||||
You must multiply your input by 1000 if it's in seconds.
|
||||
- Will show an option to specify a DateFormat as input by a string like yyyy-mm-dd or DD MM YYYY hh:mm:ss
|
||||
- **Boolean** - will make the values booleans
|
||||
- **Enum** - will make the values enums
|
||||
@@ -355,7 +353,7 @@ Consider the following dataset:
|
||||
| 1636678680000000000 | {"value": 5} |
|
||||
| 1636678620000000000 | {"value": 12} |
|
||||
|
||||
You could prepare the data to be used by a [Time series panel](ref:time-series-panel) with this configuration:
|
||||
You could prepare the data to be used by a [Time series panel][] with this configuration:
|
||||
|
||||
- Source: json_data
|
||||
- Format: JSON
|
||||
@@ -536,7 +534,7 @@ Click and uncheck the field names to remove them from the result. Fields that ar
|
||||
|
||||
#### Use a dashboard variable
|
||||
|
||||
Enable 'From variable' to let you select a dashboard variable that's used to include fields. By setting up a [dashboard variable](ref:dashboard-variable) with multiple choices, the same fields can be displayed across multiple visualizations.
|
||||
Enable 'From variable' to let you select a dashboard variable that's used to include fields. By setting up a [dashboard variable][] with multiple choices, the same fields can be displayed across multiple visualizations.
|
||||
|
||||
{{< figure src="/static/img/docs/transformations/filter-name-table-before-7-0.png" class="docs-image--no-shadow" max-width= "1100px" alt="A table visualization with time, value, Min, and Max columns" >}}
|
||||
|
||||
@@ -595,7 +593,7 @@ This transformation lets you tailor the time representation in your visualizatio
|
||||
|
||||
### Group by
|
||||
|
||||
Use this transformation to group the data by a specified field (column) value and process calculations on each group. Click to see a list of calculation choices. For information about available calculations, refer to [Calculation types](ref:calculation-types).
|
||||
Use this transformation to group the data by a specified field (column) value and process calculations on each group. Click to see a list of calculation choices. For information about available calculations, refer to [Calculation types][].
|
||||
|
||||
Here's an example of original data.
|
||||
|
||||
@@ -675,7 +673,7 @@ We can generate a matrix using the values of 'Server Status' as column names, th
|
||||
|
||||
Use this transformation to construct a matrix by specifying fields from your query results. The matrix output reflects the relationships between the unique values in these fields. This helps you present complex relationships in a clear and structured matrix format.
|
||||
|
||||
### Group to nested table
|
||||
### Group to nested tables
|
||||
|
||||
Use this transformation to group the data by a specified field (column) value and process calculations on each group. Records are generated that share the same grouped field value, to be displayed in a nested table.
|
||||
|
||||
@@ -687,7 +685,7 @@ Once **Calculate** has been selected, another selection box will appear next to
|
||||
|
||||
{{< figure src="/static/img/docs/transformations/nested-table-select-stat.png" class="docs-image--no-shadow" max-width= "1100px" alt="A select box showing available statistic calculations once the calculate option for the field has been selected." >}}
|
||||
|
||||
For information about available calculations, refer to [Calculation types](ref:calculation-types).
|
||||
For information about available calculations, refer to [Calculation types][].
|
||||
|
||||
Here's an example of original data:
|
||||
|
||||
@@ -1419,7 +1417,7 @@ This transformation allows you to manipulate and analyze geospatial data, enabli
|
||||
|
||||
### Time series to table transform
|
||||
|
||||
Use this transformation to convert time series results into a table, transforming a time series data frame into a **Trend** field which can then be used with the [sparkline cell type](ref:sparkline-cell-type). If there are multiple time series queries, each will result in a separate table data frame. These can be joined using join or merge transforms to produce a single table with multiple sparklines per row.
|
||||
Use this transformation to convert time series results into a table, transforming a time series data frame into a **Trend** field which can then be used with the [sparkline cell type][]. If there are multiple time series queries, each will result in a separate table data frame. These can be joined using join or merge transforms to produce a single table with multiple sparklines per row.
|
||||
|
||||
{{< figure src="/static/img/docs/transformations/table-sparklines.png" class="docs-image--no-shadow" max-width= "1100px" alt="A table panel showing multiple values and their corresponding sparklines." >}}
|
||||
|
||||
@@ -1427,7 +1425,7 @@ For each generated **Trend** field value, a calculation function can be selected
|
||||
|
||||
{{< figure src="/static/img/docs/transformations/timeseries-table-select-stat.png" class="docs-image--no-shadow" max-width= "1100px" alt="A select box showing available statistics that can be calculated." >}}
|
||||
|
||||
> **Note:** This transformation is available in Grafana 9.5+ as an opt-in beta feature. Modify the Grafana [configuration file](ref:configuration-file) to use it.
|
||||
> **Note:** This transformation is available in Grafana 9.5+ as an opt-in beta feature. Modify the Grafana [configuration file][] to use it.
|
||||
|
||||
### Regression analysis
|
||||
|
||||
@@ -1442,4 +1440,10 @@ There are two different models:
|
||||
|
||||
> **Note:** This transformation is currently in public preview. Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available. Enable the `regressionTransformation` feature toggle in Grafana to use this feature. Contact Grafana Support to enable this feature in Grafana Cloud.
|
||||
|
||||
[Data frames]: https://grafana.com/developers/plugin-tools/introduction/data-frames/
|
||||
[Table panel]: ref:table-panel
|
||||
[Calculation types]: ref:calculation-types
|
||||
[sparkline cell type]: ref:sparkline-cell-type
|
||||
[configuration file]: ref:configuration-file
|
||||
[Time series panel]: ref:time-series-panel
|
||||
[feature toggle]: ref:feature-toggle
|
||||
[dashboard variable]: ref:dashboard-variable
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user