Logging Solutions¶
- Obs: May be necessary attach the Cloud Watch IAM policy inside the EKS NodeGroup
FluentD + CloudWatch + ElasticSearch¶
Configure FluentD¶
Change this values inside the fluentd.yml file
containers:
- name: fluentd-cloudwatch
image: fluent/fluentd-kubernetes-daemonset:v1.14-debian-cloudwatch-1
env:
- name: REGION
value: eu-west-1
- name: CLUSTER_NAME
value: EKS-Workshop
Apply fluentd.yml.
Logs can take up to 5 minutes before showing inside CloudWatch
Better way to visualize
- Enter in the Log Events
- Actions
- Expamd all rows
Create Elastic Search Stack¶
-Under Construction-
Configure CloudWatch¶
-
Create a new role (IAM)
-
Roles
- Create Role
- Select Lambda
- Next: Permissions
- Attach AmazonESFullAccess
-
rolename -> lambda_es
-
Go to cloudwatch /eks/EKS-Workshop/containers
-
Actions
- Create Amazon OpenSearch Service subscription filter
- Select Amazon ES cluster
- Select Lambda IAM execution Role (lambda_es)
- Log format -> Common Log Format
- Subscription filter name -> [^:]
-
Start Streaming
-
Open Kibana
-
Auth
- Security
- Roles
- all_access
- Mapped users
- Manage mapping
- Add user (edit arn as needed):
- arn:aws:iam::111111111111:role/lambda_es
- Add backend roles
-
arn:aws:iam::111111111111:role/lambda_es
-
Index
- Dashboard
- Create Index Pattern
- cwl-*
- Next step
- @timestamp
- Create Index pattern