Documentation ¶
Index ¶
- Variables
- type CRIStageSpec
- type Deployment
- type DockerStageSpec
- type DropStageSpec
- type GrafanaAgent
- func (in *GrafanaAgent) DeepCopy() *GrafanaAgent
- func (in *GrafanaAgent) DeepCopyInto(out *GrafanaAgent)
- func (in *GrafanaAgent) DeepCopyObject() runtime.Object
- func (a *GrafanaAgent) IntegrationsSelector() ObjectSelector
- func (a *GrafanaAgent) LogsInstanceSelector() ObjectSelector
- func (a *GrafanaAgent) MetricsInstanceSelector() ObjectSelector
- type GrafanaAgentList
- type GrafanaAgentSpec
- type Integration
- type IntegrationList
- type IntegrationSpec
- type IntegrationType
- type IntegrationsDeployment
- type IntegrationsSubsystemSpec
- type JSONStageSpec
- type LimitStageSpec
- type LogsBackoffConfigSpec
- type LogsClientSpec
- type LogsDeployment
- type LogsInstance
- type LogsInstanceList
- type LogsInstanceSpec
- type LogsSubsystemSpec
- type LogsTargetConfigSpec
- type MatchStageSpec
- type MetadataConfig
- type MetricsDeployment
- type MetricsInstance
- func (in *MetricsInstance) DeepCopy() *MetricsInstance
- func (in *MetricsInstance) DeepCopyInto(out *MetricsInstance)
- func (in *MetricsInstance) DeepCopyObject() runtime.Object
- func (p *MetricsInstance) PodMonitorSelector() ObjectSelector
- func (p *MetricsInstance) ProbeSelector() ObjectSelector
- func (p *MetricsInstance) ServiceMonitorSelector() ObjectSelector
- type MetricsInstanceList
- type MetricsInstanceSpec
- type MetricsStageSpec
- type MetricsSubsystemSpec
- type MultilineStageSpec
- type ObjectSelector
- type OutputStageSpec
- type PackStageSpec
- type PipelineStageSpec
- type PodLogs
- type PodLogsList
- type PodLogsSpec
- type QueueConfig
- type RegexStageSpec
- type RemoteWriteSpec
- type ReplaceStageSpec
- type SigV4Config
- type TemplateStageSpec
- type TenantStageSpec
- type TimestampStageSpec
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeGroupVersion is the group version used to register CRDs for this // package. SchemeGroupVersion = schema.GroupVersion{Group: "monitoring.grafana.com", Version: "v1alpha1"} // SchemeBuilder is used to add Go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme is required by client packages. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type CRIStageSpec ¶ added in v0.19.0
type CRIStageSpec struct{}
CRIStageSpec is a parsing stage that reads log lines using the standard CRI logging format. It needs no defined fields.
func (*CRIStageSpec) DeepCopy ¶ added in v0.19.0
func (in *CRIStageSpec) DeepCopy() *CRIStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CRIStageSpec.
func (*CRIStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *CRIStageSpec) DeepCopyInto(out *CRIStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Deployment ¶ added in v0.25.0
type Deployment struct { // Root resource in the deployment. Agent *GrafanaAgent // Metrics resources discovered by Agent. Metrics []MetricsDeployment // Logs resources discovered by Agent. Logs []LogsDeployment // Integrations resources discovered by Agent. Integrations []IntegrationsDeployment // The full list of Secrets referenced by resources in the Deployment. Secrets assets.SecretStore }
Deployment is a set of discovered resources relative to a GrafanaAgent. The tree of resources contained in a Deployment form the resource hierarchy used for reconciling a GrafanaAgent.
func (*Deployment) DeepCopy ¶ added in v0.25.0
func (in *Deployment) DeepCopy() *Deployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Deployment.
func (*Deployment) DeepCopyInto ¶ added in v0.25.0
func (in *Deployment) DeepCopyInto(out *Deployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DockerStageSpec ¶ added in v0.19.0
type DockerStageSpec struct{}
DockerStageSpec is a parsing stage that reads log lines using the standard Docker logging format. It needs no defined fields.
func (*DockerStageSpec) DeepCopy ¶ added in v0.19.0
func (in *DockerStageSpec) DeepCopy() *DockerStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerStageSpec.
func (*DockerStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *DockerStageSpec) DeepCopyInto(out *DockerStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DropStageSpec ¶ added in v0.19.0
type DropStageSpec struct { // Name from the extract data to parse. If empty, uses the log message. Source string `json:"source,omitempty"` // RE2 regular expression. // // If source is provided, the regex attempts // to match the source. // // If no source is provided, then the regex attempts // to attach the log line. // // If the provided regex matches the log line or a provided source, the // line is dropped. Expression string `json:"expression,omitempty"` // Value can only be specified when source is specified. If the value // provided is an exact match for the given source then the line will be // dropped. // // Mutually exclusive with expression. Value string `json:"value,omitempty"` // OlderThan will be parsed as a Go duration. If the log line's timestamp // is older than the current time minus the provided duration, it will be // dropped. OlderThan string `json:"olderThan,omitempty"` // LongerThan will drop a log line if it its content is longer than this // value (in bytes). Can be expressed as an integer (8192) or a number with a // suffix (8kb). LongerThan string `json:"longerThan,omitempty"` // Every time a log line is dropped, the metric logentry_dropped_lines_total // is incremented. A "reason" label is added, and can be customized by // providing a custom value here. Defaults to "drop_stage". DropCounterReason string `json:"dropCounterReason,omitempty"` }
DropStageSpec is a filtering stage that lets you drop certain logs.
func (*DropStageSpec) DeepCopy ¶ added in v0.19.0
func (in *DropStageSpec) DeepCopy() *DropStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DropStageSpec.
func (*DropStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *DropStageSpec) DeepCopyInto(out *DropStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GrafanaAgent ¶
type GrafanaAgent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the specification of the desired behavior for the Grafana Agent // cluster. Spec GrafanaAgentSpec `json:"spec,omitempty"` }
GrafanaAgent defines a Grafana Agent deployment.
func (*GrafanaAgent) DeepCopy ¶
func (in *GrafanaAgent) DeepCopy() *GrafanaAgent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaAgent.
func (*GrafanaAgent) DeepCopyInto ¶
func (in *GrafanaAgent) DeepCopyInto(out *GrafanaAgent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GrafanaAgent) DeepCopyObject ¶
func (in *GrafanaAgent) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GrafanaAgent) IntegrationsSelector ¶ added in v0.25.0
func (a *GrafanaAgent) IntegrationsSelector() ObjectSelector
IntegrationsSelector returns a selector to find Integrations.
func (*GrafanaAgent) LogsInstanceSelector ¶ added in v0.19.0
func (a *GrafanaAgent) LogsInstanceSelector() ObjectSelector
LogsInstanceSelector returns a selector to find LogsInstances.
func (*GrafanaAgent) MetricsInstanceSelector ¶ added in v0.19.0
func (a *GrafanaAgent) MetricsInstanceSelector() ObjectSelector
MetricsInstanceSelector returns a selector to find MetricsInstances.
type GrafanaAgentList ¶
type GrafanaAgentList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of GrafanaAgents. Items []*GrafanaAgent `json:"items"` }
GrafanaAgentList is a list of GrafanaAgents.
func (*GrafanaAgentList) DeepCopy ¶
func (in *GrafanaAgentList) DeepCopy() *GrafanaAgentList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaAgentList.
func (*GrafanaAgentList) DeepCopyInto ¶
func (in *GrafanaAgentList) DeepCopyInto(out *GrafanaAgentList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GrafanaAgentList) DeepCopyObject ¶
func (in *GrafanaAgentList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GrafanaAgentSpec ¶
type GrafanaAgentSpec struct { // LogLevel controls the log level of the generated pods. Defaults to "info" if not set. LogLevel string `json:"logLevel,omitempty"` // LogFormat controls the logging format of the generated pods. Defaults to "logfmt" if not set. LogFormat string `json:"logFormat,omitempty"` // APIServerConfig lets you specify a host and auth methods to access the // Kubernetes API server. If left empty, the Agent assumes that it is // running inside of the cluster and will discover API servers automatically // and use the pod's CA certificate and bearer token file at // /var/run/secrets/kubernetes.io/serviceaccount. APIServerConfig *prom_v1.APIServerConfig `json:"apiServer,omitempty"` // PodMetadata configures Labels and Annotations which are propagated to // created Grafana Agent pods. PodMetadata *prom_v1.EmbeddedObjectMetadata `json:"podMetadata,omitempty"` // Version of Grafana Agent to be deployed. Version string `json:"version,omitempty"` // Paused prevents actions except for deletion to be performed on the // underlying managed objects. Paused bool `json:"paused,omitempty"` // Image, when specified, overrides the image used to run Agent. Specify // the image along with a tag. You still need to set the version to ensure // Grafana Agent Operator knows which version of Grafana Agent is being // configured. Image *string `json:"image,omitempty"` // Version of Config Reloader to be deployed. ConfigReloaderVersion string `json:"configReloaderVersion,omitempty"` // Image, when specified, overrides the image used to run Config Reloader. Specify // the image along with a tag. You still need to set the version to ensure // Grafana Agent Operator knows which version of Grafana Agent is being // configured. ConfigReloaderImage *string `json:"configReloaderImage,omitempty"` // ImagePullSecrets holds an optional list of references to Secrets within // the same namespace used for pulling the Grafana Agent image from // registries. // More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Storage spec to specify how storage will be used. Storage *prom_v1.StorageSpec `json:"storage,omitempty"` // Volumes allows configuration of additional volumes on the output // StatefulSet definition. The volumes specified are appended to other // volumes that are generated as a result of StorageSpec objects. Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts lets you configure additional VolumeMounts on the output // StatefulSet definition. Specified VolumeMounts are appended to other // VolumeMounts generated as a result of StorageSpec objects // in the Grafana Agent container. VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Resources holds requests and limits for individual pods. Resources v1.ResourceRequirements `json:"resources,omitempty"` // NodeSelector defines which nodes pods should be scheduling on. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use for running Grafana Agent pods. ServiceAccountName string `json:"serviceAccountName,omitempty"` // Secrets is a list of secrets in the same namespace as the GrafanaAgent // object which will be mounted into each running Grafana Agent pod. // The secrets are mounted into /var/lib/grafana-agent/extra-secrets/<secret-name>. Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of config maps in the same namespace as the // GrafanaAgent object which will be mounted into each running Grafana Agent // pod. // The ConfigMaps are mounted into /var/lib/grafana-agent/extra-configmaps/<configmap-name>. ConfigMaps []string `json:"configMaps,omitempty"` // Affinity, if specified, controls pod scheduling constraints. Affinity *v1.Affinity `json:"affinity,omitempty"` // Tolerations, if specified, controls the pod's tolerations. Tolerations []v1.Toleration `json:"tolerations,omitempty"` // TopologySpreadConstraints, if specified, controls the pod's topology spread constraints. TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` // SecurityContext holds pod-level security attributes and common container // settings. When unspecified, defaults to the default PodSecurityContext. SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // Containers lets you inject additional containers or modify operator-generated // containers. This can be used to add an authentication // proxy to a Grafana Agent pod or to change the behavior of an // operator-generated container. Containers described here modify an // operator-generated container if they share the same name and if modifications are done // via a strategic merge patch. The current container names are: // `grafana-agent` and `config-reloader`. Overriding containers is entirely // outside the scope of what the Grafana Agent team supports and by doing // so, you accept that this behavior may break at any time without notice. Containers []v1.Container `json:"containers,omitempty"` // InitContainers let you add initContainers to the pod definition. These // can be used to, for example, fetch secrets for injection into the Grafana // Agent configuration from external sources. Errors during the execution // of an initContainer cause the pod to restart. // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other than secret fetching is // entirely outside the scope of what the Grafana Agent maintainers // support and by doing so, you accept that this behavior may break at any // time without notice. InitContainers []v1.Container `json:"initContainers,omitempty"` // PriorityClassName is the priority class assigned to pods. PriorityClassName string `json:"priorityClassName,omitempty"` // RuntimeClassName is the runtime class assigned to pods. RuntimeClassName *string `json:"runtimeClassName,omitempty"` // Port name used for the pods and governing service. This defaults to agent-metrics. PortName string `json:"portName,omitempty"` // Metrics controls the metrics subsystem of the Agent and settings // unique to metrics-specific pods that are deployed. Metrics MetricsSubsystemSpec `json:"metrics,omitempty"` // Logs controls the logging subsystem of the Agent and settings unique to // logging-specific pods that are deployed. Logs LogsSubsystemSpec `json:"logs,omitempty"` // Integrations controls the integration subsystem of the Agent and settings // unique to deployed integration-specific pods. Integrations IntegrationsSubsystemSpec `json:"integrations,omitempty"` // enableConfigReadAPI enables the read API for viewing the currently running // config port 8080 on the agent. // +kubebuilder:default=false EnableConfigReadAPI bool `json:"enableConfigReadAPI,omitempty"` // disableReporting disables reporting of enabled feature flags to Grafana. // +kubebuilder:default=false DisableReporting bool `json:"disableReporting,omitempty"` // disableSupportBundle disables the generation of support bundles. // +kubebuilder:default=false DisableSupportBundle bool `json:"disableSupportBundle,omitempty"` }
GrafanaAgentSpec is a specification of the desired behavior of the Grafana Agent cluster.
func (*GrafanaAgentSpec) DeepCopy ¶
func (in *GrafanaAgentSpec) DeepCopy() *GrafanaAgentSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrafanaAgentSpec.
func (*GrafanaAgentSpec) DeepCopyInto ¶
func (in *GrafanaAgentSpec) DeepCopyInto(out *GrafanaAgentSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Integration ¶ added in v0.25.0
type Integration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specifies the desired behavior of the Integration. Spec IntegrationSpec `json:"spec,omitempty"` }
Integration runs a single Grafana Agent integration. Integrations that generate telemetry must be configured to send that telemetry somewhere, such as autoscrape for exporter-based integrations.
Integrations have access to the LogsInstances and MetricsInstances in the same GrafanaAgent resource set, referenced by the <namespace>/<name> of the Instance resource.
For example, if there is a default/production MetricsInstance, you can configure a supported integration's autoscrape block with:
autoscrape: enable: true metrics_instance: default/production
There is currently no way for telemetry created by an Operator-managed integration to be collected from outside of the integration itself.
func (*Integration) DeepCopy ¶ added in v0.25.0
func (in *Integration) DeepCopy() *Integration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Integration.
func (*Integration) DeepCopyInto ¶ added in v0.25.0
func (in *Integration) DeepCopyInto(out *Integration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Integration) DeepCopyObject ¶ added in v0.25.0
func (in *Integration) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IntegrationList ¶ added in v0.25.0
type IntegrationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of Integration. Items []*Integration `json:"items"` }
IntegrationList is a list of Integration.
func (*IntegrationList) DeepCopy ¶ added in v0.25.0
func (in *IntegrationList) DeepCopy() *IntegrationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationList.
func (*IntegrationList) DeepCopyInto ¶ added in v0.25.0
func (in *IntegrationList) DeepCopyInto(out *IntegrationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*IntegrationList) DeepCopyObject ¶ added in v0.25.0
func (in *IntegrationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type IntegrationSpec ¶ added in v0.25.0
type IntegrationSpec struct { // Name of the integration to run (e.g., "node_exporter", "mysqld_exporter"). Name string `json:"name"` // Type informs Grafana Agent Operator about how to manage the integration being // configured. Type IntegrationType `json:"type"` // The configuration for the named integration. Note that Integrations are // deployed with the integrations-next feature flag, which has different // common settings: // // https://grafana.com/docs/agent/latest/configuration/integrations/integrations-next/ Config apiextv1.JSON `json:"config"` // An extra list of Volumes to be associated with the Grafana Agent pods // running this integration. Volume names are mutated to be unique across // all Integrations. Note that the specified volumes should be able to // tolerate existing on multiple pods at once when type is daemonset. // // Don't use volumes for loading Secrets or ConfigMaps from the same namespace // as the Integration; use the Secrets and ConfigMaps fields instead. Volumes []corev1.Volume `json:"volumes,omitempty"` // An extra list of VolumeMounts to be associated with the Grafana Agent pods // running this integration. VolumeMount names are mutated to be unique // across all used IntegrationSpecs. // // Mount paths should include the namespace/name of the Integration CR to // avoid potentially colliding with other resources. VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` // An extra list of keys from Secrets in the same namespace as the // Integration which will be mounted into the Grafana Agent pod running this // Integration. // // Secrets will be mounted at // /etc/grafana-agent/integrations/secrets/<secret_namespace>/<secret_name>/<key>. Secrets []corev1.SecretKeySelector `json:"secrets,omitempty"` // An extra list of keys from ConfigMaps in the same namespace as the // Integration which will be mounted into the Grafana Agent pod running this // Integration. // // ConfigMaps are mounted at // /etc/grafana-agent/integrations/configMaps/<configmap_namespace>/<configmap_name>/<key>. ConfigMaps []corev1.ConfigMapKeySelector `json:"configMaps,omitempty"` }
IntegrationSpec specifies the desired behavior of a metrics integration.
func (*IntegrationSpec) DeepCopy ¶ added in v0.25.0
func (in *IntegrationSpec) DeepCopy() *IntegrationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationSpec.
func (*IntegrationSpec) DeepCopyInto ¶ added in v0.25.0
func (in *IntegrationSpec) DeepCopyInto(out *IntegrationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IntegrationType ¶ added in v0.25.0
type IntegrationType struct { // When true, the configured integration should be run on every Node in the // cluster. This is required for Integrations that generate Node-specific // metrics like node_exporter, otherwise it must be false to avoid generating // duplicate metrics. AllNodes bool `json:"allNodes"` // Whether this integration can only be defined once for a Grafana Agent // process, such as statsd_exporter. It is invalid for a GrafanaAgent to // discover multiple unique Integrations with the same Integration name // (i.e., a single GrafanaAgent cannot deploy two statsd_exporters). Unique bool `json:"unique"` }
IntegrationType determines specific behaviors of a configured integration.
func (*IntegrationType) DeepCopy ¶ added in v0.25.0
func (in *IntegrationType) DeepCopy() *IntegrationType
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationType.
func (*IntegrationType) DeepCopyInto ¶ added in v0.25.0
func (in *IntegrationType) DeepCopyInto(out *IntegrationType)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IntegrationsDeployment ¶ added in v0.25.0
type IntegrationsDeployment struct {
Instance *Integration
}
IntegrationsDeployment is a set of discovered resources relative to an IntegrationsDeployment.
func (*IntegrationsDeployment) DeepCopy ¶ added in v0.25.0
func (in *IntegrationsDeployment) DeepCopy() *IntegrationsDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationsDeployment.
func (*IntegrationsDeployment) DeepCopyInto ¶ added in v0.25.0
func (in *IntegrationsDeployment) DeepCopyInto(out *IntegrationsDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type IntegrationsSubsystemSpec ¶ added in v0.25.0
type IntegrationsSubsystemSpec struct { // Label selector to find Integration resources to run. When nil, no // integration resources will be defined. Selector *metav1.LabelSelector `json:"selector,omitempty"` // Label selector for namespaces to search when discovering integration // resources. If nil, integration resources are only discovered in the // namespace of the GrafanaAgent resource. // // Set to `{}` to search all namespaces. NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` }
IntegrationsSubsystemSpec defines global settings to apply across the integrations subsystem.
func (*IntegrationsSubsystemSpec) DeepCopy ¶ added in v0.25.0
func (in *IntegrationsSubsystemSpec) DeepCopy() *IntegrationsSubsystemSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IntegrationsSubsystemSpec.
func (*IntegrationsSubsystemSpec) DeepCopyInto ¶ added in v0.25.0
func (in *IntegrationsSubsystemSpec) DeepCopyInto(out *IntegrationsSubsystemSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JSONStageSpec ¶ added in v0.19.0
type JSONStageSpec struct { // Name from the extracted data to parse as JSON. If empty, uses entire log // message. Source string `json:"source,omitempty"` // Set of the key/value pairs of JMESPath expressions. The key will be the // key in the extracted data while the expression will be the value, // evaluated as a JMESPath from the source data. // // Literal JMESPath expressions can be used by wrapping a key in double // quotes, which then must be wrapped again in single quotes in YAML // so they get passed to the JMESPath parser. Expressions map[string]string `json:"expressions,omitempty"` }
JSONStageSpec is a parsing stage that reads the log line as JSON and accepts JMESPath expressions to extract data.
func (*JSONStageSpec) DeepCopy ¶ added in v0.19.0
func (in *JSONStageSpec) DeepCopy() *JSONStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONStageSpec.
func (*JSONStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *JSONStageSpec) DeepCopyInto(out *JSONStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LimitStageSpec ¶ added in v0.31.0
type LimitStageSpec struct { // The rate limit in lines per second that Promtail will push to Loki. Rate int `json:"rate,omitempty"` // The cap in the quantity of burst lines that Promtail will push to Loki. Burst int `json:"burst,omitempty"` // When drop is true, log lines that exceed the current rate limit are discarded. // When drop is false, log lines that exceed the current rate limit wait // to enter the back pressure mode. // // Defaults to false. Drop bool `json:"drop,omitempty"` }
The limit stage is a rate-limiting stage that throttles logs based on several options.
func (*LimitStageSpec) DeepCopy ¶ added in v0.31.0
func (in *LimitStageSpec) DeepCopy() *LimitStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitStageSpec.
func (*LimitStageSpec) DeepCopyInto ¶ added in v0.31.0
func (in *LimitStageSpec) DeepCopyInto(out *LimitStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogsBackoffConfigSpec ¶ added in v0.19.0
type LogsBackoffConfigSpec struct { // Initial backoff time between retries. Time between retries is // increased exponentially. MinPeriod string `json:"minPeriod,omitempty"` // Maximum backoff time between retries. MaxPeriod string `json:"maxPeriod,omitempty"` // Maximum number of retries to perform before giving up a request. MaxRetries int `json:"maxRetries,omitempty"` }
LogsBackoffConfigSpec configures timing for retrying failed requests.
func (*LogsBackoffConfigSpec) DeepCopy ¶ added in v0.19.0
func (in *LogsBackoffConfigSpec) DeepCopy() *LogsBackoffConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsBackoffConfigSpec.
func (*LogsBackoffConfigSpec) DeepCopyInto ¶ added in v0.19.0
func (in *LogsBackoffConfigSpec) DeepCopyInto(out *LogsBackoffConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogsClientSpec ¶ added in v0.19.0
type LogsClientSpec struct { // URL is the URL where Loki is listening. Must be a full HTTP URL, including // protocol. Required. // Example: https://logs-prod-us-central1.grafana.net/loki/api/v1/push. URL string `json:"url"` // Tenant ID used by default to push logs to Loki. If omitted assumes remote // Loki is running in single-tenant mode or an authentication layer is used // to inject an X-Scope-OrgID header. TenantID string `json:"tenantId,omitempty"` // Maximum amount of time to wait before sending a batch, even if that batch // isn't full. BatchWait string `json:"batchWait,omitempty"` // Maximum batch size (in bytes) of logs to accumulate before sending the // batch to Loki. BatchSize int `json:"batchSize,omitempty"` // BasicAuth for the Loki server. BasicAuth *prom_v1.BasicAuth `json:"basicAuth,omitempty"` // Oauth2 for URL OAuth2 *prom_v1.OAuth2 `json:"oauth2,omitempty"` // BearerToken used for remote_write. BearerToken string `json:"bearerToken,omitempty"` // BearerTokenFile used to read bearer token. BearerTokenFile string `json:"bearerTokenFile,omitempty"` // ProxyURL to proxy requests through. Optional. ProxyURL string `json:"proxyUrl,omitempty"` // TLSConfig to use for the client. Only used when the protocol of the URL // is https. TLSConfig *prom_v1.TLSConfig `json:"tlsConfig,omitempty"` // Configures how to retry requests to Loki when a request fails. // Defaults to a minPeriod of 500ms, maxPeriod of 5m, and maxRetries of 10. BackoffConfig *LogsBackoffConfigSpec `json:"backoffConfig,omitempty"` // ExternalLabels are labels to add to any time series when sending data to // Loki. ExternalLabels map[string]string `json:"externalLabels,omitempty"` // Maximum time to wait for a server to respond to a request. Timeout string `json:"timeout,omitempty"` }
LogsClientSpec defines the client integration for logs, indicating which Loki server to send logs to.
func (*LogsClientSpec) DeepCopy ¶ added in v0.19.0
func (in *LogsClientSpec) DeepCopy() *LogsClientSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsClientSpec.
func (*LogsClientSpec) DeepCopyInto ¶ added in v0.19.0
func (in *LogsClientSpec) DeepCopyInto(out *LogsClientSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogsDeployment ¶ added in v0.25.0
type LogsDeployment struct { Instance *LogsInstance PodLogs []*PodLogs }
LogsDeployment is a set of discovered resources relative to a LogsInstance.
func (*LogsDeployment) DeepCopy ¶ added in v0.25.0
func (in *LogsDeployment) DeepCopy() *LogsDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsDeployment.
func (*LogsDeployment) DeepCopyInto ¶ added in v0.25.0
func (in *LogsDeployment) DeepCopyInto(out *LogsDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogsInstance ¶ added in v0.19.0
type LogsInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the specification of the desired behavior for the logs // instance. Spec LogsInstanceSpec `json:"spec,omitempty"` }
LogsInstance controls an individual logs instance within a Grafana Agent deployment.
func (*LogsInstance) DeepCopy ¶ added in v0.19.0
func (in *LogsInstance) DeepCopy() *LogsInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsInstance.
func (*LogsInstance) DeepCopyInto ¶ added in v0.19.0
func (in *LogsInstance) DeepCopyInto(out *LogsInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LogsInstance) DeepCopyObject ¶ added in v0.19.0
func (in *LogsInstance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*LogsInstance) PodLogsSelector ¶ added in v0.22.9
func (i *LogsInstance) PodLogsSelector() ObjectSelector
PodLogsSelector returns the selector to discover PodLogs.
type LogsInstanceList ¶ added in v0.19.0
type LogsInstanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of LogsInstance. Items []*LogsInstance `json:"items"` }
LogsInstanceList is a list of LogsInstance.
func (*LogsInstanceList) DeepCopy ¶ added in v0.19.0
func (in *LogsInstanceList) DeepCopy() *LogsInstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsInstanceList.
func (*LogsInstanceList) DeepCopyInto ¶ added in v0.19.0
func (in *LogsInstanceList) DeepCopyInto(out *LogsInstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*LogsInstanceList) DeepCopyObject ¶ added in v0.19.0
func (in *LogsInstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type LogsInstanceSpec ¶ added in v0.19.0
type LogsInstanceSpec struct { // Clients controls where logs are written to for this instance. Clients []LogsClientSpec `json:"clients,omitempty"` // Determines which PodLogs should be selected for including in this // instance. PodLogsSelector *metav1.LabelSelector `json:"podLogsSelector,omitempty"` // Set of labels to determine which namespaces should be watched // for PodLogs. If not provided, checks only namespace of the // instance. PodLogsNamespaceSelector *metav1.LabelSelector `json:"podLogsNamespaceSelector,omitempty"` // AdditionalScrapeConfigs allows specifying a key of a Secret containing // additional Grafana Agent logging scrape configurations. Scrape // configurations specified are appended to the configurations generated by // the Grafana Agent Operator. // // Job configurations specified must have the form as specified in the // official Promtail documentation: // // https://grafana.com/docs/loki/latest/clients/promtail/configuration/#scrape_configs // // As scrape configs are appended, the user is responsible to make sure it is // valid. Note that using this feature may expose the possibility to break // upgrades of Grafana Agent. It is advised to review both Grafana Agent and // Promtail release notes to ensure that no incompatible scrape configs are // going to break Grafana Agent after the upgrade. AdditionalScrapeConfigs *v1.SecretKeySelector `json:"additionalScrapeConfigs,omitempty"` // Configures how tailed targets are watched. TargetConfig *LogsTargetConfigSpec `json:"targetConfig,omitempty"` }
LogsInstanceSpec controls how an individual instance will be used to discover LogMonitors.
func (*LogsInstanceSpec) DeepCopy ¶ added in v0.19.0
func (in *LogsInstanceSpec) DeepCopy() *LogsInstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsInstanceSpec.
func (*LogsInstanceSpec) DeepCopyInto ¶ added in v0.19.0
func (in *LogsInstanceSpec) DeepCopyInto(out *LogsInstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogsSubsystemSpec ¶ added in v0.19.0
type LogsSubsystemSpec struct { // A global set of clients to use when a discovered LogsInstance does not // have any clients defined. Clients []LogsClientSpec `json:"clients,omitempty"` // LogsExternalLabelName is the name of the external label used to // denote Grafana Agent cluster. Defaults to "cluster." External label will // _not_ be added when value is set to the empty string. LogsExternalLabelName *string `json:"logsExternalLabelName,omitempty"` // InstanceSelector determines which LogInstances should be selected // for running. Each instance runs its own set of Prometheus components, // including service discovery, scraping, and remote_write. InstanceSelector *metav1.LabelSelector `json:"instanceSelector,omitempty"` // InstanceNamespaceSelector are the set of labels to determine which // namespaces to watch for LogInstances. If not provided, only checks own // namespace. InstanceNamespaceSelector *metav1.LabelSelector `json:"instanceNamespaceSelector,omitempty"` // IgnoreNamespaceSelectors, if true, will ignore NamespaceSelector settings // from the PodLogs configs, and they will only discover endpoints within // their current namespace. IgnoreNamespaceSelectors bool `json:"ignoreNamespaceSelectors,omitempty"` // EnforcedNamespaceLabel enforces adding a namespace label of origin for // each metric that is user-created. The label value will always be the // namespace of the object that is being created. EnforcedNamespaceLabel string `json:"enforcedNamespaceLabel,omitempty"` }
LogsSubsystemSpec defines global settings to apply across the logging subsystem.
func (*LogsSubsystemSpec) DeepCopy ¶ added in v0.19.0
func (in *LogsSubsystemSpec) DeepCopy() *LogsSubsystemSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsSubsystemSpec.
func (*LogsSubsystemSpec) DeepCopyInto ¶ added in v0.19.0
func (in *LogsSubsystemSpec) DeepCopyInto(out *LogsSubsystemSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LogsTargetConfigSpec ¶ added in v0.19.0
type LogsTargetConfigSpec struct { // Period to resync directories being watched and files being tailed to discover // new ones or stop watching removed ones. SyncPeriod string `json:"syncPeriod,omitempty"` }
LogsTargetConfigSpec configures how tailed targets are watched.
func (*LogsTargetConfigSpec) DeepCopy ¶ added in v0.19.0
func (in *LogsTargetConfigSpec) DeepCopy() *LogsTargetConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogsTargetConfigSpec.
func (*LogsTargetConfigSpec) DeepCopyInto ¶ added in v0.19.0
func (in *LogsTargetConfigSpec) DeepCopyInto(out *LogsTargetConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MatchStageSpec ¶ added in v0.19.0
type MatchStageSpec struct { // LogQL stream selector and filter expressions. Required. Selector string `json:"selector"` // Names the pipeline. When defined, creates an additional label // in the pipeline_duration_seconds histogram, where the value is // concatenated with job_name using an underscore. PipelineName string `json:"pipelineName,omitempty"` // Determines what action is taken when the selector matches the log line. // Can be keep or drop. Defaults to keep. When set to drop, entries are // dropped and no later metrics are recorded. // Stages must be empty when dropping metrics. Action string `json:"action,omitempty"` // Every time a log line is dropped, the metric logentry_dropped_lines_total // is incremented. A "reason" label is added, and can be customized by // providing a custom value here. Defaults to "match_stage." DropCounterReason string `json:"dropCounterReason,omitempty"` // Nested set of pipeline stages to execute when action is keep and the log // line matches selector. // // An example value for stages may be: // // stages: | // - json: {} // - labelAllow: [foo, bar] // // Note that stages is a string because SIG API Machinery does not // support recursive types, and so it cannot be validated for correctness. Be // careful not to mistype anything. Stages string `json:"stages,omitempty"` }
MatchStageSpec is a filtering stage that conditionally applies a set of stages or drop entries when a log entry matches a configurable LogQL stream selector and filter expressions.
func (*MatchStageSpec) DeepCopy ¶ added in v0.19.0
func (in *MatchStageSpec) DeepCopy() *MatchStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchStageSpec.
func (*MatchStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *MatchStageSpec) DeepCopyInto(out *MatchStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetadataConfig ¶
type MetadataConfig struct { // Send enables metric metadata to be sent to remote storage. Send bool `json:"send,omitempty"` // SendInterval controls how frequently metric metadata is sent to remote storage. SendInterval string `json:"sendInterval,omitempty"` }
MetadataConfig configures the sending of series metadata to remote storage.
func (*MetadataConfig) DeepCopy ¶
func (in *MetadataConfig) DeepCopy() *MetadataConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataConfig.
func (*MetadataConfig) DeepCopyInto ¶
func (in *MetadataConfig) DeepCopyInto(out *MetadataConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsDeployment ¶ added in v0.25.0
type MetricsDeployment struct { Instance *MetricsInstance ServiceMonitors []*promv1.ServiceMonitor PodMonitors []*promv1.PodMonitor Probes []*promv1.Probe }
MetricsDeployment is a set of discovered resources relative to a MetricsInstance.
func (*MetricsDeployment) DeepCopy ¶ added in v0.25.0
func (in *MetricsDeployment) DeepCopy() *MetricsDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsDeployment.
func (*MetricsDeployment) DeepCopyInto ¶ added in v0.25.0
func (in *MetricsDeployment) DeepCopyInto(out *MetricsDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsInstance ¶ added in v0.19.0
type MetricsInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the specification of the desired behavior for the Metrics // instance. Spec MetricsInstanceSpec `json:"spec,omitempty"` }
MetricsInstance controls an individual Metrics instance within a Grafana Agent deployment.
func (*MetricsInstance) DeepCopy ¶ added in v0.19.0
func (in *MetricsInstance) DeepCopy() *MetricsInstance
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsInstance.
func (*MetricsInstance) DeepCopyInto ¶ added in v0.19.0
func (in *MetricsInstance) DeepCopyInto(out *MetricsInstance)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricsInstance) DeepCopyObject ¶ added in v0.19.0
func (in *MetricsInstance) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*MetricsInstance) PodMonitorSelector ¶ added in v0.19.0
func (p *MetricsInstance) PodMonitorSelector() ObjectSelector
PodMonitorSelector returns a selector to find PodMonitors.
func (*MetricsInstance) ProbeSelector ¶ added in v0.19.0
func (p *MetricsInstance) ProbeSelector() ObjectSelector
ProbeSelector returns a selector to find Probes.
func (*MetricsInstance) ServiceMonitorSelector ¶ added in v0.19.0
func (p *MetricsInstance) ServiceMonitorSelector() ObjectSelector
ServiceMonitorSelector returns a selector to find ServiceMonitors.
type MetricsInstanceList ¶ added in v0.19.0
type MetricsInstanceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of MetricsInstance. Items []*MetricsInstance `json:"items"` }
MetricsInstanceList is a list of MetricsInstance.
func (*MetricsInstanceList) DeepCopy ¶ added in v0.19.0
func (in *MetricsInstanceList) DeepCopy() *MetricsInstanceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsInstanceList.
func (*MetricsInstanceList) DeepCopyInto ¶ added in v0.19.0
func (in *MetricsInstanceList) DeepCopyInto(out *MetricsInstanceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MetricsInstanceList) DeepCopyObject ¶ added in v0.19.0
func (in *MetricsInstanceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MetricsInstanceSpec ¶ added in v0.19.0
type MetricsInstanceSpec struct { // WALTruncateFrequency specifies how frequently to run the WAL truncation process. // Higher values cause the WAL to increase and for old series to // stay in the WAL longer, but reduces the chance of data loss when // remote_write fails for longer than the given frequency. WALTruncateFrequency string `json:"walTruncateFrequency,omitempty"` // MinWALTime is the minimum amount of time that series and samples can exist in // the WAL before being considered for deletion. MinWALTime string `json:"minWALTime,omitempty"` // MaxWALTime is the maximum amount of time that series and samples can exist in // the WAL before being forcibly deleted. MaxWALTime string `json:"maxWALTime,omitempty"` // RemoteFlushDeadline is the deadline for flushing data when an instance // shuts down. RemoteFlushDeadline string `json:"remoteFlushDeadline,omitempty"` // WriteStaleOnShutdown writes staleness markers on shutdown for all series. WriteStaleOnShutdown *bool `json:"writeStaleOnShutdown,omitempty"` // ServiceMonitorSelector determines which ServiceMonitors to select // for target discovery. ServiceMonitorSelector *metav1.LabelSelector `json:"serviceMonitorSelector,omitempty"` // ServiceMonitorNamespaceSelector is the set of labels that determine which // namespaces to watch for ServiceMonitor discovery. If nil, it only checks its own namespace. ServiceMonitorNamespaceSelector *metav1.LabelSelector `json:"serviceMonitorNamespaceSelector,omitempty"` // PodMonitorSelector determines which PodMonitors to selected for target // discovery. Experimental. PodMonitorSelector *metav1.LabelSelector `json:"podMonitorSelector,omitempty"` // PodMonitorNamespaceSelector are the set of labels to determine which // namespaces to watch for PodMonitor discovery. If nil, it only checks its own // namespace. PodMonitorNamespaceSelector *metav1.LabelSelector `json:"podMonitorNamespaceSelector,omitempty"` // ProbeSelector determines which Probes to select for target // discovery. ProbeSelector *metav1.LabelSelector `json:"probeSelector,omitempty"` // ProbeNamespaceSelector is the set of labels that determines which namespaces // to watch for Probe discovery. If nil, it only checks own namespace. ProbeNamespaceSelector *metav1.LabelSelector `json:"probeNamespaceSelector,omitempty"` // RemoteWrite controls remote_write settings for this instance. RemoteWrite []RemoteWriteSpec `json:"remoteWrite,omitempty"` // AdditionalScrapeConfigs lets you specify a key of a Secret containing // additional Grafana Agent Prometheus scrape configurations. The specified scrape // configurations are appended to the configurations generated by // Grafana Agent Operator. Specified job configurations must have the // form specified in the official Prometheus documentation: // https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. // As scrape configs are appended, you must make sure the configuration is still // valid. Note that it's possible that this feature will break future // upgrades of Grafana Agent. Review both Grafana Agent and // Prometheus release notes to ensure that no incompatible scrape configs will // break Grafana Agent after the upgrade. AdditionalScrapeConfigs *v1.SecretKeySelector `json:"additionalScrapeConfigs,omitempty"` }
MetricsInstanceSpec controls how an individual instance is used to discover PodMonitors.
func (*MetricsInstanceSpec) DeepCopy ¶ added in v0.19.0
func (in *MetricsInstanceSpec) DeepCopy() *MetricsInstanceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsInstanceSpec.
func (*MetricsInstanceSpec) DeepCopyInto ¶ added in v0.19.0
func (in *MetricsInstanceSpec) DeepCopyInto(out *MetricsInstanceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsStageSpec ¶ added in v0.19.0
type MetricsStageSpec struct { // The metric type to create. Must be one of counter, gauge, histogram. // Required. Type string `json:"type"` // Sets the description for the created metric. Description string `json:"description,omitempty"` // Sets the custom prefix name for the metric. Defaults to "promtail_custom_". Prefix string `json:"prefix,omitempty"` // Key from the extracted data map to use for the metric. Defaults to the // metrics name if not present. Source string `json:"source,omitempty"` // Label values on metrics are dynamic which can cause exported metrics // to go stale. To prevent unbounded cardinality, any metrics not updated // within MaxIdleDuration are removed. // // Must be greater or equal to 1s. Defaults to 5m. MaxIdleDuration string `json:"maxIdleDuration,omitempty"` // If true, all log lines are counted without attempting to match the // source to the extracted map. Mutually exclusive with value. // // Only valid for type: counter. MatchAll *bool `json:"matchAll,omitempty"` // If true all log line bytes are counted. Can only be set with // matchAll: true and action: add. // // Only valid for type: counter. CountEntryBytes *bool `json:"countEntryBytes,omitempty"` // Filters down source data and only changes the metric if the targeted // value matches the provided string exactly. If not present, all // data matches. Value string `json:"value,omitempty"` // The action to take against the metric. Required. // // Must be either "inc" or "add" for type: counter or type: histogram. // When type: gauge, must be one of "set", "inc", "dec", "add", or "sub". // // "add", "set", or "sub" requires the extracted value to be convertible // to a positive float. Action string `json:"action"` // Buckets to create. Bucket values must be convertible to float64s. Extremely // large or small numbers are subject to some loss of precision. // Only valid for type: histogram. Buckets []string `json:"buckets,omitempty"` }
MetricsStageSpec is an action stage that allows for defining and updating metrics based on data from the extracted map. Created metrics are not pushed to Loki or Prometheus and are instead exposed via the /metrics endpoint of the Grafana Agent pod. The Grafana Agent Operator should be configured with a MetricsInstance that discovers the logging DaemonSet to collect metrics created by this stage.
func (*MetricsStageSpec) DeepCopy ¶ added in v0.19.0
func (in *MetricsStageSpec) DeepCopy() *MetricsStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsStageSpec.
func (*MetricsStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *MetricsStageSpec) DeepCopyInto(out *MetricsStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MetricsSubsystemSpec ¶ added in v0.19.0
type MetricsSubsystemSpec struct { // RemoteWrite controls default remote_write settings for all instances. If // an instance does not provide its own RemoteWrite settings, these will be // used instead. RemoteWrite []RemoteWriteSpec `json:"remoteWrite,omitempty"` // Replicas of each shard to deploy for metrics pods. Number of replicas // multiplied by the number of shards is the total number of pods created. Replicas *int32 `json:"replicas,omitempty"` // Shards to distribute targets onto. Number of replicas multiplied by the // number of shards is the total number of pods created. Note that scaling // down shards does not reshard data onto remaining instances; it must be // manually moved. Increasing shards does not reshard data either, but it will // continue to be available from the same instances. Sharding is performed on // the content of the __address__ target meta-label. Shards *int32 `json:"shards,omitempty"` // ReplicaExternalLabelName is the name of the metrics external label used // to denote the replica name. Defaults to __replica__. The external label is _not_ // added when the value is set to the empty string. ReplicaExternalLabelName *string `json:"replicaExternalLabelName,omitempty"` // MetricsExternalLabelName is the name of the external label used to // denote Grafana Agent cluster. Defaults to "cluster." The external label is // _not_ added when the value is set to the empty string. MetricsExternalLabelName *string `json:"metricsExternalLabelName,omitempty"` // ScrapeInterval is the time between consecutive scrapes. ScrapeInterval string `json:"scrapeInterval,omitempty"` // ScrapeTimeout is the time to wait for a target to respond before marking a // scrape as failed. ScrapeTimeout string `json:"scrapeTimeout,omitempty"` // ExternalLabels are labels to add to any time series when sending data over // remote_write. ExternalLabels map[string]string `json:"externalLabels,omitempty"` // ArbitraryFSAccessThroughSMs configures whether configuration based on a // ServiceMonitor can access arbitrary files on the file system of the // Grafana Agent container, e.g., bearer token files. ArbitraryFSAccessThroughSMs prom_v1.ArbitraryFSAccessThroughSMsConfig `json:"arbitraryFSAccessThroughSMs,omitempty"` // OverrideHonorLabels, if true, overrides all configured honor_labels read // from ServiceMonitor or PodMonitor and sets them to false. OverrideHonorLabels bool `json:"overrideHonorLabels,omitempty"` // OverrideHonorTimestamps allows global enforcement for honoring timestamps in all scrape configs. OverrideHonorTimestamps bool `json:"overrideHonorTimestamps,omitempty"` // IgnoreNamespaceSelectors, if true, ignores NamespaceSelector settings // from the PodMonitor and ServiceMonitor configs, so that they only // discover endpoints within their current namespace. IgnoreNamespaceSelectors bool `json:"ignoreNamespaceSelectors,omitempty"` // EnforcedNamespaceLabel enforces adding a namespace label of origin for // each metric that is user-created. The label value is always the // namespace of the object that is being created. EnforcedNamespaceLabel string `json:"enforcedNamespaceLabel,omitempty"` // EnforcedSampleLimit defines a global limit on the number of scraped samples // that are accepted. This overrides any SampleLimit set per // ServiceMonitor and/or PodMonitor. It is meant to be used by admins to // enforce the SampleLimit to keep the overall number of samples and series // under the desired limit. Note that if a SampleLimit from a ServiceMonitor // or PodMonitor is lower, that value is used instead. EnforcedSampleLimit *uint64 `json:"enforcedSampleLimit,omitempty"` // EnforcedTargetLimit defines a global limit on the number of scraped // targets. This overrides any TargetLimit set per ServiceMonitor and/or // PodMonitor. It is meant to be used by admins to enforce the TargetLimit to // keep the overall number of targets under the desired limit. Note that if a // TargetLimit from a ServiceMonitor or PodMonitor is higher, that value is used instead. EnforcedTargetLimit *uint64 `json:"enforcedTargetLimit,omitempty"` // InstanceSelector determines which MetricsInstances should be selected // for running. Each instance runs its own set of Metrics components, // including service discovery, scraping, and remote_write. InstanceSelector *metav1.LabelSelector `json:"instanceSelector,omitempty"` // InstanceNamespaceSelector is the set of labels that determines which // namespaces to watch for MetricsInstances. If not provided, it only checks its own namespace. InstanceNamespaceSelector *metav1.LabelSelector `json:"instanceNamespaceSelector,omitempty"` }
MetricsSubsystemSpec defines global settings to apply across the Metrics subsystem.
func (*MetricsSubsystemSpec) DeepCopy ¶ added in v0.19.0
func (in *MetricsSubsystemSpec) DeepCopy() *MetricsSubsystemSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsSubsystemSpec.
func (*MetricsSubsystemSpec) DeepCopyInto ¶ added in v0.19.0
func (in *MetricsSubsystemSpec) DeepCopyInto(out *MetricsSubsystemSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MultilineStageSpec ¶ added in v0.19.0
type MultilineStageSpec struct { // RE2 regular expression. Creates a new multiline block when matched. // Required. FirstLine string `json:"firstLine"` // Maximum time to wait before passing on the multiline block to the next // stage if no new lines are received. Defaults to 3s. MaxWaitTime string `json:"maxWaitTime,omitempty"` // Maximum number of lines a block can have. A new block is started if // the number of lines surpasses this value. Defaults to 128. MaxLines int `json:"maxLines,omitempty"` }
MultilineStageSpec merges multiple lines into a multiline block before passing it on to the next stage in the pipeline.
func (*MultilineStageSpec) DeepCopy ¶ added in v0.19.0
func (in *MultilineStageSpec) DeepCopy() *MultilineStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MultilineStageSpec.
func (*MultilineStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *MultilineStageSpec) DeepCopyInto(out *MultilineStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectSelector ¶ added in v0.19.0
type ObjectSelector struct { ObjectType client.Object ParentNamespace string NamespaceSelector *metav1.LabelSelector Labels *metav1.LabelSelector }
ObjectSelector is a set of selectors to use for finding an object in the resource hierarchy. When NamespaceSelector is nil, search for objects directly in the ParentNamespace.
type OutputStageSpec ¶ added in v0.19.0
type OutputStageSpec struct { // Name from extract data to use for the log entry. Required. Source string `json:"source"` }
OutputStageSpec is an action stage that takes data from the extracted map and changes the log line that will be sent to Loki.
func (*OutputStageSpec) DeepCopy ¶ added in v0.19.0
func (in *OutputStageSpec) DeepCopy() *OutputStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutputStageSpec.
func (*OutputStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *OutputStageSpec) DeepCopyInto(out *OutputStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PackStageSpec ¶ added in v0.19.0
type PackStageSpec struct { // Name from extracted data or line labels. Required. // Labels provided here are automatically removed from output labels. Labels []string `json:"labels"` // If the resulting log line should use any existing timestamp or use time.Now() // when the line was created. Set to true when combining several log streams from // different containers to avoid out of order errors. IngestTimestamp bool `json:"ingestTimestamp,omitempty"` }
PackStageSpec is a transform stage that lets you embed extracted values and labels into the log line by packing the log line and labels inside of a JSON object.
func (*PackStageSpec) DeepCopy ¶ added in v0.19.0
func (in *PackStageSpec) DeepCopy() *PackStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PackStageSpec.
func (*PackStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *PackStageSpec) DeepCopyInto(out *PackStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PipelineStageSpec ¶ added in v0.19.0
type PipelineStageSpec struct { // CRI is a parsing stage that reads log lines using the standard // CRI logging format. Supply cri: {} to enable. CRI *CRIStageSpec `json:"cri,omitempty"` // Docker is a parsing stage that reads log lines using the standard // Docker logging format. Supply docker: {} to enable. Docker *DockerStageSpec `json:"docker,omitempty"` // Drop is a filtering stage that lets you drop certain logs. Drop *DropStageSpec `json:"drop,omitempty"` // JSON is a parsing stage that reads the log line as JSON and accepts // JMESPath expressions to extract data. // // Information on JMESPath: http://jmespath.org/ JSON *JSONStageSpec `json:"json,omitempty"` // LabelAllow is an action stage that only allows the provided labels to be // included in the label set that is sent to Loki with the log entry. LabelAllow []string `json:"labelAllow,omitempty"` // LabelDrop is an action stage that drops labels from the label set that // is sent to Loki with the log entry. LabelDrop []string `json:"labelDrop,omitempty"` // Labels is an action stage that takes data from the extracted map and // modifies the label set that is sent to Loki with the log entry. // // The key is REQUIRED and represents the name for the label that will // be created. Value is optional and will be the name from extracted data // to use for the value of the label. If the value is not provided, it // defaults to match the key. Labels map[string]string `json:"labels,omitempty"` // Limit is a rate-limiting stage that throttles logs based on // several options. Limit *LimitStageSpec `json:"limit,omitempty"` // Match is a filtering stage that conditionally applies a set of stages // or drop entries when a log entry matches a configurable LogQL stream // selector and filter expressions. Match *MatchStageSpec `json:"match,omitempty"` // Metrics is an action stage that supports defining and updating metrics // based on data from the extracted map. Created metrics are not pushed to // Loki or Prometheus and are instead exposed via the /metrics endpoint of // the Grafana Agent pod. The Grafana Agent Operator should be configured // with a MetricsInstance that discovers the logging DaemonSet to collect // metrics created by this stage. Metrics map[string]MetricsStageSpec `json:"metrics,omitempty"` // Multiline stage merges multiple lines into a multiline block before // passing it on to the next stage in the pipeline. Multiline *MultilineStageSpec `json:"multiline,omitempty"` // Output stage is an action stage that takes data from the extracted map and // changes the log line that will be sent to Loki. Output *OutputStageSpec `json:"output,omitempty"` // Pack is a transform stage that lets you embed extracted values and labels // into the log line by packing the log line and labels inside of a JSON // object. Pack *PackStageSpec `json:"pack,omitempty"` // Regex is a parsing stage that parses a log line using a regular // expression. Named capture groups in the regex allows for adding data into // the extracted map. Regex *RegexStageSpec `json:"regex,omitempty"` // Replace is a parsing stage that parses a log line using a regular // expression and replaces the log line. Named capture groups in the regex // allows for adding data into the extracted map. Replace *ReplaceStageSpec `json:"replace,omitempty"` // Template is a transform stage that manipulates the values in the extracted // map using Go's template syntax. Template *TemplateStageSpec `json:"template,omitempty"` // Tenant is an action stage that sets the tenant ID for the log entry picking it from a // field in the extracted data map. If the field is missing, the default // LogsClientSpec.tenantId will be used. Tenant *TenantStageSpec `json:"tenant,omitempty"` // Timestamp is an action stage that can change the timestamp of a log line // before it is sent to Loki. If not present, the timestamp of a log line // defaults to the time when the log line was read. Timestamp *TimestampStageSpec `json:"timestamp,omitempty"` }
PipelineStageSpec defines an individual pipeline stage. Each stage type is mutually exclusive and no more than one may be set per stage.
More information on pipelines can be found in the Promtail documentation: https://grafana.com/docs/loki/latest/clients/promtail/pipelines/
func (*PipelineStageSpec) DeepCopy ¶ added in v0.19.0
func (in *PipelineStageSpec) DeepCopy() *PipelineStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineStageSpec.
func (*PipelineStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *PipelineStageSpec) DeepCopyInto(out *PipelineStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodLogs ¶ added in v0.19.0
type PodLogs struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec holds the specification of the desired behavior for the PodLogs. Spec PodLogsSpec `json:"spec,omitempty"` }
PodLogs defines how to collect logs for a pod.
func (*PodLogs) DeepCopy ¶ added in v0.19.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLogs.
func (*PodLogs) DeepCopyInto ¶ added in v0.19.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodLogs) DeepCopyObject ¶ added in v0.19.0
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodLogsList ¶ added in v0.19.0
type PodLogsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` // Items is the list of PodLogs. Items []*PodLogs `json:"items"` }
PodLogsList is a list of PodLogs.
func (*PodLogsList) DeepCopy ¶ added in v0.19.0
func (in *PodLogsList) DeepCopy() *PodLogsList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLogsList.
func (*PodLogsList) DeepCopyInto ¶ added in v0.19.0
func (in *PodLogsList) DeepCopyInto(out *PodLogsList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodLogsList) DeepCopyObject ¶ added in v0.19.0
func (in *PodLogsList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodLogsSpec ¶ added in v0.19.0
type PodLogsSpec struct { // The label to use to retrieve the job name from. JobLabel string `json:"jobLabel,omitempty"` // PodTargetLabels transfers labels on the Kubernetes Pod onto the target. PodTargetLabels []string `json:"podTargetLabels,omitempty"` // Selector to select Pod objects. Required. Selector metav1.LabelSelector `json:"selector"` // Selector to select which namespaces the Pod objects are discovered from. NamespaceSelector prom_v1.NamespaceSelector `json:"namespaceSelector,omitempty"` // Pipeline stages for this pod. Pipeline stages support transforming and // filtering log lines. PipelineStages []*PipelineStageSpec `json:"pipelineStages,omitempty"` // RelabelConfigs to apply to logs before delivering. // Grafana Agent Operator automatically adds relabelings for a few standard // Kubernetes fields and replaces original scrape job name with // __tmp_logs_job_name. // // More info: https://grafana.com/docs/loki/latest/clients/promtail/configuration/#relabel_configs RelabelConfigs []*prom_v1.RelabelConfig `json:"relabelings,omitempty"` }
PodLogsSpec defines how to collect logs for a pod.
func (*PodLogsSpec) DeepCopy ¶ added in v0.19.0
func (in *PodLogsSpec) DeepCopy() *PodLogsSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodLogsSpec.
func (*PodLogsSpec) DeepCopyInto ¶ added in v0.19.0
func (in *PodLogsSpec) DeepCopyInto(out *PodLogsSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueueConfig ¶
type QueueConfig struct { // Capacity is the number of samples to buffer per shard before samples start being dropped. Capacity int `json:"capacity,omitempty"` // MinShards is the minimum number of shards, i.e., the amount of concurrency. MinShards int `json:"minShards,omitempty"` // MaxShards is the maximum number of shards, i.e., the amount of concurrency. MaxShards int `json:"maxShards,omitempty"` // MaxSamplesPerSend is the maximum number of samples per send. MaxSamplesPerSend int `json:"maxSamplesPerSend,omitempty"` // BatchSendDeadline is the maximum time a sample will wait in the buffer. BatchSendDeadline string `json:"batchSendDeadline,omitempty"` // MaxRetries is the maximum number of times to retry a batch on recoverable errors. MaxRetries int `json:"maxRetries,omitempty"` // MinBackoff is the initial retry delay. MinBackoff is doubled for every retry. MinBackoff string `json:"minBackoff,omitempty"` // MaxBackoff is the maximum retry delay. MaxBackoff string `json:"maxBackoff,omitempty"` // RetryOnRateLimit retries requests when encountering rate limits. RetryOnRateLimit bool `json:"retryOnRateLimit,omitempty"` }
QueueConfig allows the tuning of remote_write queue_config parameters.
func (*QueueConfig) DeepCopy ¶
func (in *QueueConfig) DeepCopy() *QueueConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueConfig.
func (*QueueConfig) DeepCopyInto ¶
func (in *QueueConfig) DeepCopyInto(out *QueueConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RegexStageSpec ¶ added in v0.19.0
type RegexStageSpec struct { // Name from extracted data to parse. If empty, defaults to using the log // message. Source string `json:"source,omitempty"` // RE2 regular expression. Each capture group MUST be named. Required. Expression string `json:"expression"` }
RegexStageSpec is a parsing stage that parses a log line using a regular expression. Named capture groups in the regex allows for adding data into the extracted map.
func (*RegexStageSpec) DeepCopy ¶ added in v0.19.0
func (in *RegexStageSpec) DeepCopy() *RegexStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegexStageSpec.
func (*RegexStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *RegexStageSpec) DeepCopyInto(out *RegexStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoteWriteSpec ¶
type RemoteWriteSpec struct { // Name of the remote_write queue. Must be unique if specified. The name is // used in metrics and logging in order to differentiate queues. Name string `json:"name,omitempty"` // URL of the endpoint to send samples to. URL string `json:"url"` // RemoteTimeout is the timeout for requests to the remote_write endpoint. RemoteTimeout string `json:"remoteTimeout,omitempty"` // Headers is a set of custom HTTP headers to be sent along with each // remote_write request. Be aware that any headers set by Grafana Agent // itself can't be overwritten. Headers map[string]string `json:"headers,omitempty"` // WriteRelabelConfigs holds relabel_configs to relabel samples before they are // sent to the remote_write endpoint. WriteRelabelConfigs []prom_v1.RelabelConfig `json:"writeRelabelConfigs,omitempty"` // BasicAuth for the URL. BasicAuth *prom_v1.BasicAuth `json:"basicAuth,omitempty"` // Oauth2 for URL OAuth2 *prom_v1.OAuth2 `json:"oauth2,omitempty"` // BearerToken used for remote_write. BearerToken string `json:"bearerToken,omitempty"` // BearerTokenFile used to read bearer token. BearerTokenFile string `json:"bearerTokenFile,omitempty"` // SigV4 configures SigV4-based authentication to the remote_write endpoint. // SigV4-based authentication is used if SigV4 is defined, even with an empty object. SigV4 *SigV4Config `json:"sigv4,omitempty"` // TLSConfig to use for remote_write. TLSConfig *prom_v1.TLSConfig `json:"tlsConfig,omitempty"` // ProxyURL to proxy requests through. Optional. ProxyURL string `json:"proxyUrl,omitempty"` // QueueConfig allows tuning of the remote_write queue parameters. QueueConfig *QueueConfig `json:"queueConfig,omitempty"` // MetadataConfig configures the sending of series metadata to remote storage. MetadataConfig *MetadataConfig `json:"metadataConfig,omitempty"` }
RemoteWriteSpec defines the remote_write configuration for Prometheus.
func (*RemoteWriteSpec) DeepCopy ¶
func (in *RemoteWriteSpec) DeepCopy() *RemoteWriteSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteWriteSpec.
func (*RemoteWriteSpec) DeepCopyInto ¶
func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ReplaceStageSpec ¶ added in v0.19.0
type ReplaceStageSpec struct { // Name from extracted data to parse. If empty, defaults to using the log // message. Source string `json:"source,omitempty"` // RE2 regular expression. Each capture group MUST be named. Required. Expression string `json:"expression"` // Value to replace the captured group with. Replace string `json:"replace,omitempty"` }
ReplaceStageSpec is a parsing stage that parses a log line using a regular expression and replaces the log line. Named capture groups in the regex allows for adding data into the extracted map.
func (*ReplaceStageSpec) DeepCopy ¶ added in v0.19.0
func (in *ReplaceStageSpec) DeepCopy() *ReplaceStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplaceStageSpec.
func (*ReplaceStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *ReplaceStageSpec) DeepCopyInto(out *ReplaceStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SigV4Config ¶
type SigV4Config struct { // Region of the AWS endpoint. If blank, the region from the default // credentials chain is used. Region string `json:"region,omitempty"` // AccessKey holds the secret of the AWS API access key to use for signing. // If not provided, the environment variable AWS_ACCESS_KEY_ID is used. AccessKey *v1.SecretKeySelector `json:"accessKey,omitempty"` // SecretKey of the AWS API to use for signing. If blank, the environment // variable AWS_SECRET_ACCESS_KEY is used. SecretKey *v1.SecretKeySelector `json:"secretKey,omitempty"` // Profile is the named AWS profile to use for authentication. Profile string `json:"profile,omitempty"` // RoleARN is the AWS Role ARN to use for authentication, as an alternative // for using the AWS API keys. RoleARN string `json:"roleARN,omitempty"` }
SigV4Config specifies configuration to perform SigV4 authentication.
func (*SigV4Config) DeepCopy ¶
func (in *SigV4Config) DeepCopy() *SigV4Config
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SigV4Config.
func (*SigV4Config) DeepCopyInto ¶
func (in *SigV4Config) DeepCopyInto(out *SigV4Config)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TemplateStageSpec ¶ added in v0.19.0
type TemplateStageSpec struct { // Name from extracted data to parse. Required. If empty, defaults to using // the log message. Source string `json:"source"` // Go template string to use. Required. In addition to normal template // functions, ToLower, ToUpper, Replace, Trim, TrimLeft, TrimRight, // TrimPrefix, and TrimSpace are also available. Template string `json:"template"` }
TemplateStageSpec is a transform stage that manipulates the values in the extracted map using Go's template syntax.
func (*TemplateStageSpec) DeepCopy ¶ added in v0.19.0
func (in *TemplateStageSpec) DeepCopy() *TemplateStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateStageSpec.
func (*TemplateStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *TemplateStageSpec) DeepCopyInto(out *TemplateStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TenantStageSpec ¶ added in v0.19.0
type TenantStageSpec struct { // Name from labels whose value should be set as tenant ID. Mutually exclusive with // source and value. Label string `json:"label,omitempty"` // Name from extracted data to use as the tenant ID. Mutually exclusive with // label and value. Source string `json:"source,omitempty"` // Value to use for the template ID. Useful when this stage is used within a // conditional pipeline such as match. Mutually exclusive with label and source. Value string `json:"value,omitempty"` }
TenantStageSpec is an action stage that sets the tenant ID for the log entry picking it from a field in the extracted data map.
func (*TenantStageSpec) DeepCopy ¶ added in v0.19.0
func (in *TenantStageSpec) DeepCopy() *TenantStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantStageSpec.
func (*TenantStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *TenantStageSpec) DeepCopyInto(out *TenantStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TimestampStageSpec ¶ added in v0.19.0
type TimestampStageSpec struct { // Name from extracted data to use as the timestamp. Required. Source string `json:"source"` // Determines format of the time string. Required. Can be one of: // ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, // RFC3339, RFC3339Nano, Unix, UnixMs, UnixUs, UnixNs. Format string `json:"format"` // Fallback formats to try if format fails. FallbackFormats []string `json:"fallbackFormats,omitempty"` // IANA Timezone Database string. Location string `json:"location,omitempty"` // Action to take when the timestamp can't be extracted or parsed. // Can be skip or fudge. Defaults to fudge. ActionOnFailure string `json:"actionOnFailure,omitempty"` }
TimestampStageSpec is an action stage that can change the timestamp of a log line before it is sent to Loki.
func (*TimestampStageSpec) DeepCopy ¶ added in v0.19.0
func (in *TimestampStageSpec) DeepCopy() *TimestampStageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimestampStageSpec.
func (*TimestampStageSpec) DeepCopyInto ¶ added in v0.19.0
func (in *TimestampStageSpec) DeepCopyInto(out *TimestampStageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.