ReleaseEngineering/PuppetAgain/Modules/log aggregator

From MozillaWiki
Jump to: navigation, search

This module configures log aggregation servers to collect logs via rsyslogd and clients to send logs to the log aggregation server CNAME/LoadBlanacer in their datacenter or region. It installs rsyslog on the aggregation servers and modifies the syslog configuration of clients based on operating system type.

Log aggregation servers should include toplevel::server::log_aggregator

All POSIX hosts are clients and receive the client configuration as part of modules/toplevel/manifests/base.pp: include log_aggregator::client

The correct aggregation host is chosen based on the FQDN of the client in manifests/moco-config.pp:

    $log_aggregator = $fqdn ? {
        /.*\.scl3\.mozilla\.com/ => '',
        /.*\.use1\.mozilla\.com/ => '',
        /.*\.usw2\.mozilla\.com/ => '',
        default => '',

In AWS, the golden AMIs we use in all regions are always generated in use1, so we use rsyslog stanzas in cloud-init to overwrite the client rsyslog file to specify the correct log aggregation host per