Apache Web Server & Logsign USO Platform Integration via Syslog(rsyslog)

Description

To get Linux logs with Syslog, rsyslog module needs to be used. In Linux, logs are written in Text messages into the imfile file. The logs can be received from this path to Logsign USO Platform via syslog protocol. In this document, we will send Apache Logs to Logsign USO Platform with rsyslog. With the same method, different applications' logs can be sent on Linux to Logsign USO Platform via rsyslog.

 

Resolution

  • Open the terminal with root privileges on Linux and create a new conf file under /etc/rsyslog.d/

# nano /etc/rsyslog.d/apachelogs.conf

  • Prepare the conf file as follows.

----------------------------------------------------------------------------------

module(load="imfile" PollingInterval="10" mode="notify")

# Apache access file:
input(type="imfile"
File="/var/log/apache2/access.log"   #where Apache access logs are kept
Tag="apache-access"
Severity="debug"
Facility="local5")

# Apache error file:
input(type="imfile"
File="/var/log/apache2/error.log"       #where Apache error logs are kept
Tag="apache-error"
Severity="debug"
Facility="local6")

#Log Forwards to Logsign
action(type="omfwd"
Target="10.10.9.28"                            # Logsign USO Platform IP Address
Port="514"
Protocol="udp")

-------------------------------------------------------------------------------------

mceclip0__1_.png

 

  • After saving the file, restart the rsyslog service. Enable the rsyslog service to open automatically when the server restarts. For these processes, following commands are used.

root@webserver:~# systemctl enable rsyslog.service

root@webserver:~# systemctl restart rsyslog.service

  • On the Logsign, go to Settings > Data Collection and add source with +Device.  SYSLOG is selected and other information is defined as in below.

mceclip1__1_.png

  • Now Apache Web server logs are visible in Logsign.

mceclip2__1_.png

 

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
Become a Certified Logsign User/Administrator
Sign-up for Logsign Academy and take the courses to learn about Logsign USO Platform in detail. Enjoy the courses, and get your badges and certificates. In these courses, you'll learn how to use Logsign in your work and add value to your career.
Visit Our Blog
Our Logsign USO Platform illustrate our expertise. So do the blog. Through our blog posts, deepen your knowledge on various SecOps topics or get updated about important news & modern approaches for cybersecurity. Get into the habit of reading valuable information provided by Logsign. Be a step ahead.