Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrRemoteStorageDisabled = fmt.Errorf("remote graphite storage is not enabled")
ErrRemoteStorageDisabled is used to prevent remote.Fetch calls when remote storage is disabled
Functions ¶
Types ¶
type Config ¶
type Config struct { URL string CheckInterval time.Duration Timeout time.Duration User string Password string Enabled bool }
Config represents config from remote storage
type ErrRemoteTriggerResponse ¶
ErrRemoteTriggerResponse is a custom error when remote trigger check fails
func (ErrRemoteTriggerResponse) Error ¶
func (err ErrRemoteTriggerResponse) Error() string
Error is a representation of Error interface method
type FetchResult ¶
type FetchResult struct {
MetricsData []*metricSource.MetricData
}
FetchResult is implementation of metric_source.FetchResult interface, which represent fetching result from remote graphite installation in moira format
func (*FetchResult) GetMetricsData ¶
func (fetchResult *FetchResult) GetMetricsData() []*metricSource.MetricData
GetMetricsData return all metrics data from fetch result
func (*FetchResult) GetPatternMetrics ¶
func (*FetchResult) GetPatternMetrics() ([]string, error)
GetPatternMetrics always returns error, because remote fetch doesn't return base pattern metrics
func (*FetchResult) GetPatterns ¶
func (*FetchResult) GetPatterns() ([]string, error)
GetPatterns always returns error, because we can't fetch target patterns from remote metrics source
type Remote ¶
type Remote struct {
// contains filtered or unexported fields
}
Remote is implementation of MetricSource interface, which implements fetch metrics method from remote graphite installation
func (*Remote) Fetch ¶
func (remote *Remote) Fetch(target string, from, until int64, allowRealTimeAlerting bool) (metricSource.FetchResult, error)
Fetch fetches remote metrics and converts them to expected format
func (*Remote) IsConfigured ¶
IsConfigured returns false in cases that user does not properly configure remote settings like graphite URL
func (*Remote) IsRemoteAvailable ¶
IsRemoteAvailable checks if graphite API is available and returns 200 response