-
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.
* Statefulset probes now use prometheus metrics rather than direct interaction Signed-off-by: Ryan <[email protected]>
- Loading branch information
1 parent
5c75c77
commit a92272a
Showing
8 changed files
with
124 additions
and
255 deletions.
There are no files selected for viewing
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
23 changes: 23 additions & 0 deletions
23
charts/chronicle-on-sawtooth/templates/check_metrics_available.yaml
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,23 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-scripts | ||
data: | ||
first_depth_charge.sh: | | ||
#!/bin/bash | ||
metrics=$(curl -s http://localhost:9000/metrics) | ||
count=$(echo "$metrics" | grep '^depth_charge_round_trip_count' | awk '{print $2}') | ||
if [[ -z "$count" ]] || [[ $count -eq 0 ]]; then | ||
exit 1 | ||
fi | ||
check_timeouts.sh: | | ||
#!/bin/bash | ||
metrics=$(curl -s http://localhost:9000/metrics) | ||
timeouts=$(echo "$metrics" | grep '^depth_charge_timeouts' | awk '{print $2}' | tr -d '\r') | ||
if [[ "$timeouts" =~ ^[0-9]+$ ]] && [[ "$timeouts" -ne 0 ]]; then | ||
echo "Non-zero depth_charge_timeouts detected: $timeouts" | ||
exit 1 | ||
else | ||
echo "No non-zero depth_charge_timeouts detected." | ||
exit 0 | ||
fi |
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
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
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
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,23 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "common.names.fullname" . }}-scripts | ||
data: | ||
first_depth_charge.sh: | | ||
#!/bin/bash | ||
metrics=$(curl -s http://localhost:9000/metrics) | ||
count=$(echo "$metrics" | grep '^depth_charge_round_trip_count' | awk '{print $2}') | ||
if [[ -z "$count" ]] || [[ $count -eq 0 ]]; then | ||
exit 1 | ||
fi | ||
check_timeouts.sh: | | ||
#!/bin/bash | ||
metrics=$(curl -s http://localhost:9000/metrics) | ||
timeouts=$(echo "$metrics" | grep '^depth_charge_timeouts' | awk '{print $2}' | tr -d '\r') | ||
if [[ "$timeouts" =~ ^[0-9]+$ ]] && [[ "$timeouts" -ne 0 ]]; then | ||
echo "Non-zero depth_charge_timeouts detected: $timeouts" | ||
exit 1 | ||
else | ||
echo "No non-zero depth_charge_timeouts detected." | ||
exit 0 | ||
fi |
Oops, something went wrong.