Graphite

December 26, 2022 ยท View on GitHub

For a general overview of how Metrictank relates and compares to Graphite, please see the Readme

Caveats

There are some small behavioral and functional differences with Graphite:

  • render API has a 'meta' parameter to request render metadata (such as perf stats and series lineage information)
  • render API filters output by "from" (don't include series that haven't been updated)
  • Currently no support for rewriting old data; There is a reorder-buffer to support out-of-order writes to an extent. Full archived data rewriting is on the roadmap.
  • Will never move observations into the past (e.g. consolidation and rollups will only cause data to get an equal or higher timestamp)
  • Graphite timezone defaults to Chicago, we default to server time
  • xFilesfactor is currently not supported for rollups. It is fairly easy to address, but we haven't had a need for it yet.
  • Graphite supports the following render formats: csv, json, dygraph, msgpack, pickle, png, pdf, raw, rickshaw, and svg. Metrictank only implements json, msgp, msgpack, csv and pickle. Grafana only uses json. In particular, Metrictank does not render images, because Grafana renders great.
  • Some less commonly used functions are not implemented yet in Metrictank itself, but Metrictank can seamlessly proxy those to graphite-web (see below for details) At Grafana Labs, 95 to 99 % of requests get handled by Metrictank without involving Graphite.
  • perl-style regex (pcre) are not supported in functions such as aliasSub, and if used, will return an error like so "error parsing regexp: invalid or unsupported Perl syntax: '(?!'...". See https://github.com/grafana/metrictank/issues/1776
  • Metrictank supports rolling up any given metric by multiple functions and using consolidateBy() to select a rollup
  • MovingWindow and variants currently only support the input 'windowSize' specified as a quoted string with length of time and not as number of points. More details in PR #1739. (you can use http.proxy-bad-requests to proxy such requests to graphite)

Processing functions

Metrictank aims to be able to provide as much processing power as it can: we're in the process of implementing Graphite's extensive processing api into metrictank itself.

Below is an overview of all current Graphite functions (as of Aug 15, 2018) and their support in metrictank. There are 3 levels of support:

  • No : not implemented yet in metrictank or not applicable (e.g. graphite functions that affect graphical style but not json data)
  • Stable : 100% compatible with graphite and vetted
  • Unstable: not fully compatible yet or not vetted enough

When you request functions that Metrictank cannot provide, it will automatically, seamlessly proxy requests to graphite. Those requests will not include response metadata, will still use Metrictank as a storage system if Graphite is configured that way, and may return a bit slower. You can also choose to enable unstable functions via process=any See also:

Function name and signatureAliasMetrictank
absoluteStable
addNo
aggregateStable
aggregateLineNo
aggregateWithWildcardsStable
alias(seriesList, alias) seriesListStable
aliasByMetricStable
aliasByNode(seriesList, nodeList) seriesListaliasByTagsStable
aliasByTagsNo
aliasQueryNo
aliasSub(seriesList, pattern, replacement) seriesListStable
alphaNo
applyByNodeNo
areaBetweenNo
asPercent(seriesList, seriesList, nodeList) seriesListStable
averageAboveStable
averageBelowStable
averageOutsidePercentileNo
averageSeries(seriesLists) seriesavgStable
averageSeriesWithWildcardsStable
cactiStyleNo
changedNo
colorNo
consolidateBy(seriesList, func) seriesListStable
constantLineNo
countSeries(seriesLists) seriesStable
cumulativeStable
currentAboveStable
currentBelowStable
dashedNo
delayNo
derivative(seriesLists) seriesStable
diffSeries(seriesLists) seriesStable
divideSeries(dividend, divisor) seriesListStable
divideSeriesLists(dividends, divisors) seriesListStable
drawAsInfiniteNo
eventsNo
exclude(seriesList, pattern) seriesListStable
expNo
exponentialMovingAverageNo
fallbackSeriesStable
filterSeries(seriesList, func, operator, threshold) seriesListStable
grep(seriesList, pattern) seriesListStable
groupStable
groupByNodeStable
groupByNodesStable
groupByTags(seriesList, func, tagList) seriesListStable
highest(seriesList, n, func) seriesListStable
highestAverage(seriesList, n, func) seriesListStable
highestCurrent(seriesList, n, func) seriesListStable
highestMax(seriesList, n, func) seriesListStable
hitcountNo
holtWintersAberrationNo
holtWintersConfidenceAreaNo
holtWintersConfidenceBandsNo
holtWintersForecastNo
identityNo
integralStable
integralByIntervalNo
interpolateNo
invertStable
isNonNull(seriesList) seriesListStable
keepLastValue(seriesList, limit) seriesListStable
legendValueNo
limitNo
linearRegressionStable
linearRegressionAnalysisNo
lineWidthNo
logarithmlogStable
logitNo
lowest(seriesList, n, func) seriesListStable
lowestAverage(seriesList, n, func) seriesListStable
lowestCurrent(seriesList, n, func) seriesListStable
mapSeriesmapNo
maximumAboveStable
maximumBelowStable
maxSeries(seriesList) seriesmaxStable
minimumAboveStable
minimumBelowStable
minMaxStable
minSeries(seriesList) seriesminStable
mostDeviantNo
movingAverage(seriesLists, windowSize) seriesListStable
movingMaxStable
movingMedianStable
movingMinStable
movingSumStable
movingWindowStable
multiplySeries(seriesList) seriesStable
multiplySeriesWithWildcardsStable
nonNegatievDerivative(seriesList, maxValue) seriesListStable
nPercentileNo
offsetNo
offsetToZeroStable
percentileOfSeriesNo
perSecond(seriesLists) seriesListStable
pieAverageNo
pieMaximumNo
pieMinimumNo
powNo
powSeriesNo
randomWalkFunctionrandomWalkNo
rangeOfSeries(seriesList) seriesStable
reduceSeriesreduceNo
removeAbovePercentile(seriesList, n) seriesListNo
removeAboveValue(seriesList, n) seriesListStable
removeBelowPercentile(seriesList, n) seriesListNo
removeBelowValue(seriesList, n) seriesListStable
removeBetweenPercentileNo
removeEmptySeriesStable
removeZeroSeriesStable
roundStable
scale(seriesList, num) seriesStable
scaleToSeconds(seriesList, seconds) seriesListStable
secondYAxisNo
seriesByTagNo
setXFilesFactorxFilesFactorNo
sigmoidNo
sinFunctionsinNo
smartSummarizeNo
sortBy(seriesList, func, reverse) seriesListStable
sortByMaxima(seriesList) seriesListStable
sortByMinimaNo
sortByName(seriesList, natural, reverse) seriesListStable
sortByTotal(seriesList) seriesListStable
squareRootNo
stackedNo
stddevSeries(seriesList) seriesStable
stdevNo
substrStable
summarize(seriesList) seriesListStable
sumSeries(seriesLists) seriessumStable
sumSeriesWithWildcardsStable
thresholdNo
timeFunctiontimeNo
timeShiftStable
timeSliceNo
timeStackNo
transformNull(seriesList, default=0) seriesListStable
uniqueStable
useSeriesAboveNo
verticalLineNo
weightedAverageNo