github.com/kubernetes-incubator/kube-aws@v0.16.4/docs/add-ons/journald-logging-to-cloudwatch.md (about) 1 # Journald logging to AWS CloudWatch 2 3 A service has been introduced which runs a dockerised image of *journald-cloudwatch-logs*. This service forwards journald logs to AWS CloudWatch to a LogGroup with the name of .ClusterName and is run on all nodes (Etcds, Controllers and Workers). 4 5 *journald-cloudwatch-logs* is a goLang project https://github.com/saymedia/journald-cloudwatch-logs. 6 7 The default docker image *[jollinshead/journald-cloudwatch-logs](https://hub.docker.com/r/jollinshead/journald-cloudwatch-logs/)* is a wrapper around the go binary of *journald-cloudwatch-logs*. 8 9 This feature is disabled by default and configurable in cluster.yaml: 10 11 ```yaml 12 cloudWatchLogging: 13 enabled: false 14 retentionInDays: 7 15 ``` 16 17 18 The docker image is also configurable: 19 20 ```yaml 21 journaldCloudWatchLogsImage: 22 repo: "jollinshead/journald-cloudwatch-logs" 23 tag: "0.1" 24 rktPullDocker: true 25 ``` 26 27 ## kube-aws apply feedback 28 29 During kube-aws apply, filtered Journald logs can be printed to stdout. This may assist debugging. 30 The format of the messages are: 31 ``` 32 TimePassed NodeName: "LogMessage" 33 ``` 34 For example: 35 ``` 36 +00:04:51 ip-10-29-29-100.us-west-2.compute.internal: "check-certification-validity.service: Failed to run 'start-pre' task: No such file or directory" 37 +00:04:52 ip-10-29-29-100.us-west-2.compute.internal: "check-certification-validity.service: Failed with result 'resources'." 38 +00:04:53 ip-10-29-29-100.us-west-2.compute.internal: "kubelet.service: Failed with result 'exit-code'." 39 ``` 40 41 This feature is configurable in cluster.yaml under the *cloudWatchLogging* section, and requires *cloudWatchLogging* to be enabled. 42 ( Default values: ) 43 44 ```yaml 45 cloudWatchLogging: 46 enabled: false 47 imageWithTag: jollinshead/journald-cloudwatch-logs:0.1 48 retentionInDays: 7 49 localStreaming: 50 enabled: true 51 filter: `{ $.priority = "CRIT" || $.priority = "WARNING" && $.transport = "journal" && $.systemdUnit = "init.scope" }` 52 interval: 60 53 ``` 54 55 NOTE: Due to high initial entropy, *.service* failures may occur during the early stages of booting. 56 In this context Entropy refers to the disorder of *.service*s (starting, failing, restarting). 57 58 ### Parameters 59 60 #### Filter 61 By default the filter is configured for *.service* failures and messages flagged as 'critical'. 62 See [the official AWS documentation](http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html) for more information. 63 64 #### Interval 65 Since some messages are produced frequently, to avoid excessive spam, an 'interval' parameter is provided. 66 This 'interval' value determines the time between printing two identical messages to stdout. 67