Asterisk monitorings ar logwatch

Asterisk reģistra (log) failu monitoringam ar logwatch, kā sākuma punktu var ņemt Sebastian Szary veidoto paraugu [1] un pie nepieciešamības to koriģēt [2] [3].

Sakarā ar to, ka logwatch katru reizi veic visa reģistra pārbaudi, ir nepieciešams reģistra failu dalīt pa dienām, to var darīt ar logrotate, izveidojot failu asterisk mapē /etc/logrotate.d

/var/log/asterisk/messages {
missingok
daily
rotate 365
postrotate
asterisk -rx "logger rotate" > /dev/null 2> /dev/null
endscript
}
/var/log/asterisk/cdr-csv/Master.csv {
missingok
monthly
rotate 12
}

Logwatch rezultātu var pārbaudīt ar
logwatch --detail High --service asterisk --print

[1] http://szary.org/projects/scripts/logwatch/asterisk-logwatch-1.09.tar.gz
[2] http://www.mcbsys.com/techblog/2012/02/monitor-asterisk-with-logwatch/
[3] http://www.stellarcore.net/logwatch/tabs/docs/HOWTO-Customize-LogWatch…