Topics:
- Default settings
- URI Parameters
- Graphite-web 1.1 Compatibility
- Supported Functions
- Features of configuration functions
Default colors for png or svg rendering intentionally specified like it is in graphite-web 1.1.7
You can redefine that in config to be more more precise. In default config example they are defined in the same way as in original graphite PR to make them right
Reason behind that change is that on dark background it's much nicer to read old colors than new one
target
: graphite series, seriesList or function (likely containing series or seriesList)from
,until
: time specifiers. Eg. "1d", "10min", "04:37_20150822", "now", "today", ... (NOTE does not handle timezones the same as graphite)format
: support graphite values of { json, raw, pickle, csv, png, svg } adds { protobuf } and does not support { pdf }jsonp
: (...)noCache
: prevent query-response caching (which is 60s if enabled)cacheTimeout
: override default result cache (60s)rawdata
-or-rawData
: true forformat=raw
Explicitly NOT supported
_salt
_ts
_t
When format=png
(default if not specified)
width
,height
: number of pixels (default: width=330 , height=250)pixelRatio
: (1.0)margin
: (10)logBase
: Y-scale should use. Recognizes "e" or a floating point ( >= 1 )fgcolor
: foreground colorbgcolor
: background colormajorLine
: major line colorminorLine
: minor line colorfontName
: ("Sans")fontSize
: (10.0)fontBold
: (false)fontItalic
: (false)graphOnly
: (false)hideLegend
: (false) (NOTE if not defined and >10 result metrics this becomes true)hideGrid
: (false)hideAxes
: (false)hideYAxis
: (false)hideXAxis
: (false)yAxisSide
: ("left")connectedLimit
: number of missing points to bridge whenlinemode
is not one of { "slope", "staircase" } likely "connected" (4294967296)lineMode
: ("slope")areaMode
: ("none") also recognizes { "first", "all", "stacked" }areaAlpha
: ( ) float value for area alphapieMode
: ("average") also recognizes { "maximum", "minimum" } (NOTE pie graph support is explicitly unplanned)lineWidth
: (1.2) float value for line widthdashed
: (false) dashed linesrightWidth
: (1.2) ...rightDashed
: (false)rightColor
: ...leftWidth
: (1.2)leftDashed
: (false)leftColor
: ...title
: ("") graph titlevtitle
: ("") ...vtitleRight
: ("") ...colorList
: ("blue,green,red,purple,yellow,aqua,grey,magenta,pink,gold,rose")majorGridLineColor
: ("rose")minorGridLineColor
: ("grey")uniqueLegend
: (false)drawNullAsZero
: (false) (NOTE affects display only - does not translate missing values to zero in functions. For that use ...)drawAsInfinite
: (false) ...yMin
:yMax
:yStep
:xMin
:xMax
:xStep
:xFormat
: ("") ...minorY
: (1) ...yMinLeft
:yMinRight
:yMaxLeft
:yMaxRight
:yStepL
:ySTepR
:yLimitLeft
:yLimitRight
:yUnitSystem
: ("si") also recognizes { "binary" }yDivisors
: (4,5,6) ...
format
: ("treejson") also recognizes { "json" (same as "treejson"), "completer", "raw" }jsonp
: ...query
: the metric or glob-pattern to find
Function |
---|
events |
Function | Incompatibilities |
---|---|
asPercent | total: type mismatch: got seriesList, should be any |
averageAbove | n: type mismatch: got integer, should be float |
averageBelow | n: type mismatch: got integer, should be float |
currentAbove | n: type mismatch: got integer, should be float |
currentBelow | n: type mismatch: got integer, should be float |
groupByNode | callback: different amount of parameters, [averageSeries averageSeriesWithWildcards countSeries current diffSeries maxSeries minSeries multiplySeries multiplySeriesWithWildcards powSeries rangeOf rangeOfSeries stddevSeries sumSeries sumSeriesWithWildcards] are missing |
groupByNode | callback: type mismatch: got aggFunc, should be aggOrSeriesFunc |
groupByNodes | callback: different amount of parameters, [averageSeries averageSeriesWithWildcards countSeries current diffSeries maxSeries minSeries multiplySeries multiplySeriesWithWildcards powSeries rangeOf rangeOfSeries stddevSeries sumSeries sumSeriesWithWildcards] are missing |
groupByNodes | callback: type mismatch: got aggFunc, should be aggOrSeriesFunc |
groupByTags | callback: different amount of parameters, [averageSeries averageSeriesWithWildcards countSeries current diffSeries maxSeries minSeries multiplySeries multiplySeriesWithWildcards powSeries rangeOf rangeOfSeries stddevSeries sumSeries sumSeriesWithWildcards] are missing |
groupByTags | callback: type mismatch: got aggFunc, should be aggOrSeriesFunc |
highest | func: type mismatch: got string, should be aggFunc |
integralByInterval | parameter not supported: intervalUnit |
interpolate | limit: type mismatch: got float, should be intOrInf |
interpolate | limit: default value mismatch: got (empty), should be "Infinity" |
keepLastValue | limit: type mismatch: got integer, should be intOrInf |
keepLastValue | limit: default value mismatch: got "INF", should be "Infinity" |
legendValue | valuesTypes: different amount of parameters, [averageSeries avgSeries avg_zeroSeries binary countSeries current currentSeries diffSeries lastSeries maxSeries medianSeries minSeries multiplySeries rangeOf rangeOfSeries rangeSeries si stddevSeries sumSeries totalSeries] are missing |
lowest | func: type mismatch: got string, should be aggFunc |
maximumAbove | n: type mismatch: got integer, should be float |
maximumBelow | n: type mismatch: got integer, should be float |
minimumAbove | n: type mismatch: got integer, should be float |
minimumBelow | n: type mismatch: got integer, should be float |
nPercentile | n: type mismatch: got integer, should be float |
percentileOfSeries | n: type mismatch: got integer, should be float |
removeAbovePercentile | n: type mismatch: got integer, should be float |
removeAboveValue | n: type mismatch: got integer, should be float |
removeBelowPercentile | n: type mismatch: got integer, should be float |
removeBelowValue | n: type mismatch: got integer, should be float |
round | precision: default value mismatch: got (empty), should be 0 |
scaleToSeconds | seconds: type mismatch: got integer, should be float |
smartSummarize | func: different amount of parameters, [current rangeOf] are missing |
smartSummarize | -alignTo: different amount of parameters, [<nil> days hours minutes months seconds weeks years] are missing |
smartSummarize | -alignTo: type mismatch: got interval, should be string |
sortBy | func: different amount of parameters, [average avg avg_zero count current diff last max median min multiply range rangeOf stddev sum total] are missing |
sortBy | func: default value mismatch: got (empty), should be "average" |
sortBy | reverse: default value mismatch: got (empty), should be false |
timeShift | parameter not supported: alignDst |
timeSlice | endSliceAt: type mismatch: got interval, should be date |
- Make config for function with pairs key-string - request
enabled: true
database:
"databaseAlias":
urlDB: "localhost:5432"
username: "portgres_user"
password: "postgres_password"
nameDB: "database_name"
keyString:
"resolve_switch_name_byId":
varName: "var"
queryString: "SELECT field_with_switch_name FROM some_table_with_switch_names_id_and_other WHERE field_with_switchID like 'var0';"
matchString: ".*"
"resolve_interface_description_from_table":
varName: "var"
queryString: "SELECT interface_desc FROM some_table_with_switch_data WHERE field_with_hostname like 'var0' AND field_with_interface_id like 'var1';"
matchString: ".*"
We have data series:
switches.switchId.CPU1Min
We need to get CPU load resolved by switchname, aliasByPostgres( switches.*.CPU1Min, databaseAlias, resolve_switch_name_byId, 1 ) will return series like this:
switchnameA
switchnameB
switchnameC
switchnameD
We have data series:
switches.hostname.interfaceID.scope_of_interface_metrics
We want to see interfaces stats sticked to their descriptions, aliasByPostgres(switches.hostname.*.ifOctets.rx, databaseAlias, resolve_interface_description_from_table, 1, 2 ) will return series:
InterfaceADesc
InterfaceBDesc
InterfaceCDesc
InterfaceDDesc
- Add to main config path to configuration file
functionsConfigs:
aliasByPostgres: /path/to/funcConfig.yaml