Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. class profiles::postgresql {
  2. # Устанавливаем Postgres
  3. class {'::postgresql::globals':
  4. version => '9.6',
  5. } ->
  6. class {'::postgresql::server': }
  7.  
  8. # Добавляем юзера для мониторинга
  9. ::postgresql::server::db {'sensu',
  10. user => 'sensu',
  11. password => 'sensu',
  12. }
  13.  
  14. # Добавляем subscription в sensu
  15. # Через subscription назначаются проверки
  16. @sensu::subscription{'postgresql-server':
  17. custom => {
  18. user => 'sensu',
  19. password => 'sensu',
  20. }
  21. }
  22.  
  23. # Добавляем мониторинг доступности Postgres
  24. @@sensu::check{ "check_postgres@${::fqdn}":
  25. command => "check-postgres -H ${::fqdn} -u sensu -p sensu",
  26. subscription => 'roundrobin:healthchecks',
  27. }
  28.  
  29. # Добавляем мониторинг метрик Postgres
  30. @@sensu::check{ "postgres_metrics@${::fqdn}":
  31. command => 'check-postgres-metrics -H localhost -u sensu -p sensu",
  32. subscription => 'postgresql-server',
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement