munozj
(munozj)
August 2, 2018, 3:28pm
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:
/var/log/asterisk/full
/var/log/asterisk/fail2ban
/var/log/asterisk/freepbx.log
/var/log/asterisk/freepbx_security.log
It’s just easier for me to parse through them in syslog rather than the flat log files.
(FreePBX Distro 13)
dicko
(dicko)
August 2, 2018, 4:01pm
2
1 Like
munozj
(munozj)
August 2, 2018, 4:14pm
3
Thanks @dicko ! Your a wealth of knowledge and information.
1 Like
wzkds
(WZKDS)
March 9, 2019, 12:58am
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. 192.168.0.1:514, port optional
*.* @syslogd.domain.com:514
If your syslog serber is listening on tcp/514
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
*.* @@syslogd.domain.com:514
Note that @@ will use tcp, while @ will use udp.
Add full to syslog:
edit the file:
vi /etc/logrotate.d/syslog
add:
/var/log/asterisk/full
Restart syslog service:
service rsyslog restart
Reload logger:
asterisk -rx "logger reload"
1 Like
system
(system)
Closed
March 8, 2020, 12:58am
5
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.