S
S
Sersoftin2017-01-27 21:29:06
linux
Sersoftin, 2017-01-27 21:29:06

How to set up data aggregation in Graphite?

Welcome all. There is a task to stick monitoring to one application. There is a thing that sends metrics, everything is fine with that.
But there is a parameter that needs to be stored differently from everything else. Namely: the number of requests. Those. a request arrives, is processed, and the following metrics are sent to Graphite:
1) time spent on an external request;
2) application running time
3) the very fact of launching the application
In this Graphite, I need to somehow calculate the number of these launches. I already set up schemas and aggregation too, but why the hell can't he do what I want from him?
The very fact of the launch is recorded as follows: just a unit is sent to the def. metric and all. Then, let's say, I need to calculate the number of these units every hour and display it on the chart, but of course it does not display it.
storage-schemas.conf

# Schema definitions for Whisper files. Entries are scanned in order,
# and first match wins. This file is scanned for changes every 60 seconds.
#
#  [name]
#  pattern = regex
#  retentions = timePerPoint:timeToStore, timePerPoint:timeToStore, ...

# Carbon's internal metrics. This entry should match what is specified in
# CARBON_METRIC_PREFIX and CARBON_METRIC_INTERVAL settings
[carbon]
pattern = ^carbon\.
retentions = 60:90d

[app]
pattern = ^app\.api\.*
retentions = 10s:10m,10m:30d,60m:1y

storage-aggregation.conf
[collectd]
pattern = ^collectd\.
xFilesFactor = 0.7
aggregationMethod = max

[count]
pattern = \.count$
xFilesFactor = 0
aggregationMethod = sum

[default]
pattern = .*
xFilesFactor = 0.5
aggregationMethod = average

How can I set it up or what functions to apply to the metric already on the chart, so that it counts the number of these units per def. time period (it depends on the scale of the chart and should not be specified in the configs or anywhere else)?
The functions that I apply to this metric give out complete nonsense. The same countSeries, sumSeries, hitcount, etc.
Actually, I'm surprised. So little information about this Graphite. Everywhere they write that it is so scalable and simple that just take it and rejoice. Everywhere they write about setting it up in different stacks and environments, BUT no one describes how certain problems are solved, there are no examples. In general, I ask you to help, I have been burned very badly from him in recent days, because. I can't use it to solve such a simple problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mahabharata, 2019-02-01
@Mahabharata

Faced a similar problem in its essence.
I conditionally send several units in a row and want to see on the chart the total number of these units over a period of time. BOLT :)
At first I played with the functions in the graphite itself (graphana), then I got to the bottom of the settings in carbon - I played with them. Nothing happened.
Then, on the carbon offline branch in the Gita, they inserted a brain into me that carbon + graphite is a database of time series with a fixed interval. Those. when several events arrive in a period of time, they are simply overwritten. Well, they advised me to dig towards statsd.
I sit crying, because I have Debian, but there are no ready-made packages for Debian, plus, it works on node.js
The problem has not yet been solved, so if one of the four subscribers has an answer to this topic, I will be sincerely grateful if you share :)
Good luck to everyone!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question