Skip to content

Instantly share code, notes, and snippets.

@dblessing
Last active August 29, 2015 13:56
Show Gist options
  • Save dblessing/9192609 to your computer and use it in GitHub Desktop.
Save dblessing/9192609 to your computer and use it in GitHub Desktop.
augeas
ebug: Augeas[rsyslog preserve fqdn](provider=augeas): /augeas/files/etc/rsyslog.conf/error/path = /files/etc/rsyslog.conf
Debug: Augeas[rsyslog preserve fqdn](provider=augeas): /augeas/files/etc/rsyslog.conf/error/lens = /usr/share/augeas/lenses/dist/rsyslog.aug:30.10-.57:
Debug: Augeas[rsyslog preserve fqdn](provider=augeas): /augeas/files/etc/rsyslog.conf/error/message = Failed to match
({ } | { /#comment/ = /[^\001-\004\t\n !+-][^\001-\004\n]*[^\001-\004\t\n ]|[^\001-\004\t\n !+-]/ } | { /entry/ } | { /\\$[0-9A-Za-z]+/ = /[^\001-\004\t\n #,]+/ })*({ /program/ } | { /hostname/ })*
with tree
{ "$PreserveFQDN" } { "#comment" = "rsyslog v5 configuration file" } { } { "#comment" = "For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html" } { "#comment" = "If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html" } { } { "#comment" = "$PreserveFQDN on" } { } { "#comment" = "### MODULES ####" } { } { "$ModLoad" = "imuxsock" } { "$ModLoad" = "imklog" } { "#comment" = "$ModLoad immark # provides --MARK-- message capability" } { } { "#comment" = "Provides UDP syslog reception" } { "#comment" = "$ModLoad imudp" } { "#comment" = "$UDPServerRun 514" } { } { "#comment" = "Provides TCP syslog reception" } { "#comment" = "$ModLoad imtcp" } { "#comment" = "$InputTCPServerRun 514" } { } { } { "#comment" = "### GLOBAL DIRECTIVES ####" } { } { "#comment" = "Use default timestamp format" } { "$ActionFileDefaultTemplate" = "RSYSLOG_TraditionalFileFormat" } { } { "#comment" = "File syncing capability is disabled by default. This feature is usually not required," } { "#comment" = "not useful and an extreme performance hit" } { "#comment" = "$ActionFileEnableSync on" } { } { "#comment" = "Include all config files in /etc/rsyslog.d/" } { "$IncludeConfig" = "/etc/rsyslog.d/*.conf" } { } { } { "#comment" = "### RULES ####" } { } { "#comment" = "Log all kernel messages to the console." } { "#comment" = "Logging much else clutters up the screen." } { "#comment" = "kern.* /dev/console" } { } { "#comment" = "Log anything (except mail) of level info or higher." } { "#comment" = "Don't log private authentication messages!" } { "entry" } { } { "#comment" = "The authpriv file has restricted access." } { "entry" } { } { "#comment" = "Log all the mail messages in one place." } { "entry" } { } { } { "#comment" = "Log cron stuff" } { "entry" } { } { "#comment" = "Everybody gets emergency messages" } { "entry" } { } { "#comment" = "Save news errors of level crit and higher in a special file." } { "entry" } { } { "#comment" = "Save boot messages also to boot.log" } { "entry" } { } { } { "#comment" = "### begin forwarding rule ###" } { "#comment" = "The statement between the begin ... end define a SINGLE forwarding" } { "#comment" = "rule. They belong together, do NOT split them. If you create multiple" } { "#comment" = "forwarding rules, duplicate the whole block!" } { "#comment" = "Remote Logging (we use TCP for reliable delivery)" } { } { "#comment" = "An on-disk queue is created for this action. If the remote host is" } { "#comment" = "down, messages are spooled to disk and sent when it is up again." } { "#comment" = "$WorkDirectory /var/lib/rsyslog # where to place spool files" } { "#comment" = "$ActionQueueFileName fwdRule1 # unique name prefix for spool files" } { "#comment" = "$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)" } { "#comment" = "$ActionQueueSaveOnShutdown on # save messages to disk on shutdown" } { "#comment" = "$ActionQueueType LinkedList # run asynchronously" } { "#comment" = "$ActionResumeRetryCount -1 # infinite retries if host is down" } { "#comment" = "remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional" } { "#comment" = "*.* @@remote-host:514" } { "#comment" = "### end of the forwarding rule ###" }
Debug: Augeas[rsyslog preserve fqdn](provider=augeas): Closed the augeas connection
Error: /Stage[main]/Main/Augeas[rsyslog preserve fqdn]: Could not evaluate: Save failed with return code false, see debug
augeas { 'rsyslog preserve fqdn':
lens => 'Rsyslog.lns',
incl => '/etc/rsyslog.conf',
context => '/files/etc/rsyslog.conf',
changes => [ 'ins $PreserveFQDN before *[1]', 'set $PreserveFQDN on' ],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment