question

reshov r. avatar image
reshov r. asked ·

Help on Aggregation types

My service uses redis for caching responses . Redis also tells about its uptime through its info method. I use this method to create a jmx plugin which exposes this uptime information in my java service updated every 5 seconds. I created a jmx extension to record this metric in dynatrace. So what kind of aggregation should I use to obtain the uptime of the service as a line graph -> sum, avg or max?

Another question, we also count the number of cache hits in our app. what would the aggregation be to obtain the cache hits?

application monitoring
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

1 Answer

Radoslaw S. avatar image
Radoslaw S. answered ·

1. Redis uptime - I guess you then refer to following metrics:

uptime_in_seconds:846988
uptime_in_days:9

values will be reset every Redis restart, so using "max" makes no sense - as you'll report what was the longest uptime in a given timeframe. Using "sum" also makes no sense as that metric grows. I believe you want to report "availability". If I were you, I'd report "1" if uptime_in_seconds > 0. And report "0" if "INFO" command fails (or not report at all). By that you'll know what state is when Redis is running and when it is not.


2. Cache hits - depends what you want to measure. If you want to measure the total hits over time - then use "sum". If you want to measure the ratio use "avg/min" or similar. If you want to see what was the best cache hit value - use "max". It all depends from understanding what you want to measure and WHY.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.