package
0.0.0-20191024030528-a481964b876e
Repository: https://github.com/divinerapier/learn-kubernetes.git
Documentation: pkg.go.dev

# Functions

APICallToPerfData transforms APIResponsiveness to PerfData.
ExtractLatencyMetrics returns latency metrics for each percentile(50th, 90th and 99th).
GetDefaultKubeletLatencyMetrics calls GetKubeletLatencyMetrics with a set of default metricNames identifying common latency metrics.
GetKubeletLatencyMetrics filters ms to include only those contained in the metricNames set, then constructs a KubeletLatencyMetrics list based on the samples associated with those metrics.
GetKubeletMetrics gets all metrics in kubelet subsystem from specified node and trims the subsystem prefix.
GrabKubeletMetricsWithoutProxy retrieve metrics from the kubelet on the given node using a simple GET over http.
HighLatencyKubeletOperations logs and counts the high latency metrics exported by the kubelet server via /metrics.
HighLatencyRequests prints top five summary metrics for request types with latency and returns number of such request types above threshold.
LogSuspiciousLatency logs metrics/docker errors from all nodes that had slow startup times If latencyDataLag is nil then it will be populated from latencyData.
NewEtcdMetricsCollector creates a new etcd metrics collector.
NewKubeletMetrics returns new metrics which are initialized.
NewMetrics returns new metrics which are initialized.
NewMetricsGrabber returns new metrics which are initialized.
PodStartupLatencyToPerfData transforms PodStartupLatency to PerfData.
PrettyPrintJSON converts metrics to JSON format.
PrintLatencies outputs latencies to log with readable format.
ResetMetrics resets latency metrics in apiserver.
ResetSchedulerMetrics sends a DELETE request to kube-scheduler for resetting metrics.
VerifyLatencyWithinThreshold verifies whether 50, 90 and 99th percentiles of a latency metric are within the expected threshold.
VerifySchedulerLatency verifies (currently just by logging them) the scheduling latencies.

# Constants

SingleCallTimeout is how long to try single API calls (like 'get' or 'list').

# Structs

APICall is a struct for managing API call.
APIResponsiveness is a struct for managing multiple API calls.
Collection is metrics collection of components.
EtcdMetrics is a struct for managing etcd metrics.
EtcdMetricsCollector is a struct for managing etcd metrics collector.
Grabber provides functions which grab metrics from components.
Histogram is a struct for managing histogram.
KubeletLatencyMetric stores metrics scraped from the kubelet server's /metric endpoint.
LatencyMetric is a struct for dashboard metrics.
PodLatencyData encapsulates pod startup latency information.
PodStartupLatency is a struct for managing latency of pod startup.
SchedulingMetrics is a struct for managing scheduling metrics.

# Type aliases

APIServerMetrics is metrics for API server.
ClusterAutoscalerMetrics is metrics for cluster autoscaler.
ComponentCollection is metrics collection of components.
ControllerManagerMetrics is metrics for controller manager.
HistogramVec is an array of Histogram.
KubeletLatencyMetrics implements sort.Interface for []KubeletMetric based on the latency field.
KubeletMetrics is metrics for kubelet.
LatencySlice is an array of PodLatencyData which encapsulates pod startup latency information.
Metrics is generic metrics for other specific metrics.
SchedulerMetrics is metrics for scheduler.