Syslog configuration
Configuration of the Insight Pack are described here as a reference for users.
rsyslog requirements
Before ingesting rsyslog log files, both rsyslog and IBM® Operations Analytics - Log Analysis must be configured to ensure that rsyslog log files are output in a format that can be processed by IBM Operations Analytics - Log Analysis Syslog Insight Pack.
Add the scalaLogFormat template to rsyslog:
- For rsyslog 7 and higher, which support the list format:
- Open the /etc/rsyslog.conf for edit.
- Add the following template:
template(name="scalaLogFormat" type="list") { property(name="timestamp" dateFormat="rfc3339") constant(value=" host=") property(name="hostname") constant(value=", relayHost=") property(name="fromhost") constant(value=", tag=") property(name="syslogtag") constant(value=", programName=") property(name="programname") constant(value=", procid=") property(name="procid") constant(value=", facility=") property(name="syslogfacility-text") constant(value=", sev=") property(name="syslogseverity-text") constant(value=", appName=") property(name="app-name") constant(value=", msg=") property(name="msg" ) constant(value="\n") }
The generated log record is formatted as
2013-07-15T21:30:37.997295-04:00 host=co052065, relayHost=co052065, tag=rhnsd[12171]:, programName=rhnsd, procid=12171, facility=daemon, sev=debug, appName=rhnsd, msg= running program /usr/sbin/rhn_check
- Associate the scalaLogFormat template with the log files to be
ingested by IBM Operations Analytics - Log Analysis.
It will log all log entries to <filename> in addition to any other
associations in the configuration file. For example:
*.* /var/log/<filename>.log;scalaLogFormat
- Restart the rsyslog daemon.
Refer to the rsyslog documentation http://rsyslog.com/doc for more information.
- Ensure that the output file created for IBM Operations Analytics - Log Analysis can
be read by your IBM Operations Analytics - Log Analysis user,
and write that file directly to the monitored logsource directories.
For example:
*.* <HOME>/logsources/SyslogInsightPack SCALA.log;scalaLogFormat
- For versions of rsyslog older than version 7:
- Open the /etc/rsyslog.conf for edit.
- Add the following template (legacy format):
$template scalaLogFormat,"%TIMESTAMP:::date-rfc3339% host=%HOSTNAME%, relayHost=%FROMHOST%, tag=%syslogtag%, programName=%programname%, procid=%PROCID%, facility=%syslogfacility-text%, sev=%syslogseverity-text%, appName=%APP-NAME%, msg=%msg%\n"
The generated log record is formatted as
2013-07-15T21:30:37.997295-04:00 host=co052065, relayHost=co052065, tag=rhnsd[12171]:, programName=rhnsd, procid=12171, facility=daemon, sev=debug, appName=rhnsd, msg= running program /usr/sbin/rhn_check
- Associate the scalaLogFormat template with the log files to be
ingested by IBM Operations Analytics - Log Analysis.
It will log all log entries to <filename> in addition to any other
associations in the configuration file. For example:
*.* /var/log/<filename>.log;scalaLogFormat
- Restart the rsyslog daemon.
Refer to the rsyslog documentation http://rsyslog.com/doc for more information.
- Ensure that the output file created for IBM Operations Analytics - Log Analysis can
be read by your IBM Operations Analytics - Log Analysis user,
and write that file directly to the monitored logsource directories.
For example:
*.* <HOME>/logsources/SyslogInsightPack SCALA.log;scalaLogFormat
For more information about rsyslog configuration files, see: http://www.rsyslog.com/doc/rsyslog_conf.html
Configuration artifacts
The following table
lists the configuration artifacts that are provided with the Insight
Pack for each log file.
Artifact | Name for the syslog log |
---|---|
Splitter rule set | Syslog-Split |
Annotator rule set | Syslog-Annotate |
Source type | Syslog |
Collection | Syslog-Collection1 |
Note: Data sources are not predefined. A user with administrator
privileges must define at least one syslog data source type and collection
before the application can be used.
Log File Agent configuration
The supported
log files share IBM Tivoli Monitoring Log File Agent (LFA) configuration
files. The following LFA configuration files are in the <HOME>/IBM-LFA-6.30/config/lo directory
(where <HOME> is
the install location of IBM Operations Analytics - Log Analysis):
- SyslogInsightPack-lfasyslog.conf: Configuration file for the syslog log file agent.
- SyslogInsightPack-lfasyslog.fmt: Matches records for the syslog log files.
Splitting and annotation AQL modules
Splitting
and annotation are handled by the following Annotation Query Language
(AQL)
modules.
AQL Module | Description |
---|---|
common | Common code module that is used across multiple insight packs (for example, to recognize timestamp formats). |
dateTimeSplitter newlineSplitter | Splitter modules for syslog log files. |
annotatorSyslog | Annotator module for syslog log files. |