Blame doc/examples/cloud-config-rsyslog.txt

Packit Service 9bfd13
#cloud-config
Packit Service a04d08
## the rsyslog module allows you to configure the systems syslog.
Packit Service a04d08
## configuration of syslog is under the top level cloud-config
Packit Service a04d08
## entry 'rsyslog'.
Packit Service a04d08
##
Packit Service a04d08
## Example:
Packit Service a04d08
#cloud-config
Packit Service a04d08
rsyslog:
Packit Service 9bfd13
  remotes:
Packit Service 9bfd13
    # udp to host 'maas.mydomain' port 514
Packit Service 9bfd13
    maashost: maas.mydomain
Packit Service 9bfd13
    # udp to ipv4 host on port 514
Packit Service 9bfd13
    maas: "@[10.5.1.56]:514"
Packit Service 9bfd13
    # tcp to host ipv6 host on port 555
Packit Service 9bfd13
    maasipv6: "*.* @@[FE80::0202:B3FF:FE1E:8329]:555"
Packit Service 9bfd13
  configs:
Packit Service 9bfd13
    - "*.* @@192.158.1.1"
Packit Service 9bfd13
    - content: "*.*   @@192.0.2.1:10514"
Packit Service 9bfd13
      filename: 01-example.conf
Packit Service 9bfd13
    - content: |
Packit Service 9bfd13
        *.*   @@syslogd.example.com
Packit Service 9bfd13
  config_dir: /etc/rsyslog.d
Packit Service 9bfd13
  config_filename: 20-cloud-config.conf
Packit Service 9bfd13
  service_reload_command: [your, syslog, reload, command]
Packit Service a04d08
Packit Service a04d08
## Additionally the following legacy format is supported
Packit Service a04d08
## it is converted into the format above before use.
Packit Service a04d08
##  rsyslog_filename -> rsyslog/config_filename
Packit Service a04d08
##  rsyslog_dir -> rsyslog/config_dir
Packit Service a04d08
##  rsyslog -> rsyslog/configs
Packit Service a04d08
# rsyslog:
Packit Service 9bfd13
#   - "*.* @@192.158.1.1"
Packit Service 9bfd13
#   - content: "*.*   @@192.0.2.1:10514"
Packit Service 9bfd13
#     filename: 01-example.conf
Packit Service 9bfd13
#   - content: |
Packit Service 9bfd13
#       *.*   @@syslogd.example.com
Packit Service a04d08
# rsyslog_filename: 20-cloud-config.conf
Packit Service a04d08
# rsyslog_dir: /etc/rsyslog.d
Packit Service a04d08
Packit Service a04d08
## to configure rsyslog to accept remote logging on Ubuntu
Packit Service a04d08
## write the following into /etc/rsyslog.d/20-remote-udp.conf
Packit Service a04d08
##   $ModLoad imudp
Packit Service a04d08
##   $UDPServerRun 514
Packit Service a04d08
##   $template LogRemote,"/var/log/maas/rsyslog/%HOSTNAME%/messages"
Packit Service a04d08
##   :fromhost-ip, !isequal, "127.0.0.1" ?LogRemote
Packit Service a04d08
## then:
Packit Service a04d08
## sudo service rsyslog restart