package monitoring
import "k8s.io/kubernetes/test/e2e/instrumentation/monitoring"
Index ¶
- Constants
- Variables
- func CheckCadvisorHealthOnAllNodes(c clientset.Interface, timeout time.Duration)
- func CleanupAdapter(adapterDeploymentFile string)
- func CleanupDescriptors(service *gcm.Service, projectId string)
- func CreateAdapter(adapterDeploymentFile string) error
- func CreateDescriptors(service *gcm.Service, projectId string) error
- func PrometheusExporterDeployment(name, namespace string, replicas int32, metricValue int64) *extensions.Deployment
- func Query(c clientset.Interface, query string) (*influxdb.Response, error)
- func SimpleStackdriverExporterDeployment(name, namespace string, replicas int32, metricValue int64) *extensions.Deployment
- func StackdriverExporterDeployment(name, namespace string, replicas int32, containers []CustomMetricContainerSpec) *extensions.Deployment
- func StackdriverExporterPod(podName, namespace, podLabel, metricName string, metricValue int64) *corev1.Pod
- type CustomMetricContainerSpec
- type DroppedTarget
- type Metadata
- type Resource
- type Target
- type TargetDiscovery
- type TargetHealth
Constants ¶
const ( // Scope for Stackdriver Metadata API MonitoringScope = "https://www.googleapis.com/auth/monitoring" )
Variables ¶
var ( CustomMetricName = "foo" UnusedMetricName = "unused" CustomMetricValue = int64(448) UnusedMetricValue = int64(446) StackdriverExporter = "stackdriver-exporter" HPAPermissions = &rbac.ClusterRoleBinding{ ObjectMeta: metav1.ObjectMeta{ Name: "custom-metrics-reader", }, RoleRef: rbac.RoleRef{ APIGroup: "rbac.authorization.k8s.io", Kind: "ClusterRole", Name: "system:controller:horizontal-pod-autoscaler", }, Subjects: []rbac.Subject{ { APIGroup: "rbac.authorization.k8s.io", Kind: "Group", Name: "system:unauthenticated", }, }, } StagingDeploymentsLocation = "" /* 129 byte string literal not displayed */ AdapterForOldResourceModel = "adapter_old_resource_model.yaml" AdapterForNewResourceModel = "adapter_new_resource_model.yaml" AdapterDefault = AdapterForOldResourceModel ClusterAdminBinding = "e2e-test-cluster-admin-binding" )
Functions ¶
func CheckCadvisorHealthOnAllNodes ¶
func CleanupAdapter ¶
func CleanupAdapter(adapterDeploymentFile string)
CleanupAdapter deletes Custom Metrics - Stackdriver adapter deployments.
func CleanupDescriptors ¶
CleanupDescriptors deletes descriptors for metrics: CustomMetricName and UnusedMetricName. TODO: Cleanup time series as well
func CreateAdapter ¶
CreateAdapter creates Custom Metrics - Stackdriver adapter adapterDeploymentFile should be a filename for adapter deployment located in StagingDeploymentLocation
func CreateDescriptors ¶
CreateDescriptors creates descriptors for metrics: CustomMetricName and UnusedMetricName.
func PrometheusExporterDeployment ¶
func PrometheusExporterDeployment(name, namespace string, replicas int32, metricValue int64) *extensions.Deployment
PrometheusExporterDeployment is a Deployment of simple application with two containers one exposing a metric in prometheus fromat and second a prometheus-to-sd container that scrapes the metric and pushes it to stackdriver.
func Query ¶
Query sends a command to the server and returns the Response
func SimpleStackdriverExporterDeployment ¶
func SimpleStackdriverExporterDeployment(name, namespace string, replicas int32, metricValue int64) *extensions.Deployment
SimpleStackdriverExporterDeployment is a Deployment of simple application that exports a metric of fixed value to Stackdriver in a loop.
func StackdriverExporterDeployment ¶
func StackdriverExporterDeployment(name, namespace string, replicas int32, containers []CustomMetricContainerSpec) *extensions.Deployment
StackdriverExporterDeployment is a Deployment of an application that can expose an arbitrary amount of metrics of fixed value to Stackdriver in a loop. Each metric is exposed by a different container in one pod. The metric names and values are configured via the containers parameter.
func StackdriverExporterPod ¶
func StackdriverExporterPod(podName, namespace, podLabel, metricName string, metricValue int64) *corev1.Pod
StackdriverExporterPod is a Pod of simple application that exports a metric of fixed value to Stackdriver in a loop.
Types ¶
type CustomMetricContainerSpec ¶
CustomMetricContainerSpec allows to specify a config for StackdriverExporterDeployment with multiple containers exporting different metrics.
type DroppedTarget ¶
type DroppedTarget struct { // Labels before any processing. DiscoveredLabels map[string]string `json:"discoveredLabels"` }
type Metadata ¶
type Metadata struct { Results []map[string]interface{} }
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
type Target ¶
type Target struct { DiscoveredLabels map[string]string `json:"discoveredLabels"` Labels map[string]string `json:"labels"` ScrapeURL string `json:"scrapeUrl"` LastError string `json:"lastError"` LastScrape time.Time `json:"lastScrape"` Health TargetHealth `json:"health"` }
type TargetDiscovery ¶
type TargetDiscovery struct { ActiveTargets []*Target `json:"activeTargets"` DroppedTargets []*DroppedTarget `json:"droppedTargets"` }
type TargetHealth ¶
type TargetHealth string
const ( HealthUnknown TargetHealth = "unknown" HealthGood TargetHealth = "up" HealthBad TargetHealth = "down" )
Source Files ¶
accelerator.go cadvisor.go custom_metrics_deployments.go custom_metrics_stackdriver.go influxdb.go metrics_grabber.go prometheus.go stackdriver.go stackdriver_metadata_agent.go
- Version
- v1.11.3
- Published
- Sep 8, 2018
- Platform
- js/wasm
- Imports
- 36 packages
- Last checked
- 3 seconds ago –
Tools for package owners.