query.options.html 3.3 KB

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