mirror of
https://github.com/storytold/terraform-aws-observability-accelerator.git
synced 2026-10-09 00:09:43 +00:00
Node exporter dashboards (#43)
* Added dashboards for node exporter * Drop use cluster and node * Add nodename to ne metrics * Add account ID and region Co-authored-by: Venkataraman <vikrvenk@88665a367666.ant.amazon.com> Co-authored-by: Rodrigue Koffi <bonclay7@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2e6ac046d8
commit
a42b1751e9
@@ -8,7 +8,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
|
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -137,4 +137,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
|
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
|
||||||
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
|
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
|
||||||
tflint-version: ${{ env.TFLINT_VERSION }}
|
tflint-version: ${{ env.TFLINT_VERSION }}
|
||||||
|
|||||||
@@ -30,4 +30,4 @@ jobs:
|
|||||||
with no activity. Remove stale label or comment or this issue will be closed in 10 days
|
with no activity. Remove stale label or comment or this issue will be closed in 10 days
|
||||||
stale-pr-message: |
|
stale-pr-message: |
|
||||||
This PR has been automatically marked as stale because it has been open 30 days
|
This PR has been automatically marked as stale because it has been open 30 days
|
||||||
with no activity. Remove stale label or comment or this PR will be closed in 10 days
|
with no activity. Remove stale label or comment or this PR will be closed in 10 days
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ This module is inspired from the open source [kube-prometheus-stack](https://git
|
|||||||
| [aws_prometheus_rule_group_namespace.recording_rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/prometheus_rule_group_namespace) | resource |
|
| [aws_prometheus_rule_group_namespace.recording_rules](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/prometheus_rule_group_namespace) | resource |
|
||||||
| [grafana_dashboard.cluster](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
| [grafana_dashboard.cluster](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
||||||
| [grafana_dashboard.kubelet](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
| [grafana_dashboard.kubelet](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
||||||
|
| [grafana_dashboard.nodeexp_nodes](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
||||||
| [grafana_dashboard.nodes](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
| [grafana_dashboard.nodes](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
||||||
| [grafana_dashboard.nsworkload](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
| [grafana_dashboard.nsworkload](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
||||||
| [grafana_dashboard.workloads](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
| [grafana_dashboard.workloads](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/dashboard) | resource |
|
||||||
|
|||||||
@@ -28,3 +28,9 @@ resource "grafana_dashboard" "cluster" {
|
|||||||
folder = var.dashboards_folder_id
|
folder = var.dashboards_folder_id
|
||||||
config_json = file("${path.module}/dashboards/cluster.json")
|
config_json = file("${path.module}/dashboards/cluster.json")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "grafana_dashboard" "nodeexp_nodes" {
|
||||||
|
count = var.enable_dashboards ? 1 : 0
|
||||||
|
folder = var.dashboards_folder_id
|
||||||
|
config_json = file("${path.module}/dashboards/nodeexporter-nodes.json")
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ module "helm_addon" {
|
|||||||
{
|
{
|
||||||
name = local.name
|
name = local.name
|
||||||
chart = "${path.module}/otel-config"
|
chart = "${path.module}/otel-config"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
namespace = local.namespace
|
namespace = local.namespace
|
||||||
description = "ADOT helm Chart deployment configuration"
|
description = "ADOT helm Chart deployment configuration"
|
||||||
},
|
},
|
||||||
@@ -69,6 +69,10 @@ module "helm_addon" {
|
|||||||
name = "globalScrapeTimeout"
|
name = "globalScrapeTimeout"
|
||||||
value = var.prometheus_config.global_scrape_timeout
|
value = var.prometheus_config.global_scrape_timeout
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name = "accountId"
|
||||||
|
value = local.context.aws_caller_identity_account_id
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
irsa_config = {
|
irsa_config = {
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ spec:
|
|||||||
scrape_timeout: {{ .Values.globalScrapeTimeout }}
|
scrape_timeout: {{ .Values.globalScrapeTimeout }}
|
||||||
external_labels:
|
external_labels:
|
||||||
cluster: {{ .Values.ekscluster }}
|
cluster: {{ .Values.ekscluster }}
|
||||||
|
account_id: {{ .Values.accountId }}
|
||||||
|
region: {{ .Values.region }}
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
- job_name: 'kubernetes-kubelet'
|
- job_name: 'kubernetes-kubelet'
|
||||||
scrape_interval: {{ .Values.globalScrapeInterval }}
|
scrape_interval: {{ .Values.globalScrapeInterval }}
|
||||||
@@ -1552,6 +1554,14 @@ spec:
|
|||||||
- job_name: 'node-exporter'
|
- job_name: 'node-exporter'
|
||||||
kubernetes_sd_configs:
|
kubernetes_sd_configs:
|
||||||
- role: endpoints
|
- role: endpoints
|
||||||
|
ec2_sd_configs:
|
||||||
|
relabel_configs:
|
||||||
|
- source_labels: [ __address__ ]
|
||||||
|
action: keep
|
||||||
|
regex: '.*:9100$'
|
||||||
|
- action: replace
|
||||||
|
source_labels: [__meta_kubernetes_endpoint_node_name]
|
||||||
|
target_label: nodename
|
||||||
exporters:
|
exporters:
|
||||||
prometheusremotewrite:
|
prometheusremotewrite:
|
||||||
endpoint: {{ .Values.ampurl }}
|
endpoint: {{ .Values.ampurl }}
|
||||||
|
|||||||
Reference in New Issue
Block a user