Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class profiles::postgresql {
- # Устанавливаем Postgres
- class {'::postgresql::globals':
- version => '9.6',
- } ->
- class {'::postgresql::server': }
- # Добавляем юзера для мониторинга
- ::postgresql::server::db {'sensu',
- user => 'sensu',
- password => 'sensu',
- }
- # Добавляем subscription в sensu
- # Через subscription назначаются проверки
- @sensu::subscription{'postgresql-server':
- custom => {
- user => 'sensu',
- password => 'sensu',
- }
- }
- # Добавляем мониторинг доступности Postgres
- @@sensu::check{ "check_postgres@${::fqdn}":
- command => "check-postgres -H ${::fqdn} -u sensu -p sensu",
- subscription => 'roundrobin:healthchecks',
- }
- # Добавляем мониторинг метрик Postgres
- @@sensu::check{ "postgres_metrics@${::fqdn}":
- command => 'check-postgres-metrics -H localhost -u sensu -p sensu",
- subscription => 'postgresql-server',
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement