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 total number of connected minions #29

Closed
julioz opened this issue May 24, 2023 · 6 comments
Closed

Add total number of connected minions #29

julioz opened this issue May 24, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@julioz
Copy link

julioz commented May 24, 2023

On every scrape, the exporter should include a gauge metric with the number of connected minions to that master node.
This way we can keep track of new minions connected, but more importantly, when minions disappear.

@kpetremann
Copy link
Owner

kpetremann commented May 24, 2023

hello @julioz,

What about counting the number of minion using salt_responses_total metric?

The exporter is passive, it only watches the event queue. So I don't see how we could know that a minion disappeared, except if your are sending requests targeting all minions. But if you do, the salt_responses_total would do the trick.

Note: where I work, we use another simple active exporter only to "ping" our minions (not open-source):

  • It sends a test.ping request to all minions via the API.
  • Then it parses the results to count number of responding and not responding minions.

But this is not always reliable depending on your targets workload: sometimes the minion does not respond to test.ping before the timeout because it was doing something else.

@kpetremann kpetremann self-assigned this May 24, 2023
@julioz
Copy link
Author

julioz commented May 25, 2023

The exporter is passive, it only watches the event queue

Got it. Is your intent to keep it passive-only, or is salt-exporter intended to grow for "all things salt"? If the latter, I'd imagine a salt-run manage.alived could be a good way to count "up" minions without sending test.ping commands that could hang.

@kpetremann
Copy link
Owner

The initial intent was to keep it passive-only.

But if there is a need, I am not opposed to make salt-exporter grow.

My two concerns are:

  • keeping the salt-exporter as simple as possible for the user (easy to setup and understand).
  • is there an overlap with an already an exporter doing this kind of feature? I wrote this exporter because I did not find any leveraging the IPC event queue. TBH, I am hesitating between having an "all things salt" versus installing one or two additional exporters if they already exists. I did not check the current status of Saltstack exporters recently.

@kpetremann kpetremann added the enhancement New feature or request label May 25, 2023
@julioz
Copy link
Author

julioz commented Jun 20, 2023

Note: where I work, we use another simple active exporter only to "ping" our minions (not open-source):

We ended up implementing something similar, but based on a homegrown active salt exporter. Feel free to close this issue if there are no plans to implement similarly in this exporter 👍

@kpetremann
Copy link
Owner

ok great :) thanks for the feedback.
I think this is the best approach for now.

I'll close the issue.
If I plan to add this kind of feature (Salt API client based metrics) in the future, I'll mention this issue.

@kpetremann
Copy link
Owner

hello @julioz,

The PR #57 might interest you (available in v0.9.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants