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

Prototype how to use collect status in Prometheus #356

Closed
sed-i opened this issue Sep 13, 2022 · 2 comments
Closed

Prototype how to use collect status in Prometheus #356

sed-i opened this issue Sep 13, 2022 · 2 comments

Comments

@sed-i
Copy link
Contributor

sed-i commented Sep 13, 2022

If we're going to have constant [log/status message] strings this way, they could be class-level rather than instance level, or just plain ALL-CAPS constants the way the old status was (just to make it clear what they are).

Alternatively, this seems like a great place for a tiny meta-config class/method, where:

if some_bad_thing:
  self.set_unit_status("push_fail") # or even an Enum at the top to make it self.set_unit_status(PUSH_FAIL)

Would be a nice abstraction which keeps the list of conditions->statuses in a single place, almost like a excepthook

Originally posted by @rbarry82 in #352 (comment)

@simskij
Copy link
Member

simskij commented Aug 2, 2023

This is meant to be addressed by the collect status feature of canonical/operator#954

@simskij simskij changed the title Rethink how we could handle status in a decentralized way Prototype how to use collect status in Prometheus Aug 2, 2023
@simskij
Copy link
Member

simskij commented Nov 11, 2024

4ca83b6 - this has already been done iteratively. Closing issue

@simskij simskij closed this as completed Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants