Skip to content

[Bug]: Unknown state returned on check with alert and include-label #146

Closed

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.9.x

Describe the bug

Hi, I think something changed from 0.8.0 to 0.9.x when using the check like this

'/usr/lib/nagios/plugins/check_prometheus' 'alert' '--hostname' 'prometheus.domain.it' '--include-label' 'instance=node1:\\d+' '--port' '443' '--problems' 'false' '--secure' '--timeout' '30'

the old version of the plugin returns correctly

 - 13 Alerts: 13 Firing - 0 Pending - 0 Inactive
\_  No alerts retrieved

the 0.9.1 returns Unknown

 - No status information

I haven't changed anything on my services so I think maybe some changes on the logic

How to recreate the bug?

Try a check like this

'/usr/lib/nagios/plugins/check_prometheus' 'alert' '--hostname' 'prometheus.domain.it' '--include-label' 'instance=node1:\\d+' '--port' '443' '--problems' 'false' '--secure' '--timeout' '30'

with the 0.8.0 and 0.9.1 versions

Activity

  1. martialblog commented on Oct 19, 2026

    @martialblog
    Member

    Hi, thanks for the hint. I'll have a closer look at it.

  2. self-assigned this
    on Nov 9, 2026
  3. added this to the v0.10.0 milestone on Nov 12, 2026
  4. martialblog commented on Nov 12, 2026

    @martialblog
    Member

    @gianmarco-mameli Yeah there was a bug! Should be fixed on this branch #152

    Can you confirm this is working now?

    Grazieee!

  5. modified the milestones: v0.10.0, v0.9.2 on Nov 13, 2026
  6. martialblog commented on Nov 13, 2026

    @martialblog
    Member

    Should be fixed in #152

  7. gianmarco-mameli commented on Nov 13, 2026

    @gianmarco-mameli
    ContributorAuthor

    Hi @martialblog sorry I read your comment late, I'm going to try it immediately
    Thanks as always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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