defaults

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package defaults contains the default values for configuration options

Index

Constants

View Source
const (
	APITokenKey        = ""
	APITokenKeyFile    = ""
	APITokenApp        = release.NAME
	APIURL             = "https://api.circonus.com/v2/"
	APIDebug           = false
	APICAFile          = ""
	CheckBundleCID     = ""
	CheckCreate        = true
	CheckBrokerCID     = "/broker/35" // circonus public httptrap broker
	CheckBrokerCAFile  = ""
	CheckMetricFilters = ""
	CheckTags          = ""
	CheckTarget        = "" // defaults to cluster name
	DefaultStreamtags  = ""
	MetricFiltersFile  = "/ck8sa/metric-filters.json" // assumes running in a pod, ConfigMap mounted volume
	DefaultAlertsFile  = "/ck8sa/default-alerts.json" // assumes running in a pod, ConfigMap mounted volume
	CustomRulesFile    = "/ck8sa/custom-rules.json"   // assumes running in a pod, ConfigMap mounted volume
	CheckTitle         = ""
	TraceSubmits       = ""
	// hidden circonus settings for development and debugging
	DryRun = false
	// StreamMetrics = false
	// these hidden settings are mainly for debugging
	// the features default to ON and can be toggled OFF
	NoBase64        = false
	Base64Tags      = true
	NoGZIP          = false
	UseGZIP         = true
	LogAgentMetrics = false
	NodeCC          = false

	Debug     = false
	LogLevel  = "info"
	LogPretty = false

	K8SName                      = ""
	K8SInterval                  = "1m"
	K8SAPIURL                    = "https://kubernetes.default.svc"                       // https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod
	K8SAPICAFile                 = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" // https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod
	K8SBearerToken               = ""
	K8SBearerTokenFile           = "/var/run/secrets/kubernetes.io/serviceaccount/token" //nolint:gosec // https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod
	K8SEnableEvents              = true                                                  // dashboard
	K8SEnableKubeStateMetrics    = true                                                  // dashobard
	K8SKSMFieldSelectorQuery     = "metadata.name=kube-state-metrics"                    // default from 'standard' service deployment, https://github.com/kubernetes/kube-state-metrics/blob/master/examples/standard/service.yaml#L19
	K8SKSMMetricsPort            = ""                                                    // no default, pulled from endpoint for service
	K8SKSMMetricsPortName        = "http-metrics"                                        // default from 'standard' service deployment, https://github.com/kubernetes/kube-state-metrics/blob/master/examples/standard/service.yaml#L11
	K8SKSMRequestMode            = "direct"                                              // DEPRECATED - 'direct' or 'proxy' modes supported
	K8SKSMTelemetryPortName      = "telemetry"                                           // DEPRECATED - default from 'standard' service deployment, https://github.com/kubernetes/kube-state-metrics/blob/master/examples/standard/service.yaml#L11
	K8SEnableAPIServer           = true                                                  // dashboard
	K8SEnableMetricsServer       = false                                                 // deprecated
	K8SNodeKubeletVersion        = "v1.18.0"                                             // kubelet version to switch to alternate /metrics/... urls
	K8SEnableNodes               = true                                                  // dashboard
	K8SEnableNodeStats           = true                                                  // dashboard (only available in k8s<v1.18 - /stats/summary)
	K8SEnableNodeMetrics         = true                                                  // dashboard /metrics
	K8SEnableCadvisorMetrics     = false                                                 // not needed by dashboard (k8s<v1.18, may be needed for k8s>=v1.18) /metrics/cadvisor
	K8SEnableNodeResourceMetrics = true                                                  // dashboard (k8s >= 1.18) /metrics/resources
	K8SEnableNodeProbeMetrics    = false                                                 // dashboard (k8s >= 1.18) /metrics/probes
	K8SEnableKubeDNSMetrics      = true                                                  // dashboard
	K8SKubeDNSMetricsPort        = "10054"                                               // ONLY used if the kube-dns service does not have scrape and port annotations (e.g. GKE)
	K8SNodeSelector              = ""                                                    // blank=all
	K8SIncludePods               = true                                                  // dashboard
	K8SPodLabelKey               = ""                                                    // blank=all
	K8SPodLabelVal               = ""                                                    // blank=all
	K8SIncludeContainers         = false                                                 // not needed by dashboard
	K8SAPITimelimit              = "10s"                                                 // default timeout
	K8SDynamicCollectorFile      = "/ck8sa/dynamic-collectors.yaml"                      // assumes running in a pod, ConfigMap mounted volume
)

Variables

View Source
var (
	// BasePath is the "base" directory
	//
	// expected installation structure:
	// base        (e.g. /opt/circonus/k8s-agent)
	//   /etc      (e.g. /opt/circonus/k8s-agent/etc)
	//   /sbin     (e.g. /opt/circonus/k8s-agent/sbin)
	BasePath = ""

	// EtcPath returns the default etc directory within base directory
	EtcPath = ""

	// ConfigFile defines the default configuration file name
	ConfigFile = ""

	// K8SNodePoolSize defaults to number of available cpus for concurrent collection of metrics
	K8SNodePoolSize = runtime.NumCPU()
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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