Skip to content

ServiceMonitors broken in v1.12.0 with labeldrop rule #4992

@eloo-abi

Description

@eloo-abi

Component(s)

prometheus.operator.servicemonitors

What's wrong?

Hi,
we have updated to alloy 1.12.0 and have discovered that our service monitors are not scraped anymore.

We get the following error:

"labeldrop action requires only \'regex\', and no other fields"

I have checked the version 1.11.3 which is working fine.
Also its kinda weird that podmonitors are working as expected with the same configuration.

As you can see in the config example it should work as expected. But as soon as there is at least one labeldrop rule included the reconcile of the servicemonitors is broken.

This leads to all metrics related to the service monitors not being scraped anymore and thus to an outage of the monitoring system at all.

Steps to reproduce

  • Deploy alloy with a config like the mentioned one
  • Add the same rule also for a podmonitor
  • Deploy a service monitor and a podmonitor
  • See podmonitor working
  • See servicemonitor reconcile errors

System information

No response

Software version

Grafana Alloy 1.12.0

Configuration

prometheus.operator.servicemonitors "service_monitors" {
        clustering {
          enabled = true
        }
        scrape {
          default_scrape_interval = "60s"
          default_scrape_timeout = "10s"
        }

        rule {
          action = "labeldrop"
          regex  = "helm_sh_chart"
        }

        forward_to = argument.metrics_destinations.value
      }

Logs


Tip

React with 👍 if this issue is important to you.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions