Syslogs are generated by Linux/Unix and other network devices such as switches, routers, and firewalls. Syslogs contain valuable information that helps in securing networks and troubleshoot operational issues. Therefore it is essential to collect and analyze Syslogs.
This article explains the structure and format of syslogs and provides information about syslog storage.
The syslog standard contains three different layers:
Every Syslog packet contains three parts and is limited to 1024 bytes (1kb) by default. This format makes it easier to parse and analyze the collected logs.
The PRI section of Syslog represents the Facility and Severity of the message. As mentioned in the RFC 3164 standard, Facility and Severity are mapped against pre-determined numerical values. Facility denotes a component or application that can generate logs.
|mail system arrangement
|messages generated internally by syslogd
|line printer subsystem
|network news subsystem
|local use 0
|local use 1
|local use 2
|local use 3
|local use 4
|local use 5
|local use 6
|local use 7
Priority value = Facility Value * 8 + Severity Value.
The value calculated using this formula will be present in the PRI section of the Syslog packet within angular brackets <>.
The header portion contains timestamp and IP address or hostname of the network device.The timestamp denotes the date and time of the message generated by the particular device. The time across all network devices should be in sync to avoid confusions while viewing timestamps.
The message portion contains the TAG and CONTENT. TAG refers to the application or program which generates the message/log. CONTENT refers to the message generated.
All syslogs are stored in var/log/syslog or var/log/messages. They can be stored in different locations based on the type of events. For instance, security events are stored in either var/log/auth.log or var/log/secure, kernel events can be accessed from var/log/kern.log and MySQL events can be accessed from var/log/mysql.
Syslogs helps security administrators to analyze critical events such as authorization failures and unusual configuration changes. As syslogs contain information such as who did what actions from where and when, it becomes essential to enable logging, centrally collect the syslogs, and analyze them in-depth to enhance network security.
EventLog Analyzer, an effective log management solution can collect, filter, parse and analyze syslogs and generate comprehensive reports to make syslog auditing and monitoring easy for any network. You can set up alerts for any deviance or malicious activity in syslogs to notify IT security admins in real-time via email/SMS to stop an impending attack.Click here to see how EventLog Analyzer does it.
Zoho Corporation Pvt. Ltd. All rights reserved.