Reduce cacti updates cron spam
The current process to udpate cacti hosts is fairly chatty. It basically goes in and just tries to update every host there and if they exist that generates a bunch of output which is then emailed to infra roots. This information is potentially useful for debugging so keep it around in local cacti host logs. These logs will then be rotated with a week of retention. This should help make our inboxes happier. Change-Id: Ib03ef7b22083a2a2454715bd5229313b19b84ae9
This commit is contained in:
parent
ea950aadeb
commit
0293b260d9
@ -83,9 +83,21 @@ class openstack_project::cacti (
|
||||
cron { 'add cacti hosts':
|
||||
ensure => present,
|
||||
user => root,
|
||||
command => 'for host in $(cat /var/lib/cacti/devices); do /usr/local/bin/create_graphs.sh $host; done',
|
||||
command => 'for host in $(cat /var/lib/cacti/devices); do /usr/local/bin/create_graphs.sh $host >> /var/log/cacti_update.log 2>&1; done',
|
||||
minute => '0',
|
||||
}
|
||||
|
||||
|
||||
include logrotate
|
||||
logrotate::file { 'cacti_update.log':
|
||||
log => '/var/log/cacti_update.log',
|
||||
options => [
|
||||
'compress',
|
||||
'missingok',
|
||||
'rotate 7',
|
||||
'daily',
|
||||
'notifempty',
|
||||
'copytruncate',
|
||||
],
|
||||
require => Cron['add cacti hosts'],
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user