- Related Products
- ADManager Plus
- ADAudit Plus
- ADSelfService Plus
- Exchange Reporter Plus
- AD360
- Log360
Note: Please take a note of the default port numbers used for the different protocols.
Default port number & protocol used
To find the Syslog service used, use the below command
ps aux | grep syslog
As a result, this will return the current running Syslog service.
Follow the steps below to configure log forwarding to EventLog Analyzer server based on the Syslog Service used.
*.*<space/tab>@<eventloganalyzer_server_name>:<port_no>
*.*<space/tab>@<eventloganalyzer_server_name>:<port_no>
*.*<space/tab>@@<eventloganalyzer_server_name>:<port_no>
Note: Please check the prerequisites before appending the entries mentioned
$DefaultNetstreamDriverCAFile <CACertificate>
$ActionSendStreamDriver gtls
$ActionSendStreamDriverMode 1
$ActionSendStreamDriverAuthMode x509/name
$ActionSendStreamDriverPermittedPeer <commonname>
*.*<space/tab>@@<eventloganalyzer_server_name>:<port_no>
For ex: Here the <source_name> should be "s_src"
source s_src {
system();
internal();
};
destination d_eventloganalyzer { network(<eventloganalyzer_server_name> port(<port>) transport("udp")); }; log { source(<source_name>); destination(d_eventloganalyzer); };
destination d_eventloganalyzer { network(<eventloganalyzer_server_name> port(<port>) transport("tcp")); }; log { source(<source_name>); destination(d_eventloganalyzer); };
Note: Please check the prerequisites before appending the entries mentioned
destination d_eventloganalyzer { network(<eventloganalyzer_server_name> port(<port>) transport("tls") tls(key-file("/path/to/private.key") cert-file("/path/to/certificate.crt") ca-dir("/path/to/ca/directory"))); }; log { source(<source_name>); destination(d_eventloganalyzer); };
Save the configuration and restart the Syslog daemon using the below command
service <syslog/rsyslog/syslog-ng> restart
systemctl restart <syslog/rsyslog/syslog-ng>
The above configuration will only enable forwarding the machine logs to the EventLog Analyzer server.
To configure auto log forwarding from EventLogAnalyzer server using sudo or non sudo user, refer here.
If any particular applications' logs or audit logs needs to be forwarded, then the following configurations needs to be done in Linux devices under rsyslog.conf (or) syslog.conf
Example:
$InputFileName /var/log/sample.log
$InputFileStateFile sample
$InputFileSeverity info
$InputFileFacility local6
local6.info @eventloganalyzer-Server:514
Here /var/log/sample.log is the external file to be forwarded.
yum install <package_name>
apt-get install <package_name>
Important Note: The below privileges are specific to an individual user.
Granting privileges to the rsyslog.conf [or] syslog.conf file.
setfacl -m u:<username>:rw /etc/rsyslog.conf [or] /etc/syslog.conf
Example:
syslog.conf: setfacl -m u:testuser:rw /etc/syslog.conf
rsyslog.conf: setfacl -m u:testuser:rw /etc/rsyslog.conf
Please follow the instructions below to give restart privilege for the syslog/rsyslog service for non-sudo user:
visudo -f /etc/sudoers.d/<username>
<username> ALL=NOPASSWD: /usr/sbin/service <syslog/rsyslog> restart
cat /etc/sudoers.d/<username>
Example: cat /etc/sudoers.d/testuser
Expected Output: testuser ALL=NOPASSWD: /usr/sbin/service rsyslog restart
Note: The acl package must be installed. Before that the filesystem is mounted with the acl support. For more details, kindly refer the official documentation [ ref ].
Copyright © 2020, ZOHO Corp. All Rights Reserved.