Skip to content

Commit 6f6fdbc

Browse files
authored
Merge pull request #39 from aws-observability/mixed-doc
mixed doc
2 parents b174ae1 + 00eb153 commit 6f6fdbc

File tree

8 files changed

+136
-1
lines changed

8 files changed

+136
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The individual patterns can be found in the `lib` directory. Most of the patter
2121

2222
## Documentation
2323

24-
Please refer to the AWS CDK Observability Accelertor [documentation site](tbd) for complete project documentation.
24+
Please refer to the AWS CDK Observability Accelertor [documentation site](https://aws-observability.github.io/cdk-aws-observability-accelerator/) for complete project documentation.
2525

2626
## Usage
2727
Before proceeding, make sure [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) is installed on your machine.
776 KB
Loading
73.8 KB
Loading
222 KB
Loading
272 KB
Loading
151 KB
Loading
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Single New EKS Cluster AWS Mixed Observability Accelerator
2+
3+
## Architecture
4+
5+
The following figure illustrates the architecture of the pattern we will be deploying for Single EKS Cluster Mixed Observability pattern using AWS native tools such as CloudWatch and X-Ray and Open Source tools such as Amazon Distro for OpenTelmetry(ADOT) and Prometheus Node Exporter.
6+
7+
![Architecture](../images/mixed-diagram.png)
8+
9+
This example makes use of CloudWatch as a metric and log aggregation layer while X-Ray is used as a trace-aggregation layer. In order to collect the metrics and traces we use the Open Source ADOT collector. Fluent Bit is used to export the logs to CloudWatch Logs.
10+
11+
In this architecture AWS X-Ray provides a complete view of requests as they travel through your application and filters visual data across payloads, functions, traces, services, and APIs. X-Ray also allows you to perform analytics to gain powerful insights about your distributed trace data.
12+
13+
Utilizing CloudWatch and X-Ray as an aggregation layer allows for a fully-managed scalable telemetry backend. In this example we get those benefits while still having the flexibility and rapid development of the Open Source collection tools.
14+
15+
## Objective
16+
17+
- Deploys one production grade Amazon EKS cluster.
18+
- AWS Distro For OpenTelemetry Operator and Collector configured to collect metrics and traces.
19+
- Logs with [AWS for FluentBit](https://github.com/aws/aws-for-fluent-bit) and CloudWatch Logs
20+
- Aggregate Metrics in CloudWatch
21+
- Aggregate Traces in X-Ray
22+
23+
Ensure that you have installed the following tools on your machine.
24+
25+
1. [aws cli](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)
26+
2. [kubectl](https://Kubernetes.io/docs/tasks/tools/)
27+
3. [cdk](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#getting_started_install)
28+
4. [npm](https://docs.npmjs.com/cli/v8/commands/npm-install)
29+
30+
## Deploying
31+
32+
1. Clone your forked repository
33+
34+
```sh
35+
git clone https://github.com/aws-observability/cdk-aws-observability-accelerator.git
36+
```
37+
38+
2. Install the AWS CDK Toolkit globally on your machine using
39+
40+
```bash
41+
npm install -g aws-cdk
42+
```
43+
44+
3. Install project dependencies by running `npm install` in the main folder of this cloned repository
45+
46+
4. Once all pre-requisites are set you are ready to deploy the pipeline. Run the following command from the root of this repository to deploy the pipeline stack:
47+
48+
```bash
49+
make build
50+
make pattern single-new-eks-mixed-observability deploy
51+
```
52+
53+
## Verify the resources
54+
55+
Run update-kubeconfig command. You should be able to get the command from CDK output message.
56+
57+
```bash
58+
aws eks update-kubeconfig --name single-new-eks-mixed-observability-accelerator --region <your region> --role-arn arn:aws:iam::xxxxxxxxx:role/single-new-eks-opensource-singleneweksopensourceob-82N8N3BMJYYI
59+
```
60+
61+
Let’s verify the resources created by steps above.
62+
63+
```bash
64+
kubectl get nodes -o wide
65+
```
66+
67+
Output:
68+
69+
```console
70+
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
71+
ip-10-0-144-134.us-west-1.compute.internal Ready <none> 143m v1.25.9-eks-0a21954 10.0.144.134 <none> Amazon Linux 2 5.10.179-168.710.amzn2.x86_64 containerd://1.6.19
72+
```
73+
74+
Next, lets verify the namespaces in the cluster:
75+
76+
```bash
77+
kubectl get ns # Output shows all namespace
78+
```
79+
80+
Output:
81+
82+
```console
83+
NAME STATUS AGE
84+
aws-for-fluent-bit Active 142m
85+
cert-manager Active 142m
86+
default Active 148m
87+
external-secrets Active 142m
88+
kube-node-lease Active 149m
89+
kube-public Active 149m
90+
kube-system Active 149m
91+
opentelemetry-operator-system Active 142m
92+
prometheus-node-exporter Active 142m
93+
```
94+
95+
## Visualization
96+
97+
Navigate to CloudWatch and go to Metrics -> All Metrics.
98+
99+
Select the metrics in the ContainerInsights/Prometheus Namespace:
100+
101+
![metric selectrion](../images/mixed-metrics.png)
102+
103+
View the graph of the selected metrics:
104+
105+
![metric graph](../images/mixed-graph.png)
106+
107+
## Viewing Logs
108+
109+
By default, we deploy a FluentBit daemon set in the cluster to collect worker logs for all namespaces. Logs are collected and exported to Amazon CloudWatch Logs, which enables you to centralize the logs from all of your systems, applications,
110+
and AWS services that you use, in a single, highly scalable service.
111+
112+
## Using CloudWatch Logs Insights to Query Logs
113+
114+
Navigate to CloudWatch, then go to "Logs Insights"
115+
116+
In the dropdown, select any of the logs that begin with "/aws/eks/single-new-eks-mixed-observability-accelerator" and run a query.
117+
118+
Example with "kubesystem" log group:
119+
120+
![logs-query](../images/mixed-query.png)
121+
122+
Then you can view the results of your query:
123+
124+
![logs-results](../images/mixed-log-results.png)
125+
126+
## Teardown
127+
128+
You can teardown the whole CDK stack with the following command:
129+
130+
```bash
131+
make pattern single-new-eks-mixed-observability destroy
132+
```
133+
134+

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ nav:
2727
- Amazon EKS:
2828
- Single Cluster AWS Native Observability: patterns/single-new-eks-observability-accelerators/single-new-eks-native-observability.md
2929
- Single Cluster Open Source Observability: patterns/single-new-eks-observability-accelerators/single-new-eks-opensource-observability.md
30+
- Single Cluster Mixed Observability: patterns/single-new-eks-observability-accelerators/single-new-eks-mixed-observability.md
3031
- Support & Feedback: support.md
3132
- Contributors: contributors.md
3233

0 commit comments

Comments
 (0)