Documentation ¶
Index ¶
- func GetBuckets(metricName string) []float64
- func GetCounters() map[string][]string
- func GetDefaultBuckets() []float64
- func GetGauges() map[string][]string
- func GetHistograms() map[string][]string
- func GetMaxIdleScrapeInterval() time.Duration
- func GetStorageLatencyBuckets() []float64
- func GetSummaries() map[string][]string
- func IncDownloadCounter(ms MetricServer, repo string)
- func IncHTTPConnRequests(ms MetricServer, lvs ...string)
- func IncUploadCounter(ms MetricServer, repo string)
- func ObserveHTTPMethodLatency(ms MetricServer, method string, latency time.Duration)
- func ObserveHTTPRepoLatency(ms MetricServer, path string, latency time.Duration)
- func ObserveStorageLockLatency(ms MetricServer, latency time.Duration, storageName, lockType string)
- func SetServerInfo(ms MetricServer, lvs ...string)
- func SetStorageUsage(ms MetricServer, rootDir, repo string)
- type CounterValue
- type GaugeValue
- type HistogramValue
- type MetricServer
- type MetricsClient
- type MetricsConfig
- type MetricsInfo
- type SummaryValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBuckets ¶ added in v1.4.2
func GetCounters ¶ added in v1.4.2
contains a map with key=CounterName and value=CounterLabels.
func GetDefaultBuckets ¶
func GetDefaultBuckets() []float64
func GetHistograms ¶ added in v1.4.2
func GetMaxIdleScrapeInterval ¶ added in v1.4.2
func GetStorageLatencyBuckets ¶ added in v1.4.2
func GetStorageLatencyBuckets() []float64
func GetSummaries ¶ added in v1.4.2
func IncDownloadCounter ¶ added in v1.4.2
func IncDownloadCounter(ms MetricServer, repo string)
func IncHTTPConnRequests ¶ added in v1.4.2
func IncHTTPConnRequests(ms MetricServer, lvs ...string)
func IncUploadCounter ¶ added in v1.4.2
func IncUploadCounter(ms MetricServer, repo string)
func ObserveHTTPMethodLatency ¶ added in v1.4.2
func ObserveHTTPMethodLatency(ms MetricServer, method string, latency time.Duration)
func ObserveHTTPRepoLatency ¶ added in v1.4.2
func ObserveHTTPRepoLatency(ms MetricServer, path string, latency time.Duration)
func ObserveStorageLockLatency ¶ added in v1.4.2
func ObserveStorageLockLatency(ms MetricServer, latency time.Duration, storageName, lockType string)
func SetServerInfo ¶ added in v1.4.2
func SetServerInfo(ms MetricServer, lvs ...string)
func SetStorageUsage ¶ added in v1.4.2
func SetStorageUsage(ms MetricServer, rootDir, repo string)
Types ¶
type CounterValue ¶ added in v1.4.2
CounterValue stores info about a metric that is incremented over time, such as the number of requests to an HTTP endpoint.
type GaugeValue ¶ added in v1.4.2
GaugeValue stores one value that is updated as time goes on, such as the amount of memory allocated.
type HistogramValue ¶ added in v1.4.2
type MetricServer ¶
type MetricServer interface { SendMetric(interface{}) // works like SendMetric, but adds the metric regardless of the value of 'enabled' field for MetricServer ForceSendMetric(interface{}) ReceiveMetrics() interface{} IsEnabled() bool }
func NewMetricsServer ¶ added in v1.4.2
func NewMetricsServer(enabled bool, log log.Logger) MetricServer
type MetricsClient ¶ added in v1.4.2
type MetricsClient struct {
// contains filtered or unexported fields
}
func NewMetricsClient ¶ added in v1.4.2
func NewMetricsClient(config *MetricsConfig, logger log.Logger) *MetricsClient
Creates a MetricsClient that can be used to retrieve in memory metrics The new MetricsClient retrieved must be cached and reused by the Node Exporter in order to prevent concurrent memory leaks.
func (*MetricsClient) GetMetrics ¶ added in v1.4.2
func (mc *MetricsClient) GetMetrics() (*MetricsInfo, error)
type MetricsConfig ¶ added in v1.4.2
type MetricsConfig struct { // Address of the zot http server Address string // Transport to use for the http client. Transport *http.Transport // HTTPClient is the client to use. HTTPClient *http.Client }
MetricsConfig is used to configure the creation of a Node Exporter http client that will connect to a particular zot instance.
type MetricsInfo ¶ added in v1.4.2
type MetricsInfo struct { Counters []*CounterValue Gauges []*GaugeValue Summaries []*SummaryValue Histograms []*HistogramValue }
Click to show internal directories.
Click to hide internal directories.