Skip to Content

Solved: How do I collect Linux servers logs?


Is there a free and robust solution to collect server logs from about 100 Linux systems and Apache servers to refer to when there are security accidents like scanning from outside IPs?

Solution 1

I am using Nagios Log Server. You can certainly have a trial for Nagios Log Server, even for 60 days. If you would like to schedule a live demo with a Nagios expert, contact them to set that up.

Solved: How do I collect Linux servers logs?

Solved: How do I collect Linux servers logs?

Solution 2

A simple solution is to aggregate all logs using Rsync to copy all machines/containers/VMs /var/log/* files to some common machine. Then you can use any number of tools to analyze the logs. This approach is both free, robust, and simple to understand.

Solution 3

You can look into an ELK stack (Elastic Search, Logstash, Kibana) and feed that using Filebeat or rsyslog.

Solution 4

If you are using syslog, then you are able to send logs to a remote server to collect and monitor on that central log server.

On the log server-side, allow logging from the client(s) / network(s) you need, make sure you only send the logs through trusted networks (they are not encrypted).

On the client-side, check the log target and send a copy to the log server.

The configuration depends on the type of syslog/rsyslog/… logging server you are using.

For example in rsyslog edit /etc/rsyslog.conf on server and clients and verify:

  • you can reach the server from the client (test with ping/traceroute)
  • the syslog server is accepting remote connections and no firewall is blocking port 514
  • the client syslog is configured to forward a copy of the log entries you need to the remote log host

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.