2014-09-04 14:08:31 +02:00
< div class = "editor-row" >
2015-03-25 11:07:12 +01:00
2015-05-18 11:40:50 +02:00
< div ng-repeat = "target in panel.targets" ng-controller = "InfluxQueryCtrl" ng-init = "init()" ng-class = "{'tight-form-disabled': target.hide}" class = "tight-form-container-no-item-borders" style = "margin-bottom: 10px" >
< div class = "tight-form" >
< ul class = "tight-form-list pull-right" >
< li ng-show = "parserError" class = "tight-form-item" >
< a bs-tooltip = "parserError" style = "color: rgb(229, 189, 28)" role = "menuitem" >
< i class = "fa fa-warning" > < / i >
< / a >
< / li >
< li class = "tight-form-item" >
< a class = "pointer" tabindex = "1" ng-click = "toggleQueryMode()" >
< i class = "fa fa-pencil" > < / i >
< / a >
< / li >
< li class = "tight-form-item" >
2015-01-16 08:35:32 +01:00
< div class = "dropdown" >
2015-03-25 11:07:12 +01:00
< a class = "pointer dropdown-toggle"
2015-01-16 08:35:32 +01:00
data-toggle="dropdown"
tabindex="1">
< i class = "fa fa-bars" > < / i >
2014-11-03 08:56:13 +01:00
< / a >
2015-01-16 08:35:32 +01:00
< ul class = "dropdown-menu pull-right" role = "menu" >
2015-03-25 11:07:12 +01:00
< li role = "menuitem" >
< a tabindex = "1"
ng-click="duplicate()">
Duplicate
< / a >
< / li >
< li role = "menuitem" >
< a tabindex = "1"
ng-click="moveMetricQuery($index, $index-1)">
Move up
< / a >
< / li >
< li role = "menuitem" >
< a tabindex = "1"
ng-click="moveMetricQuery($index, $index+1)">
Move down
< / a >
< / li >
2014-09-04 14:08:31 +02:00
< / ul >
2015-01-16 08:35:32 +01:00
< / div >
< / li >
2015-01-16 08:50:26 +01:00
< li class = "tight-form-item last" >
2015-01-16 08:35:32 +01:00
< a class = "pointer" tabindex = "1" ng-click = "removeDataQuery(target)" >
< i class = "fa fa-remove" > < / i >
< / a >
< / li >
< / ul >
2015-01-16 08:50:26 +01:00
< ul class = "tight-form-list" >
2015-01-16 08:35:32 +01:00
< li >
2015-03-25 11:07:12 +01:00
< a class = "tight-form-item"
ng-click="target.hide = !target.hide; get_data();"
role="menuitem">
2015-01-16 08:35:32 +01:00
< i class = "fa fa-eye" > < / i >
< / a >
2015-01-16 09:31:38 +01:00
< / li >
< / ul >
2015-01-16 08:35:32 +01:00
2015-05-18 11:40:50 +02:00
< input type = "text" class = "tight-form-clear-input span10" ng-model = "target.query" focus-me = "target.rawQuery" spellcheck = 'false' ng-model-onblur ng-change = "targetTextChanged()" ng-show = "target.rawQuery" / >
2015-03-25 11:07:12 +01:00
2015-05-18 11:40:50 +02:00
< ul class = "tight-form-list" role = "menu" ng-hide = "target.rawQuery" >
< li class = "tight-form-item query-keyword" style = "width: 75px;" >
2015-05-15 11:38:22 +02:00
SELECT
< / li >
< li class = "dropdown tight-form-item" >
< a gf-dropdown = "functionMenu" class = "dropdown-toggle" data-toggle = "dropdown" >
{{target.function}}< span > (value)< / span >
< / a >
< / li >
2015-05-18 11:40:50 +02:00
< / ul >
< div class = "clearfix" > < / div >
< / div >
< div class = "tight-form" ng-hide = "target.rawQuery" >
< ul class = "tight-form-list" >
< li class = "tight-form-item" >
< i class = "fa fa-eye invisible" > < / i >
< / li >
< li class = "tight-form-item query-keyword" style = "width: 75px;" >
2015-05-15 11:38:22 +02:00
FROM
< / li >
< li >
< metric-segment segment = "measurementSegment" get-alt-segments = "getMeasurements()" on-value-changed = "measurementChanged()" > < / metric-segment >
< / li >
2015-05-18 11:40:50 +02:00
< / ul >
< div class = "clearfix" > < / div >
< / div >
< div class = "tight-form" ng-hide = "target.rawQuery" >
< ul class = "tight-form-list" >
< li class = "tight-form-item" >
< i class = "fa fa-eye invisible" > < / i >
< / li >
< li class = "tight-form-item query-keyword" style = "width: 75px;" >
2015-05-15 11:38:22 +02:00
WHERE
< / li >
2015-05-18 11:40:50 +02:00
2015-05-15 15:58:07 +02:00
< li ng-repeat = "segment in tagSegments" >
< metric-segment segment = "segment" get-alt-segments = "getTagsOrValues(segment, $index)" on-value-changed = "tagSegmentUpdated(segment, $index)" > < / metric-segment >
2015-05-15 11:38:22 +02:00
< / li >
2015-05-18 11:40:50 +02:00
< / ul >
< div class = "clearfix" > < / div >
< / div >
< div class = "tight-form" ng-hide = "target.rawQuery" >
< ul class = "tight-form-list" >
2015-05-15 11:38:22 +02:00
< li class = "tight-form-item" >
2015-05-18 11:40:50 +02:00
< i class = "fa fa-eye invisible" > < / i >
< / li >
< li class = "tight-form-item" >
2015-05-15 11:38:22 +02:00
< span class = "query-keyword" > GROUP BY< / span >
2015-05-18 11:40:50 +02:00
< / li >
< li class = "tight-form-item" >
2015-05-15 15:58:07 +02:00
time($interval)
< / li >
2015-05-18 11:40:50 +02:00
2015-05-15 15:58:07 +02:00
< li ng-repeat = "segment in groupBySegments" >
2015-05-15 19:04:49 +02:00
< metric-segment segment = "segment" get-alt-segments = "getGroupByTagSegments(segment, 0)" on-value-changed = "groupByTagUpdated(segment, $index)" > < / metric-segment >
2015-05-15 11:38:22 +02:00
< / li >
< li class = "dropdown" >
< a class = "tight-form-item pointer" data-toggle = "dropdown" bs-tooltip = "'Insert missing values, important when stacking'" data-placement = "right" >
< span ng-show = "target.fill" >
fill ({{target.fill}})
< / span >
< span ng-show = "!target.fill" >
no fill
< / span >
< / a >
< ul class = "dropdown-menu" >
< li > < a ng-click = "target.fill = ''" > no fill< / a > < / li >
< li > < a ng-click = "target.fill = 'null'" > fill (null)< / a > < / li >
< li > < a ng-click = "target.fill = '0'" > fill (0)< / a > < / li >
< / ul >
2015-05-18 11:40:50 +02:00
< / li >
< / ul >
2015-05-18 15:01:05 +02:00
< ul class = "tight-form-list pull-right" >
< li class = "tight-form-item" >
Alias pattern
< / li >
< li >
< input type = "text" class = "input-medium tight-form-input" ng-model = "target.alias" spellcheck = 'false' placeholder = "alias" ng-blur = "get_data()" >
< / li >
< / ul >
2015-05-18 11:40:50 +02:00
< div class = "clearfix" > < / div >
< / div >
2015-05-15 11:38:22 +02:00
2015-05-18 11:40:50 +02:00
< / div >
2014-08-27 15:54:30 +02:00
< / div >
2014-07-02 15:50:57 +02:00
2015-05-18 15:01:05 +02:00
< section class = "grafana-metric-options" >
< div class = "tight-form" >
< ul class = "tight-form-list" >
< li class = "tight-form-item tight-form-item-icon" >
< i class = "fa fa-wrench" > < / i >
< / li >
< li class = "tight-form-item" >
Group by time interval
< / li >
< li >
< input type = "text" class = "input-medium tight-form-input" ng-model = "panel.interval" ng-blur = "get_data();"
spellcheck='false' placeholder="example: >10s">
< / li >
< li class = "tight-form-item" >
< i class = "fa fa-question-circle" bs-tooltip = "'Set a low limit by having a greater sign: example: >60s'" data-placement = "right" > < / i >
< / li >
< / ul >
< div class = "clearfix" > < / div >
< / div >
< div class = "tight-form" >
< ul class = "tight-form-list" >
< li class = "tight-form-item tight-form-item-icon" >
< i class = "fa fa-info-circle" > < / i >
< / li >
< li class = "tight-form-item" >
< a ng-click = "toggleEditorHelp(1);" bs-tooltip = "'click to show helpful info'" data-placement = "bottom" >
alias patterns
< / a >
< / li >
< li class = "tight-form-item" >
< a ng-click = "toggleEditorHelp(2)" bs-tooltip = "'click to show helpful info'" data-placement = "bottom" >
stacking & and fill
< / a >
< / li >
< li class = "tight-form-item" >
< a ng-click = "toggleEditorHelp(3)" bs-tooltip = "'click to show helpful info'" data-placement = "bottom" >
group by time
< / a >
< / li >
< / ul >
< div class = "clearfix" > < / div >
< / div >
< / section >
2014-08-27 15:54:30 +02:00
< div class = "editor-row" >
2014-09-04 14:08:31 +02:00
< div class = "pull-left" style = "margin-top: 30px;" >
2015-05-18 15:01:05 +02:00
< div class = "grafana-info-box span6" ng-if = "editorHelpIndex === 1" >
< h5 > Alias patterns< / h5 >
< ul >
< li > $m = replaced with measurement name< / li >
< li > $measurement = replaced with measurement name< / li >
< li > $tag_hostname = replaced with the value of the hostname tag< / li >
< li > You can also use [[tag_hostname]] pattern replacement syntax< / li >
< / ul >
< / div >
< div class = "grafana-info-box span6" ng-if = "editorHelpIndex === 2" >
< h5 > Stacking and fill< / h5 >
< ul >
< li > When stacking is enabled it important that points align< / li >
< li > If there are missing points for one series it can cause gaps or missing bars< / li >
< li > You must use fill(0), and select a group by time low limit< / li >
< li > Use the group by time option below your queries and specify for example > 10s if your metrics are written every 10 seconds< / li >
< li > This will insert zeros for series that are missing measurements and will make stacking work properly< / li >
< / ul >
< / div >
< div class = "grafana-info-box span6" ng-if = "editorHelpIndex === 3" >
< h5 > Group by time< / h5 >
< ul >
< li > Group by time is important, otherwise the query could return many thousands of datapoints that will slow down Grafana< / li >
< li > Leave the group by time field empty for each query and it will be calculated based on time range and pixel width of the graph< / li >
< li > If you use fill(0) or fill(null) set a low limit for the auto group by time interval< / li >
< li > The low limit can only be set in the group by time option below your queries< / li >
< li > You set a low limit by adding a greater sign before the interval< / li >
< li > Example: > 60s if you write metrics to InfluxDB every 60 seconds< / li >
< / ul >
< / div >
2014-09-04 14:08:31 +02:00
< / div >
2014-03-01 12:02:55 +01:00
< / div >
2015-05-18 11:40:50 +02:00
2015-05-18 15:01:05 +02:00