Giter Club home page Giter Club logo

go-wavefront's People

Contributors

agarfu avatar akshaychitneni avatar arkentos avatar ashwin1dd avatar chengwang86 avatar fr0stbyte avatar ggpaue avatar louism517 avatar nathmclean avatar pacejackson avatar ray2kool avatar sanoojm avatar siralvarex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-wavefront's Issues

Request to become a contributor to this project.

Hi there. I am very much interested in becoming a contributor to this project. My organization would benefit greatly from having an open source Golang Wavefront client, and, rather than starting my own project, I would much rather leverage and contribute to an existing open source project. I've added a pull request for your review to add additional features to the dashboard component. Your consideration would be greatly appreciated. Thank you, Pablo Judd

Add support configuring http.client timeout

Currently Client struct doesn't exports the httpClient field to configure the http.Client timeout to configurable value. It would be ideal to allow a configurable timeout , which can be used for failing fast scenario in cases where wavefront API is slow to respond back to query results.

Add chartAttributes support

While I was building my dashboards I found there's no support for drilldown links. It looks like support for chartAttributes is needed to get that feature, so I'd like to work on that and contribute a PR back.

Support for chartSettings

I need to create charts of different types (sparkline, stacked_area, etc) so I was thinking to add support for 'chartSettings' to the library. Would you be interested in a PR with such feature?

Boolean params in wavefront.QueryParams not set correctly in http request to wavefront API

In the wavefront.QueryParams struct, "SeriesOutsideTimeWindow" is a boolean. When the client builds the http request to Wavefront API, the value needs to be converted to a string in the request's query string.

Example, below is the params in struct:

wavefrontQuery := client.NewQuery(
	&wavefront.QueryParams{
		QueryString:             query,
		StartTime:               configuration.Starttime,
		EndTime:                 configuration.Endtime,
		Granularity:             configuration.Granularity,
		SeriesOutsideTimeWindow: true,
	},
)

Boolean values in query string of request is being set as "%3Cbool+Value%3E", instead of "true" or "false".

See below. This is printed out when client debug is turned on.

Since "SeriesOutsideTimeWindow" is true, the query string expected is "i=true". Instead, it is "i=%3Cbool+Value%3E"

GET /api/v2/chart/api?autoEvents=%3Cbool+Value%3E&e=1573862340&g=m&i=%3Cbool+Value%3E&includeObsoleteMetrics=%3Cbool+Value%3E&listmode=%3Cbool+Value%3E&q=query&s=1573862280&strict=%3Cbool+Value%3E&summarization=LAST HTTP/1.1

Query interval

If we widen the query start time, say go from default (1h) to (24 hours) does the summarization interval change?

Add support for updating tags on Alerts and Dashboards

Tags can be created on Alerts and Dashboards, but cannot be updated (you can change the values in the struct, but the API won't apply them)

There are additional endpoints for managing tags after Alerts and Dashboards have been created

POST /api/v2/{resource}/{id}/tag Set all tags associated with a specific dashboard
DELETE /api/v2/{resource}/{id}/tag/{tagValue} Remove a tag from a specific dashboard
PUT /api/v2/{resource}/{id}/tag/{tagValue}

Add `Tags` attribute to timeseries in the query response

According to the wavefront API documentation, the query response of GET /api/v2/chart/api has the following definition of tags:

Timeseries {
label (string, optional): Label of this timeseries ,
host (string, optional): Source/Host of this timeseries ,
tags (object, optional): Tags (key-value annotations) of this timeseries ,
data (Array[Inline Model 1], optional): Data returned by this time series. This is returned as a list of points, where each point is represented as a two-element list with 1st element being the timestamp in epoch SECONDS and the 2nd element being the numeric value of the series at the timestamp
}

However, the current struct for Timeseries doesn't have the tags attribute at all. See here https://github.com/spaceapegames/go-wavefront/blob/master/query.go#L87

// TimeSeries represents a single TimeSeries as returned by Wavefront
type TimeSeries struct {
	DataPoints []DataPoint `json:"data"`
	Label      string      `json:"label"`
	Host       string      `json:"host"`
}

Can I submit a PR to add Tags to the struct?

// TimeSeries represents a single TimeSeries as returned by Wavefront
type TimeSeries struct {
	DataPoints []DataPoint `json:"data"`
	Label      string      `json:"label"`
	Host       string      `json:"host"`
        Tags       map[string]string   `json:"tags"`
}

A wavefront engineer told me that they always store the key-value pair of tags as strings.

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.