-
Notifications
You must be signed in to change notification settings - Fork 14
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 metrics for expirationd stats #100
Comments
It's not our business, sorry. Gently kindly closing. |
why is this not our business? it can be used by our customers on various occasions. |
it's expirationd business |
I think we should not forget dashboard for such metrics. what do you think @DifferentialOrange ? can we somehow make custom panels that are displayed only if certain metrics are in the result? |
AFAIK, Grafana do not support this (and I doubt it ever will). But if we do tarantool/grafana-dashboard#128 , "excessive" panels will be less annoying. |
Seems that professional likers needed: grafana/grafana#13468 |
Suggested RFC:
task1:
checked_count = 1000
expired_count = 122
restarts = 3
working_time = 600
task2:
checked_count = 2000
expired_count = 12
restarts = 0
working_time = 30 Stats is already collected by expirationd so this data can be obtained via expirationd.stats method.
This method should register a callback in metrics. For example: local metrics = require('metrics')
local expiration_gauge = metrics.gauge('expirationd', 'Expirationd statistics')
metrics.register_callback(function()
local stats = json.encode( get_all_tasks_stats() )
expiration_gauge:set(stats, {app = 'tarantool'})
end)
|
@Totktonada please review |
Comments on the RFCMain points
Minor/easy points
@DifferentialOrange, @ligurio, you may be interested about this RFC. |
@Totktonada thanks for comments.
|
Lines 800 to 804 in 838c2d1
|
Seems that this must be added to this issue: #98 |
If there is no any important requirements - let's close duplicate |
About Prometheus
If it is in About filling metrics collectors
I don't know if it is a really rough draft or non-acquaintance with tarantool/metrics, but just in case of second bet I'll write some corrections here. Each metrics collector represents metric of a different nature. Thus you'll need four (restarts, checked_records, expired_records, working_time) different collectors. (You may unite records collectors and use three instead of four, but I think it may confuse users while not being more convenient and cost-effective than using four collectors). Each metrics collector may represent different time series depending on labels. (In fact, we will store a single value in Tarantool and DB like Prometheus will store a whole time series.) In case of expirationd, it seems that the only label separating different time series is task name ( Each metrics collector observation accepts a single numeric value and labels table. Thus, if input data is
the code will be as follows.
I don't know what Also I would prefer to use About the nature of metrics collectors
Maybe this is a matter of personal preferences, but I like metrics to be the type they fit to. So I would prefer to use a counter here. Also tarantool/metrics#117 works vice versa: if it is a counter, you're better name it with The only drawback is c:reset(labels)
c:inc(value, labels) to set values to counters. About the callback
Just in case you may not know: since metrics 0.10.0 you can |
@DifferentialOrange thanks for clearing up the important details. You are right - it's a draft code. I've just copied the example code from here . Maybe we should fix the example if it's unusable in real life? |
Well, local current_cpu_usage = math.random()
cpu_usage_gauge:set(current_cpu_usage, {app = 'tarantool'}) clearly shows that you need to pass a number here, not a json. (Though I remember a time when a user from community tried to use exactly this code to measure CPU and then complained about |
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.10.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.11.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
The patch adds the ability to export statistics to metrics >= 0.11.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
Into the GitHub workflow and the Makefile. Closes #100
The patch adds the ability to export statistics to metrics >= 0.11.0. expirationd does not require the metrics package itself and tries to use an installed one. It also adds a new API method expirationd.cfg({options}). Part of #100
Into the GitHub workflow and the Makefile. Closes #100
It wiil be great to add expirationd stats metrics to have an availability to see them on timeline.
The text was updated successfully, but these errors were encountered: