Oracle Solaris

NXLog can collect various types of system logs on the Solaris platform. For deployment details, see the supported Solaris platforms, Solaris installation, and monitoring.

Basic Security Mode (BSM) Auditing

The xm_bsm module can be used to parse logs collected with im_file.

Example 1. Collecting BSM Audit logs from the kernel

This example configuration reads from files in /var/audit with im_file. The InputType provided by xm_bsm is used to parse the binary format.

nxlog.conf
<Extension bsm_parser>
    Module      xm_bsm
</Extension>

<Input in>
    Module      im_file
    File        '/var/audit/*'
    InputType   bsm_parser
</Input>
Custom programs

The im_exec module allows log data to be collected from custom external programs.

Example 2. Using an external command

This example uses the tail command to read from a file.

The im_file module should be used to read log messages from files. This example only demonstrates the use of the im_exec module.
nxlog.conf
<Input systemlog>
    Module  im_exec
    Command /usr/bin/tail
    Arg     -f
    Arg     /var/log/syslog
</Input>
DNS Monitoring

DNS logs can be collected from the BIND DNS server, see the BIND 9 section in the NXLog User Guide.

File Integrity Monitoring

File and directory changes can be detected and logged for auditing with the im_fim module. See File Integrity Monitoring.

Example 3. Monitoring file integrity

This configuration watches for changes to files and directories under /usr/bin/.

nxlog.conf
<Input fim>
    Module          im_fim
    File            "/usr/bin/*"
    Digest          SHA1
    ScanInterval    3600
    Recursive       TRUE
</Input>
Local syslog

Events written to file in Syslog format can be collected with the im_file module and parsed with the xm_syslog module. See Collecting and Parsing Syslog for more information.

Example 4. Reading syslog messages from file

This example uses the im_file module to read messages from /var/log/messages and the xm_syslog parse_syslog() procedure to parse them.

nxlog.conf
<Extension _syslog>
    Module  xm_syslog
</Extension>

<Input in>
    Module  im_file
    File    "/var/log/messages"
    Exec    parse_syslog();
</Input>
Log files

The im_file module can be used to collect events from log files.

Example 5. Reading from log files

This configuration uses the im_file module to read events from the specified log file.

nxlog.conf
<Input in>
    Module  im_file
    File    "/foo/input.log"
</Input>
Process Accounting

The im_acct module can be used to gather details about which owner (user and group) runs what processes.

Example 6. Reading Process Accounting logs

With this configuration file, NXLog will enable process accounting to the specified file and read events from it.

nxlog.conf
<Input acct>
    Module  im_acct
    AcctOn  TRUE
    File    '/tmp/nxlog.acct'
</Input>