query.options.html 4.8 KB

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