Is it possible to export FreePBX logs to syslog?

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)

1 Like

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

1 Like

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"

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.