S
S
Shazo2015-10-21 14:06:41
Monitoring
Shazo, 2015-10-21 14:06:41

Graphite (+grafana): how to multiply one metric by another?

I'm thinking about switching to graphite monitoring with grafana dashboards.
But the following functionality will be needed, I didn’t understand from the documentation whether it would be possible to do this using graphite or graphana.
Suppose I have 4 metrics:
service.type.host.a
service.type.host.b
service.group.c
service.group.d
Is it possible to create new ones based on these metrics, for example:
service.total.a = service.type.host.a / service.group.c * service.group.d I understand that this can be done by pulling out the metric values ​​​​through the request, then perform the necessary operations and send it back as a new metric, but I would like to do it easier.
service.group.d create a new metric by multiplying, adding, subtracting, dividing based on other metrics from different series.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Sivakov, 2015-10-30
@sivakov512

So yes, at the level of visualization of the graph, this can be done.
Emnip, it looks something like this:
As I understand it, in one such "request" it will not be possible to implement complex arithmetic, that is, according to the wish in your question, service.total.a = service.type.host.a / service.group.c * service.group.d will contain a bunch of requests:

  1. Request A: get service.type.host.a
  2. Request B: get service.group.c
  3. Request C: get service.group.d
  4. Query D: multiply B, C
  5. Request E: division A, D
    Only make this "request" visible.
    But in my experience grafana is not a complete replacement for monitoring unless you have a need for an alert system as graphite is a statistics visualization system.
    For low alert needs, collectd-threshold can be used if you are collecting statistics with the collectd daemon;
    For higher needs, Seyren can be used ;
    If absolutely, then there is Cabot ;
    And a good article on this topic on Habré .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question