munin.conf.j2 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. {% if ansible_prolog -%}
  2. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  3. {{ prolog() }}
  4. {% endif -%}
  5. # Example configuration file for Munin, generated by 'make build'
  6. # The next three variables specifies where the location of the RRD
  7. # databases, the HTML output, logs and the lock/pid files. They all
  8. # must be writable by the user running munin-cron. They are all
  9. # defaulted to the values you see here.
  10. #
  11. # dbdir /var/lib/munin
  12. # htmldir /var/cache/munin/www
  13. # logdir /var/log/munin
  14. # rundir /var/run/munin
  15. #
  16. # Where to look for the HTML templates
  17. # tmpldir /etc/munin/templates
  18. # (Exactly one) directory to include all files from.
  19. #
  20. includedir /etc/munin/munin-conf.d
  21. # Make graphs show values per minute instead of per second
  22. #graph_period minute
  23. # Graphics files are normaly generated by munin-graph, no matter if
  24. # the graphs are used or not. You can change this to
  25. # on-demand-graphing by following the instructions in
  26. # http://munin.projects.linpro.no/wiki/CgiHowto
  27. #
  28. #graph_strategy cgi
  29. # munin-cgi-graph is invoked by the web server up to very many times at the
  30. # same time. This is not optimal since it results in high CPU and memory
  31. # consumption to the degree that the system can thrash. Again the default is
  32. # 6. Most likely the optimal number for max_cgi_graph_jobs is the same as
  33. # max_graph_jobs.
  34. #
  35. #munin_cgi_graph_jobs 6
  36. # If the automatic CGI url is wrong for your system override it here:
  37. #
  38. #cgiurl_graph /cgi-bin/munin-cgi-graph
  39. # munin-graph runs in parallel, the number of concurrent processes is
  40. # 6. If you want munin-graph to not be parallel set to 0. If set too
  41. # high it will slow down munin-graph. Some experiments are needed to
  42. # determine how many are optimal on your system. On a multi-core
  43. # system with good SCSI disks the number can probably be quite high.
  44. #
  45. #max_graph_jobs 6
  46. # Drop somejuser@fnord.comm and anotheruser@blibb.comm an email everytime
  47. # something changes (OK -> WARNING, CRITICAL -> OK, etc)
  48. #contact.someuser.command mail -s "Munin notification" somejuser@fnord.comm
  49. #contact.anotheruser.command mail -s "Munin notification" anotheruser@blibb.comm
  50. contacts root
  51. contact.root.command mail -s 'MUNIN – [${var:host}] ~ ${var:graph_title}' root
  52. contact.root.always_send warning critical
  53. # For those with Nagios, the following might come in handy. In addition,
  54. # the services must be defined in the Nagios server as well.
  55. #contact.nagios.command /usr/bin/send_nsca nagios.host.comm -c /etc/nsca.conf
  56. # a simple host tree
  57. {% if munin_nodes is defined %}
  58. {% for node in munin_nodes %}
  59. [{{ node.node }}]
  60. {% if node.address is defined %}
  61. address {{ node.address }}
  62. {% else %}
  63. address {{ node.node }}
  64. {% endif %}
  65. use_node_name yes
  66. {% if node.port is defined %}
  67. port {{ node.port }}
  68. {% endif %}
  69. {% if munin_load_warning is defined %}
  70. load.load.warning {{ munin_load_warning }}
  71. {% endif %}
  72. {% if munin_load_critical is defined %}
  73. load.load.critical {{ munin_load_critical }}
  74. {% endif %}
  75. {% if munin_swap_warning is defined %}
  76. memory.swap.warning {{ munin_swap_warning }}
  77. {% endif %}
  78. {% if munin_swap_critical is defined %}
  79. memory.swap.critical {{ munin_swap_critical }}
  80. {% endif %}
  81. {% if munin_postfix_mailqueue_warning is defined %}
  82. postfix_mailqueue.deferred.warning {{ munin_postfix_mailqueue_warning }}
  83. {% endif %}
  84. {% if munin_postfix_mailqueue_critical is defined %}
  85. postfix_mailqueue.deferred.critical {{ munin_postfix_mailqueue_critical }}
  86. {% endif %}
  87. {% endfor %}
  88. {% endif %}
  89. #
  90. # A more complex example of a host tree
  91. #
  92. ## First our "normal" host.
  93. # [fii.foo.com]
  94. # address foo
  95. #
  96. ## Then our other host...
  97. # [fay.foo.com]
  98. # address fay
  99. #
  100. ## Then we want totals...
  101. # [foo.com;Totals] #Force it into the "foo.com"-domain...
  102. # update no # Turn off data-fetching for this "host".
  103. #
  104. # # The graph "load1". We want to see the loads of both machines...
  105. # # "fii=fii.foo.com:load.load" means "label=machine:graph.field"
  106. # load1.graph_title Loads side by side
  107. # load1.graph_order fii=fii.foo.com:load.load fay=fay.foo.com:load.load
  108. #
  109. # # The graph "load2". Now we want them stacked on top of each other.
  110. # load2.graph_title Loads on top of each other
  111. # load2.dummy_field.stack fii=fii.foo.com:load.load fay=fay.foo.com:load.load
  112. # load2.dummy_field.draw AREA # We want area instead the default LINE2.
  113. # load2.dummy_field.label dummy # This is needed. Silly, really.
  114. #
  115. # # The graph "load3". Now we want them summarised into one field
  116. # load3.graph_title Loads summarised
  117. # load3.combined_loads.sum fii.foo.com:load.load fay.foo.com:load.load
  118. # load3.combined_loads.label Combined loads # Must be set, as this is
  119. # # not a dummy field!
  120. #
  121. ## ...and on a side note, I want them listen in another order (default is
  122. ## alphabetically)
  123. #
  124. # # Since [foo.com] would be interpreted as a host in the domain "com", we
  125. # # specify that this is a domain by adding a semicolon.
  126. # [foo.com;]
  127. # node_order Totals fii.foo.com fay.foo.com
  128. #