Skip to content

Commit

Permalink
Prometheus adapter custom time range (#1033)
Browse files Browse the repository at this point in the history
Update Developer doc with customize interval explanation. Add example of
VerticaAutoscaler under sample.
  • Loading branch information
HaoYang0000 authored Jan 15, 2025
1 parent 0854860 commit 1f43fbb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ A Prometheus service is running and accessible through an URL.
2. Configuration
Customize the adapter configuration to map Prometheus metrics to Kubernetes metrics. For example, you can configure rules to map a Prometheus query (e.g., vertica_query_requests_attempted_total) to a Kubernetes metric.
To customize the interval of a query, change the interval value "5m" on the metricsQuery to the prefered time range.
```shell
rules:
Expand Down
22 changes: 22 additions & 0 deletions config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: vertica.com/v1beta1
kind: VerticaAutoscaler
metadata:
name: as-sample-custom-metrics
spec:
verticaDBName: verticadb-sample
# The serviceName should be the name of your subcluster
serviceName: sc1
scalingGranularity: Pod
customAutoscalerSpec:
minReplicas: 3
maxReplicas: 10
metrics:
- metric:
type: Pods
pods:
metric:
# The name of the mapped Kubernetes metric name
name: vertica_query_requests_attempted_rate_per_second
target:
type: AverageValue
averageValue: 20000m

0 comments on commit 1f43fbb

Please sign in to comment.