metrics

package
v1.2.0-alpha.5....-f5ea4f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommonMetrics = map[string][]string{
	"get_token_count":                          {},
	"get_token_fail_count":                     {},
	"go_gc_duration_seconds":                   {"quantile"},
	"go_gc_duration_seconds_count":             {},
	"go_gc_duration_seconds_sum":               {},
	"go_goroutines":                            {},
	"http_request_duration_microseconds":       {"handler", "quantile"},
	"http_request_duration_microseconds_count": {"handler"},
	"http_request_duration_microseconds_sum":   {"handler"},
	"http_request_size_bytes":                  {"handler", "quantile"},
	"http_request_size_bytes_count":            {"handler"},
	"http_request_size_bytes_sum":              {"handler"},
	"http_requests_total":                      {"handler", "method", "code"},
	"http_response_size_bytes":                 {"handler", "quantile"},
	"http_response_size_bytes_count":           {"handler"},
	"http_response_size_bytes_sum":             {"handler"},
	"kubernetes_build_info":                    {"major", "minor", "gitCommit", "gitTreeState", "gitVersion"},
	"process_cpu_seconds_total":                {},
	"process_max_fds":                          {},
	"process_open_fds":                         {},
	"process_resident_memory_bytes":            {},
	"process_start_time_seconds":               {},
	"process_virtual_memory_bytes":             {},
	"ssh_tunnel_open_count":                    {},
	"ssh_tunnel_open_fail_count":               {},
}
View Source
var KnownApiServerMetrics = map[string][]string{
	"apiserver_request_count":                        {"verb", "resource", "client", "code"},
	"apiserver_request_latencies_bucket":             {"verb", "resource", "le"},
	"apiserver_request_latencies_count":              {"verb", "resource"},
	"apiserver_request_latencies_sum":                {"verb", "resource"},
	"apiserver_request_latencies_summary":            {"verb", "resource", "quantile"},
	"apiserver_request_latencies_summary_count":      {"verb", "resource"},
	"apiserver_request_latencies_summary_sum":        {"verb", "resource"},
	"etcd_helper_cache_entry_count":                  {},
	"etcd_helper_cache_hit_count":                    {},
	"etcd_helper_cache_miss_count":                   {},
	"etcd_request_cache_add_latencies_summary":       {"quantile"},
	"etcd_request_cache_add_latencies_summary_count": {},
	"etcd_request_cache_add_latencies_summary_sum":   {},
	"etcd_request_cache_get_latencies_summary":       {"quantile"},
	"etcd_request_cache_get_latencies_summary_count": {},
	"etcd_request_cache_get_latencies_summary_sum":   {},
	"etcd_request_latencies_summary":                 {"operation", "type", "quantile"},
	"etcd_request_latencies_summary_count":           {"operation", "type"},
	"etcd_request_latencies_summary_sum":             {"operation", "type"},
	"rest_client_request_latency_microseconds":       {"url", "verb", "quantile"},
	"rest_client_request_latency_microseconds_count": {"url", "verb"},
	"rest_client_request_latency_microseconds_sum":   {"url", "verb"},
	"rest_client_request_status_codes":               {"code", "host", "method"},
}
View Source
var KnownControllerManagerMetrics = map[string][]string{
	"etcd_helper_cache_entry_count":                  {},
	"etcd_helper_cache_hit_count":                    {},
	"etcd_helper_cache_miss_count":                   {},
	"etcd_request_cache_add_latencies_summary":       {"quantile"},
	"etcd_request_cache_add_latencies_summary_count": {},
	"etcd_request_cache_add_latencies_summary_sum":   {},
	"etcd_request_cache_get_latencies_summary":       {"quantile"},
	"etcd_request_cache_get_latencies_summary_count": {},
	"etcd_request_cache_get_latencies_summary_sum":   {},
	"get_token_count":                                {},
	"get_token_fail_count":                           {},
	"rest_client_request_latency_microseconds":       {"url", "verb", "quantile"},
	"rest_client_request_latency_microseconds_count": {"url", "verb"},
	"rest_client_request_latency_microseconds_sum":   {"url", "verb"},
	"rest_client_request_status_codes":               {"method", "code", "host"},
}
View Source
var KnownKubeletMetrics = map[string][]string{
	"cadvisor_version_info":                                  {"cadvisorRevision", "cadvisorVersion", "dockerVersion", "kernelVersion", "osVersion"},
	"container_cpu_system_seconds_total":                     {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_cpu_usage_seconds_total":                      {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name", "cpu"},
	"container_cpu_user_seconds_total":                       {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_io_current":                                {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_io_time_seconds_total":                     {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_io_time_weighted_seconds_total":            {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_limit_bytes":                               {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_read_seconds_total":                        {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_reads_merged_total":                        {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_reads_total":                               {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_sector_reads_total":                        {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_sector_writes_total":                       {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_usage_bytes":                               {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_write_seconds_total":                       {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_writes_merged_total":                       {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_fs_writes_total":                              {"device", "id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_last_seen":                                    {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_memory_failcnt":                               {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_memory_failures_total":                        {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name", "scope", "type"},
	"container_memory_usage_bytes":                           {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_memory_working_set_bytes":                     {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_receive_bytes_total":                  {"id", "interface", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_receive_errors_total":                 {"id", "image", "interface", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_receive_packets_dropped_total":        {"id", "image", "interface", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_receive_packets_total":                {"id", "image", "interface", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_transmit_bytes_total":                 {"id", "interface", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_transmit_errors_total":                {"id", "interface", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_transmit_packets_dropped_total":       {"id", "interface", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_network_transmit_packets_total":               {"id", "interface", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_scrape_error":                                 {},
	"container_spec_cpu_shares":                              {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_spec_memory_limit_bytes":                      {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_spec_memory_swap_limit_bytes":                 {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_start_time_seconds":                           {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name"},
	"container_tasks_state":                                  {"id", "image", "kubernetes_container_name", "kubernetes_namespace", "kubernetes_pod_name", "name", "state"},
	"kubelet_container_manager_latency_microseconds":         {"operation_type", "quantile"},
	"kubelet_container_manager_latency_microseconds_count":   {"operation_type"},
	"kubelet_container_manager_latency_microseconds_sum":     {"operation_type"},
	"kubelet_containers_per_pod_count":                       {"quantile"},
	"kubelet_containers_per_pod_count_count":                 {},
	"kubelet_containers_per_pod_count_sum":                   {},
	"kubelet_docker_errors":                                  {"operation_type"},
	"kubelet_docker_operations_latency_microseconds":         {"operation_type", "quantile"},
	"kubelet_docker_operations_latency_microseconds_count":   {"operation_type"},
	"kubelet_docker_operations_latency_microseconds_sum":     {"operation_type"},
	"kubelet_generate_pod_status_latency_microseconds":       {"quantile"},
	"kubelet_generate_pod_status_latency_microseconds_count": {},
	"kubelet_generate_pod_status_latency_microseconds_sum":   {},
	"kubelet_pleg_relist_latency_microseconds":               {"quantile"},
	"kubelet_pleg_relist_latency_microseconds_sum":           {},
	"kubelet_pleg_relist_latency_microseconds_count":         {},
	"kubelet_pleg_relist_interval_microseconds":              {"quantile"},
	"kubelet_pleg_relist_interval_microseconds_sum":          {},
	"kubelet_pleg_relist_interval_microseconds_count":        {},
	"kubelet_pod_start_latency_microseconds":                 {"quantile"},
	"kubelet_pod_start_latency_microseconds_count":           {},
	"kubelet_pod_start_latency_microseconds_sum":             {},
	"kubelet_pod_worker_latency_microseconds":                {"operation_type", "quantile"},
	"kubelet_pod_worker_latency_microseconds_count":          {"operation_type"},
	"kubelet_pod_worker_latency_microseconds_sum":            {"operation_type"},
	"kubelet_pod_worker_start_latency_microseconds":          {"quantile"},
	"kubelet_pod_worker_start_latency_microseconds_count":    {},
	"kubelet_pod_worker_start_latency_microseconds_sum":      {},
	"kubelet_running_container_count":                        {},
	"kubelet_running_pod_count":                              {},
	"kubelet_sync_pods_latency_microseconds":                 {"quantile"},
	"kubelet_sync_pods_latency_microseconds_count":           {},
	"kubelet_sync_pods_latency_microseconds_sum":             {},
	"machine_cpu_cores":                                      {},
	"machine_memory_bytes":                                   {},
	"rest_client_request_latency_microseconds":               {"quantile", "url", "verb"},
	"rest_client_request_latency_microseconds_count":         {"url", "verb"},
	"rest_client_request_latency_microseconds_sum":           {"url", "verb"},
	"rest_client_request_status_codes":                       {"code", "host", "method"},
}
View Source
var KnownSchedulerMetrics = map[string][]string{
	"rest_client_request_latency_microseconds":                  {"url", "verb", "quantile"},
	"rest_client_request_latency_microseconds_count":            {"url", "verb"},
	"rest_client_request_latency_microseconds_sum":              {"url", "verb"},
	"rest_client_request_status_codes":                          {"code", "host", "method"},
	"scheduler_binding_latency_microseconds":                    {"quantile"},
	"scheduler_binding_latency_microseconds_count":              {},
	"scheduler_binding_latency_microseconds_sum":                {},
	"scheduler_binding_ratelimiter_saturation":                  {},
	"scheduler_e2e_scheduling_latency_microseconds":             {"quantile"},
	"scheduler_e2e_scheduling_latency_microseconds_count":       {},
	"scheduler_e2e_scheduling_latency_microseconds_sum":         {},
	"scheduler_scheduling_algorithm_latency_microseconds":       {"quantile"},
	"scheduler_scheduling_algorithm_latency_microseconds_count": {},
	"scheduler_scheduling_algorithm_latency_microseconds_sum":   {},
}
View Source
var KubeletMetricsLabelsToSkip = sets.NewString(
	"kubernetes_namespace",
	"image",
	"name",
)

Functions

func PrintSample

func PrintSample(sample *model.Sample) string

Types

type ApiServerMetrics

type ApiServerMetrics Metrics

func NewApiServerMetrics

func NewApiServerMetrics() ApiServerMetrics

type ControllerManagerMetrics

type ControllerManagerMetrics Metrics

func NewControllerManagerMetrics

func NewControllerManagerMetrics() ControllerManagerMetrics

type KubeletMetrics

type KubeletMetrics Metrics

func NewKubeletMetrics

func NewKubeletMetrics() KubeletMetrics

type Metrics

type Metrics map[string]model.Samples

func NewMetrics

func NewMetrics() Metrics

type MetricsCollection

type MetricsCollection struct {
	ApiServerMetrics         ApiServerMetrics
	ControllerManagerMetrics ControllerManagerMetrics
	KubeletMetrics           map[string]KubeletMetrics
	SchedulerMetrics         SchedulerMetrics
}

type MetricsGrabber

type MetricsGrabber struct {
	// contains filtered or unexported fields
}

func NewMetricsGrabber

func NewMetricsGrabber(c *client.Client, kubelets bool, scheduler bool, controllers bool, apiServer bool) (*MetricsGrabber, error)

func (*MetricsGrabber) Grab

func (g *MetricsGrabber) Grab(unknownMetrics sets.String) (MetricsCollection, error)

func (*MetricsGrabber) GrabFromApiServer

func (g *MetricsGrabber) GrabFromApiServer(unknownMetrics sets.String) (ApiServerMetrics, error)

func (*MetricsGrabber) GrabFromControllerManager

func (g *MetricsGrabber) GrabFromControllerManager(unknownMetrics sets.String) (ControllerManagerMetrics, error)

func (*MetricsGrabber) GrabFromKubelet

func (g *MetricsGrabber) GrabFromKubelet(nodeName string, unknownMetrics sets.String) (KubeletMetrics, error)

func (*MetricsGrabber) GrabFromScheduler

func (g *MetricsGrabber) GrabFromScheduler(unknownMetrics sets.String) (SchedulerMetrics, error)

type SchedulerMetrics

type SchedulerMetrics Metrics

func NewSchedulerMetrics

func NewSchedulerMetrics() SchedulerMetrics

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL