query.options.html 3.2 KB

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