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

Add last aggregator to datadog_timeboard resource #14391

Merged
merged 2 commits into from
May 11, 2017

Conversation

jesusvazquez
Copy link
Contributor

This solves #14390

Given this configuration:

  graph = {
    title = "Consul Current Latency"
    viz = "query_value"

    request = {
        q = "avg:consul.net.node.latency.p95{$env,$consul_datacenter}"
        aggregator = "last"
        type = "line"
      }
      autoscale = true
      custom_unit = "ms"
  }

Terraform will fail planning/applying with the following error:

1 error(s) occurred:

* datadog_timeboard.consul: "graph.3.request.0.aggregator" contains an invalid method "last". Valid methods are either "average", "max", "min", or "sum"

Important Factoids

Datadog does have the last aggregator available:
image

The datadog api returns this value:

      {
        "definition": {
          "viz": "query_value",
          "requests": [
            {
              "q": "avg:consul.net.node.latency.p95{$env,$consul_datacenter}",
              "aggregator": "last",
              "conditional_formats": [],
              "type": "line"
            }
          ],
          "autoscale": true,
          "custom_unit": "ms"
        },
        "title": "Consul Current Latency"
      },

@stack72
Copy link
Contributor

stack72 commented May 11, 2017

Thanks for this @jesusvazquez :) LGTM!

@stack72 stack72 merged commit 3319b27 into hashicorp:master May 11, 2017
@ghost
Copy link

ghost commented Apr 12, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants