Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ADOT collector for metrics and potentially logging #256

Open
steveellis opened this issue Apr 6, 2022 · 9 comments
Open

Use ADOT collector for metrics and potentially logging #256

steveellis opened this issue Apr 6, 2022 · 9 comments
Assignees
Labels
Infrastructure Anything having to do with our FOLIO deployments. AWS, pulumi, k8s, etc.

Comments

@steveellis
Copy link
Contributor

steveellis commented Apr 6, 2022

@jwfuller I think your first instinct was right about this. The cloudwatch agent container image referred to in the daemonset file is more than 2 years old. This agent code has been under active development.

https://github.com/aws-samples/amazon-cloudwatch-container-insights/blob/d60789889e0b679947e73d393618f6385a2a64ec/k8s-yaml-templates/cwagent-kubernetes-monitoring/cwagent-daemonset.yaml#L18

Think this should be latest.

I think we should indeed bring these yamls into our repo.

@steveellis steveellis self-assigned this Apr 6, 2022
@steveellis steveellis added the Infrastructure Anything having to do with our FOLIO deployments. AWS, pulumi, k8s, etc. label Apr 6, 2022
@steveellis
Copy link
Contributor Author

@steveellis steveellis changed the title Use latest cloudwatch agent container image Use ADOT collector helm chart for metrics Apr 6, 2022
@steveellis
Copy link
Contributor Author

steveellis commented Apr 6, 2022

Ok actually this is what we should be doing to solve this: https://github.com/aws-observability/aws-otel-helm-charts/tree/master/charts/adot-exporter-for-eks-on-ec2. This way we can deploy the agent with helm (and pulumi) and not have to use the shell script or the yamls at all.

This can also be used to deploy fluent bit.

What ADOT is and how it fits into the CloudWatch agent: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Container-Insights-EKS-otel.html.

@steveellis
Copy link
Contributor Author

Ref #252 and #206.

@steveellis
Copy link
Contributor Author

steveellis commented Apr 6, 2022

Ok configuring the chart it is possible to send data only to CW but it seems like AMP/Graphana might be easy to set up as well: https://github.com/aws-observability/aws-otel-helm-charts/blob/master/charts/adot-exporter-for-eks-on-ec2/documentation/metrics_to_cloudwatch_amp.md#sending-metrics-and-logs-to-cloudwatch-container-insights-only.

I think I'm going to try to get all of this going at once, metrics and logging using this helm chart, under this ticket.

@steveellis steveellis changed the title Use ADOT collector helm chart for metrics Use ADOT collector helm chart for metrics and potentially logging Apr 6, 2022
@steveellis steveellis added this to the Infrastructure - Kiwi milestone Apr 6, 2022
@steveellis
Copy link
Contributor Author

There's an issue with the aws helm chart. They've added some images to the chart docs and need to add a .helmignore file to ignore them. Since the chart is unusable and they say they are supporting it, I'd expect it to be fixed quickly: aws-observability/aws-otel-helm-charts#30.

@steveellis
Copy link
Contributor Author

Metrics and logging are working on the scratch instance when deployed via script. The helm chart isn't working yet, the ADOT collector is however for both logging and metrics. Closes #174.

@steveellis
Copy link
Contributor Author

steveellis commented Apr 20, 2022

Log retention should be part of this PR

cc @jwfuller

Log retention appears to be handled by this variable in the ConfigMap for FluentBit. If we deploy via kubectl apply (not the helm chart) this variable will need to be added since it isn't present by default.

That's all for retention of logs. Retention of metrics is another matter and it's not immediately clear where that would get controlled. It does seem like it should be a variable somewhere in the cwagentconfig.json here.

@steveellis
Copy link
Contributor Author

steveellis commented Apr 20, 2022

What options are there for working with these aws yaml files in pulumi if we can't get the helm chart to work? Getting the helm chart working is being tracked here.

  1. You can apply the yaml using a ConfigGroup like this: https://www.pulumi.com/docs/guides/adopting/from_kubernetes/
  2. You could convert the yaml to pulumi like this: https://www.pulumi.com/blog/introducing-kube2pulumi/
  3. There is the command package which lets you run a local command but I don't think it would reverse that operation on deletion: https://www.pulumi.com/registry/packages/command/

Only 2 would let you neatly handle passing parameters to the yaml (the cluster name for example is a runtime value).

If we apply the yaml in 1 it seems like we can change values inside that yaml using transformations.

@jwfuller
Copy link
Contributor

It does seem like it should be a variable somewhere in the cwagentconfig.json

Maybe in these lines? The output conf section looks similar to in the ConfigMap for FluentBit

@steveellis steveellis changed the title Use ADOT collector helm chart for metrics and potentially logging Use ADOT collector for metrics and potentially logging Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Anything having to do with our FOLIO deployments. AWS, pulumi, k8s, etc.
Projects
None yet
Development

No branches or pull requests

2 participants