Less known Solaris 11.1 features: rsyslog

Solaris 11.1 has now the rsyslog on board, an extended variant of the normal syslog. However the ORACLE SOLARIS 11.1—WHAT’S NEW is mistakable in this regard. Indeed the normal syslog is activated by default and it’s still activated when you have rsyslog on your machine. However rsyslog is not installed by default. When you try do disable the normal syslog and enable the rsyslog, you will get a message that there is no rsyslog.

root@ca:~# svcadm enable svc:/system/system-log:rsyslog
svcadm: Pattern 'svc:/system/system-log:rsyslog' doesn't match any instances

But it’s pretty easy to install it.

root@ca:~# pkg install rsyslog
           Packages to install:  5
       Create boot environment: No
Create backup boot environment: No
            Services to change:  1

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                5/5       117/117      2.5/2.5  227k/s

PHASE                                          ITEMS
Installing new actions                       262/262
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

Okay, now there is an instance of rsyslog in the SMF:

root@ca:~# svcs -a | grep "system-log"
disabled        6:13:13 svc:/system/system-log:rsyslog
online          6:47:53 svc:/system/system-log:default

Now you switch to rsyslog:

root@ca:~# svcadm disable svc:/system/system-log:default
root@ca:~# svcadm enable svc:/system/system-log:rsyslog
root@ca:~# svcs -xv

And now you can start to configure the syslog in /etc/rsyslog.conf