object_idomysqlconnection.conf.erb 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /**
  2. * WARNING: This IdoMysqlConnection definition is automatically generated by Puppet.
  3. * ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
  4. */
  5. /**
  6. * An IdoMysqlConnection definition. You can create your own configuration
  7. * files in the conf.d directory (e.g. one per host). By default all *.conf
  8. * files in this directory are included.
  9. *
  10. *
  11. * See http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-idomysqlconnection
  12. * for more info on MySQL IDO connection obects.
  13. */
  14. library "db_ido_mysql"
  15. object IdoMysqlConnection "mysql-ido" {
  16. <%#- If any of the @ parameters are undefined, don't print anything for them: -%>
  17. <%- if @host -%>
  18. <%#- Otherwise, include the parameter: -%>
  19. host = "<%= @host -%>"
  20. <%- end -%>
  21. <%- if @port -%>
  22. port = <%= @port %>
  23. <%- end -%>
  24. <%- if @user -%>
  25. user = "<%= @user -%>"
  26. <%- end -%>
  27. <%- if @password -%>
  28. password = "<%= @password -%>"
  29. <%- end -%>
  30. <%- if @database -%>
  31. database = "<%= @database -%>"
  32. <%- end -%>
  33. <%- if @table_prefix -%>
  34. table_prefix = "<%= @table_prefix -%>"
  35. <%- end -%>
  36. <%- if @instance_name -%>
  37. instance_name = "<%= @instance_name -%>"
  38. <%- end -%>
  39. <%- if @instance_description -%>
  40. instance_description = "<%= @instance_description -%>"
  41. <%- end -%>
  42. <%- if @cleanup.empty? != true -%>
  43. cleanup = {
  44. <%- @cleanup.sort_by {|key, value| key}.each do |key, value| -%>
  45. <%= key %> = <%= value %>
  46. <%- end -%>
  47. }
  48. <%- end -%>
  49. <%- if @categories.length != 0 -%>
  50. categories = <%= @categories.map {|category| "#{category}"}.join(' | ') %>
  51. <%- end -%>
  52. }