#prometheus (2023-01)


Archive: https://archive.sweetops.com/prometheus/


zadkiel avatar

Hey there, I’d like to delete a label from a single metrics: nginx_ingress_controller_ssl_certificate_info. i’m using the labeldrop action in metricsRelabelings section, tried the following but it’s not supported by prom and i get an error in the logs saying that only regex otpion can be used with labeldrop:

                   - action: labeldrop
                      - __name__
                      - pod
                    regex: 'nginx_ingress_controller_ssl_certificate_info;pod'

If I simply use

                  - action: labeldrop
                    regex: 'pod'

It removed the pod label from all metrics exported by nginx. Are you aware of an other way to delete a single label from a single metric? Thank you

zadkiel avatar
Conditionally drop labels

I would like to drop a label but only from a specific series. From the doc I can see that the action needed is labeldrop. My starting point is something like

  • action: replace source_labe…