Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement optional logging w/ custom_logging option #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexconrey
Copy link

  • add boolean to control logging
    • useful for managed/custom logs beyond puppet scope (separate config file)
    • useful for admins that wish to disable logging
    • defaults to true
  • adds custom_logging hash
    • relies on hash format of: { 'channel|category' => { name => {key => val} } }
    • named.conf equillivent
  channel name {
    key val;
  };

  category name {
    key val;
  };
Reason

When adding data collectors (ie. prometheus exporters) - its nice to have segregated logging as an option. Cuts down on the amount of data the collector must parse as well as allows for easier debugging when applied properly (YMMV.)

Example configuration

This is my current setup (with all of the fun stuff redacted)

  bind::server::conf {'/etc/named.conf':
    custom_logging => {
      channel => {
        security_log => {
          file => '"/var/log/named/security.log" versions 3 size 30m',
	  severity => 'dynamic',
          print-time => 'yes',
        },
      }, 
      category => {
        security => { 
          security_log => '', 
        },
      },
    },
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant