Categorygithub.com/datadog/go-datadog-api
modulepackage
0.0.0-20180412144801-1a106981ce7e
Repository: https://github.com/datadog/go-datadog-api.git
Documentation: pkg.go.dev

# README

GoDoc Build
status

Datadog API in Go

Hi!

This is a Go wrapper for the Datadog API. You should use this library if you need to interact with the Datadog system. You can post metrics with it if you want, but this library is probably mostly used for automating dashboards/alerting and retrieving data (events, etc).

The source API documentation is here: http://docs.datadoghq.com/api/

USAGE

To use this project, include it in your code like:

    import "github.com/zorkian/go-datadog-api"

Then, you can work with it:

    client := datadog.NewClient("api key", "application key")
    
    dash, err := client.GetDashboard(10880)
    if err != nil {
        log.Fatalf("fatal: %s\n", err)
    }
    log.Printf("dashboard %d: %s\n", dash.Id, dash.Title)

That's all; it's pretty easy to use. Check out the Godoc link for the available API methods and, if you can't find the one you need, let us know (or patches welcome)!

DOCUMENTATION

Please see: http://godoc.org/github.com/zorkian/go-datadog-api

BUGS/PROBLEMS/CONTRIBUTING

There are certainly some, but presently no known major bugs. If you do find something that doesn't work as expected, please file an issue on Github:

https://github.com/zorkian/go-datadog-api/issues

Thanks in advance! And, as always, patches welcome!

DEVELOPMENT

  • Get dependencies with make updatedeps.
  • Run tests tests with make test.
  • Integration tests can be run with make testacc.

The acceptance tests require DATADOG_API_KEY and DATADOG_APP_KEY to be available in your environment variables.

Warning: the integrations tests will create and remove real resources in your Datadog account

COPYRIGHT AND LICENSE

Please see the LICENSE file for the included license information.

Copyright 2013 by authors and contributors.

# Packages

No description provided by the author

# Functions

NewClient returns a new datadog.Client which can be used to access the API methods.

# Structs

Alert represents the data of an alert: a query that can fire and send a message to the users.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Client is the object that handles talking to the Datadog API.
Comment is a special form of event that appears in a stream.
No description provided by the author
Dashboard represents a user created dashboard.
DashboardLite represents a user created dashboard.
No description provided by the author
Event is a single event.
No description provided by the author
No description provided by the author
No description provided by the author
Graph represents a graph that might exist on a dashboard.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Metric represents a collection of data points that we might send or receive on one single metric line.
Monitors allow you to watch a metric or check that you care about,notifying your team when some defined threshold is exceeded.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Screenboard represents a user created screenboard.
ScreenboardLite represents a user created screenboard.
No description provided by the author
Series represents a collection of data points we get when we query for timeseries data.
Template variable represents a template variable that might exist on a dashboard.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
type Widget struct {.

# Type aliases

DataPoint is a tuple of [UNIX timestamp, value].
TagMap is used to receive the format given to us by the API.