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

feat: create dashboard without format block #48

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

thegentlemanphysicist
Copy link
Contributor

No description provided.

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
module.eb75ad-team.sysdig_monitor_alert_metric.test_dr_pod: Refreshing state... [id=15328794]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_db_pods_low: Refreshing state... [id=9921900]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_db_pv_usage_med: Refreshing state... [id=9921934]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_sustained: Refreshing state... [id=15961444]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_pods_low: Refreshing state... [id=9921901]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_pods_high: Refreshing state... [id=9921902]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_db_pv_usage_low: Refreshing state... [id=9921935]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_pods_med: Refreshing state... [id=9921897]
module.eb75ad-team.sysdig_monitor_alert_downtime.prod_dr_pod_downtime: Refreshing state... [id=15346483]
module.eb75ad-team.sysdig_monitor_alert_promql.test_db_pv_usage_seventyfive: Refreshing state... [id=14625869]
module.eb75ad-team.sysdig_monitor_alert_metric.dev_dr_pod: Refreshing state... [id=15328793]
module.eb75ad-team.sysdig_monitor_dashboard.pv_overall: Refreshing state... [id=363087]
module.eb75ad-team.sysdig_monitor_alert_promql.dev_db_pv_usage_seventyfive: Refreshing state... [id=14625866]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_db_pod_restarts_gte_1: Refreshing state... [id=9921905]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_db_pods_high: Refreshing state... [id=9921906]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_med: Refreshing state... [id=9921903]
module.eb75ad-team.sysdig_monitor_dashboard.general_pod_performance: Refreshing state... [id=404905]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_high: Refreshing state... [id=9921898]
module.eb75ad-team.sysdig_monitor_alert_downtime.dev_dr_pod_downtime: Refreshing state... [id=15338912]
module.eb75ad-team.sysdig_monitor_alert_promql.dev_kc_disk_log_pv_usage_sixty: Refreshing state... [id=15959117]
module.eb75ad-team.sysdig_monitor_dashboard.pv_usage: Refreshing state... [id=363085]
module.eb75ad-team.sysdig_monitor_alert_downtime.test_dr_pod_downtime: Refreshing state... [id=15346484]
module.eb75ad-team.sysdig_monitor_alert_promql.dev_db_pv_usage_ninety: Refreshing state... [id=14625871]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_backup_storage_pv_usage_gt_med: Refreshing state... [id=9921933]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_kc_disk_log_pv_usage_sixty: Refreshing state... [id=15959118]
module.eb75ad-team.sysdig_monitor_alert_promql.test_kc_disk_log_pv_usage_sixty: Refreshing state... [id=15959116]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_dr_pod: Refreshing state... [id=15328795]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_log_pv_med: Refreshing state... [id=9921922]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_minio_pvc_storage_low: Refreshing state... [id=14080753]
module.eb75ad-team.sysdig_monitor_alert_promql.test_db_pv_usage_ninety: Refreshing state... [id=14625872]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_spike_high: Refreshing state... [id=9921904]
module.eb75ad-team.sysdig_monitor_dashboard.pods_cpu: Refreshing state... [id=363086]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_backup_storage_pv_usage_gt_low: Refreshing state... [id=9921936]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_high: Refreshing state... [id=10777725]
module.c6af30-team.sysdig_monitor_alert_promql.prod_sso_db_pv_gt_60: Refreshing state... [id=10777731]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_spike_high: Refreshing state... [id=10777728]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_pods_high: Refreshing state... [id=10777724]
module.c6af30-team.sysdig_monitor_alert_metric.prod_db_pods_low: Refreshing state... [id=10777732]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_pods_med: Refreshing state... [id=10777734]
module.c6af30-team.sysdig_monitor_alert_metric.prod_db_pods_high: Refreshing state... [id=10777727]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_pods_low: Refreshing state... [id=10777730]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_med: Refreshing state... [id=10777726]
module.c6af30-team.sysdig_monitor_dashboard.pods_cpu: Refreshing state... [id=296848]
module.c6af30-team.sysdig_monitor_dashboard.pv_overall: Refreshing state... [id=296847]
module.c6af30-team.sysdig_monitor_alert_promql.prod_sso_db_pv_gt_80: Refreshing state... [id=10777733]
module.c6af30-team.sysdig_monitor_alert_metric.prod_db_pod_restarts_gte_1: Refreshing state... [id=10777729]
module.c6af30-team.sysdig_monitor_dashboard.pv_usage: Refreshing state... [id=296849]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply":

  # module.eb75ad-team.sysdig_monitor_dashboard.general_pod_performance has changed
  ~ resource "sysdig_monitor_dashboard" "general_pod_performance" {
        id           = "404905"
        name         = "Memory Network and CPU for pods"
      + public_token = "88468825f09a46e1b27f6ed85297b80d"
        # (3 unchanged attributes hidden)



        # (4 unchanged blocks hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.eb75ad-team.sysdig_monitor_dashboard.general_pod_performance will be updated in-place
  ~ resource "sysdig_monitor_dashboard" "general_pod_performance" {
        id           = "404905"
        name         = "Memory Network and CPU for pods"
        # (4 unchanged attributes hidden)

      + panel {
          + autosize_text          = false
          + height                 = 4
          + name                   = "HTTP Errors (4xx/5xx) per Pod Keycloak"
          + pos_x                  = 0
          + pos_y                  = 0
          + transparent_background = false
          + type                   = "timechart"
          + visible_title          = false
          + width                  = 8

          + query {
              + promql = "topk(20,sum(sum_over_time(sysdig_container_net_http_error_count{kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}[$__interval])) by (kube_cluster_name, kube_namespace_name, kube_workload_type, kube_workload_name, kube_pod_name)) / $__interval_sec"
              + unit   = "number rate"
            }
        }
      + panel {
          + autosize_text          = false
          + description            = "Keycloak memory used by pods compared to the requested memory factor of 100 added to fix dispaly"
          + height                 = 4
          + name                   = "Memory used by pod vs memory request keycloak"
          + pos_x                  = 0
          + pos_y                  = 0
          + transparent_background = false
          + type                   = "timechart"
          + visible_title          = false
          + width                  = 8

          + query {
              + promql = "(sum by (kube_workload_name,kube_pod_name,kube_cluster_name,kube_namespace_name)(rate(sysdig_container_memory_used_bytes{kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}[$__interval])))*100/ (sum by (kube_workload_name, kube_pod_name,kube_cluster_name,kube_namespace_name)(kube_pod_container_resource_requests{resource='memory',kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}))"
              + unit   = "percent"
            }
        }
      - panel {
          - autosize_text          = false -> null
          - description            = "Keycloak memory used by pods compared to the requested memory" -> null
          - height                 = 4 -> null
          - name                   = "Memory used by pod vs memory request keycloak" -> null
          - pos_x                  = 0 -> null
          - pos_y                  = 0 -> null
          - transparent_background = false -> null
          - type                   = "timechart" -> null
          - visible_title          = false -> null
          - width                  = 8 -> null

          - query {
              - promql = "(sum by (kube_workload_name,kube_pod_name,kube_cluster_name,kube_namespace_name)(rate(sysdig_container_memory_used_bytes{kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}[$__interval])))/ (sum by (kube_workload_name, kube_pod_name,kube_cluster_name,kube_namespace_name)(kube_pod_container_resource_requests{resource='memory',kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}))" -> null
              - unit   = "percent" -> null
            }
        }
      + panel {
          + autosize_text          = false
          + description            = "Patroni memory used by pods compared to the requested memory. Factor of 100 added to fix dispaly"
          + height                 = 4
          + name                   = "Memory used by pod vs memory request patroni"
          + pos_x                  = 0
          + pos_y                  = 0
          + transparent_background = false
          + type                   = "timechart"
          + visible_title          = false
          + width                  = 8

          + query {
              + promql = "(sum by (kube_workload_name,kube_pod_name,kube_cluster_name,kube_namespace_name)(rate(sysdig_container_memory_used_bytes{kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-patroni'}[$__interval])))*100/ (sum by (kube_workload_name, kube_pod_name,kube_cluster_name,kube_namespace_name)(kube_pod_container_resource_requests{resource='memory',kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-patroni'}))"
              + unit   = "percent"
            }
        }


        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @thegentlemanphysicist, Action: pull_request

@@ -297,14 +297,47 @@ resource "sysdig_monitor_dashboard" "general_pod_performance" {
height = 4
type = "timechart"
name = "Memory used by pod vs memory request keycloak"
description = "Keycloak memory used by pods compared to the requested memory"
description = "Keycloak memory used by pods compared to the requested memory factor of 100 added to fix dispaly"
Copy link

Choose a reason for hiding this comment

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

Looks great to me, just a typo on "display" here and the description below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Show Plan
module.eb75ad-team.sysdig_monitor_dashboard.general_pod_performance: Refreshing state... [id=404905]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_backup_storage_pv_usage_gt_low: Refreshing state... [id=9921936]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_log_pv_med: Refreshing state... [id=9921922]
module.eb75ad-team.sysdig_monitor_alert_promql.dev_kc_disk_log_pv_usage_sixty: Refreshing state... [id=15959117]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_db_pv_usage_low: Refreshing state... [id=9921935]
module.eb75ad-team.sysdig_monitor_dashboard.pv_usage: Refreshing state... [id=363085]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_db_pods_high: Refreshing state... [id=9921906]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_pods_low: Refreshing state... [id=9921901]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_pods_high: Refreshing state... [id=9921902]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_sustained: Refreshing state... [id=15961444]
module.eb75ad-team.sysdig_monitor_alert_metric.test_dr_pod: Refreshing state... [id=15328794]
module.eb75ad-team.sysdig_monitor_alert_promql.test_db_pv_usage_ninety: Refreshing state... [id=14625872]
module.eb75ad-team.sysdig_monitor_alert_promql.test_kc_disk_log_pv_usage_sixty: Refreshing state... [id=15959116]
module.eb75ad-team.sysdig_monitor_alert_promql.dev_db_pv_usage_seventyfive: Refreshing state... [id=14625866]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_minio_pvc_storage_low: Refreshing state... [id=14080753]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_dr_pod: Refreshing state... [id=15328795]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_db_pv_usage_med: Refreshing state... [id=9921934]
module.eb75ad-team.sysdig_monitor_alert_promql.prod_kc_disk_log_pv_usage_sixty: Refreshing state... [id=15959118]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_db_pod_restarts_gte_1: Refreshing state... [id=9921905]
module.eb75ad-team.sysdig_monitor_alert_downtime.test_dr_pod_downtime: Refreshing state... [id=15346484]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_med: Refreshing state... [id=9921903]
module.eb75ad-team.sysdig_monitor_dashboard.pv_overall: Refreshing state... [id=363087]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_spike_high: Refreshing state... [id=9921904]
module.eb75ad-team.sysdig_monitor_alert_promql.test_db_pv_usage_seventyfive: Refreshing state... [id=14625869]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_backup_storage_pv_usage_gt_med: Refreshing state... [id=9921933]
module.eb75ad-team.sysdig_monitor_alert_promql.dev_db_pv_usage_ninety: Refreshing state... [id=14625871]
module.eb75ad-team.sysdig_monitor_alert_downtime.dev_dr_pod_downtime: Refreshing state... [id=15338912]
module.eb75ad-team.sysdig_monitor_dashboard.pods_cpu: Refreshing state... [id=363086]
module.eb75ad-team.sysdig_monitor_alert_downtime.prod_dr_pod_downtime: Refreshing state... [id=15346483]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_high: Refreshing state... [id=9921898]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_keycloak_pods_med: Refreshing state... [id=9921897]
module.eb75ad-team.sysdig_monitor_alert_metric.prod_db_pods_low: Refreshing state... [id=9921900]
module.eb75ad-team.sysdig_monitor_alert_metric.dev_dr_pod: Refreshing state... [id=15328793]
module.c6af30-team.sysdig_monitor_alert_promql.prod_sso_db_pv_gt_80: Refreshing state... [id=10777733]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_med: Refreshing state... [id=10777726]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_pods_low: Refreshing state... [id=10777730]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_pods_med: Refreshing state... [id=10777734]
module.c6af30-team.sysdig_monitor_dashboard.pods_cpu: Refreshing state... [id=296848]
module.c6af30-team.sysdig_monitor_alert_metric.prod_db_pods_high: Refreshing state... [id=10777727]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_usage_high: Refreshing state... [id=10777725]
module.c6af30-team.sysdig_monitor_alert_metric.prod_db_pods_low: Refreshing state... [id=10777732]
module.c6af30-team.sysdig_monitor_dashboard.pv_usage: Refreshing state... [id=296849]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_cpu_spike_high: Refreshing state... [id=10777728]
module.c6af30-team.sysdig_monitor_alert_metric.prod_db_pod_restarts_gte_1: Refreshing state... [id=10777729]
module.c6af30-team.sysdig_monitor_alert_metric.prod_keycloak_pods_high: Refreshing state... [id=10777724]
module.c6af30-team.sysdig_monitor_alert_promql.prod_sso_db_pv_gt_60: Refreshing state... [id=10777731]
module.c6af30-team.sysdig_monitor_dashboard.pv_overall: Refreshing state... [id=296847]

Note: Objects have changed outside of Terraform

Terraform detected the following changes made outside of Terraform since the
last "terraform apply":

  # module.eb75ad-team.sysdig_monitor_dashboard.general_pod_performance has changed
  ~ resource "sysdig_monitor_dashboard" "general_pod_performance" {
        id           = "404905"
        name         = "Memory Network and CPU for pods"
      + public_token = "88468825f09a46e1b27f6ed85297b80d"
        # (3 unchanged attributes hidden)



        # (4 unchanged blocks hidden)
    }


Unless you have made equivalent changes to your configuration, or ignored the
relevant attributes using ignore_changes, the following plan may include
actions to undo or respond to these changes.

─────────────────────────────────────────────────────────────────────────────

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.eb75ad-team.sysdig_monitor_dashboard.general_pod_performance will be updated in-place
  ~ resource "sysdig_monitor_dashboard" "general_pod_performance" {
        id           = "404905"
        name         = "Memory Network and CPU for pods"
        # (4 unchanged attributes hidden)

      + panel {
          + autosize_text          = false
          + height                 = 4
          + name                   = "HTTP Errors (4xx/5xx) per Pod Keycloak"
          + pos_x                  = 0
          + pos_y                  = 0
          + transparent_background = false
          + type                   = "timechart"
          + visible_title          = false
          + width                  = 8

          + query {
              + promql = "topk(20,sum(sum_over_time(sysdig_container_net_http_error_count{kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}[$__interval])) by (kube_cluster_name, kube_namespace_name, kube_workload_type, kube_workload_name, kube_pod_name)) / $__interval_sec"
              + unit   = "number rate"
            }
        }
      + panel {
          + autosize_text          = false
          + description            = "Keycloak memory used by pods compared to the requested memory factor of 100 added to fix display"
          + height                 = 4
          + name                   = "Memory used by pod vs memory request keycloak"
          + pos_x                  = 0
          + pos_y                  = 0
          + transparent_background = false
          + type                   = "timechart"
          + visible_title          = false
          + width                  = 8

          + query {
              + promql = "(sum by (kube_workload_name,kube_pod_name,kube_cluster_name,kube_namespace_name)(rate(sysdig_container_memory_used_bytes{kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}[$__interval])))*100/ (sum by (kube_workload_name, kube_pod_name,kube_cluster_name,kube_namespace_name)(kube_pod_container_resource_requests{resource='memory',kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}))"
              + unit   = "percent"
            }
        }
      - panel {
          - autosize_text          = false -> null
          - description            = "Keycloak memory used by pods compared to the requested memory" -> null
          - height                 = 4 -> null
          - name                   = "Memory used by pod vs memory request keycloak" -> null
          - pos_x                  = 0 -> null
          - pos_y                  = 0 -> null
          - transparent_background = false -> null
          - type                   = "timechart" -> null
          - visible_title          = false -> null
          - width                  = 8 -> null

          - query {
              - promql = "(sum by (kube_workload_name,kube_pod_name,kube_cluster_name,kube_namespace_name)(rate(sysdig_container_memory_used_bytes{kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}[$__interval])))/ (sum by (kube_workload_name, kube_pod_name,kube_cluster_name,kube_namespace_name)(kube_pod_container_resource_requests{resource='memory',kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-keycloak'}))" -> null
              - unit   = "percent" -> null
            }
        }
      + panel {
          + autosize_text          = false
          + description            = "Patroni memory used by pods compared to the requested memory. Factor of 100 added to fix display"
          + height                 = 4
          + name                   = "Memory used by pod vs memory request patroni"
          + pos_x                  = 0
          + pos_y                  = 0
          + transparent_background = false
          + type                   = "timechart"
          + visible_title          = false
          + width                  = 8

          + query {
              + promql = "(sum by (kube_workload_name,kube_pod_name,kube_cluster_name,kube_namespace_name)(rate(sysdig_container_memory_used_bytes{kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-patroni'}[$__interval])))*100/ (sum by (kube_workload_name, kube_pod_name,kube_cluster_name,kube_namespace_name)(kube_pod_container_resource_requests{resource='memory',kube_namespace_name=~'eb75ad-prod',kube_cluster_name=~'gold', kube_workload_name=~'sso-patroni'}))"
              + unit   = "percent"
            }
        }


        # (3 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @thegentlemanphysicist, Action: pull_request

@thegentlemanphysicist thegentlemanphysicist merged commit fb5d270 into main Oct 6, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants