loxilb-io / kube-loxilb

Implementation of kubernetes service load-balancer spec for loxilb
Apache License 2.0
92 stars 25 forks source link

Provide log output filtering options for Prometheus monitoring URLs #206

Closed 6547709 closed 2 weeks ago

6547709 commented 2 weeks ago

Problem description: When using Prometheus get Loxilb's monitoring metric, the request will be recorded in the log, which increases the log volume and is actually useless; Example log:

2024-10-24 17:33:02 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:33:12 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:33:22 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:33:32 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:33:42 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:33:52 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:34:02 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:34:12 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:34:22 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:34:32 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:34:42 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:34:52 api: Prometheus GET API called. url : /netlox/v1/metrics
2024-10-24 17:35:02 api: Prometheus GET API called. url : /netlox/v1/metrics

Suggestions:

  1. can use a filter option to filter the request log for the API URL;
  2. can even ignore the log of the metric request directly;
6547709 commented 2 weeks ago

Closed because it's actually a LoxiLB issue.