Meraki Infra Osquery

  • By Meraki SRE Infrastructure Team
Channel Version Revision Published Runs on
latest/stable 1 1 19 Mar 2021
Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
juju deploy meraki-infra-osquery
Show information

Platform:

Ubuntu
20.04 18.04 16.04 14.04

Overview

Apache 2.0 License

This base layer provides a function to add logrotate support to any reactive charm.

Usage

Declarative via layer.yaml

options:
  logrotate:
    /var/log/foobar.log:
      - copytruncate
      - rotate 5
      - size 100k

In your charm code

from charms.layer import logrotate

@when(logrotate.installed, ...)
def setup_logrotate():
    logrotate_opts = {
        /var/log/foobar.log: [
            'copytruncate', 
            'rotate 5', 
            'size 100k', 
        ]
    }
    logrotate.configure(logrotate_opts)