v1alpha1

package
v0.0.0-...-e190f02 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true +groupName=monitor.datadog.jet.crossplane.io +versionName=v1alpha1

Index

Constants

View Source
const (
	CRDGroup   = "monitor.datadog.jet.crossplane.io"
	CRDVersion = "v1alpha1"
)

Package type metadata.

Variables

View Source
var (
	// CRDGroupVersion is the API Group Version used to register the objects
	CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	Monitor_Kind             = "Monitor"
	Monitor_GroupKind        = schema.GroupKind{Group: CRDGroup, Kind: Monitor_Kind}.String()
	Monitor_KindAPIVersion   = Monitor_Kind + "." + CRDGroupVersion.String()
	Monitor_GroupVersionKind = CRDGroupVersion.WithKind(Monitor_Kind)
)

Repository type metadata.

Functions

This section is empty.

Types

type Monitor

type Monitor struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              MonitorSpec   `json:"spec"`
	Status            MonitorStatus `json:"status,omitempty"`
}

Monitor is the Schema for the Monitors API +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:subresource:status +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,datadogjet}

func (*Monitor) DeepCopy

func (in *Monitor) DeepCopy() *Monitor

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Monitor.

func (*Monitor) DeepCopyInto

func (in *Monitor) DeepCopyInto(out *Monitor)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Monitor) DeepCopyObject

func (in *Monitor) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Monitor) GetCondition

func (mg *Monitor) GetCondition(ct xpv1.ConditionType) xpv1.Condition

GetCondition of this Monitor.

func (*Monitor) GetConnectionDetailsMapping

func (tr *Monitor) GetConnectionDetailsMapping() map[string]string

GetConnectionDetailsMapping for this Monitor

func (*Monitor) GetDeletionPolicy

func (mg *Monitor) GetDeletionPolicy() xpv1.DeletionPolicy

GetDeletionPolicy of this Monitor.

func (*Monitor) GetID

func (tr *Monitor) GetID() string

GetID returns ID of underlying Terraform resource of this Monitor

func (*Monitor) GetObservation

func (tr *Monitor) GetObservation() (map[string]interface{}, error)

GetObservation of this Monitor

func (*Monitor) GetParameters

func (tr *Monitor) GetParameters() (map[string]interface{}, error)

GetParameters of this Monitor

func (*Monitor) GetProviderConfigReference

func (mg *Monitor) GetProviderConfigReference() *xpv1.Reference

GetProviderConfigReference of this Monitor.

func (*Monitor) GetProviderReference

func (mg *Monitor) GetProviderReference() *xpv1.Reference

GetProviderReference of this Monitor. Deprecated: Use GetProviderConfigReference.

func (*Monitor) GetPublishConnectionDetailsTo

func (mg *Monitor) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo

GetPublishConnectionDetailsTo of this Monitor.

func (*Monitor) GetTerraformResourceType

func (mg *Monitor) GetTerraformResourceType() string

GetTerraformResourceType returns Terraform resource type for this Monitor

func (*Monitor) GetTerraformSchemaVersion

func (tr *Monitor) GetTerraformSchemaVersion() int

GetTerraformSchemaVersion returns the associated Terraform schema version

func (*Monitor) GetWriteConnectionSecretToReference

func (mg *Monitor) GetWriteConnectionSecretToReference() *xpv1.SecretReference

GetWriteConnectionSecretToReference of this Monitor.

func (*Monitor) LateInitialize

func (tr *Monitor) LateInitialize(attrs []byte) (bool, error)

LateInitialize this Monitor using its observed tfState. returns True if there are any spec changes for the resource.

func (*Monitor) SetConditions

func (mg *Monitor) SetConditions(c ...xpv1.Condition)

SetConditions of this Monitor.

func (*Monitor) SetDeletionPolicy

func (mg *Monitor) SetDeletionPolicy(r xpv1.DeletionPolicy)

SetDeletionPolicy of this Monitor.

func (*Monitor) SetObservation

func (tr *Monitor) SetObservation(obs map[string]interface{}) error

SetObservation for this Monitor

func (*Monitor) SetParameters

func (tr *Monitor) SetParameters(params map[string]interface{}) error

SetParameters for this Monitor

func (*Monitor) SetProviderConfigReference

func (mg *Monitor) SetProviderConfigReference(r *xpv1.Reference)

SetProviderConfigReference of this Monitor.

func (*Monitor) SetProviderReference

func (mg *Monitor) SetProviderReference(r *xpv1.Reference)

SetProviderReference of this Monitor. Deprecated: Use SetProviderConfigReference.

func (*Monitor) SetPublishConnectionDetailsTo

func (mg *Monitor) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo)

SetPublishConnectionDetailsTo of this Monitor.

func (*Monitor) SetWriteConnectionSecretToReference

func (mg *Monitor) SetWriteConnectionSecretToReference(r *xpv1.SecretReference)

SetWriteConnectionSecretToReference of this Monitor.

type MonitorList

type MonitorList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Monitor `json:"items"`
}

MonitorList contains a list of Monitors

func (*MonitorList) DeepCopy

func (in *MonitorList) DeepCopy() *MonitorList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorList.

func (*MonitorList) DeepCopyInto

func (in *MonitorList) DeepCopyInto(out *MonitorList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MonitorList) DeepCopyObject

func (in *MonitorList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*MonitorList) GetItems

func (l *MonitorList) GetItems() []resource.Managed

GetItems of this MonitorList.

type MonitorObservation

type MonitorObservation struct {
	ID *string `json:"id,omitempty" tf:"id,omitempty"`
}

func (*MonitorObservation) DeepCopy

func (in *MonitorObservation) DeepCopy() *MonitorObservation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorObservation.

func (*MonitorObservation) DeepCopyInto

func (in *MonitorObservation) DeepCopyInto(out *MonitorObservation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorParameters

type MonitorParameters struct {

	// A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to `false`.
	// +kubebuilder:validation:Optional
	EnableLogsSample *bool `json:"enableLogsSample,omitempty" tf:"enable_logs_sample,omitempty"`

	// A message to include with a re-notification. Supports the `@username` notification allowed elsewhere.
	// +kubebuilder:validation:Optional
	EscalationMessage *string `json:"escalationMessage,omitempty" tf:"escalation_message,omitempty"`

	// (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer.
	//
	// For example, if the value is set to `300` (5min), the `timeframe` is set to `last_5m` and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.
	// +kubebuilder:validation:Optional
	EvaluationDelay *float64 `json:"evaluationDelay,omitempty" tf:"evaluation_delay,omitempty"`

	// A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).
	// +kubebuilder:validation:Optional
	ForceDelete *bool `json:"forceDelete,omitempty" tf:"force_delete,omitempty"`

	// Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to `false`.
	// +kubebuilder:validation:Optional
	GroupbySimpleMonitor *bool `json:"groupbySimpleMonitor,omitempty" tf:"groupby_simple_monitor,omitempty"`

	// A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to `true`.
	// +kubebuilder:validation:Optional
	IncludeTags *bool `json:"includeTags,omitempty" tf:"include_tags,omitempty"`

	// A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to `false`. **Deprecated.** Use `restricted_roles`.
	// +kubebuilder:validation:Optional
	Locked *bool `json:"locked,omitempty" tf:"locked,omitempty"`

	// A message to include with notifications for this monitor.
	//
	// Email notifications can be sent to specific users by using the same `@username` notation as events.
	// +kubebuilder:validation:Required
	Message *string `json:"message" tf:"message,omitempty"`

	// A mapping containing `recovery_window` and `trigger_window` values, e.g. `last_15m` . Can only be used for, and are required for, anomaly monitors.
	// +kubebuilder:validation:Optional
	MonitorThresholdWindows []MonitorThresholdWindowsParameters `json:"monitorThresholdWindows,omitempty" tf:"monitor_threshold_windows,omitempty"`

	// Alert thresholds of the monitor.
	// +kubebuilder:validation:Optional
	MonitorThresholds []MonitorThresholdsParameters `json:"monitorThresholds,omitempty" tf:"monitor_thresholds,omitempty"`

	// Name of Datadog monitor.
	// +kubebuilder:validation:Required
	Name *string `json:"name" tf:"name,omitempty"`

	// The time (in seconds) to skip evaluations for new groups.
	//
	// `new_group_delay` overrides `new_host_delay` if it is set to a nonzero value.
	// +kubebuilder:validation:Optional
	NewGroupDelay *float64 `json:"newGroupDelay,omitempty" tf:"new_group_delay,omitempty"`

	// **Deprecated**. See `new_group_delay`. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to `300`. The only case when this should be used is to override the default and set `new_host_delay` to zero for monitors grouped by host. **Deprecated.** Use `new_group_delay` except when setting `new_host_delay` to zero.
	// +kubebuilder:validation:Optional
	NewHostDelay *float64 `json:"newHostDelay,omitempty" tf:"new_host_delay,omitempty"`

	// The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes.
	//
	// We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.
	// +kubebuilder:validation:Optional
	NoDataTimeframe *float64 `json:"noDataTimeframe,omitempty" tf:"no_data_timeframe,omitempty"`

	// A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to `false`.
	// +kubebuilder:validation:Optional
	NotifyAudit *bool `json:"notifyAudit,omitempty" tf:"notify_audit,omitempty"`

	// A boolean indicating whether this monitor will notify when data stops reporting. Defaults to `false`.
	// +kubebuilder:validation:Optional
	NotifyNoData *bool `json:"notifyNoData,omitempty" tf:"notify_no_data,omitempty"`

	// Integer from 1 (high) to 5 (low) indicating alert severity.
	// +kubebuilder:validation:Optional
	Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"`

	// The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the [API Reference](https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor) for details. `terraform plan` will validate query contents unless `validate` is set to `false`.
	//
	// **Note:** APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the [detailed doc](https://docs.datadoghq.com/tracing/guide/ddsketch_trace_metrics/).
	// +kubebuilder:validation:Required
	Query *string `json:"query" tf:"query,omitempty"`

	// The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.
	// +kubebuilder:validation:Optional
	RenotifyInterval *float64 `json:"renotifyInterval,omitempty" tf:"renotify_interval,omitempty"`

	// The number of re-notification messages that should be sent on the current status.
	// +kubebuilder:validation:Optional
	RenotifyOccurrences *float64 `json:"renotifyOccurrences,omitempty" tf:"renotify_occurrences,omitempty"`

	// The types of statuses for which re-notification messages should be sent. Valid values are `alert`, `warn`, `no data`.
	// +kubebuilder:validation:Optional
	RenotifyStatuses []*string `json:"renotifyStatuses,omitempty" tf:"renotify_statuses,omitempty"`

	// A boolean indicating whether this monitor needs a full window of data before it's evaluated.
	//
	// We highly recommend you set this to `false` for sparse metrics, otherwise some evaluations will be skipped. Default: `true` for `on average`, `at all times` and `in total` aggregation. `false` otherwise.
	// +kubebuilder:validation:Optional
	RequireFullWindow *bool `json:"requireFullWindow,omitempty" tf:"require_full_window,omitempty"`

	// A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the [Roles API](https://docs.datadoghq.com/api/latest/roles/#list-roles) in the `data.id` field.
	// +kubebuilder:validation:Optional
	RestrictedRoles []*string `json:"restrictedRoles,omitempty" tf:"restricted_roles,omitempty"`

	// A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API
	// +kubebuilder:validation:Optional
	Tags []*string `json:"tags,omitempty" tf:"tags,omitempty"`

	// The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.
	// +kubebuilder:validation:Optional
	TimeoutH *float64 `json:"timeoutH,omitempty" tf:"timeout_h,omitempty"`

	// The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API [documentation page](https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor). Note: The monitor type cannot be changed after a monitor is created. Valid values are `composite`, `event alert`, `log alert`, `metric alert`, `process alert`, `query alert`, `rum alert`, `service check`, `synthetics alert`, `trace-analytics alert`, `slo alert`, `event-v2 alert`, `audit alert`, `ci-pipelines alert`, `ci-tests alert`, `error-tracking alert`.
	// +kubebuilder:validation:Required
	Type *string `json:"type" tf:"type,omitempty"`

	// If set to `false`, skip the validation call done during plan.
	// +kubebuilder:validation:Optional
	Validate *bool `json:"validate,omitempty" tf:"validate,omitempty"`
}

func (*MonitorParameters) DeepCopy

func (in *MonitorParameters) DeepCopy() *MonitorParameters

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorParameters.

func (*MonitorParameters) DeepCopyInto

func (in *MonitorParameters) DeepCopyInto(out *MonitorParameters)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorSpec

type MonitorSpec struct {
	v1.ResourceSpec `json:",inline"`
	ForProvider     MonitorParameters `json:"forProvider"`
}

MonitorSpec defines the desired state of Monitor

func (*MonitorSpec) DeepCopy

func (in *MonitorSpec) DeepCopy() *MonitorSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorSpec.

func (*MonitorSpec) DeepCopyInto

func (in *MonitorSpec) DeepCopyInto(out *MonitorSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorStatus

type MonitorStatus struct {
	v1.ResourceStatus `json:",inline"`
	AtProvider        MonitorObservation `json:"atProvider,omitempty"`
}

MonitorStatus defines the observed state of Monitor.

func (*MonitorStatus) DeepCopy

func (in *MonitorStatus) DeepCopy() *MonitorStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorStatus.

func (*MonitorStatus) DeepCopyInto

func (in *MonitorStatus) DeepCopyInto(out *MonitorStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorThresholdWindowsObservation

type MonitorThresholdWindowsObservation struct {
}

func (*MonitorThresholdWindowsObservation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorThresholdWindowsObservation.

func (*MonitorThresholdWindowsObservation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorThresholdWindowsParameters

type MonitorThresholdWindowsParameters struct {

	// Describes how long an anomalous metric must be normal before the alert recovers.
	// +kubebuilder:validation:Optional
	RecoveryWindow *string `json:"recoveryWindow,omitempty" tf:"recovery_window,omitempty"`

	// Describes how long a metric must be anomalous before an alert triggers.
	// +kubebuilder:validation:Optional
	TriggerWindow *string `json:"triggerWindow,omitempty" tf:"trigger_window,omitempty"`
}

func (*MonitorThresholdWindowsParameters) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorThresholdWindowsParameters.

func (*MonitorThresholdWindowsParameters) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorThresholdsObservation

type MonitorThresholdsObservation struct {
}

func (*MonitorThresholdsObservation) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorThresholdsObservation.

func (*MonitorThresholdsObservation) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MonitorThresholdsParameters

type MonitorThresholdsParameters struct {

	// The monitor `CRITICAL` threshold. Must be a number.
	// +kubebuilder:validation:Optional
	Critical *string `json:"critical,omitempty" tf:"critical,omitempty"`

	// The monitor `CRITICAL` recovery threshold. Must be a number.
	// +kubebuilder:validation:Optional
	CriticalRecovery *string `json:"criticalRecovery,omitempty" tf:"critical_recovery,omitempty"`

	// The monitor `OK` threshold. Must be a number.
	// +kubebuilder:validation:Optional
	Ok *string `json:"ok,omitempty" tf:"ok,omitempty"`

	// The monitor `UNKNOWN` threshold. Must be a number.
	// +kubebuilder:validation:Optional
	Unknown *string `json:"unknown,omitempty" tf:"unknown,omitempty"`

	// The monitor `WARNING` threshold. Must be a number.
	// +kubebuilder:validation:Optional
	Warning *string `json:"warning,omitempty" tf:"warning,omitempty"`

	// The monitor `WARNING` recovery threshold. Must be a number.
	// +kubebuilder:validation:Optional
	WarningRecovery *string `json:"warningRecovery,omitempty" tf:"warning_recovery,omitempty"`
}

func (*MonitorThresholdsParameters) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitorThresholdsParameters.

func (*MonitorThresholdsParameters) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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