Skip to content

feat: enable polyglot otel config #287

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

Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/eks-monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ See examples using this Terraform modules in the **Amazon EKS** section of [this
| <a name="input_enable_grafana_operator"></a> [enable\_grafana\_operator](#input\_enable\_grafana\_operator) | Deploys Grafana Operator to EKS Cluster | `bool` | `true` | no |
| <a name="input_enable_istio"></a> [enable\_istio](#input\_enable\_istio) | Enable ISTIO workloads monitoring, alerting and default dashboards | `bool` | `false` | no |
| <a name="input_enable_java"></a> [enable\_java](#input\_enable\_java) | Enable Java workloads monitoring, alerting and default dashboards | `bool` | `false` | no |
| <a name="input_enable_polyglot"></a> [enable\_polyglot](#input\_enable\_polyglot) | Enable monitoring for .Net,Rust and other languages | `bool` | `false` | no |
| <a name="input_enable_kube_state_metrics"></a> [enable\_kube\_state\_metrics](#input\_enable\_kube\_state\_metrics) | Enables or disables Kube State metrics exporter. Disabling this might affect some data in the dashboards | `bool` | `true` | no |
| <a name="input_enable_logs"></a> [enable\_logs](#input\_enable\_logs) | Using AWS For FluentBit to collect cluster and application logs to Amazon CloudWatch | `bool` | `true` | no |
| <a name="input_enable_managed_prometheus"></a> [enable\_managed\_prometheus](#input\_enable\_managed\_prometheus) | Creates a new Amazon Managed Service for Prometheus Workspace | `bool` | `true` | no |
Expand Down
10 changes: 10 additions & 0 deletions modules/eks-monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ module "helm_addon" {
name = "enableIstio"
value = var.enable_istio
},
{
name = "enablePolyglot"
value = var.enable_polyglot
},
{
name = "istioScrapeSampleLimit"
value = try(var.istio_config.scrape_sample_limit, local.istio_pattern_config.scrape_sample_limit)
Expand Down Expand Up @@ -237,20 +241,26 @@ module "java_monitoring" {
count = var.enable_java ? 1 : 0

pattern_config = coalesce(var.java_config, local.java_pattern_config)

depends_on = [resource.helm_release.fluxcd]
}

module "nginx_monitoring" {
source = "./patterns/nginx"
count = var.enable_nginx ? 1 : 0

pattern_config = local.nginx_pattern_config

depends_on = [resource.helm_release.fluxcd]
}

module "istio_monitoring" {
source = "./patterns/istio"
count = var.enable_istio ? 1 : 0

pattern_config = coalesce(var.istio_config, local.istio_pattern_config)

depends_on = [resource.helm_release.fluxcd]
}

module "fluentbit_logs" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1386,6 +1386,12 @@ spec:
action: drop
{{ end }}

{{ if .Values.enablePolyglot }}
- job_name: 'kubernetes-polyglot'
kubernetes_sd_configs:
- role: pod
Comment on lines +1391 to +1392
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a bit wide, as without any relabel config or port capture, it would capture any exposed metrics at the pod level unless i'm missing something. Can you make it more specific to what you are collecting?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bonclay7 Happy to discuss this on a call. We are going to setup .net, Rust,Go and other dashboards as part of the RI workshop. We opened up all the pods (defaulted to false and only explicitly set to true) for the usecase. Once we finalize all the metrics for all these languages/apps and understand what filters we need to apply we will apply them along with corresponding dashboards similar to how its implemented for Java.

{{ end }}

{{ if .Values.enableNginx }}
- job_name: 'kubernetes-nginx'
sample_limit: {{ .Values.nginxScrapeSampleLimit }}
Expand Down
2 changes: 2 additions & 0 deletions modules/eks-monitoring/otel-config/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ adotServiceTelemetryLoglevel: ${adot_service_telemetry_loglevel}

enableAdotcollectorMetrics: ${enable_adotcollector_metrics}

enablePolyglot: ${enable_polyglot}

serviceAccount: ${service_account}
namespace: ${namespace}
6 changes: 6 additions & 0 deletions modules/eks-monitoring/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -565,3 +565,9 @@ variable "kubeproxy_monitoring_config" {
# defaults are pre-computed in locals.tf, provide a full definition to override
default = null
}

variable "enable_polyglot" {
description = "Enable monitoring for .Net,Rust and other languages"
type = bool
default = false
}
Loading