constants

package
v0.0.0-...-d596a3d Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MonitoringNamespace is the name of k8s namespace where all our monitoring stuff goes
	MonitoringNamespace = "monitoring"

	// ModeDashboards is the mode in which watcher polls for new dashboards
	ModeDashboards = "dashboards"

	// ModeAlerts is the mode in which watcher polls for new alerts and
	// monitoring configuration updates
	ModeAlerts = "alerts"

	// ModeAutoscale is the mode in which watcher updates the number of
	// Prometheus/Alertmanager replicas based on the number of nodes.
	ModeAutoscale = "autoscale"

	// GrafanaAPIAddress is the API address of Grafana running in the same pod
	GrafanaAPIAddress = "http://localhost:3000"

	// GrafanaApiAddrEnv is the name of environment variable with Grafana API Address
	GrafanaApiAddrEnv = "GRAFANA_API_ADDRESS"

	// GrafanaUsernameEnv is the name of environment variable with Grafana username
	GrafanaUsernameEnv = "GRAFANA_USERNAME"

	// GrafanaPasswordEnv is the name of environment variable with Grafana password
	GrafanaPasswordEnv = "GRAFANA_PASSWORD"

	// DashboardPrefix is the prefix of configmaps with dashboards data
	DashboardPrefix = "dashboard-"

	// PollInterval is interval between attempts to reach API
	PollInterval = 2 * time.Second

	// MonitoringLabel is the label for resources with configuration updates
	MonitoringLabel = "monitoring"
	// MonitoringUpdateAlert defines the update for an alert
	MonitoringUpdateAlert = "alert"
	// MonitoringUpdateAlertTarget defines the update for an alert target
	MonitoringUpdateAlertTarget = "alert-target"
	// MonitoringUpdateDashboard defines the update for a dashboard
	MonitoringUpdateDashboard = "dashboard"
	// MonitoringUpdateSMTP defines the update for kapacitor SMTP configuration
	MonitoringUpdateSMTP = "smtp"

	// ResourceSpecKey specifies the name of the key with raw resource specification
	ResourceSpecKey = "spec"

	// AlertFrom specifies default sender's email for alert email notifications
	AlertFrom = "noreply@gravitational.com"

	// SMTPSecret specifies the name of the SMTP configuration secret
	SMTPSecret = "smtp-configuration"

	// AlertTargetConfigMap specifies the name of the alert target configmap
	AlertTargetConfigMap = "alerting-addresses"

	// AppLabel specifies the name of the label to define the type of an application
	AppLabel = "app"
	// ComponentLabel specifies the name of the label to define a sub-component
	ComponentLabel = "component"

	// MonitoringApp defines the monitoring application label
	MonitoringApp = "monitoring"

	// NodeRoleLabel is the label with Kubernetes node role.
	NodeRoleLabel = "gravitational.io/k8s-role"
	// MasterLabel is the label that marks Kubernetes master nodes.
	MasterLabel = "master"

	// AlermanagerName is the name of the Alertmanager CRD object.
	AlertmanagerName = "monitoring-kube-prometheus-alertmanager"
	// PrometheusName is the name of the Prometheus CRD object.
	PrometheusName = "monitoring-kube-prometheus-prometheus"
)

Variables

View Source
var (
	// AllModes contains names of all modes the watcher can run in
	AllModes = []string{
		ModeAlerts,
		ModeDashboards,
		ModeAutoscale,
	}
)

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