Graphite Percentage Calculation with groupby/wildcards for alerting Target Function

Asked by sourabh sinha

I am trying to create a seyren alert for my page render metric stored in graphite.

My render stats are collected by ststsD and stored in graphite. The structure is following:

stats.counters.renderCompleted.display.<country>.<placement_id>.<page_version>.count
e.g.

    stats.counters.renderCompleted.display.US.123456.v1_1_03.count
    stats.counters.renderCompleted.display.US.123456.v1_1_09.count

    stats.counters.renderCompleted.display.US.654321.v2_1_05.count
    stats.counters.renderCompleted.display.US.654321.v2_1_07.count

    stats.counters.renderCompleted.display.UK.123456.v1_1_09.count
    ...
    ...

I want to create a seyren alert with graphite function whenever the current render count for ANY PLACEMENT ANY VERSION (e.g. group by placement_id, page_version) falls below certain % of its (for that placement's and version's) previous day average.

I did search graphite functions but it's bit confusing probably because I don't have background in time-series data processing. Will truly appreciate any help. I tried with many combinations including the following, but not able to get it correct...

    asPercent(averageSeriesWithWildCards(movingAverage(scaleToSeconds(
      stats.counters.renderCompleted.display.US.*.*.count, 1),'10min'), 6),
    averageSeriesWithWildCards(movingAverage(scaleToSeconds(timeShift(
      stats.counters.renderCompleted.display.US.*.*.count, '1d'), 1), '10min'), 6))

Please note, I want to create only one alert (hence using WildCard function like sumSeriesWithWildCards) which should serve the purpose, not multiple alerts for individual placements and versions and we keep on adding these.

Thanks in advance.

Question information

Language:
English Edit question
Status:
Expired
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
sourabh sinha (sourabh.ubuntu1) said :
#1

Will appreciate any help here

Revision history for this message
sourabh sinha (sourabh.ubuntu1) said :
#2

Hi don't see any reply for 4 days, is the question not clear? Please help.

Revision history for this message
sourabh sinha (sourabh.ubuntu1) said :
#3

After doing many search I came up with the following formula, which seems to be close but still the numbers does not look right, will appreciate if you can comment what's is missing here:

asPercent(
 groupByNode(
  movingAverage(
   scaleToSeconds(stats.counters.renderCompleted.display.US.*.*.count, 1),
  '2hour'),
 5, 'averageSeries'),
 groupByNode(
  movingAverage(
   scaleToSeconds(
    timeShift(stats.counters.renderCompleted.display.US.*.*.count, '1d'),
   1),
  '2hour'),
 5, 'averageSeries')
)

Revision history for this message
sourabh sinha (sourabh.ubuntu1) said :
#4

Abandoning this post since there were no comment from anybody even after 6 days! May be there is some issue with it, creating a new one.

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.