Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus adapter custom time range #1033

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -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:
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