-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: QuentinBisson <[email protected]>
- Loading branch information
1 parent
efab778
commit 8990c57
Showing
14 changed files
with
16,645 additions
and
16,829 deletions.
There are no files selected for viewing
3,578 changes: 1,782 additions & 1,796 deletions
3,578
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-canary.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,614 changes: 1,286 additions & 1,328 deletions
2,614
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-chunks.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,916 changes: 949 additions & 967 deletions
1,916
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-deletion.json
Large diffs are not rendered by default.
Oops, something went wrong.
2,136 changes: 1,068 additions & 1,068 deletions
2,136
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-logs.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,402 changes: 701 additions & 701 deletions
1,402
...ds/charts/private_dashboards_al/dashboards/shared/private/loki-mixin-recording-rules.json
Large diffs are not rendered by default.
Oops, something went wrong.
12,158 changes: 6,079 additions & 6,079 deletions
12,158
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-operational.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,832 changes: 899 additions & 933 deletions
1,832
...shboards/charts/private_dashboards_al/dashboards/shared/private/loki-reads-resources.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,290 changes: 639 additions & 651 deletions
1,290
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-reads.json
Large diffs are not rendered by default.
Oops, something went wrong.
3,776 changes: 1,863 additions & 1,913 deletions
3,776
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-retention.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,416 changes: 697 additions & 719 deletions
1,416
...hboards/charts/private_dashboards_al/dashboards/shared/private/loki-writes-resources.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,304 changes: 644 additions & 660 deletions
1,304
helm/dashboards/charts/private_dashboards_al/dashboards/shared/private/loki-writes.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
vendor/ | ||
dashboards_out/ | ||
alerts.yaml | ||
rules.yaml | ||
jsonnetfile.* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
local loki = import 'loki-mixin/mixin-ssd.libsonnet'; | ||
|
||
loki{ | ||
_config+:: { | ||
tags: [ | ||
"owner:team-atlas", | ||
"topic:observability", | ||
"component:loki" | ||
], | ||
|
||
per_cluster_label: 'cluster_id', | ||
|
||
canary+: { | ||
enabled: true, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,30 @@ | |
|
||
# Update Loki mixins from upstream | ||
# | ||
# This script is used to update the Loki mixins from the upstream repository. | ||
# | ||
# Usage: | ||
# ./loki/update.sh from the root of the repository | ||
|
||
set -e | ||
|
||
TAG="helm-loki-5.47.2" | ||
helmDir="$(pwd)/helm/dashboards/charts/private_dashboards_al/dashboards/shared/private" | ||
|
||
tmpDir="$(mktemp -d)" | ||
cp loki/mixin.libsonnet "$tmpDir" | ||
cd "$tmpDir" | ||
jb init | ||
jb install https://github.com/grafana/loki/production/loki-mixin@$TAG | ||
mixtool generate all mixin.libsonnet | ||
|
||
git clone --depth 1 --single-branch -b "$TAG" --no-tags -q [email protected]:grafana/loki.git "$tmpDir" | ||
|
||
ls -l "$tmpDir"/production/loki-mixin-compiled-ssd/dashboards | ||
|
||
rm -rf ./output | ||
mkdir -p ./output | ||
|
||
for file in "$tmpDir"/production/loki-mixin-compiled-ssd/dashboards/*; do | ||
for file in dashboards_out/*; do | ||
# Process each file here | ||
echo "$file" | ||
|
||
# replaces cluster with cluster_id in queries and expr, then adds loki- prefix to uid | ||
jq '.uid = "loki-" + .uid | .templating.list[].query |= gsub(", cluster\\)"; ", cluster_id)") | .templating.list[].query |= gsub("cluster=~\\\"\\$cluster\\\""; "cluster_id=~\"$cluster_id\"") | .templating.list[].query |= gsub("cluster=\\\"\\$cluster\\\""; "cluster_id=\"$cluster_id\"") | .rows[].panels[].targets[].expr |= gsub("cluster=~\\\"\\$cluster\\\""; "cluster_id=~\"$cluster_id\"") | .rows[].panels[].targets[].expr |= gsub("cluster=\\\"\\$cluster\\\""; "cluster_id=\"$cluster_id\"") | .tags |= ["owner:team-atlas", "topic:observability", "component:loki"] | .links[].tags |= ["owner:team-atlas", "topic:observability", "component:loki"]' "$file" > "./output/$(basename "$file")" | ||
# adds loki- prefix to uid | ||
jq '.uid = "loki-" + .uid' "$file" > "$$file.out" && mv "$$file.out" "$$file" | ||
|
||
echo "Copying dashboard to $helmDir" | ||
cp "$file" "$helmDir" | ||
done | ||
|
||
cp ./output/* helm/dashboards/charts/private_dashboards_al/dashboards/shared/private | ||
|
||
|