-
Notifications
You must be signed in to change notification settings - Fork 99
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
Support exposing current metric value on server check command #276
Comments
We now support marking up streams individually with the configuration checks need
With these in place the CLI will now configure itself from those:
I could look at making the actual checks optional if really still needed but seems to me the purpose of these checks are to check. |
Had a look and it should in theory be possible to make a gathering-only behaviour, I did a lot of refactoring of the checks and they do seem like its easier now. I'm also adding a prometheus exporter where you can define these checks and they will get done on every poll if thats something of interest |
Current behaviour
Currently when we execute the
nats server check
command, the client expects a set of threshold flags as inputs to be able to answer if the server is healthy or not according to the provided thresholds.Feature request
It would be useful to know get current metric values, instead of just knowing if the threshold was exceeded or not.
This would enable us to create a prometheus exporter component that could export prometheus metrics on all of the
nats server check
set of commands. We would use these metrics on alerts and define the needed thresholds on the alerts themselves.Desired behaviour
Example
Currently
nats server check stream --server nats://nats:4222 \ --stream TEST \ --peer-expect 1 \ --lag-critical 100 \ --msgs-warn 4000 \ --msgs-critical 3000 \ --min-sources 33 \ --max-sources 34 \ --peer-lag-critical 100 \ --peer-seen-critical 5m \ --format prometheus
Example output:
Proposed
In the previous example it would export a metric saying if a given peer has lag according to the provided threshold flag
--peer-lag-critical 100
.In this example, it would just export the peer lag itself for each peer <> stream.
This strategy could be applied for every other type of metric currently available on the tool.
Example output:
Thanks 🙏
The text was updated successfully, but these errors were encountered: