graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.89k stars 1.26k forks source link

[Q] conslidate by (max) doesnt work #2713

Closed from88 closed 2 years ago

from88 commented 3 years ago

Hello,

Trying to view RRD files in graphite-web. I'm making symlink to /var/lib/carbon/rrd/ and graphite-web correctly shows the graphs. But i need to see not AVG, but MAX values of RRD. So i've read some manuals, and it says - that i need to use consolidateby(max) function. So, on grapphite-web im aplying this function - consolidateBy(ITXNCS01_Sentia#1_OLD.INOCTETS,"max") it doesnt change anything. The graph is still averaged.

Any help ? my final point is to use that on Grafana.

deniszh commented 3 years ago

Hi @from88

What result do you expect from applying consolidateBy() function? Both whisper and RRD format contain only single consolidation per metric, defined during metric creation. So, we can't do any magic and extract max values when metric contain average aggregated data. consolidateBy() will work only with runtime consolidation, e.g. when "width of the graph size in pixels is smaller than the number of datapoints to be graphed". See e.g. https://grafana.com/blog/2016/03/03/25-graphite-grafana-and-statsd-gotchas/#runtime.consolidation

But in general, both RRD and whisper just showing metric with built in consolidation and there's no way how you can change it. That's why some libraries (e.g. Dropwizard) by default produces bunch of metric for every gauge (min, max, p50, p75, p95, p99 etc). Or some alternative backends (e.g. Metrictank) can store more then one aggregation for Graphite metric.

piotr1212 commented 3 years ago

I think that in RRD you can actually store multiple aggregation types per metric. So for one metric you could have an average and an max aggregation at the same time. I don't think support for this is implemented in Graphite.

from88 commented 3 years ago

thanks for replys!

The problem is that i have RRD based monitoring and i need to transfer that graphs to grafana. https://ibb.co/xqfV6P9 if u click on this link u would see a traffic graph with two shades, lighter and normal one. Lighter means MAX RRA values. All that graph is from same RRD file. So i'm trying to transfer that light shaded graph to Grafana. But as i understand - u say that this is impossible to do with Graphite ? The normal (not lighted colour is RRD AVG value which imports to Grafana with no problem..

Any help ?

Thanks

deniszh commented 3 years ago

@piotr1212 : yes, you're right, I touched RRD long time ago, indeed, you can provide CF parameter to get proper consolidation.

@from88 :

But as i understand - u say that this is impossible to do with Graphite ?

You can try rrd2whisper.py - https://github.com/graphite-project/whisper/blob/master/bin/rrd2whisper.py - but I never tried that before. Probably, it creates separate metric per CF. But it's one time operation, you can't do that with live files, only during migration e.g. for historical data.

from88 commented 3 years ago

ok, converted the .rrd file to .wsps. Took one port-87_INOCTETS.wsp file, and symlinked it to /var/lib/carbon/whisper/ITXNCS01_Sentia#3_OLD.wsp but graphite web doesnt show it in Graphite web, not Grafana itself. Any ideas ?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

deniszh commented 2 years ago

Not sure if symlinking will work, try to copy it there. Is /var/lib/carbon/whisper right whisper directory for your installation?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.