Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Perfdata inconsistency #68

Open
1 task done
martialblog opened this issue Dec 18, 2024 · 3 comments
Open
1 task done

[Bug]: Perfdata inconsistency #68

martialblog opened this issue Dec 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@martialblog
Copy link
Member

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.2.0

Describe the bug

The perfdata output is inconsistent:

go run main.go alert -T 2 --name foo
[UNKNOWN] - 0 Alerts: 0 Firing - 0 Pending - 0 Inactive

go run main.go alert -T 1 --name foo --name NodeHasMemoryPressure
[OK] - 1 Alerts: 0 Firing - 0 Pending - 1 Inactive
\_ [OK] [NodeHasMemoryPressure] is inactive
|total=1 firing=0 pending=0 inactive=1

When there are no alerts found, there is no output.

How to recreate the bug?

No response

@martialblog martialblog added bug Something isn't working needs-triage Needs to be triaged and removed needs-triage Needs to be triaged labels Dec 18, 2024
@martialblog martialblog added this to the v0.3.0 milestone Dec 18, 2024
@martialblog
Copy link
Member Author

Now that I think of it, maybe it's fine because if nothing is found there maybe should not be perfdata 🤔

@RincewindsHat RincewindsHat changed the title [Bug]: Perfdata inconsitency [Bug]: Perfdata inconsistency Dec 19, 2024
@martialblog
Copy link
Member Author

I'll at least do a review and see if everything is consistent.

@martialblog
Copy link
Member Author

Yeah, this won't do:

# With alerts defined:

$ go run main.go alert 

[OK] - 1 Alerts: 0 Firing - 0 Pending - 1 Inactive
\_ [OK] [NodeHasMemoryPressure] is inactive

$ go run main.go alert -P

[UNKNOWN] - 0 Alerts: 0 Firing - 0 Pending - 0 Inactive

exit status 3

# With nothing defined:

$ go run main.go alert
[OK] - No alerts defined

$ go run main.go alert -P
[OK] - No alerts defined

We should see perfdata when there are alerts defined.

@martialblog martialblog removed this from the v0.3.0 milestone Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant