-
Install prometheus adapter.
- Configure helm chart to connect with prometheus to get the metrics. Change the values as required.
prometheus: # Value is templated url: http://prometheus-operated.monitoring.svc port: 9090 path: ""
- Create seriesQuery & metricsQuery to fetch metrics for the required components. For example, labels like
app="starboard-exporter"
orjob="starboard-exporter"
can be used to filter thestarboard-exporter
metrics in prometheus. Change the values as required.rules: custom: - seriesQuery: 'scrape_duration_seconds{job="starboard-exporter"}' seriesFilters: [] resources: template: <<.Resource>> name: as: "scrapedurationseconds" metricsQuery: scrape_duration_seconds{job="starboard-exporter"}
export TEST_NAMESPACE=giantswarm kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/$TEST_NAMESPACE/pods/*/scrapedurationseconds" kubectl get --raw "/apis/custom.metrics.k8s.io/v1beta1/namespaces/$TEST_NAMESPACE/services/*/scrapedurationseconds" | jq -r .
- Configure helm chart to connect with prometheus to get the metrics. Change the values as required.
-
Enable
customMetricsHPA
fromvalues.yaml