FreePBX | Register | Issues | Wiki | Portal | Support

Is it possible to export FreePBX logs to syslog?

(John) #1

I’ve been able to get system messages such as /var/log/messages to forward to my syslog server but is it possible to also forward some of the Freepbx and Asterisk logs such as:


It’s just easier for me to parse through them in syslog rather than the flat log files.

(FreePBX Distro 13)


(John) #3

Thanks @dicko! Your a wealth of knowledge and information.

(Wzkds) #4

That helped me, too, thought I’d add my 2cents.

(the part that I’m assuming, but adding for posterity):

edit /etc/rsyslog.conf

vi /etc/rsyslog.conf

Search for remote, uncoment the .@remotehost and change remotehost to the ip or fqdn of your syslog server.

If your syslog server is listening on udp/514:

 # remote host is: name/ip:port, e.g., port optional    

If your syslog serber is listening on tcp/514

 # remote host is: name/ip:port, e.g., port optional    

Note that @@ will use tcp, while @ will use udp.

Add full to syslog:

edit the file:

vi /etc/logrotate.d/syslog



Restart syslog service:

service rsyslog restart

Reload logger:

asterisk -rx "logger reload"