Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents an accessor to the MonDash API
func (*Client) DeleteDashboard ¶
DeleteDashboard will delete all your monitoring results available on your dashboard and release the dashboard URL to the public
func (*Client) DeleteMetric ¶
func (c *Client) DeleteMetric(input *DeleteMetricInput) error
DeleteMetric deletes a metric from your dashboard
func (*Client) PostMetric ¶
func (c *Client) PostMetric(input *PostMetricInput) error
PostMetric submits a new monitoring result
func (*Client) WithContext ¶
WithContext craetes a copy of the Client using the passed context instead of context.Background()
type DeleteMetricInput ¶
type DeleteMetricInput struct { // The unique name for your metric Example: `beer_available`. MetricID string }
DeleteMetricInput contains parameters for the API request
type PostMetricInput ¶
type PostMetricInput struct { // The unique name for your metric Example: `beer_available`. MetricID string `json:"-"` // The title of the metric to display on the dashboard Title string `json:"title"` // A descriptive text for the current state of the metric Description string `json:"description"` // An URL with further information of the status DetailURL string `json:"detail_url"` // One of: OK, Warning, Critical, Unknown Status Status `json:"status"` // The metric value to store with the status Value float64 `json:"value"` // Time in seconds when to remove the metric if there is no update (Valid: `0 < x < 604800`) // Default: `604800` Expires int64 `json:"expires,omitempty"` // Time in seconds when to switch to stale state of there is no update (Valid: `0 < x < 604800`) // Default: 3600 Freshness int64 `json:"freshness,omitempty"` // If set to true the status passed in the update will be used instead of the median absolute deviation // Default: false IgnoreMAD bool `json:"ignore_mad,omitempty"` // If set to true the median absolute deviation is hidden on the dashboard for this metric // Default: false HideMAD bool `json:"hide_mad,omitempty"` // If set to true the value of the metric is not shown on the dashboard // Default: false HideValue bool `json:"hide_value,omitempty"` // If set this status will be set when the metric gets stale (no updates within freshness time range // Default: "Unknown" StalenessStatus string `json:"staleness_status,omitifempty"` }
PostMetricInput contains parameters for the API request
Click to show internal directories.
Click to hide internal directories.