Merge pull request 'feat: auto restart puppetdb' (#131) from neoloc/puppetdb_restart into develop
Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/131
This commit is contained in:
commit
988e7c2a32
@ -24,6 +24,19 @@ class profiles::puppet::puppetdb_api (
|
||||
|
||||
contain ::puppetdb::server
|
||||
|
||||
# generate the minute for the cron job using fqdn_rand
|
||||
$random_minute = fqdn_rand(60)
|
||||
|
||||
# create cron task to restart the puppetdb service daily at 3am
|
||||
cron { 'restart_puppetdb':
|
||||
ensure => 'present',
|
||||
user => 'root',
|
||||
command => '/bin/systemctl restart puppetdb',
|
||||
minute => $random_minute,
|
||||
hour => '3',
|
||||
require => Service['puppetdb'],
|
||||
}
|
||||
|
||||
class { 'prometheus::puppetdb_exporter':
|
||||
puppetdb_url => "http://${listen_address}:8080/pdb/query",
|
||||
export_scrape_job => true,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user