Prometheus Adapter Custom Metrics

43 views
Skip to first unread message

nishan...@atmecs.com

unread,
Jan 21, 2021, 10:26:46 AM1/21/21
to Prometheus Users
Hi All,

I am creating a custom metrics for HPA. I want to scale on the based of nginx_ingress_controller_requests. But I am getting 404 in adapter logs as below.

I0121 15:21:10.089817       1 httplog.go:89] "HTTP" verb="GET" URI="/apis/custom.metrics.k8s.io/v1beta1/namespaces/dev/ingresses.extensions/dev-dotcom-ingress/nic_requests" latency="3.573968ms" userAgent="vpa-recommender/v0.0.0 (linux/amd64) kubernetes/$Format/kuba-horizontal-pod-autoscaler" resp=404

Following is my custom rule.

custom:
  - seriesQuery: 'nginx_ingress_controller_requests'
    resources:
      overrides:
        ingress: {resource: "ingress"}
    name:
      as: "nic_requests"
    metricsQuery: 'sum(rate(nginx_ingress_controller_requests{ingress!="",status!="503",status!="504"}[1m])) by (<<.GroupBy>>)'

Appreciate any help, Thanks a lot.

Sudeep Nanda

unread,
Jan 21, 2021, 10:28:38 AM1/21/21
to nishan...@atmecs.com, Prometheus Users
Hi Nishan, may I know hpa means and I would suggest to use promscale rather than adapter 


BR
Sudeep

The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify ATMECS and delete it from your computer.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/8fecd0f1-463c-4361-8c59-068d4799f6bcn%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages