Documentation
¶
Overview ¶
Package config generates Grafana Agent configuration based on Kubernetes resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConfig ¶ added in v0.25.0
func BuildConfig(d *gragent.Deployment, ty Type) (string, error)
BuildConfig builds an Agent configuration file.
func SanitizeLabelName ¶
func SanitizeLabelName(name string) string
SanitizeLabelName sanitizes a label name for Prometheus.
Types ¶
type AssetReference ¶
type AssetReference struct {
Namespace string
Reference prom.SecretOrConfigMap
}
AssetReference is a namespaced Secret or ConfigMap selector.
func AssetReferences ¶ added in v0.22.9
func AssetReferences(v interface{}) []AssetReference
AssetReferences returns all secret or configmap selectors used throughout v.
type FSImporter ¶
type FSImporter struct {
// contains filtered or unexported fields
}
FSImporter implements jsonnet.Importer for a fs.FS.
func NewFSImporter ¶
func NewFSImporter(f fs.FS, paths []string) *FSImporter
NewFSImporter creates a new jsonnet VM Importer that uses the given fs.
type Type ¶ added in v0.19.0
type Type int
Type is the type of Agent deployment that a config is being generated for.
const (
// MetricsType generates a configuration for metrics.
MetricsType Type = iota + 1
// LogsType generates a configuration for logs.
LogsType
// IntegrationsType generates a configuration for integrations.
IntegrationsType
)
Click to show internal directories.
Click to hide internal directories.