← Back to team overview

graphite-dev team mailing list archive

Re: [Question #665395]: Graphite Percentage Calculation with groupby/wildcards for alerting Target Function

 

Question #665395 on Graphite changed:
https://answers.launchpad.net/graphite/+question/665395

Description changed to:
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'), 7), 
    averageSeriesWithWildCards(movingAverage(scaleToSeconds(timeShift(
      stats.counters.renderCompleted.display.US.*.*.count, '1d'), 1), '10min'), 7))

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.

-- 
You received this question notification because your team graphite-dev
is an answer contact for Graphite.