#prometheus - January 2023

January 2023
zadkiel
zadkielalmost 4 years ago
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
                    sourceLabels:
                      - __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