creator.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {% extends "portal/layout.html" %}
  2. {% block content %}
  3. <div>
  4. <div class="panel panel-default">
  5. <div class="panel-heading">
  6. {{_('create cluster monitor metric')}}
  7. <a target="_blank" href="https://book.open-falcon.com/zh/usage/aggregator.html" title="aggregator{{_('configure help')}}">
  8. <span class="glyphicon glyphicon-question-sign"></span>
  9. </a>
  10. </div>
  11. <div class="panel-body">
  12. <div role="form">
  13. <div class="form-group">
  14. <label for="numerator">分子:</label>
  15. <textarea rows="4" id="numerator" class="form-control"></textarea>
  16. <span class="help-block">
  17. 比如:整个集群的请求失败率 = 所有机器的request_fail数量 ÷ 所有机器的request_total数量 <br/>
  18. 分子就是:$(request_fail/module=graph,project=falcon) <br/>
  19. 分母就是:$(request_total/module=graph,project=falcon)<br/>
  20. </span>
  21. </div>
  22. <div class="form-group">
  23. <label for="denominator">分母:</label>
  24. <textarea rows="4" id="denominator" class="form-control"></textarea>
  25. </div>
  26. <div style="border-left: 10px solid green; padding-left: 5px;margin-bottom: 10px;">
  27. <span>计算得出的监控值要重新push回Falcon,需填写以下信息:</span>
  28. </div>
  29. <div class="form-group">
  30. <label for="endpoint">endpoint:</label>
  31. <input type="text" class="form-control" id="endpoint">
  32. </div>
  33. <div class="form-group">
  34. <label for="metric">metric:</label>
  35. <input type="text" class="form-control" id="metric">
  36. </div>
  37. <div class="form-group">
  38. <label for="tags">tags:</label>
  39. <input type="text" class="form-control" id="tags" value="{{ falcon_tags }}">
  40. </div>
  41. <div class="form-group">
  42. <label for="step">汇报周期(秒为单位):</label>
  43. <input type="text" class="form-control" id="step" value="60">
  44. </div>
  45. <button class="btn btn-success" onclick="create_cluster_monitor_metric('{{ group.id }}');">
  46. <span class="glyphicon glyphicon-floppy-disk"></span>
  47. 创建
  48. </button>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. {% endblock %}