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

Add probes (WIP) #213

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Add probes (WIP) #213

wants to merge 5 commits into from

Conversation

sed-i
Copy link
Contributor

@sed-i sed-i commented Nov 22, 2024

NOTE: this PR is not intended to be merged yet!

Issue

Need a quick way to determine if grafana-agent deployment is correct.

Solution

Add a few external probes, runnable against a bundle or a status.

Context

https://discourse.charmhub.io/t/how-to-testing-cos-integrations/14532

Testing Instructions

Per committed README.

@sed-i sed-i changed the title Add probes Add probes (WIP) Nov 22, 2024
print(
f"{name} is related to more than one grafana-agent subordinate: {subord_agents}"
)

Copy link
Contributor

@MichaelThamm MichaelThamm Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add this probe

def one_cos_proxy_to_nrpe_monitors(status: dict):
"""Can have only one cos-proxy related to nrpe:monitors."""
...

for k, v in counter.items():
if len(v) > 1:
print(f"App '{k}' related to multiple grafana-agent apps '{v}'")

Copy link
Contributor

@MichaelThamm MichaelThamm Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add this probe

def one_cos_proxy_to_nrpe_monitors(bundle: dict):
"""Can have only one cos-proxy related to nrpe:monitors."""
...

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

Successfully merging this pull request may close these issues.

2 participants