This procedure describes how to collect logs from Linux into Sumo Logic.
Sumo apps gather data from the log messages collected from sources by collectors. The Sumo app for Linux requires specific Linux log types, which are set up during the collector and source configuration process. The sections below list the required logs for:
- CentOS, Amazon Linux, and most Red Hat forks
Required logs for Ubuntu
The following logs, located in your Linux machine's /var/log folder, are required for using the Sumo app for Linux with Ubuntu:
Required logs for CentOS, Amazon Linux, and Red Hat
The following logs, located in your Linux machine's /var/log folder, are required for using the Sumo app for Linux with CentOS, Amazon Linux, and most Red Hat forks:
Configure a collector
Configure an Installed Collector.
Configure a source
To configure a source for collecting Linux logs, you create a Local File Source. Following the instructions on Local File Source. When you define a Source Category for the source, we recommend something like: prod/os/linux. For more information about Source Categories, see see Best Practices.
Sample log messages
Dec 16 20:26:23 ubuntu sshd: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=220.127.116.11 user=root 2016-12-16 19:23:13 startup packages remove 2016-12-16 19:23:13 remove tomcat7:all 7.0.68-1ubuntu0.1 <none>
_sourceCategory=ubuntu_log ("authentication failure" or "FAILED SU")
| parse regex "\d+\s+\d+:\d+:\d+\s(?<dest_hostname>\S+)\s" nodrop
| parse "ruser=* rhost=* user=*" as src_user,src_hostname, dest_user nodrop
| parse "Authentication failure for * from *" as dest_user,src_hostname nodrop
| parse "FAILED SU (to *) * on" as dest_user,src_user nodrop
| parse regex "FAILED LOGIN (?:SESSION|\d+) FROM (?<src_tty>\S+) FOR (?<dest_user>\S+)," nodrop
| where dest_user!=""
Sumo Logic App
Now that you have set up collection for Linux, install the Sumo Logic App for Linux to use the preconfigured searches and dashboards that provide insight into website visitor behavior patterns, monitors server operations, and assists in troubleshooting issues that span entire web server farms.