Documentation
¶
Index ¶
- type Alert
- type AlertGraphWidget
- type AlertValueWidget
- type ChangeWidget
- type CheckStatusWidget
- type Client
- func (self *Client) AddTagsToHost(host, source string, tags []string) error
- func (self *Client) CreateAlert(alert *Alert) (*Alert, error)
- func (self *Client) CreateComment(handle, message string) (*Comment, error)
- func (self *Client) CreateDashboard(dash *Dashboard) (*Dashboard, error)
- func (self *Client) CreateDowntime(downtime *Downtime) (*Downtime, error)
- func (self *Client) CreateMonitor(monitor *Monitor) (*Monitor, error)
- func (self *Client) CreateRelatedComment(handle, message string, relid int) (*Comment, error)
- func (self *Client) CreateScreenboard(board *Screenboard) (*Screenboard, error)
- func (self *Client) DeleteAlert(id int) error
- func (self *Client) DeleteComment(id int) error
- func (self *Client) DeleteDashboard(id int) error
- func (self *Client) DeleteDowntime(id int) error
- func (self *Client) DeleteMonitor(id int) error
- func (self *Client) DeleteScreenboard(id int) error
- func (self *Client) DeleteUser(handle string) error
- func (self *Client) EditComment(id int, handle, message string) error
- func (self *Client) GetAlert(id int) (*Alert, error)
- func (self *Client) GetAlerts() ([]Alert, error)
- func (self *Client) GetDashboard(id int) (*Dashboard, error)
- func (self *Client) GetDashboards() ([]DashboardLite, error)
- func (self *Client) GetDowntime(id int) (*Downtime, error)
- func (self *Client) GetDowntimes() ([]Downtime, error)
- func (self *Client) GetEvent(id int) (*Event, error)
- func (self *Client) GetEvents(start, end int, priority, sources, tags string) ([]Event, error)
- func (self *Client) GetHostTags(host, source string) ([]string, error)
- func (self *Client) GetHostTagsBySource(host, source string) (TagMap, error)
- func (self *Client) GetMonitor(id int) (*Monitor, error)
- func (self *Client) GetMonitors() ([]Monitor, error)
- func (self *Client) GetScreenboard(id int) (*Screenboard, error)
- func (self *Client) GetScreenboards() ([]*ScreenboardLite, error)
- func (self *Client) GetTags(source string) (TagMap, error)
- func (self *Client) GetUser(handle string) (user User, err error)
- func (self *Client) GetUsers() (users []User, err error)
- func (self *Client) InviteUsers(emails []string) error
- func (self *Client) MuteAlerts() error
- func (self *Client) MuteMonitor(id int) error
- func (self *Client) MuteMonitors() error
- func (self *Client) PostEvent(event *Event) (*Event, error)
- func (client *Client) PostMetrics(series []Metric) error
- func (client *Client) QueryMetrics(from, to int64, query string) ([]Series, error)
- func (self *Client) RemoveHostTags(host, source string) error
- func (self *Client) RevokeScreenboard(id int) error
- func (self *Client) SearchHosts(search string) ([]string, error)
- func (self *Client) SearchMetrics(search string) ([]string, error)
- func (c *Client) SetKeys(apiKey, appKey string)
- func (self *Client) ShareScreenboard(id int, response *ScreenShareResponse) error
- func (self *Client) Snapshot(query string, start, end time.Time, eventQuery string) (string, error)
- func (self *Client) UnmuteAlerts() error
- func (self *Client) UnmuteMonitor(id int) error
- func (self *Client) UnmuteMonitors() error
- func (self *Client) UpdateAlert(alert *Alert) error
- func (self *Client) UpdateDashboard(dash *Dashboard) error
- func (self *Client) UpdateDowntime(downtime *Downtime) error
- func (self *Client) UpdateHostTags(host, source string, tags []string) error
- func (self *Client) UpdateMonitor(monitor *Monitor) error
- func (self *Client) UpdateScreenboard(board *Screenboard) error
- func (self *Client) UpdateUser(user User) error
- type Comment
- type ConditionalFormat
- type Dashboard
- type DashboardLite
- type DataPoint
- type Downtime
- type Event
- type EventStreamWidget
- type EventTimelineWidget
- type FreeTextWidget
- type Graph
- type GraphWidget
- type HostMapWidget
- type IFrameWidget
- type ImageWidget
- type Metric
- type Monitor
- type NoteWidget
- type Options
- type QueryValueWidget
- type Recurrence
- type ScreenShareResponse
- type Screenboard
- type ScreenboardLite
- type Series
- type TagMap
- type TemplateVariable
- type TextSize
- type ThresholdCount
- type TileDef
- type TileDefEvent
- type TimeseriesMarker
- type TimeseriesRequest
- type TimeseriesRequestStyle
- type TimeseriesWidget
- type ToplistWidget
- type User
- type Widget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { Id int `json:"id,omitempty"` Creator int `json:"creator,omitempty"` Query string `json:"query,omitempty"` Name string `json:"name,omitempty"` Message string `json:"message,omitempty"` Silenced bool `json:"silenced,omitempty"` NotifyNoData bool `json:"notify_no_data,omitempty"` State string `json:"state,omitempty"` }
Alert represents the data of an alert: a query that can fire and send a message to the users.
type AlertGraphWidget ¶
type AlertGraphWidget struct { TitleSize int `json:"title_size,omitempty"` VizType string `json:"timeseries,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` X int `json:"y,omitempty"` Y int `json:"x,omitempty"` AlertId int `json:"alert_id,omitempty"` Timeframe string `json:"timeframe,omitempty"` Type string `json:"type,omitempty"` AddTimeframe bool `json:"add_timeframe,omitempty"` }
type AlertValueWidget ¶
type AlertValueWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TextAlign string `json:"text_align,omitempty"` TitleText string `json:"title_text,omitempty"` Precision int `json:"precision,omitempty"` AlertId int `json:"alert_id,omitempty"` Timeframe string `json:"timeframe,omitempty"` AddTimeframe bool `json:"add_timeframe,omitempty"` Y int `json:"y,omitempty"` X int `json:"x,omitempty"` TextSize string `json:"text_size,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` Type string `json:"type,omitempty"` Unit string `json:"unit,omitempty"` }
type ChangeWidget ¶
type ChangeWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` X int `json:"y,omitempty"` Y int `json:"x,omitempty"` Aggregator string `json:"aggregator,omitempty"` TileDef TileDef `json:"tile_def,omitempty"` }
type CheckStatusWidget ¶
type CheckStatusWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TextAlign string `json:"text_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` X int `json:"y,omitempty"` Y int `json:"x,omitempty"` Tags string `json:"tags,omitempty"` Timeframe string `json:"timeframe,omitempty"` TextSize string `json:"text_size,omitempty"` Type string `json:"type,omitempty"` Check string `json:"check,omitempty"` Group string `json:"group,omitempty"` Grouping string `json:"grouping,omitempty"` }
type Client ¶
type Client struct { //The Http Client that is used to make requests HttpClient *http.Client // contains filtered or unexported fields }
Client is the object that handles talking to the Datadog API. This maintains state information for a particular application connection.
func NewClient ¶
NewClient returns a new datadog.Client which can be used to access the API methods. The expected argument is the API key.
func (*Client) AddTagsToHost ¶
AddTagsToHost does exactly what it says on the tin. Given a list of tags, add them to the host. The source is optionally specificed, and defaults to "users" as per the API documentation.
func (*Client) CreateAlert ¶
CreateAlert adds a new alert to the system. This returns a pointer to an Alert so you can pass that to UpdateAlert later if needed.
func (*Client) CreateComment ¶
CreateComment adds a new comment to the system.
func (*Client) CreateDashboard ¶
CreateDashboard creates a new dashboard when given a Dashboard struct. Note that the Id, Resource, Url and similar elements are not used in creation.
func (*Client) CreateDowntime ¶
CreateDowntime adds a new downtme to the system. This returns a pointer to a Downtime so you can pass that to UpdateDowntime or CancelDowntime later if needed.
func (*Client) CreateMonitor ¶
Createmonitor adds a new monitor to the system. This returns a pointer to an monitor so you can pass that to Updatemonitor later if needed.
func (*Client) CreateRelatedComment ¶
CreateRelatedComment adds a new comment, but lets you specify the related identifier for the comment.
func (*Client) CreateScreenboard ¶
func (self *Client) CreateScreenboard(board *Screenboard) (*Screenboard, error)
CreateScreenboard creates a new screenboard when given a Screenboard struct. Note that the Id, Resource, Url and similar elements are not used in creation.
func (*Client) DeleteAlert ¶
DeleteAlert removes an alert from the system.
func (*Client) DeleteComment ¶
DeleteComment does exactly what you expect.
func (*Client) DeleteDashboard ¶
DeleteDashboard deletes a dashboard by the identifier.
func (*Client) DeleteDowntime ¶
DeleteDowntime removes an downtime from the system.
func (*Client) DeleteMonitor ¶
Deletemonitor removes an monitor from the system.
func (*Client) DeleteScreenboard ¶
DeleteScreenboard deletes a screenboard by the identifier.
func (*Client) DeleteUser ¶
DeleteUser deletes a user and returns an error if deletion failed
func (*Client) EditComment ¶
EditComment changes the message and possibly handle of a particular comment.
func (*Client) GetDashboard ¶
GetDashboard returns a single dashboard created on this account.
func (*Client) GetDashboards ¶
func (self *Client) GetDashboards() ([]DashboardLite, error)
GetDashboards returns a list of all dashboards created on this account.
func (*Client) GetDowntime ¶
Getdowntime retrieves an downtime by identifier.
func (*Client) GetDowntimes ¶
GetDowntimes returns a slice of all downtimes.
func (*Client) GetHostTags ¶
GetHostTags returns a slice of tags for a given host and source.
func (*Client) GetHostTagsBySource ¶
GetHostTagsBySource is a different way of viewing the tags. It returns a map of source:[tag,tag].
func (*Client) GetMonitor ¶
Getmonitor retrieves an monitor by identifier.
func (*Client) GetMonitors ¶
GetMonitors returns a slice of all monitors.
func (*Client) GetScreenboard ¶
func (self *Client) GetScreenboard(id int) (*Screenboard, error)
GetScreenboard returns a single screenboard created on this account.
func (*Client) GetScreenboards ¶
func (self *Client) GetScreenboards() ([]*ScreenboardLite, error)
GetScreenboards returns a list of all screenboards created on this account.
func (*Client) InviteUsers ¶
InviteUsers takes a slice of email addresses and sends invitations to them.
func (*Client) MuteAlerts ¶
MuteAlerts turns off alerting notifications.
func (*Client) MuteMonitor ¶
MuteMonitor turns off monitoring notifications for a monitor.
func (*Client) MuteMonitors ¶
MuteMonitors turns off monitoring notifications.
func (*Client) PostMetrics ¶
PostMetrics takes as input a slice of metrics and then posts them up to the server for posting data.
func (*Client) QueryMetrics ¶
QueryMetrics takes as input from, to (seconds from Unix Epoch) and query string and then requests timeseries data for that time peried
func (*Client) RemoveHostTags ¶
RemoveHostTags removes all tags from a host for the given source. If none is given, the API defaults to "users".
func (*Client) RevokeScreenboard ¶
RevokeScreenboard revokes a currently shared screenboard
func (*Client) SearchHosts ¶
SearchHosts searches through the hosts facet, returning matching hostnames.
func (*Client) SearchMetrics ¶
SearchMetrics searches through the metrics facet, returning matching ones.
func (*Client) ShareScreenboard ¶
func (self *Client) ShareScreenboard(id int, response *ScreenShareResponse) error
ShareScreenboard shares an existing screenboard, it takes and updates ScreenShareResponse
func (*Client) UnmuteAlerts ¶
UnmuteAlerts turns on alerting notifications.
func (*Client) UnmuteMonitor ¶
UnmuteMonitor turns on monitoring notifications for a monitor.
func (*Client) UnmuteMonitors ¶
UnmuteMonitors turns on monitoring notifications.
func (*Client) UpdateAlert ¶
UpdateAlert takes an alert that was previously retrieved through some method and sends it back to the server.
func (*Client) UpdateDashboard ¶
UpdateDashboard in essence takes a Dashboard struct and persists it back to the server. Use this if you've updated your local and need to push it back.
func (*Client) UpdateDowntime ¶
UpdateDowntime takes a downtime that was previously retrieved through some method and sends it back to the server.
func (*Client) UpdateHostTags ¶
UpdateHostTags overwrites existing tags for a host, allowing you to specify a new set of tags for the given source. This defaults to "users".
func (*Client) UpdateMonitor ¶
Updatemonitor takes an monitor that was previously retrieved through some method and sends it back to the server.
func (*Client) UpdateScreenboard ¶
func (self *Client) UpdateScreenboard(board *Screenboard) error
UpdateScreenboard in essence takes a Screenboard struct and persists it back to the server. Use this if you've updated your local and need to push it back.
func (*Client) UpdateUser ¶
UpdateUser updates a user with the content of `user`, and returns an error if the update failed
type Comment ¶
type Comment struct { Id int `json:"id"` RelatedId int `json:"related_event_id"` Handle string `json:"handle"` Message string `json:"message"` Resource string `json:"resource"` Url string `json:"url"` }
Comment is a special form of event that appears in a stream.
type ConditionalFormat ¶
type Dashboard ¶
type Dashboard struct { Id int `json:"id"` Description string `json:"description"` Title string `json:"title"` Graphs []Graph `json:"graphs"` TemplateVariables []TemplateVariable `json:"template_variables,omitempty"` }
Dashboard represents a user created dashboard. This is the full dashboard struct when we load a dashboard in detail.
type DashboardLite ¶
type DashboardLite struct { Id int `json:"id,string"` // TODO: Remove ',string'. Resource string `json:"resource"` Description string `json:"description"` Title string `json:"title"` }
DashboardLite represents a user created dashboard. This is the mini struct when we load the summaries.
type DataPoint ¶
type DataPoint [2]float64
DataPoint is a tuple of [UNIX timestamp, value]. This has to use floats because the value could be non-integer.
type Downtime ¶
type Downtime struct { Active bool `json:"active,omitempty"` Canceled int `json:"canceled,omitempty"` Disabled bool `json:"disabled,omitempty"` End int `json:"end,omitempty"` Id int `json:"id,omitempty"` Message string `json:"message,omitempty"` Recurrence *Recurrence `json:"recurrence,omitempty"` Scope []string `json:"scope,omitempty"` Start int `json:"start,omitempty"` }
type Event ¶
type Event struct { Id int `json:"id,omitempty"` Title string `json:"title,omitempty"` Text string `json:"text,omitempty"` Time int `json:"date_happened,omitempty"` // UNIX time. Priority string `json:"priority,omitempty"` AlertType string `json:"alert_type,omitempty"` Host string `json:"host,omitempty"` Aggregation string `json:"aggregation_key,omitempty"` SourceType string `json:"source_type,omitempty"` Tags []string `json:"tags,omitempty"` Url string `json:"url,omitempty"` Resource string `json:"resource,omitempty"` }
Event is a single event. If this is being used to post an event, then not all fields will be filled out.
type EventStreamWidget ¶
type EventStreamWidget struct { EventSize string `json:"event_size,omitempty"` Height int `json:"height,omitempty"` Query string `json:"query,omitempty"` Timeframe string `json:"timeframe,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleSize TextSize `json:"title_size,omitempty"` TitleText string `json:"title_text,omitempty"` Type string `json:"type,omitempty"` Width int `json:"width,omitempty"` X int `json:"x,omitempty"` Y int `json:"y,omitempty"` }
type EventTimelineWidget ¶
type EventTimelineWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` X int `json:"y,omitempty"` Y int `json:"x,omitempty"` Type string `json:"type,omitempty"` Timeframe string `json:"timeframe,omitempty"` Query string `json:"query,omitempty"` }
type FreeTextWidget ¶
type FreeTextWidget struct { Color string `json:"color,omitempty"` FontSize string `json:"font_size,omitempty"` Height int `json:"height,omitempty"` Text string `json:"text,omitempty"` TextAlign string `json:"text_align,omitempty"` Type string `json:"type,omitempty"` Width int `json:"width,omitempty"` X int `json:"x,omitempty"` Y int `json:"y,omitempty"` }
type Graph ¶
type Graph struct { Title string `json:"title"` Events []struct{} `json:"events"` Definition struct { Viz string `json:"viz"` Requests []struct { Query string `json:"q"` Stacked bool `json:"stacked"` } `json:"requests"` } `json:"definition"` }
Graph represents a graph that might exist on a dashboard.
type GraphWidget ¶
type GraphWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` X int `json:"y,omitempty"` Y int `json:"x,omitempty"` Type string `json:"type,omitempty"` Timeframe string `json:"timeframe,omitempty"` LegendSize int `json:"legend_size,omitempty"` Legend bool `json:"legend,omitempty"` TileDef TileDef `json:"tile_def,omitempty"` }
type HostMapWidget ¶
type HostMapWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` X int `json:"y,omitempty"` Y int `json:"x,omitempty"` Query string `json:"query,omitempty"` Timeframe string `json:"timeframe,omitempty"` LegendSize int `json:"legend_size,omitempty"` Type string `json:"type,omitempty"` Legend bool `json:"legend,omitempty"` TileDef TileDef `json:"tile_def,omitempty"` }
type IFrameWidget ¶
type IFrameWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` Url string `json:"url,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Width int `json:"width,omitempty"` X int `json:"y,omitempty"` Y int `json:"x,omitempty"` Type string `json:"type,omitempty"` }
type ImageWidget ¶
type ImageWidget struct { Height int `json:"height,omitempty"` Sizing string `json:"sizing,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleSize TextSize `json:"title_size,omitempty"` TitleText string `json:"title_text,omitempty"` Type string `json:"type,omitempty"` Url string `json:"url,omitempty"` Width int `json:"width,omitempty"` X int `json:"x,omitempty"` Y int `json:"y,omitempty"` }
type Metric ¶
type Metric struct { Metric string `json:"metric,omitempty"` Points []DataPoint `json:"points,omitempty"` Type string `json:"type,omitempty"` Host string `json:"host,omitempty"` Tags []string `json:"tags,omitempty"` Unit string `json:"unit,omitempty"` SourceTypeName string `json:"source_type_name,omitempty"` Interval int `json:"interval,omitempty"` }
Metric represents a collection of data points that we might send or receive on one single metric line.
type Monitor ¶
type Monitor struct { Id int `json:"id,omitempty"` Type string `json:"type,omitempty"` Query string `json:"query,omitempty"` Name string `json:"name,omitempty"` Message string `json:"message,omitempty"` Tags []string `json:"tags,omitempty"` Options Options `json:"options,omitempty"` }
Monitors allow you to watch a metric or check that you care about, notifying your team when some defined threshold is exceeded.
type NoteWidget ¶
type NoteWidget struct { TitleSize int `json:"title_size,omitempty"` Title bool `json:"title,omitempty"` RefreshEvery int `json:"refresh_every,omitempty"` TickPos string `json:"tick_pos,omitempty"` TitleAlign string `json:"title_align,omitempty"` TickEdge string `json:"tick_edge,omitempty"` TextAlign string `json:"text_align,omitempty"` TitleText string `json:"title_text,omitempty"` Height int `json:"height,omitempty"` Color string `json:"bgcolor,omitempty"` Html string `json:"html,omitempty"` Y int `json:"y,omitempty"` X int `json:"x,omitempty"` FontSize int `json:"font_size,omitempty"` Tick bool `json:"tick,omitempty"` Note string `json:"type,omitempty"` Width int `json:"width,omitempty"` AutoRefresh bool `json:"auto_refresh,omitempty"` }
type Options ¶
type Options struct { NoDataTimeframe int `json:"no_data_timeframe,omitempty"` NotifyAudit bool `json:"notify_audit,omitempty"` NotifyNoData bool `json:"notify_no_data,omitempty"` RenotifyInterval int `json:"renotify_interval,omitempty"` Silenced map[string]int `json:"silenced,omitempty"` TimeoutH int `json:"timeout_h,omitempty"` EscalationMessage string `json:"escalation_message,omitempty"` Thresholds ThresholdCount `json:"thresholds,omitempty"` IncludeTags bool `json:"include_tags,omitempty"` }
type QueryValueWidget ¶
type QueryValueWidget struct { Timeframe string `json:"timeframe,omitempty"` TimeframeAggregator string `json:"aggr,omitempty"` Aggregator string `json:"aggregator,omitempty"` CalcFunc string `json:"calc_func,omitempty"` ConditionalFormats []ConditionalFormat `json:"conditional_formats,omitempty"` Height int `json:"height,omitempty"` IsValidQuery bool `json:"is_valid_query,omitempty,omitempty"` Metric string `json:"metric,omitempty"` MetricType string `json:"metric_type,omitempty"` Precision int `json:"precision,omitempty"` Query string `json:"query,omitempty"` ResultCalcFunc string `json:"res_calc_func,omitempty"` Tags []string `json:"tags,omitempty"` TextAlign string `json:"text_align,omitempty"` TextSize TextSize `json:"text_size,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleSize TextSize `json:"title_size,omitempty"` TitleText string `json:"title_text,omitempty"` Type string `json:"type,omitempty"` Unit string `json:"auto,omitempty"` Width int `json:"width,omitempty"` X int `json:"x,omitempty"` Y int `json:"y,omitempty"` }
type Recurrence ¶
type ScreenShareResponse ¶
type ScreenShareResponse struct {}
type Screenboard ¶
type Screenboard struct { Id int `json:"id,omitempty"` Title string `json:"board_title,omitempty"` Height string `json:"height,omitempty"` Width string `json:"width,omitempty"` Templated bool `json:"templated,omitempty"` TemplateVariables []TemplateVariable `json:"template_variables,omitempty"` Widgets []Widget `json:"widgets,omitempty"` }
Screenboard represents a user created screenboard. This is the full screenboard struct when we load a screenboard in detail.
type ScreenboardLite ¶
type ScreenboardLite struct { Id int `json:"id,omitempty"` Resource string `json:"resource,omitempty"` Title string `json:"title,omitempty"` }
ScreenboardLite represents a user created screenboard. This is the mini struct when we load the summaries.
type Series ¶
type Series struct { Metric string `json:"metric,omitempty"` DisplayName string `json:"display_name,omitempty"` Points []DataPoint `json:"pointlist,omitempty"` Start float64 `json:"start,omitempty"` End float64 `json:"end,omitempty"` Interval int `json:"interval,omitempty"` Aggr string `json:"aggr,omitempty"` Length int `json:"length,omitempty"` Scope string `json:"scope,omitempty"` Expression string `json:"expression,omitempty"` QueryIndex int `json:"query_index,omitempty"` }
Series represents a collection of data points we get when we query for timeseries data
type TemplateVariable ¶
type TemplateVariable struct { Name string `json:"name"` Prefix string `json:"prefix"` Default string `json:"default"` }
Template variable represents a template variable that might exist on a dashboard
type ThresholdCount ¶
type TileDef ¶
type TileDef struct { Events []TileDefEvent `json:"events,omitempty"` Markers []TimeseriesMarker `json:"markers,omitempty"` Requests []TimeseriesRequest `json:"requests,omitempty"` Viz string `json:"viz,omitempty"` }
type TileDefEvent ¶
type TileDefEvent struct {
Query string `json:"q"`
}
type TimeseriesMarker ¶
type TimeseriesRequest ¶
type TimeseriesRequest struct { Query string `json:"q,omitempty"` Type string `json:"type,omitempty"` ConditionalFormats []ConditionalFormat `json:"conditional_formats,omitempty"` Style TimeseriesRequestStyle `json:"style,omitempty"` }
type TimeseriesRequestStyle ¶
type TimeseriesRequestStyle struct {
Palette string `json:"palette,omitempty"`
}
type TimeseriesWidget ¶
type TimeseriesWidget struct { Height int `json:"height,omitempty"` Legend bool `json:"legend,omitempty"` TileDef TileDef `json:"tile_def,omitempty"` Timeframe string `json:"timeframe,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleSize TextSize `json:"title_size,omitempty"` TitleText string `json:"title_text,omitempty"` Type string `json:"type,omitempty"` Width int `json:"width,omitempty"` X int `json:"x,omitempty"` Y int `json:"y,omitempty"` }
type ToplistWidget ¶
type ToplistWidget struct { Height int `json:"height,omitempty"` Legend bool `json:"legend,omitempty"` LegendSize int `json:"legend_size,omitempty"` TileDef TileDef `json:"tile_def,omitempty"` Timeframe string `json:"timeframe,omitempty"` Title bool `json:"title,omitempty"` TitleAlign string `json:"title_align,omitempty"` TitleSize TextSize `json:"title_size,omitempty"` TitleText string `json:"title_text,omitempty"` Type string `json:"type,omitempty"` Width int `json:"width,omitempty"` X int `json:"x,omitempty"` Y int `json:"y,omitempty"` }
type Widget ¶
type Widget struct { Default string `json:"default,omitempty"` Name string `json:"name,omitempty"` Prefix string `json:"prefix,omitempty"` TimeseriesWidget TimeseriesWidget `json:"timeseries,omitempty"` QueryValueWidget QueryValueWidget `json:"query_value,omitempty"` EventStreamWidget EventStreamWidget `json:"event_stream,omitempty"` FreeTextWidget FreeTextWidget `json:"free_text,omitempty"` ToplistWidget ToplistWidget `json:"toplist,omitempty"` ImageWidget ImageWidget `json:"image,omitempty"` ChangeWidget ChangeWidget `json:"change,omitempty"` GraphWidget GraphWidget `json:"graph,omitempty"` EventTimelineWidget EventTimelineWidget `json:"event_timeline,omitempty"` AlertValueWidget AlertValueWidget `json:"alert_value,omitempty"` AlertGraphWidget AlertGraphWidget `json:"alert_graph,omitempty"` HostMapWidget HostMapWidget `json:"hostmap,omitempty"` CheckStatusWidget CheckStatusWidget `json:"check_status,omitempty"` IFrameWidget IFrameWidget `json:"iframe,omitempty"` NoteWidget NoteWidget `json:"frame,omitempty"` }
type Widget struct {