Skip to content

Commit

Permalink
update(agent-flow-mixin)
Browse files Browse the repository at this point in the history
Signed-off-by: Weifeng Wang <[email protected]>

update

Signed-off-by: Weifeng Wang <[email protected]>

update(loki-mixin)

Signed-off-by: Weifeng Wang <[email protected]>
  • Loading branch information
qclaogui committed Feb 29, 2024
1 parent 6c7556c commit 2dddc3c
Show file tree
Hide file tree
Showing 129 changed files with 40,982 additions and 46,464 deletions.
6 changes: 3 additions & 3 deletions .bingo/Variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ $(KUSTOMIZE): $(BINGO_DIR)/kustomize.mod
@echo "(re)installing $(GOBIN)/kustomize-v5.3.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=kustomize.mod -o=$(GOBIN)/kustomize-v5.3.0 "sigs.k8s.io/kustomize/kustomize/v5"

MIXTOOL := $(GOBIN)/mixtool-v0.0.0-20240102105536-c5c8c700d43b
MIXTOOL := $(GOBIN)/mixtool-v0.0.0-20240208221950-117ecd3d3a1f
$(MIXTOOL): $(BINGO_DIR)/mixtool.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/mixtool-v0.0.0-20240102105536-c5c8c700d43b"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=mixtool.mod -o=$(GOBIN)/mixtool-v0.0.0-20240102105536-c5c8c700d43b "github.com/monitoring-mixins/mixtool/cmd/mixtool"
@echo "(re)installing $(GOBIN)/mixtool-v0.0.0-20240208221950-117ecd3d3a1f"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=mixtool.mod -o=$(GOBIN)/mixtool-v0.0.0-20240208221950-117ecd3d3a1f "github.com/monitoring-mixins/mixtool/cmd/mixtool"

2 changes: 1 addition & 1 deletion .bingo/mixtool.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT

go 1.20

require github.com/monitoring-mixins/mixtool v0.0.0-20240102105536-c5c8c700d43b // cmd/mixtool
require github.com/monitoring-mixins/mixtool v0.0.0-20240208221950-117ecd3d3a1f // cmd/mixtool
2 changes: 2 additions & 0 deletions .bingo/mixtool.sum
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ github.com/monitoring-mixins/mixtool v0.0.0-20231106214329-ad41c1466f54 h1:gYRxn
github.com/monitoring-mixins/mixtool v0.0.0-20231106214329-ad41c1466f54/go.mod h1:QBrYcNkbwkWTG6nxsmXXaSD4BTvVQThpXnDKYVwfRf4=
github.com/monitoring-mixins/mixtool v0.0.0-20240102105536-c5c8c700d43b h1:+z4sTeSlb/or/J9a8aX218sHHnoNb5C9WSONGb65fPI=
github.com/monitoring-mixins/mixtool v0.0.0-20240102105536-c5c8c700d43b/go.mod h1:Qard6joC2PaBF1hMkhPlaW3VjBbndgN09Wjr2qB0H3g=
github.com/monitoring-mixins/mixtool v0.0.0-20240208221950-117ecd3d3a1f h1:BVYgyfSmcgQDWTdZ2Spt98fxIAfAIfdOXyUscXReSb8=
github.com/monitoring-mixins/mixtool v0.0.0-20240208221950-117ecd3d3a1f/go.mod h1:Qard6joC2PaBF1hMkhPlaW3VjBbndgN09Wjr2qB0H3g=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand Down
2 changes: 1 addition & 1 deletion .bingo/variables.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ JSONNETFMT="${GOBIN}/jsonnetfmt-v0.20.0"

KUSTOMIZE="${GOBIN}/kustomize-v5.3.0"

MIXTOOL="${GOBIN}/mixtool-v0.0.0-20240102105536-c5c8c700d43b"
MIXTOOL="${GOBIN}/mixtool-v0.0.0-20240208221950-117ecd3d3a1f"

6 changes: 3 additions & 3 deletions monitoring-mixins/agent-flow-mixin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ fmt: ## Format the mixin files
@find . -type f -name '*.libsonnet' | xargs -n 1 -- $(JSONNET_FMT) -i

.PHONY: update
update: ## update mixin
update: $(JB) ## update mixin
$(JB) update

.PHONY: build
build: ## Generates the mixin files
build: $(MIXTOOL) ## Generates the mixin files
@mkdir -p "$(MIXIN_OUT_PATH)"; \
find "$(MIXIN_OUT_PATH)" ! -name "kustomization.yaml" -type f -delete; \
$(MIXTOOL) generate all --output-alerts "$(MIXIN_OUT_PATH)/alerts.yaml" --output-rules "$(MIXIN_OUT_PATH)/rules.yaml" --directory "$(MIXIN_OUT_PATH)/dashboards_out" "mixin.libsonnet"; \
# ../../tools/check-rules.sh "$(MIXIN_OUT_PATH)/rules.yaml" 20 ; \

.PHONY: check
check: build fmt manifests ## Build, fmt and check the mixin files
check: $(MIXTOOL) build fmt manifests ## Build, fmt and check the mixin files
@../../tools/find-diff-or-untracked.sh . "$(MIXIN_OUT_PATH)" || (echo "Please build and fmt mixin by running 'make build fmt'" && false); \
# $(JB) install && \
# $(MIXTOOL) lint mixin.libsonnet
Expand Down
22 changes: 5 additions & 17 deletions monitoring-mixins/agent-flow-mixin/deploy/alerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,21 @@ groups:
annotations:
message: Cluster is not converging.
expr: stddev by (cluster, namespace) (sum without (state) (cluster_node_peers)) != 0
for: 5m
for: 10m
- alert: ClusterSplitBrain
annotations:
message: Cluster nodes have entered a split brain state.
expr: |
sum without (state) (cluster_node_peers) !=
on (cluster, namespace) group_left
count by (cluster, namespace) (cluster_node_info)
for: 5m
- alert: ClusterLamportClockDrift
annotations:
message: Cluster nodes' lamport clocks are not converging.
expr: stddev by (cluster, namespace) (cluster_node_lamport_time) > 4 * sqrt(count by (cluster, namespace) (cluster_node_info))
for: 5m
for: 10m
- alert: ClusterNodeUnhealthy
annotations:
message: Cluster node is reporting a health score > 0.
expr: |
cluster_node_gossip_health_score > 0
for: 5m
- alert: ClusterLamportClockStuck
annotations:
message: Cluster nodes's lamport clocks is not progressing.
expr: |
sum by (cluster, namespace, instance) (rate(cluster_node_lamport_time[2m])) == 0
and on (cluster, namespace, instance) (cluster_node_peers > 1)
for: 5m
for: 10m
- alert: ClusterNodeNameConflict
annotations:
message: A node tried to join the cluster with a name conflicting with an existing peer.
Expand All @@ -41,7 +29,7 @@ groups:
annotations:
message: Cluster node stuck in Terminating state.
expr: sum by (cluster, namespace, instance) (cluster_node_peers{state="terminating"}) > 0
for: 5m
for: 10m
- alert: ClusterConfigurationDrift
annotations:
message: Cluster nodes are not using the same configuration file.
Expand All @@ -60,5 +48,5 @@ groups:
- alert: UnhealthyComponents
annotations:
message: Unhealthy Flow components detected.
expr: sum(agent_component_controller_running_components{health_type!="healthy"}) > 0
expr: sum by (cluster, namespace) (agent_component_controller_running_components{health_type!="healthy"}) > 0
for: 15m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}
]
},
"graphTooltip": 1,
"links": [
{
"icon": "doc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}
]
},
"graphTooltip": 1,
"links": [
{
"icon": "doc",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
}
]
},
"graphTooltip": 1,
"links": [
{
"icon": "doc",
Expand Down
Loading

0 comments on commit 2dddc3c

Please sign in to comment.