Skip to content

[Bug]: New include-label parameter not matching in some cases #120

@gianmarco-mameli

Description

@gianmarco-mameli

Please try to fill out as much of the information below as you can. Thank you!

  • Yes, I've searched similar issues on GitHub and didn't find any.

Which version contains the bug?

0.6.0

Describe the bug

Hi,
I'm trying to use the newly added parameter include-label parameter (see #113 and #114), but I have some problems to make it work.
It seems working with a label like severity=warning, it matches correctly, but it's not working with labels like instance=hostname:8088 or job=haproxy-metrics

The commands looks like that taken from inspect in Icinga
'/usr/lib/nagios/plugins/check_prometheus' 'alert' '--hostname' 'prometheus.domain' '--port' '443' '--secure' '--timeout' '30' '--include-label' 'instance=hostname:8088'

'/usr/lib/nagios/plugins/check_prometheus' 'alert' '--hostname' 'prometheus.domain' '--port' '443' '--secure' '--timeout' '30' '--include-label' 'severity=warning'

How to recreate the bug?

Try a command like
'/usr/lib/nagios/plugins/check_prometheus' 'alert' '--hostname' 'prometheus.domain' '--port' '443' '--secure' '--timeout' '30' '--include-label' 'instance=hostname:8088
'/usr/lib/nagios/plugins/check_prometheus' 'alert' '--hostname' 'prometheus.domain' '--port' '443' '--secure' '--timeout' '30' '--include-label' 'job=haproxy-metrics'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions