Objective
This article outlines the steps required to collect logs from an application hosted in Unix/Linux device by configuring syslog service to forward log data to ManageEngine EventLog Analyzer. This setup allows centralized logging, monitoring, and auditing of system or application logs for auditing and compliance.
Prerequisites
System requirements
- User permissions
Dependencies
Syslog service (rsyslog or syslog-ng) must be active.
Firewall, SELinux, or AppArmor must allow outbound syslog traffic.
EventLog Analyzer must be configured to receive logs from remote Unix devices.
Steps to follow
Step 1: Identify the logging daemon
Run the following commands to determine the active syslog daemon:
ps -ef | grep rsyslog
ps -ef | grep syslog-ng
- Create a new configuration file: sudo vi /etc/rsyslog.d/<application_name>.conf

Add the following content to the file:
$ModLoad imfile
$InputFilePollInterval 10
$PrivDropToGroup adm
$InputFileName <ConfiguredLogFile_Location>
#$InputFileTag APP
#$InputFileStateFile Stat-APP
#$InputFileSeverity 120
$InputFileFacility local7 local6 local5 local4 local3 local2 local1
$InputRunFileMonitor
$InputFilePersistStateInterval 100
Notes:
The '#' used at the starting of each line denotes that the line is commented. If the user needed those field, it can be uncommented by just removing it.
Replace <ConfiguredLogFile_Location> with the path of the application log file. (Sample Image below)
Add or adjust fields based on log structure or compliance needs.

For rsyslog:
Open /etc/rsyslog.conf or use a dedicated file like /etc/rsyslog.d/forward.conf.
Add the following lines:
- $ModLoad imudp
$UDPServerRun 514
- $ModLoad imtcp
$InputTCPServerRun 514
Include all configuration files:
$IncludeConfig /etc/rsyslog.d/*.conf
Forward the logs to the EventLog Analyzer server:
# For UDP
*.* @<ELA_SERVER_IP>:514
# For TCP
*.* @@<ELA_SERVER_IP>:514

- For syslog-ng:
Open /etc/syslog-ng/syslog-ng.conf.
Add the following configuration:
destination d_ela { tcp("<ELA_SERVER_IP>" port(514)); };
log { source(s_src); destination(d_ela); };
- Replace <ELA_SERVER_IP> with the IP address of the EventLog Analyzer server.
Step 4: Restart logging services
sudo systemctl restart rsyslog
sudo systemctl restart syslog-ng
Validation and testing
Log in to the EventLog Analyzer web console.
Navigate to Log Search or Syslog Devices.
Run a test message from the Unix machine: logger "Test log from Unix system"
Confirm that the test log appears in EventLog Analyzer.
Ensure expected logs (e.g., auth logs, application logs) are being received.
Tips
Use separate configuration files (e.g., forward.conf) instead of editing the main config.
Regularly monitor log flow after configuration.
Enable timestamps and facility-based filtering if required for more structured log analysis.
When forwarding audit logs, sometimes default policies in Red Hat systems with Security enhancement (SElinux) won't allow the audit logs to be read. Refer to Troubleshooting tips.
Related Articles and Topics