Skip to content

Commit

Permalink
fargate holly monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Howlla committed Oct 16, 2023
1 parent cad2ca6 commit 460b6f7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
5 changes: 1 addition & 4 deletions cdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
"kustomizations": [
{
"kustomizationPath": "./artifacts/grafana-operator-manifests/eks/infrastructure"
},
{
"kustomizationPath": "./artifacts/grafana-operator-manifests/eks/gpu"
}
]
},
Expand All @@ -53,4 +50,4 @@
"existing.cluster.name": "single-new-eks-observability-accelerator",
"existing.kubectl.rolename": "YOUR_KUBECTL_ROLE"
}
}
}
Binary file added docs/patterns/images/holly-fargate-metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ fargate-ip-10-0-187-27.ec2.internal Ready <none> 15m v1.27.1-eks-2f008
fargate-ip-10-0-188-225.ec2.internal Ready <none> 15m v1.27.1-eks-2f008fe 10.0.188.225 <none> Amazon Linux 2 5.10.186-179.751.amzn2.x86_64 containerd://1.6.6
fargate-ip-10-0-189-234.ec2.internal Ready <none> 15m v1.27.1-eks-2f008fe 10.0.189.234 <none> Amazon Linux 2 5.10.186-179.751.amzn2.x86_64 containerd://1.6.6
fargate-ip-10-0-96-29.ec2.internal Ready <none> 15m v1.27.1-eks-2f008fe 10.0.96.29 <none> Amazon Linux 2 5.10.184-175.749.amzn2.x86_64 containerd://1.6.6
Next, lets verify the namespaces in the cluster:
```

```bash
Expand Down Expand Up @@ -155,6 +154,18 @@ Example with "EKS_Cluster" metrics

![metrics](../images/metrics-fargate-1.png)

## Monitoring workloads

Although the default metrics exposed by cloudWatchAdotAddon are useful for getting some standardized metrics from our application we often instrument our own application with OLTP to expose metrics. Fortunately, the otel-collector-cloudwatch-collector can be specified as the endpoint for collecting these metrics and getting metrics and logs to cloudwatch.

We will be fetching metrics from `ho11y` a synthetic signal generator allowing you to test observability solutions for microservices. It emits logs, metrics, and traces in a configurable manner. The application can be deployed using `team-geordie` ArgoCD configuration found [here](https://github.com/aws-observability/aws-observability-accelerator/tree/main/artifacts/argocd-apps/teams/team-geordie).

We will have to edit the `OTEL_EXPORTER_OTLP_ENDPOINT` value in `ho11y.yaml` and set the value as 'otel-collector-cloudwatch-collector.default.svc.cluster.local:4317'

Once deployed you will be able to monitor the Ho11y metrics in cloudwatch as shown:

![metrics](../images/holly-fargate-metrics.png)

## Teardown

You can teardown the whole CDK stack with the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct {
deploymentMode: blueprints.cloudWatchDeploymentMode.DEPLOYMENT,
namespace: 'default',
name: 'adot-collector-cloudwatch',
metricsNameSelectors: ['apiserver_request_.*', 'container_memory_.*', 'container_threads', 'otelcol_process_.*'],
metricsNameSelectors: ['apiserver_request_.*', 'container_memory_.*', 'container_threads', 'otelcol_process_.*', "ho11y*"],
podLabelRegex: 'frontend|downstream(.*)',
});

Reflect.defineMetadata("ordered", true, blueprints.addons.CloudWatchLogsAddon);

const addOns: Array<blueprints.ClusterAddOn> = [
new blueprints.addons.CloudWatchLogsAddon({
Expand All @@ -29,9 +30,8 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct {
new blueprints.addons.XrayAdotAddOn(),
];

// Create Fargate profile, you can add selectors to match which pods to schedule on fargate, we will use 'default' i.e., all pods
const fargateProfiles: Map<string, eks.FargateProfileOptions> = new Map([
["MyProfile", { selectors: [{ namespace: "mynamespace" },
["MyProfile", { selectors: [
{ namespace: "cert-manager" },
{ namespace: "opentelemetry-operator-system" }
]}]
Expand All @@ -51,8 +51,10 @@ export default class SingleNewEksAWSNativeFargateobservabilityConstruct {
};

const coreDnsAddOnProps : blueprints.CoreDnsAddOnProps = {
version:"auto",
configurationValues:{ computeType: "Fargate" }
version:"v1.10.1-eksbuild.1",
configurationValues:{
computeType: "Fargate"
}
};

/* Use observability builder mixed pattern addons, aws native containerInsightsAddon
Expand Down

0 comments on commit 460b6f7

Please sign in to comment.