Giter Club home page Giter Club logo

terraform-provider-signalform's Issues

400 "Failed to deserialize payload" when creating a dashboard

We have a (somewhat simple) signalform_dashboard resource being created.

See gist: https://gist.github.com/cb-tjuricek/5d4711493c061f83da0de0e3b93fe380

When attempting to apply, even with the TF_LOG=TRACE variable set, the only information we receive is the following:

2018-10-19T09:01:11.386-0700 [DEBUG] plugin.terraform-provider-signalform: 2018/10/19 09:01:11 [ERR] plugin: stream copy 'stderr' error: stream closed
2018-10-19T09:01:11.386-0700 [DEBUG] plugin.terraform-provider-signalform: 2018/10/19 09:01:11 [ERR] plugin: plugin server: accept unix /Users/tjuricek/Desktop/reno/plugin158257377: use of closed network connection
* signalform_dashboard.cache_layer: For the resource CbDefense Central Cache Layer SignalFx returned status 400: 
{
  "code" : 400,
  "message" : "Failed to deserialize payload"
}

This is a little hard to interpret - is there a way to get more details from the plugin?

I've double checked all chart IDs referenced, and they exist and the charts themselves all appear to be created. It's only this dashboard resource failing.

Visualization options for detector

Hi!

I'm trying to create detector chart and could not find a way to add visualization options (color metrics with different colors, units etc.). I see this options available on the chart.

Maybe there is a way to create a chart and then reference chart in the detector resource. Any suggestions?

Add ability to configure provider using .netrc file

The .netrc file is quite a common way to handle authentication credentials for any host.

We are using this way for handling auth credentials for various machines in our network.

Is it planned to add .netrc support?

Suggestion: Docker build

Before I do the work to implement it I wondered if you would be open to me providing a PR which adds a Dockerfile to this project to allow building in a docker container instead of needing build tools installed locally?

I would also propose to add a make docker target which will run the necessary docker commands to build the provider.

Treat notification as an object instead of a string

Currently, the notifications associated with a detector rule are stored as a list of strings:

rule {
    description = "maximum > 60 for 30m"
    severity = "Critical"
    detect_label = "Processing old messages 30m"
    notifications = ["Email,[email protected]"]
}

I would like to propose storing them as objects instead:

rule {
    description = "maximum > 60 for 30m"
    severity = "Critical"
    detect_label = "Processing old messages 30m"
    notification {
        type = "Email"
        email = "[email protected]"
    }
}

or perhaps even:

rule {
    description = "maximum > 60 for 30m"
    severity = "Critical"
    detect_label = "Processing old messages 30m"
    email {
        email = "[email protected]"
    }
}

Motivation for this change: I am planning to add support for the signalfx teams api to signalform, and teams support a notificationlist which (to my understanding) uses the same object as detector rules. It would be useful to have the same structure in both places. In addition, this approach would more closely reflect the underlying API's data model, and would allow for more types of notifications to be supported. (For example, signalform does not currently support sending notifications to a team, which could have its own notification configuration.)

What are your thoughts on this change? I am happy to implement it myself if this is something you'd be willing to accept.

Clarify terraform version requirement

The readme states "Please note that this provider only works with terraform 0.9." but in testing it appears to be working on Terraform v0.11.2. Is 0.9 a minimum requirement, the only version being tested or are their known issues on the new versions?

Detector fails to link Slack notification silently

The Slack notification is silently failing. The Pagerduty one is linked but the Slack one is not linked when I look at them in the SignalFX UI.

This is the code that I have that creates the detectors.

resource "signalform_detector" "site_capacity" {
    provider = "signalform"
    count = "${length(var.regions)}"
    name = "${var.regions[count.index]} stack capacity"
    max_delay = 30
    description = "Alerts when stack capacity in a region is full"
    program_text = <<-EOF
        [.....]
        detect("Site Capacity @ 95%", when(site_count > site_capacity * 0.95, lasting='5s'))
        detect("Site Capacity @ 90%", when(site_count > site_capacity * 0.90, lasting='5s'))
    EOF
    rule {
        description = "active when site count exceeds 95% site capacity"
        severity = "Critical"
        detect_label = "Site Capacity @ 95%"
        notifications = ["PagerDuty,RedactedId"]
    }
    rule {
        description = "active when site count exceeds 90% site capacity"
        severity = "Major"
        detect_label = "CDE Site Capacity @ 90%"
        notifications = ["Slack,RedactedId,#channelname"]
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.