Documentation ¶
Index ¶
- Variables
- func BuildCustomVectorToml(telemetrySpec *telemetry.TelemetrySpec) string
- func BuildDefaultVectorComponents(config vector.VectorConfig) ([]telemetry.VectorSourceSpec, []telemetry.VectorTransformSpec, ...)
- func BuildVectorAgentConfigMap(namespace, k8cName, dcName, k8cNamespace, vectorToml string) *corev1.ConfigMap
- func CreateCassandraVectorToml(telemetrySpec *telemetry.TelemetrySpec, mcacEnabled bool) (string, error)
- func FilterUnusedPipelines(sources []telemetry.VectorSourceSpec, ...) ([]telemetry.VectorSourceSpec, []telemetry.VectorTransformSpec, ...)
- func InjectCassandraTelemetryFilters(telemetrySpec *telemetry.TelemetrySpec, dcConfig *cassandra.DatacenterConfig)
- func InjectCassandraVectorAgentConfig(telemetrySpec *telemetry.TelemetrySpec, dcConfig *cassandra.DatacenterConfig, ...) error
- func IsNewMetricsEndpointAvailable(serverVersion string) bool
- func IsPromInstalled(client client.Client, logger logr.Logger) (bool, error)
- func NewTelemetrySpec() telemetryapi.TelemetrySpec
- func SpecIsValid(tspec *telemetryapi.TelemetrySpec, promInstalled bool) bool
- func VectorAgentConfigMapName(k8cName, dcName string) string
- type PrometheusResourcer
- func (cfg PrometheusResourcer) CleanupResources(ctx context.Context, client runtimeclient.Client) error
- func (cfg PrometheusResourcer) NewCassServiceMonitor(legacyEndpoints bool) (*promapi.ServiceMonitor, error)
- func (cfg PrometheusResourcer) NewReaperServiceMonitor() (promapi.ServiceMonitor, error)
- func (cfg PrometheusResourcer) NewStargateServiceMonitor() (promapi.ServiceMonitor, error)
- func (cfg PrometheusResourcer) UpdateResources(ctx context.Context, client runtimeclient.Client, owner metav1.Object, ...) error
- type TelemetryConfigIncomplete
- type TelemetryDepsNotInstalled
Constants ¶
This section is empty.
Variables ¶
var (
DefaultFilters = []string{"deny:org.apache.cassandra.metrics.Table",
"deny:org.apache.cassandra.metrics.table",
"allow:org.apache.cassandra.metrics.table.live_ss_table_count",
"allow:org.apache.cassandra.metrics.Table.LiveSSTableCount",
"allow:org.apache.cassandra.metrics.table.live_disk_space_used",
"allow:org.apache.cassandra.metrics.table.LiveDiskSpaceUsed",
"allow:org.apache.cassandra.metrics.Table.Pending",
"allow:org.apache.cassandra.metrics.Table.Memtable",
"allow:org.apache.cassandra.metrics.Table.Compaction",
"allow:org.apache.cassandra.metrics.table.read",
"allow:org.apache.cassandra.metrics.table.write",
"allow:org.apache.cassandra.metrics.table.range",
"allow:org.apache.cassandra.metrics.table.coordinator",
"allow:org.apache.cassandra.metrics.table.dropped_mutations"}
)
Functions ¶
func BuildCustomVectorToml ¶ added in v1.5.0
func BuildCustomVectorToml(telemetrySpec *telemetry.TelemetrySpec) string
func BuildDefaultVectorComponents ¶ added in v1.6.0
func BuildDefaultVectorComponents(config vector.VectorConfig) ([]telemetry.VectorSourceSpec, []telemetry.VectorTransformSpec, []telemetry.VectorSinkSpec)
func BuildVectorAgentConfigMap ¶ added in v1.5.0
func CreateCassandraVectorToml ¶ added in v1.5.0
func CreateCassandraVectorToml(telemetrySpec *telemetry.TelemetrySpec, mcacEnabled bool) (string, error)
func FilterUnusedPipelines ¶ added in v1.6.0
func FilterUnusedPipelines(sources []telemetry.VectorSourceSpec, transformers []telemetry.VectorTransformSpec, sinks []telemetry.VectorSinkSpec) ([]telemetry.VectorSourceSpec, []telemetry.VectorTransformSpec, []telemetry.VectorSinkSpec)
FilterUnusedPipelines removes sources that have no destination in the sinks. If there are duplicate transformer, source or sink names, only the first occurence wins
func InjectCassandraTelemetryFilters ¶ added in v1.2.0
func InjectCassandraTelemetryFilters(telemetrySpec *telemetry.TelemetrySpec, dcConfig *cassandra.DatacenterConfig)
InjectCassandraTelemetryFilters adds MCAC filters to the cassandra container as an env variable. If filter list is set to nil, the default filters are used, otherwise the provided filters are used.
func InjectCassandraVectorAgentConfig ¶ added in v1.6.0
func InjectCassandraVectorAgentConfig(telemetrySpec *telemetry.TelemetrySpec, dcConfig *cassandra.DatacenterConfig, k8cName string, logger logr.Logger) error
InjectCassandraVectorAgentConfig adds a override Vector agent config to the Cassandra pods, overwriting the default in the cass-operator
func IsNewMetricsEndpointAvailable ¶ added in v1.7.0
IsNewMetricsEndpointAvailable returns true if the new metrics endpoint is available, false otherwise. It is available since Cassandra 3.11.13 in the 3.11 branch and since 4.0.4 in the 4.0 branch.
func IsPromInstalled ¶
IsPromInstalled returns true if Prometheus is installed in the cluster, false otherwise.
func NewTelemetrySpec ¶ added in v1.6.0
func NewTelemetrySpec() telemetryapi.TelemetrySpec
func SpecIsValid ¶
func SpecIsValid(tspec *telemetryapi.TelemetrySpec, promInstalled bool) bool
func VectorAgentConfigMapName ¶ added in v1.5.0
Types ¶
type PrometheusResourcer ¶
type PrometheusResourcer struct { MonitoringTargetNS string MonitoringTargetName string ServiceMonitorName string Logger logr.Logger CommonLabels map[string]string }
func (PrometheusResourcer) CleanupResources ¶
func (cfg PrometheusResourcer) CleanupResources(ctx context.Context, client runtimeclient.Client) error
CleanupResources executes the cleanup of any resources on the cluster, once they are no longer required.
func (PrometheusResourcer) NewCassServiceMonitor ¶
func (cfg PrometheusResourcer) NewCassServiceMonitor(legacyEndpoints bool) (*promapi.ServiceMonitor, error)
NewCassServiceMonitor returns a Prometheus operator ServiceMonitor resource.
func (PrometheusResourcer) NewReaperServiceMonitor ¶ added in v1.2.0
func (cfg PrometheusResourcer) NewReaperServiceMonitor() (promapi.ServiceMonitor, error)
NewReaperServiceMonitor returns a Prometheus operator ServiceMonitor resource.
func (PrometheusResourcer) NewStargateServiceMonitor ¶
func (cfg PrometheusResourcer) NewStargateServiceMonitor() (promapi.ServiceMonitor, error)
NewStargateServiceMonitor returns a Prometheus operator ServiceMonitor resource.
func (PrometheusResourcer) UpdateResources ¶
func (cfg PrometheusResourcer) UpdateResources( ctx context.Context, client runtimeclient.Client, owner metav1.Object, desiredSM *promapi.ServiceMonitor, ) error
UpdateResources executes the creation of the desired Prometheus resources on the cluster.
type TelemetryConfigIncomplete ¶
type TelemetryConfigIncomplete struct {
// contains filtered or unexported fields
}
func (TelemetryConfigIncomplete) Error ¶
func (detail TelemetryConfigIncomplete) Error() string
type TelemetryDepsNotInstalled ¶
type TelemetryDepsNotInstalled struct {
// contains filtered or unexported fields
}
func (TelemetryDepsNotInstalled) Error ¶
func (detail TelemetryDepsNotInstalled) Error() string