query.options.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <section class="gf-form-group">
  2. <div class="gf-form-inline">
  3. <div class="gf-form max-width-15">
  4. <span class="gf-form-label width-8">
  5. Cache timeout
  6. </span>
  7. <input type="text"
  8. class="gf-form-input"
  9. ng-model="ctrl.panelCtrl.panel.cacheTimeout"
  10. bs-tooltip="'Graphite parameter to override memcache default timeout (unit is seconds)'"
  11. data-placement="right"
  12. spellcheck='false'
  13. placeholder="60">
  14. </input>
  15. </div>
  16. <div class="gf-form max-width-15">
  17. <span class="gf-form-label">Max data points</span>
  18. <input type="text"
  19. class="gf-form-input"
  20. ng-model="ctrl.panelCtrl.panel.maxDataPoints"
  21. bs-tooltip="'Override max data points, automatically set to graph width in pixels.'"
  22. data-placement="right"
  23. ng-model-onblur ng-change="ctrl.panelCtrl.refresh()"
  24. spellcheck='false'
  25. placeholder="auto">
  26. </input>
  27. </div>
  28. </div>
  29. <div class="gf-form-inline">
  30. <div class="gf-form">
  31. <span class="gf-form-label width-12">
  32. <i class="fa fa-info-circle"></i>
  33. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(1);" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  34. Shorter legend names
  35. </a>
  36. </span>
  37. <span class="gf-form-label width-12">
  38. <i class="fa fa-info-circle"></i>
  39. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(2);" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  40. Series as parameters
  41. </a>
  42. </span>
  43. <span class="gf-form-label width-7">
  44. <i class="fa fa-info-circle"></i>
  45. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(3)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  46. Stacking
  47. </a>
  48. </span>
  49. <span class="gf-form-label width-8">
  50. <i class="fa fa-info-circle"></i>
  51. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(4)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  52. Templating
  53. </a>
  54. </span>
  55. <span class="gf-form-label width-10">
  56. <i class="fa fa-info-circle"></i>
  57. <a ng-click="ctrl.panelCtrl.toggleEditorHelp(5)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
  58. max data points
  59. </a>
  60. </span>
  61. </div>
  62. </div>
  63. </section>
  64. <div class="editor-row">
  65. <div class="grafana-info-box span8" ng-if="ctrl.panelCtrl.editorHelpIndex === 1">
  66. <h5>Shorter legend names</h5>
  67. <ul>
  68. <li>alias() function to specify a custom series name</li>
  69. <li>aliasByNode(2) to alias by a specific part of your metric path</li>
  70. <li>aliasByNode(2, -1) you can add multiple segment paths, and use negative index</li>
  71. <li>groupByNode(2, 'sum') is useful if you have 2 wildcards in your metric path and want to sumSeries and group by</li>
  72. </ul>
  73. </div>
  74. <div class="grafana-info-box span8" ng-if="ctrl.panelCtrl.editorHelpIndex === 2">
  75. <h5>Series as parameter</h5>
  76. <ul>
  77. <li>Some graphite functions allow you to have many series arguments</li>
  78. <li>Use #[A-Z] to use a graphite query as parameter to a function</li>
  79. <li>
  80. Examples:
  81. <ul>
  82. <li>asPercent(#A, #B)</li>
  83. <li>prod.srv-01.counters.count - asPercent(#A) : percentage of count in comparison with A query</li>
  84. <li>prod.srv-01.counters.count - sumSeries(#A) : sum count and series A </li>
  85. <li>divideSeries(#A, #B)</li>
  86. </ul>
  87. </li>
  88. <li>If a query is added only to be used as a parameter, hide it from the graph with the eye icon</li>
  89. </ul>
  90. </div>
  91. <div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 3">
  92. <h5>Stacking</h5>
  93. <ul>
  94. <li>You find the stacking option under Display Styles tab</li>
  95. <li>When stacking is enabled make sure null point mode is set to 'null as zero'</li>
  96. </ul>
  97. </div>
  98. <div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 4">
  99. <h5>Templating</h5>
  100. <ul>
  101. <li>You can use a template variable in place of metric names</li>
  102. <li>You can use a template variable in place of function parameters</li>
  103. <li>You enable the templating feature in Dashboard settings / Feature toggles </li>
  104. </ul>
  105. </div>
  106. <div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 5">
  107. <h5>Max data points</h5>
  108. <ul>
  109. <li>Every graphite request is issued with a maxDataPoints parameter</li>
  110. <li>Graphite uses this parameter to consolidate the real number of values down to this number</li>
  111. <li>If there are more real values, then by default they will be consolidated using averages</li>
  112. <li>This could hide real peaks and max values in your series</li>
  113. <li>You can change how point consolidation is made using the consolidateBy graphite function</li>
  114. <li>Point consolidation will effect series legend values (min,max,total,current)</li>
  115. <li>If you override maxDataPoint and set a high value performance can be severely effected</li>
  116. </ul>
  117. </div>
  118. </div>