Skip to content

Commit

Permalink
add metric vertica_queued_requests_total
Browse files Browse the repository at this point in the history
  • Loading branch information
qindotguan committed Jan 16, 2025
1 parent 1f43fbb commit 2736ca9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions prometheus/adapter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ rules:
# pod:
# resource: pod
# metricsQuery: 'sum(increase(vertica_sessions_running_counter[1m])) by (namespace, pod)'
# # Number of requests that are queued in the resource pool. Type: guage
# - seriesQuery: 'vertica_queued_requests_total{namespace!="", pod!=""}'
# resources:
# overrides:
# namespace:
# resource: namespace
# pod:
# resource: pod
# metricsQuery: 'sum(increase(vertica_queued_requests_total[1m])) by (namespace, pod)'
# Number of requests that are queued in the resource pool. Type: guage
- seriesQuery: 'vertica_queued_requests_total{namespace!="", pod!=""}'
resources:
overrides:
namespace:
resource: namespace
pod:
resource: pod
metricsQuery: 'sum(vertica_queued_requests_total) by (namespace, pod)'
18 changes: 9 additions & 9 deletions tests/e2e-leg-12/prometheus-sanity/35-verify-custom-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ commands:
# echo "empty custom metrics result on vertica_sessions_running_counter. Result: $RESULT"
# exit 1
# fi
# - script: |
# NAMESPACE=$(kubectl get pod v-prometheus-pri1-0 -o=jsonpath='{.metadata.namespace}')
# RESULT=$(kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1/namespaces/$NAMESPACE/pods/v-prometheus-pri1-0/vertica_queued_requests_total)
# OUTPUT=$(echo $RESULT | jq -r '.items[0].value')
# # verify the metrics result
# if [[ "$OUTPUT" == "" ]]; then
# echo "empty custom metrics result on vertica_queued_requests_total. Result: $RESULT"
# exit 1
# fi
- script: |
NAMESPACE=$(kubectl get pod v-prometheus-pri1-0 -o=jsonpath='{.metadata.namespace}')
RESULT=$(kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1/namespaces/$NAMESPACE/pods/v-prometheus-pri1-0/vertica_queued_requests_total)
OUTPUT=$(echo $RESULT | jq -r '.items[0].value')
# verify the metrics result
if [[ "$OUTPUT" == "" ]]; then
echo "empty custom metrics result on vertica_queued_requests_total. Result: $RESULT"
exit 1
fi

0 comments on commit 2736ca9

Please sign in to comment.