I want to continuously monitor a custom metric(of metricType Gauge) implemented in java usinf prometheus and autoscale the kubernetes pod based on that value. The value is exposed in the prometheus dashboard and I can able to access in the rest - http://localhost:9090/api/v1/query?query= . The tutorials are available only for series query (for prometheus adapter) and I want to implement instant query in prometheus adapter to monitor this metric, because if I use series query, I get a custom metric value in milli"s instead of integers. Current prometheus-adapter.yaml configuration.
rules:
default: false
custom:
- seriesQuery: '{__name__=~"<custom-metric>"}'
resources: { template: "<<.Resource>>" }
name:
matches: "custom-metric"
as: "custom-metric"
prometheus:
url: http://prom-demo-prometheus-opera-prometheus<namespace>
port: port
Can anyone let me know how to implement this? Thanks in advance!