diff --git a/config.yaml b/config.yaml index 654eb88..6adafb2 100644 --- a/config.yaml +++ b/config.yaml @@ -110,3 +110,8 @@ options: description: | Key ID to import to the apt keyring to support use with arbitary source configuration from outside of Launchpad archives or PPA's. + use-syslog: + type: boolean + default: False + description: | + If set to True, supporting services will log to syslog. diff --git a/hooks/hooks.py b/hooks/hooks.py index 82fb332..11e1cab 100755 --- a/hooks/hooks.py +++ b/hooks/hooks.py @@ -72,7 +72,8 @@ def emit_cephconf(): 'mon_hosts': ' '.join(get_mon_hosts()), 'fsid': config('fsid'), 'version': ceph.get_ceph_version(), - 'osd_journal_size': config('osd-journal-size') + 'osd_journal_size': config('osd-journal-size'), + 'use_syslog': str(config('use-syslog')).lower() } # Install ceph.conf as an alternative to support # co-existence with other charms that write this file diff --git a/revision b/revision index b16e5f7..ffda4e7 100644 --- a/revision +++ b/revision @@ -1 +1 @@ -104 +105 \ No newline at end of file diff --git a/templates/ceph.conf b/templates/ceph.conf index 107beec..d82ca82 100644 --- a/templates/ceph.conf +++ b/templates/ceph.conf @@ -9,6 +9,10 @@ keyring = /etc/ceph/$cluster.$name.keyring mon host = {{ mon_hosts }} fsid = {{ fsid }} + log to syslog = {{ use_syslog }} + err to syslog = {{ use_syslog }} + clog to syslog = {{ use_syslog }} + mon cluster log to syslog = {{ use_syslog }} [mon] keyring = /var/lib/ceph/mon/$cluster-$id/keyring