Problems Sending Log To Rsyslog

Home » Asterisk Users » Problems Sending Log To Rsyslog
Asterisk Users 1 Comment

So I have asterisk 1.8.23 and want to send my logs to rsyslog. I
tell asterisk to use syslog in addition to messages:

root@voip:~# tail -10 /etc/asterisk/logger.conf
;debug => debug console => notice,warning,error
;console => notice,warning,error,debug messages => notice,warning,error
;full => notice,warning,error,debug,verbose,dtmf,fax

;syslog keyword : This special keyword logs to syslog facility
;
syslog.local0 => notice,warning,error
;
root@voip:~#

After reloading (asterisk -rx ‘logger reload’) the logger, it seems that Asterisk is happy:

root@voip:~# asterisk -rx ‘logger show channels’
Channel Type Status Configuration
——- —- —— ———–

One thought on - Problems Sending Log To Rsyslog

  • And you were absolutely right:

    root@voip:~# sudo -u syslog touch /var/log/asterisk/my_nose touch: cannot touch `/var/log/asterisk/my_nose’: Permission denied root@voip:~# ls -lhd /var/log/asterisk drwxr-xr-x 4 asterisk asterisk 4.0K Sep 26 10:10 /var/log/asterisk root@voip:~# getent group asterisk asterisk:x:114:www-data root@voip:~#

    So, I decided to be lazy and add syslog to the asterisk group:

    root@voip:~# id syslog uid1(syslog) gid3(syslog) groups4(asterisk),103(syslog)
    root@voip:~# chmod g+w /var/log/asterisk root@voip:~# sudo -u syslog touch /var/log/asterisk/my_nose root@voip:~#

    Thanks!