splunk-terraform / terraform-provider-signalfx

Terraform SignalFx provider
https://www.terraform.io/docs/providers/signalfx/
Mozilla Public License 2.0
31 stars 71 forks source link

signalfx_table_chart not showing column names correctly in dashboard view #395

Open maulikp-splunk opened 2 years ago

maulikp-splunk commented 2 years ago

Hi team,

I am using following code to generate Table chart in Splunk O11y:

terraform {
  required_providers {
    signalfx = {
      source  = "splunk-terraform/signalfx"
      version = "6.17.0"
    }
  }
  required_version = ">= 0.13"
}

provider "signalfx" {
  auth_token = "****************"
  api_url    = "https://api.us1.signalfx.com"
}

resource "signalfx_dashboard_group" "service_version" {
  name        = "Service Version"
  description = "Service Version details"
}

resource "signalfx_dashboard" "service_version_stage" {
  name            = "Service Version By Stage"
  dashboard_group = signalfx_dashboard_group.service_version.id

  chart {
    chart_id = signalfx_table_chart.service_version_stage.id
    column   = 0
    height   = 3
    row      = 0
    width    = 12
  }

}

resource "signalfx_table_chart" "service_version_stage" {
  name             = "Service Version by Stage"
  description      = "Replicate the Versions on all Services by Stage"
  disable_sampling = true
  program_text     = <<-EOF
    A = data('k8s.container.cpu_limit').sum(by=['container.image.tag', 'k8s.container.name']).publish(label='CPU Limit')
    B = data('k8s.container.memory_limit').sum(by=['container.image.tag', 'k8s.container.name']).publish(label='Memory Limit')
    C = data('k8s.container.ready').count(by=['container.image.tag', 'k8s.container.name']).publish(label='Count')
    EOF
  group_by         = ["k8s.container.name"]

}

When I view chart from dashboard, column names are showing incorrectly, although when I open a chart, column name shows up correctly. Attaching two screen shots here. image image

Can you please look into this?

MovieStoreGuy commented 4 hours ago

Hey @maulikp-splunk,

I just wanted to follow up on this and see if this is still an issue you're experiencing?

Looking at the version you've provided, it appears there is now 3 major version that might have addressed this.