spaceapegames / go-wavefront Goto Github PK
View Code? Open in Web Editor NEWGolang Wavefront client
License: Apache License 2.0
Golang Wavefront client
License: Apache License 2.0
isHtmlContent is an option in Email Alert Targets to add HTML boilerplate to the Email content. This option is by default disabled.
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
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.
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.
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?
@louism517 - Looks like the current latest release is not correct semver , could you please re-release the SDK with v1.7.x , the previously released version v1.6.2 looks like missing the TimeOut changes that we introduced a while back , i can see them in master , but not as part of 1.6.2.
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
Currently the provider only supports type=CLASSIC
alerts.
This issue is about adding support for type=THRESHOLD
alerts, which allow us to set different thresholds for different levels of severity in a single alert instance.
https://docs.wavefront.com/alerts.html#creating-a-multi-threshold-alert
Enables progress on spaceapegames/terraform-provider-wavefront#42
If we widen the query start time, say go from default (1h) to (24 hours) does the summarization interval change?
The current alert schema doesnt allow to see the sources of the metrics that triggered the alert.
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}
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
.
Ref: https://code.vmware.com/apis/714/wavefront-rest#/Query/queryApi
The QueryResult
model for this API also has the errorType
and errorMessage
optional strings defined. The type QueryResponse must support parsing them for clients to check and handle.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.