First draft
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
This commit is contained in:
parent
58171a6a42
commit
cdb0bee56e
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
production/
|
12
Makefile
12
Makefile
@ -8,3 +8,15 @@ help:
|
|||||||
|
|
||||||
helm-lint: ## Run helm linter
|
helm-lint: ## Run helm linter
|
||||||
$(MAKE) -BC charts/meta-monitoring lint
|
$(MAKE) -BC charts/meta-monitoring lint
|
||||||
|
|
||||||
|
MIXIN_PATH := production/loki-mixin
|
||||||
|
MIXIN_OUT_PATH_META_MONITORING := production/loki-mixin-compiled-meta-monitoring
|
||||||
|
|
||||||
|
mixin: ## Create our version of the mixin
|
||||||
|
@rm -rf $(MIXIN_PATH)
|
||||||
|
./scripts/clone_loki_mixin.sh
|
||||||
|
@rm -rf $(MIXIN_OUT_PATH_META_MONITORING) && mkdir $(MIXIN_OUT_PATH_META_MONITORING)
|
||||||
|
@cd $(MIXIN_PATH) && jb install
|
||||||
|
@mixtool generate all --output-alerts $(MIXIN_OUT_PATH_META_MONITORING)/alerts.yaml --output-rules $(MIXIN_OUT_PATH_META_MONITORING)/rules.yaml --directory $(MIXIN_OUT_PATH_META_MONITORING)/dashboards ${MIXIN_PATH}/mixin-meta-monitoring.libsonnet
|
||||||
|
# copy MIXIN_OUT_PATH_META_MONITORING dir to src
|
||||||
|
|
||||||
|
23
scripts/clone_loki_mixin.sh
Executable file
23
scripts/clone_loki_mixin.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
clean_up() {
|
||||||
|
test -d "$tmp_dir" && rm -fr "$tmp_dir"
|
||||||
|
}
|
||||||
|
|
||||||
|
here=${PWD}
|
||||||
|
|
||||||
|
tmp_dir=$( mktemp -d -t my-script )
|
||||||
|
cd $tmp_dir
|
||||||
|
|
||||||
|
echo "Cloning Loki"
|
||||||
|
git clone --filter=blob:none --no-checkout "https://github.com/grafana/loki"
|
||||||
|
cd loki
|
||||||
|
git sparse-checkout init --cone
|
||||||
|
git checkout main
|
||||||
|
git sparse-checkout set production/loki-mixin
|
||||||
|
|
||||||
|
echo "Copying production/loki-mixin to ${here}"
|
||||||
|
cp -r production ${here}
|
||||||
|
|
||||||
|
cd ${here}
|
||||||
|
cp scripts/mixin-meta-monitoring.libsonnet production/loki-mixin/
|
18
scripts/mixin-meta-monitoring.libsonnet
Normal file
18
scripts/mixin-meta-monitoring.libsonnet
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
(import 'dashboards.libsonnet') +
|
||||||
|
(import 'alerts.libsonnet') +
|
||||||
|
(import 'recording_rules.libsonnet') + {
|
||||||
|
grafanaDashboardFolder: 'Loki Meta Monitoring',
|
||||||
|
|
||||||
|
_config+:: {
|
||||||
|
internal_components: false,
|
||||||
|
|
||||||
|
// The Meta Monitoring helm chart uses Grafana Alloy instead of promtail
|
||||||
|
promtail+: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
meta_monitoring+: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user