query.options.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <section class="grafana-metric-options">
  2. <div class="gf-form-group">
  3. <div class="gf-form-inline">
  4. <div class="gf-form">
  5. <span class="gf-form-label"><i class="fa fa-wrench"></i></span>
  6. <span class="gf-form-label width-11">Group by time interval</span>
  7. <input type="text" class="gf-form-input width-16" ng-model="ctrl.panelCtrl.panel.interval" ng-blur="ctrl.panelCtrl.refresh();"
  8. spellcheck='false' placeholder="example: >10s">
  9. <info-popover mode="right-absolute">
  10. Set a low limit by having a greater sign: example: >60s
  11. </info-popover>
  12. </div>
  13. </div>
  14. <div class="gf-form-inline">
  15. <div class="gf-form">
  16. <span class="gf-form-label width-10">
  17. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(1);" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  18. <i class="fa fa-info-circle"></i>
  19. &nbsp;alias patterns
  20. </a>
  21. </span>
  22. <span class="gf-form-label width-10">
  23. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(2)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  24. <i class="fa fa-info-circle"></i>
  25. &nbsp;stacking &amp; fill
  26. </a>
  27. </span>
  28. <span class="gf-form-label width-10">
  29. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(3)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  30. <i class="fa fa-info-circle"></i>
  31. &nbsp;group by time
  32. </a>
  33. </span>
  34. </div>
  35. </div>
  36. </div>
  37. </section>
  38. <div class="editor-row">
  39. <div class="pull-left">
  40. <div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 1">
  41. <h5>Alias patterns</h5>
  42. <ul>
  43. <li>$m = replaced with measurement name</li>
  44. <li>$measurement = replaced with measurement name</li>
  45. <li>$1 - $9 = replaced with part of measurement name (if you separate your measurement name with dots)</li>
  46. <li>$col = replaced with column name</li>
  47. <li>$tag_hostname = replaced with the value of the hostname tag</li>
  48. <li>You can also use [[tag_hostname]] pattern replacement syntax</li>
  49. </ul>
  50. </div>
  51. <div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 2">
  52. <h5>Stacking and fill</h5>
  53. <ul>
  54. <li>When stacking is enabled it important that points align</li>
  55. <li>If there are missing points for one series it can cause gaps or missing bars</li>
  56. <li>You must use fill(0), and select a group by time low limit</li>
  57. <li>Use the group by time option below your queries and specify for example &gt;10s if your metrics are written every 10 seconds</li>
  58. <li>This will insert zeros for series that are missing measurements and will make stacking work properly</li>
  59. </ul>
  60. </div>
  61. <div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 3">
  62. <h5>Group by time</h5>
  63. <ul>
  64. <li>Group by time is important, otherwise the query could return many thousands of datapoints that will slow down Grafana</li>
  65. <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>
  66. <li>If you use fill(0) or fill(null) set a low limit for the auto group by time interval</li>
  67. <li>The low limit can only be set in the group by time option below your queries</li>
  68. <li>You set a low limit by adding a greater sign before the interval</li>
  69. <li>Example: &gt;60s if you write metrics to InfluxDB every 60 seconds</li>
  70. </ul>
  71. </div>
  72. </div>
  73. </div>