Documentation ¶
Overview ¶
Code generated by generate.sh; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToMetricDataQuery ¶ added in v0.0.10
ToMetricDataQuery converts the query to (cloudwatch/types).MetricDataQuery.
Types ¶
type Forwarder ¶
type Forwarder struct { Config aws.Config APIURL string // APIKey is api key for the Mackerel. // If it empty, the MACKEREL_APIKEY environment value is used. // The priority is APIKey, APIKeyParameter, MACKEREL_APIKEY, and the MACKEREL_APIKEY_PARAMETER. APIKey string // APIKeyParameter is a name of AWS Systems Manager Parameter Store for the Mackerel api key. // If it empty, the MACKEREL_APIKEY_PARAMETER environment value is used. // The priority is APIKey, APIKeyParameter, MACKEREL_APIKEY, and the MACKEREL_APIKEY_PARAMETER. APIKeyParameter string // APIKeyWithDecrypt means the Mackerel API key is encrypted. // If it is true, the Forwarder decrypts the API key. // If not, the MACKEREL_APIKEY_WITH_DECRYPT environment value is used. APIKeyWithDecrypt bool // contains filtered or unexported fields }
Forwarder forwards metrics of AWS CloudWatch to Mackerel
func (*Forwarder) ForwardMetrics ¶
ForwardMetrics forwards metrics of AWS CloudWatch to Mackerel
type HostMetricValue ¶
type HostMetricValue struct { HostID string `json:"hostId"` Name string `json:"name"` Time int64 `json:"time"` Value float64 `json:"value"` }
HostMetricValue is a value of Mackerel's host metric.
type Label ¶ added in v0.0.6
Label is a label for metrics.
func ParseLabel ¶ added in v0.0.6
ParseLabel parses a label.
type MackerelClient ¶
type MackerelClient struct { BaseURL *url.URL APIKey string UserAgent string HTTPClient *http.Client RetryPolicy retry.Policy }
MackerelClient is a tiny client for Mackerel.
func NewMackerelClient ¶ added in v0.0.12
func NewMackerelClient(apiKey string) *MackerelClient
NewMackerelClient creates a new MackerelClient.
func (*MackerelClient) PostHostMetricValues ¶
func (c *MackerelClient) PostHostMetricValues(ctx context.Context, values []HostMetricValue) error
PostHostMetricValues posts host metrics.
func (*MackerelClient) PostServiceMetricValues ¶
func (c *MackerelClient) PostServiceMetricValues(ctx context.Context, serviceName string, values []ServiceMetricValue) error
PostServiceMetricValues posts service metrics.
type Query ¶ added in v0.0.10
type Query struct { Service string `json:"service,omitempty"` Host string `json:"host,omitempty"` Name string `json:"name,omitempty"` Metric []interface{} `json:"metric,omitempty"` Stat string `json:"stat,omitempty"` Default *float64 `json:"default,omitempty"` }
Query is a query for AWS CloudWatch.
type ServiceMetricValue ¶
type ServiceMetricValue struct { Name string `json:"name"` Time int64 `json:"time"` Value float64 `json:"value"` }
ServiceMetricValue is a value of Mackerel's service metric.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.