Skip to content

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