Documentation ¶
Overview ¶
Package v1alpha represents objects available in API n9/v1alpha
Package v1alpha represents objects available in API n9/v1alpha
Index ¶
- Constants
- Variables
- func FieldRuleMetadataDisplayName[S any](getter func(S) string) validation.PropertyRules[string, S]
- func FieldRuleMetadataLabels[S any](getter func(S) Labels) validation.PropertyRules[Labels, S]
- func FieldRuleMetadataName[S any](getter func(S) string) validation.PropertyRules[string, S]
- func FieldRuleMetadataProject[S any](getter func(S) string) validation.PropertyRules[string, S]
- func FieldRuleSpecDescription[S any](getter func(S) string) validation.PropertyRules[string, S]
- func IsBiggerThanMaxQueryDelayDuration(duration Duration) bool
- func IsDNS1123Label(value string) []string
- func IsValidDirectType(directType string) bool
- func IsValidRegion(code string, regions []AWSRegion) bool
- func IsValidSourceOf(sourceOf string) bool
- func OperatorNames() []string
- func ReleaseChannelNames() []string
- func SourceOfToStringSlice(isMetrics, isServices bool) []string
- func ValidationRuleLabels() validation.SingleRule[Labels]
- type AWSIAMRoleAuthExternalIDs
- type AWSRegion
- type Agent
- func (a Agent) GetKind() manifest.Kind
- func (a Agent) GetManifestSource() string
- func (a Agent) GetName() string
- func (a Agent) GetOrganization() string
- func (a Agent) GetProject() string
- func (a Agent) GetVersion() string
- func (a Agent) SetManifestSource(src string) manifest.Object
- func (a Agent) SetOrganization(org string) manifest.Object
- func (a Agent) SetProject(project string) manifest.Object
- func (a Agent) Validate() error
- type AgentMetadata
- type AgentSpec
- type AgentStatus
- type Alert
- func (a Alert) GetKind() manifest.Kind
- func (a Alert) GetManifestSource() string
- func (a Alert) GetName() string
- func (a Alert) GetOrganization() string
- func (a Alert) GetProject() string
- func (a Alert) GetVersion() string
- func (a Alert) SetManifestSource(src string) manifest.Object
- func (a Alert) SetOrganization(org string) manifest.Object
- func (a Alert) SetProject(project string) manifest.Object
- func (a Alert) Validate() error
- type AlertCondition
- type AlertMetadata
- type AlertMethod
- func (a AlertMethod) GetKind() manifest.Kind
- func (a AlertMethod) GetManifestSource() string
- func (a AlertMethod) GetName() string
- func (a AlertMethod) GetOrganization() string
- func (a AlertMethod) GetProject() string
- func (a AlertMethod) GetVersion() string
- func (a AlertMethod) SetManifestSource(src string) manifest.Object
- func (a AlertMethod) SetOrganization(org string) manifest.Object
- func (a AlertMethod) SetProject(project string) manifest.Object
- func (a AlertMethod) Validate() error
- type AlertMethodMetadata
- type AlertMethodSpec
- type AlertMethodWithAlertPolicy
- type AlertObjectMetadata
- type AlertObjective
- type AlertPolicy
- func (a AlertPolicy) GetKind() manifest.Kind
- func (a AlertPolicy) GetManifestSource() string
- func (a AlertPolicy) GetName() string
- func (a AlertPolicy) GetOrganization() string
- func (a AlertPolicy) GetProject() string
- func (a AlertPolicy) GetVersion() string
- func (a AlertPolicy) SetManifestSource(src string) manifest.Object
- func (a AlertPolicy) SetOrganization(org string) manifest.Object
- func (a AlertPolicy) SetProject(project string) manifest.Object
- func (a AlertPolicy) Validate() error
- type AlertPolicyMetadata
- type AlertPolicySpec
- type AlertSilence
- func (a AlertSilence) GetKind() manifest.Kind
- func (a AlertSilence) GetManifestSource() string
- func (a AlertSilence) GetName() string
- func (a AlertSilence) GetOrganization() string
- func (a AlertSilence) GetProject() string
- func (a AlertSilence) GetVersion() string
- func (a AlertSilence) SetManifestSource(src string) manifest.Object
- func (a AlertSilence) SetOrganization(org string) manifest.Object
- func (a AlertSilence) SetProject(project string) manifest.Object
- func (a AlertSilence) Validate() error
- type AlertSilenceAlertPolicySource
- type AlertSilenceMetadata
- type AlertSilencePeriod
- type AlertSilenceSpec
- type AlertSilenceStatus
- type AlertSpec
- type AmazonPrometheusAgentConfig
- type AppDynamicsAgentConfig
- type AppDynamicsDirectConfig
- type AzureMonitorAgentConfig
- type AzureMonitorDirectConfig
- type BigQueryAgentConfig
- type BigQueryDirectConfig
- type CloudWatchAgentConfig
- type CloudWatchDirectConfig
- type DataExport
- func (d DataExport) GetKind() manifest.Kind
- func (d DataExport) GetManifestSource() string
- func (d DataExport) GetName() string
- func (d DataExport) GetOrganization() string
- func (d DataExport) GetProject() string
- func (d DataExport) GetVersion() string
- func (d DataExport) SetManifestSource(src string) manifest.Object
- func (d DataExport) SetOrganization(org string) manifest.Object
- func (d DataExport) SetProject(project string) manifest.Object
- func (d DataExport) Validate() error
- type DataExportMetadata
- type DataExportSpec
- type DataExportStatus
- type DataExportStatusJob
- type DataSourceType
- type DatadogAgentConfig
- type DatadogDirectConfig
- type Direct
- func (d Direct) GetKind() manifest.Kind
- func (d Direct) GetManifestSource() string
- func (d Direct) GetName() string
- func (d Direct) GetOrganization() string
- func (d Direct) GetProject() string
- func (d Direct) GetVersion() string
- func (d Direct) SetManifestSource(src string) manifest.Object
- func (d Direct) SetOrganization(org string) manifest.Object
- func (d Direct) SetProject(project string) manifest.Object
- func (d Direct) Validate() error
- type DirectMetadata
- type DirectSpec
- type DirectStatus
- type DiscordAlertMethod
- type Duration
- type DurationUnit
- type DynatraceAgentConfig
- type DynatraceDirectConfig
- type ElasticsearchAgentConfig
- type EmailAlertMethod
- type ErrInvalidPayload
- type GCMAgentConfig
- type GCMDirectConfig
- type GCSDataExportSpec
- type GenericAgentConfig
- type GenericObject
- func (g GenericObject) GetKind() manifest.Kind
- func (g GenericObject) GetManifestSource() string
- func (g GenericObject) GetName() string
- func (g GenericObject) GetOrganization() string
- func (g GenericObject) GetProject() string
- func (g GenericObject) GetVersion() string
- func (g GenericObject) SetManifestSource(src string) manifest.Object
- func (g GenericObject) SetOrganization(org string) manifest.Object
- func (g GenericObject) SetProject(project string) manifest.Object
- func (g GenericObject) Validate() error
- type GrafanaLokiAgentConfig
- type GraphiteAgentConfig
- type HistoricalDataRetrieval
- type HistoricalRetrievalDuration
- type HistoricalRetrievalDurationUnit
- type HoneycombAgentConfig
- type HoneycombDirectConfig
- type InfluxDBAgentConfig
- type InfluxDBDirectConfig
- type InstanaAgentConfig
- type InstanaDirectConfig
- type JiraAlertMethod
- type Key
- type Labels
- type LightstepAgentConfig
- type LightstepDirectConfig
- type Measurement
- type NewRelicAgentConfig
- type NewRelicDirectConfig
- type ObjectContext
- type ObjectError
- type ObjectMetadata
- type OpenTSDBAgentConfig
- type Operator
- type OpsgenieAlertMethod
- type PagerDutyAlertMethod
- type PingdomAgentConfig
- type PingdomDirectConfig
- type PrometheusAgentConfig
- type PublicAlertMethod
- type PublicAlertMethodSpec
- type PublicAlertMethodStatus
- type PublicAppDynamicsDirectConfig
- type PublicAzureMonitorDirectConfig
- type PublicBigQueryDirectConfig
- type PublicCloudWatchDirectConfig
- type PublicDatadogDirectConfig
- type PublicDirect
- func (p PublicDirect) GetKind() manifest.Kind
- func (p PublicDirect) GetManifestSource() string
- func (p PublicDirect) GetName() string
- func (p PublicDirect) GetProject() string
- func (p PublicDirect) GetVersion() string
- func (p PublicDirect) SetManifestSource(src string) manifest.Object
- func (p PublicDirect) SetProject(project string) manifest.Object
- func (p PublicDirect) Validate() error
- type PublicDirectSpec
- type PublicDiscordAlertMethod
- type PublicDynatraceDirectConfig
- type PublicGCMDirectConfig
- type PublicHoneycombDirectConfig
- type PublicInfluxDBDirectConfig
- type PublicInstanaDirectConfig
- type PublicJiraAlertMethod
- type PublicLightstepDirectConfig
- type PublicNewRelicDirectConfig
- type PublicOpsgenieAlertMethod
- type PublicPagerDutyAlertMethod
- type PublicPingdomDirectConfig
- type PublicRedshiftDirectConfig
- type PublicServiceNowAlertMethod
- type PublicSlackAlertMethod
- type PublicSplunkDirectConfig
- type PublicSplunkObservabilityDirectConfig
- type PublicSumoLogicDirectConfig
- type PublicTeamsAlertMethod
- type PublicThousandEyesDirectConfig
- type PublicWebhookAlertMethod
- type QueryDelay
- type QueryDelayDefaults
- type RedshiftAgentConfig
- type RedshiftDirectConfig
- type ReleaseChannel
- type S3DataExportSpec
- type SendResolution
- type ServiceNowAlertMethod
- type Severity
- type SlackAlertMethod
- type SourceOf
- type SplunkAgentConfig
- type SplunkDirectConfig
- type SplunkObservabilityAgentConfig
- type SplunkObservabilityDirectConfig
- type SumoLogicAgentConfig
- type SumoLogicDirectConfig
- type TeamsAlertMethod
- type TemplateVariable
- type ThousandEyesAgentConfig
- type ThousandEyesDirectConfig
- type Validate
- type Value
- type WebhookAlertMethod
- type WebhookHeader
Constants ¶
const ( DataExportTypeS3 string = "S3" DataExportTypeSnowflake string = "Snowflake" DataExportTypeGCS string = "GCS" )
const ( //nolint:lll IPRegex string = `` /* 659-byte string literal not displayed */ DNSNameRegex string = `^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$` URLSchemaRegex string = `((?i)(https?):\/\/)` URLUsernameRegex string = `(\S+(:\S*)?@)` URLPathRegex string = `((\/|\?|#)[^\s]*)` URLPortRegex string = `(:(\d{1,5}))` //nolint:lll URLIPRegex string = `([1-9]\d?|1\d\d|2[01]\d|22[0-3]|24\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}(?:\.([0-9]\d?|1\d\d|2[0-4]\d|25[0-5]))` URLSubdomainRegex string = `((www\.)|([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])*[a-zA-Z0-9]\.[a-zA-Z0-9]+))` //nolint:lll URLRegex = `^` + URLSchemaRegex + URLUsernameRegex + `?` + `((` + URLIPRegex + `|(\[` + IPRegex + `\])|(([a-zA-Z0-9]([a-zA-Z0-9-_]+)?[a-zA-Z0-9]([-\.][a-zA-Z0-9]+)*)|(` + URLSubdomainRegex + `?))?(([a-zA-Z\x{00a1}-\x{ffff}0-9]+-?-?)*[a-zA-Z\x{00a1}-\x{ffff}0-9]+)(?:\.([a-zA-Z\x{00a1}-\x{ffff}]{1,}))?))\.?` + URLPortRegex + `?` + URLPathRegex + `?$` NumericRegex string = "^[-+]?[0-9]+(?:\\.[0-9]+)?$" //nolint:lll //cspell:ignore FFFD RoleARNRegex string = `^[\x{0009}\x{000A}\x{000D}\x{0020}-\x{007E}\x{0085}\x{00A0}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]+$` S3BucketNameRegex string = `^[a-z0-9][a-z0-9\-.]{1,61}[a-z0-9]$` GCSNonDomainNameBucketNameRegex string = `^[a-z0-9][a-z0-9-_]{1,61}[a-z0-9]$` GCSNonDomainNameBucketMaxLength int = 63 HeaderNameRegex string = `^([a-zA-Z0-9]+[_-]?)+$` AzureResourceIDRegex string = `^\/subscriptions\/[a-zA-Z0-9-]+\/resourceGroups\/[a-zA-Z0-9-]+\/providers\/[a-zA-Z0-9-\._]+\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+$` //nolint:lll )
Regular expressions for validating URL. It is from https://github.com/asaskevich/govalidator. The same regex is used on the frontend side.
const ( LightstepMetricDataType = "metric" LightstepLatencyDataType = "latency" LightstepErrorRateDataType = "error_rate" LightstepTotalCountDataType = "total" LightstepGoodCountDataType = "good" )
const ( PingdomTypeUptime = "uptime" PingdomTypeTransaction = "transaction" )
const APIVersion = "n9/v1alpha"
APIVersion is a value of valid apiVersions
const DatasourceStableChannel = "stable"
const GCM = GoogleCloudMonitoring
GCM aliases GoogleCloudMonitoring. Eventually we should solve this inconsistency between the enum name and it's string representation.
const HiddenValue = "[hidden]"
HiddenValue can be used as a value of a secret field and is ignored during saving
const MinimalSupportedQueryDelayAgentVersion = "v0.65.0-beta09"
Variables ¶
var ( ErrAgentTypeChanged = fmt.Errorf("cannot change agent type") ErrDirectTypeChanged = fmt.Errorf("cannot change direct type") ErrDirectSecretRequired = fmt.Errorf("direct secrets cannot be empty") ErrAlertMethodSecretRequired = fmt.Errorf("alert method secrets cannot be empty") ErrAlertMethodTypeChanged = fmt.Errorf("cannot change alert method type") )
var ErrInvalidDataSourceType = errors.New("not a valid DataSourceType")
var ErrInvalidReleaseChannel = fmt.Errorf("not a valid ReleaseChannel, try [%s]", strings.Join(_ReleaseChannelNames, ", "))
Functions ¶
func FieldRuleMetadataDisplayName ¶ added in v0.49.0
func FieldRuleMetadataDisplayName[S any](getter func(S) string) validation.PropertyRules[string, S]
func FieldRuleMetadataLabels ¶ added in v0.49.0
func FieldRuleMetadataLabels[S any](getter func(S) Labels) validation.PropertyRules[Labels, S]
func FieldRuleMetadataName ¶ added in v0.49.0
func FieldRuleMetadataName[S any](getter func(S) string) validation.PropertyRules[string, S]
func FieldRuleMetadataProject ¶ added in v0.49.0
func FieldRuleMetadataProject[S any](getter func(S) string) validation.PropertyRules[string, S]
func FieldRuleSpecDescription ¶ added in v0.49.0
func FieldRuleSpecDescription[S any](getter func(S) string) validation.PropertyRules[string, S]
func IsBiggerThanMaxQueryDelayDuration ¶ added in v0.61.3
func IsDNS1123Label ¶
IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123). nolint:lll Source: https://github.com/kubernetes/kubernetes/blob/fdb2cb4c8832da1499069bda918c014762d8ac05/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go
func IsValidDirectType ¶
func IsValidRegion ¶ added in v0.59.0
func IsValidSourceOf ¶
func OperatorNames ¶ added in v0.59.0
func OperatorNames() []string
OperatorNames returns a list of possible string values of Operator.
func ReleaseChannelNames ¶ added in v0.23.0
func ReleaseChannelNames() []string
ReleaseChannelNames returns a list of possible string values of ReleaseChannel.
func SourceOfToStringSlice ¶
func ValidationRuleLabels ¶ added in v0.48.0
func ValidationRuleLabels() validation.SingleRule[Labels]
Types ¶
type AWSIAMRoleAuthExternalIDs ¶ added in v0.57.0
type AWSIAMRoleAuthExternalIDs struct { ExternalID string `json:"externalID"` AccountID string `json:"accountID"` }
AWSIAMRoleAuthExternalIDs struct which is used for exposing AWS IAM role auth data
type AWSRegion ¶
func AWSRegions ¶
func AWSRegions() []AWSRegion
AWSRegions returns list of all AWS regions. Data is taken from: https://docs.aws.amazon.com/general/latest/gr/rande.html
type Agent ¶
type Agent struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata AgentMetadata `json:"metadata"` Spec AgentSpec `json:"spec"` Status *AgentStatus `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` OktaClientID string `json:"oktaClientID,omitempty"` }
Agent struct which mapped one to one with kind: Agent yaml definition
func (Agent) GetManifestSource ¶ added in v0.28.0
func (Agent) GetOrganization ¶ added in v0.28.0
func (Agent) GetProject ¶ added in v0.28.0
func (Agent) GetVersion ¶ added in v0.28.0
func (Agent) SetManifestSource ¶ added in v0.28.0
func (Agent) SetOrganization ¶ added in v0.28.0
func (Agent) SetProject ¶ added in v0.28.0
type AgentMetadata ¶ added in v0.28.0
type AgentMetadata struct { Name string `json:"name" validate:"required,objectName"` DisplayName string `json:"displayName,omitempty" validate:"omitempty,min=0,max=63"` Project string `json:"project,omitempty" validate:"objectName"` Labels Labels `json:"labels,omitempty" validate:"omitempty,labels"` }
type AgentSpec ¶
type AgentSpec struct { Description string `json:"description,omitempty" validate:"description" example:"Prometheus description"` //nolint:lll SourceOf []string `json:"sourceOf" example:"Metrics,Services"` ReleaseChannel ReleaseChannel `json:"releaseChannel,omitempty" example:"beta,stable"` Prometheus *PrometheusAgentConfig `json:"prometheus,omitempty"` Datadog *DatadogAgentConfig `json:"datadog,omitempty"` NewRelic *NewRelicAgentConfig `json:"newRelic,omitempty"` AppDynamics *AppDynamicsAgentConfig `json:"appDynamics,omitempty"` Splunk *SplunkAgentConfig `json:"splunk,omitempty"` Lightstep *LightstepAgentConfig `json:"lightstep,omitempty"` SplunkObservability *SplunkObservabilityAgentConfig `json:"splunkObservability,omitempty"` Dynatrace *DynatraceAgentConfig `json:"dynatrace,omitempty"` Elasticsearch *ElasticsearchAgentConfig `json:"elasticsearch,omitempty"` ThousandEyes *ThousandEyesAgentConfig `json:"thousandEyes,omitempty"` Graphite *GraphiteAgentConfig `json:"graphite,omitempty"` BigQuery *BigQueryAgentConfig `json:"bigQuery,omitempty"` OpenTSDB *OpenTSDBAgentConfig `json:"opentsdb,omitempty"` GrafanaLoki *GrafanaLokiAgentConfig `json:"grafanaLoki,omitempty"` CloudWatch *CloudWatchAgentConfig `json:"cloudWatch,omitempty"` Pingdom *PingdomAgentConfig `json:"pingdom,omitempty"` AmazonPrometheus *AmazonPrometheusAgentConfig `json:"amazonPrometheus,omitempty"` Redshift *RedshiftAgentConfig `json:"redshift,omitempty"` SumoLogic *SumoLogicAgentConfig `json:"sumoLogic,omitempty"` Instana *InstanaAgentConfig `json:"instana,omitempty"` InfluxDB *InfluxDBAgentConfig `json:"influxdb,omitempty"` AzureMonitor *AzureMonitorAgentConfig `json:"azureMonitor,omitempty"` GCM *GCMAgentConfig `json:"gcm,omitempty"` Generic *GenericAgentConfig `json:"generic,omitempty"` Honeycomb *HoneycombAgentConfig `json:"honeycomb,omitempty"` HistoricalDataRetrieval *HistoricalDataRetrieval `json:"historicalDataRetrieval,omitempty"` QueryDelay *QueryDelay `json:"queryDelay,omitempty"` }
AgentSpec represents content of Spec typical for Agent Object
func (AgentSpec) GetType ¶
func (spec AgentSpec) GetType() (DataSourceType, error)
type AgentStatus ¶
type AgentStatus struct { AgentType string `json:"agentType" example:"Prometheus"` AgentVersion string `json:"agentVersion,omitempty" example:"0.0.9"` LastConnection string `json:"lastConnection,omitempty" example:"2020-08-31T14:26:13Z"` }
AgentStatus represents content of Status optional for Agent Object
type Alert ¶
type Alert struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata AlertMetadata `json:"metadata"` Spec AlertSpec `json:"spec"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
Alert represents triggered alert
func (Alert) GetManifestSource ¶ added in v0.28.0
func (Alert) GetOrganization ¶ added in v0.28.0
func (Alert) GetProject ¶ added in v0.28.0
func (Alert) GetVersion ¶ added in v0.28.0
func (Alert) SetManifestSource ¶ added in v0.28.0
func (Alert) SetOrganization ¶ added in v0.28.0
func (Alert) SetProject ¶ added in v0.28.0
type AlertCondition ¶
type AlertCondition struct { Measurement string `json:"measurement" validate:"required,alertPolicyMeasurement" example:"BurnedBudget"` Value interface{} `json:"value" validate:"required" example:"0.97"` AlertingWindow string `json:"alertingWindow,omitempty" validate:"omitempty,validDuration,nonNegativeDuration,durationMinutePrecision" example:"30m"` //nolint:lll LastsForDuration string `json:"lastsFor,omitempty" validate:"omitempty,validDuration,nonNegativeDuration" example:"15m"` //nolint:lll Operator string `json:"op,omitempty" validate:"omitempty,operator" example:"lt"` }
AlertCondition represents a condition to meet to trigger an alert.
type AlertMetadata ¶ added in v0.28.0
type AlertMethod ¶
type AlertMethod struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata AlertMethodMetadata `json:"metadata"` Spec AlertMethodSpec `json:"spec"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
AlertMethod represents the configuration required to send a notification to an external service when an alert is triggered.
func (AlertMethod) GetKind ¶ added in v0.28.0
func (a AlertMethod) GetKind() manifest.Kind
func (AlertMethod) GetManifestSource ¶ added in v0.28.0
func (a AlertMethod) GetManifestSource() string
func (AlertMethod) GetName ¶ added in v0.28.0
func (a AlertMethod) GetName() string
func (AlertMethod) GetOrganization ¶ added in v0.28.0
func (a AlertMethod) GetOrganization() string
func (AlertMethod) GetProject ¶ added in v0.28.0
func (a AlertMethod) GetProject() string
func (AlertMethod) GetVersion ¶ added in v0.28.0
func (a AlertMethod) GetVersion() string
func (AlertMethod) SetManifestSource ¶ added in v0.28.0
func (a AlertMethod) SetManifestSource(src string) manifest.Object
func (AlertMethod) SetOrganization ¶ added in v0.28.0
func (a AlertMethod) SetOrganization(org string) manifest.Object
func (AlertMethod) SetProject ¶ added in v0.28.0
func (a AlertMethod) SetProject(project string) manifest.Object
func (AlertMethod) Validate ¶ added in v0.28.0
func (a AlertMethod) Validate() error
type AlertMethodMetadata ¶ added in v0.28.0
type AlertMethodSpec ¶
type AlertMethodSpec struct { Description string `json:"description" validate:"description" example:"Sends notification"` Webhook *WebhookAlertMethod `json:"webhook,omitempty" validate:"omitempty"` PagerDuty *PagerDutyAlertMethod `json:"pagerduty,omitempty"` Slack *SlackAlertMethod `json:"slack,omitempty"` Discord *DiscordAlertMethod `json:"discord,omitempty"` Opsgenie *OpsgenieAlertMethod `json:"opsgenie,omitempty"` ServiceNow *ServiceNowAlertMethod `json:"servicenow,omitempty"` Jira *JiraAlertMethod `json:"jira,omitempty"` Teams *TeamsAlertMethod `json:"msteams,omitempty"` Email *EmailAlertMethod `json:"email,omitempty"` }
AlertMethodSpec represents content of AlertMethod's Spec.
type AlertMethodWithAlertPolicy ¶
type AlertMethodWithAlertPolicy struct { AlertMethod PublicAlertMethod `json:"alertMethod"` AlertPolicies []AlertPolicy `json:"alertPolicies"` }
AlertMethodWithAlertPolicy represents an AlertPolicies assigned to AlertMethod.
type AlertObjectMetadata ¶ added in v0.49.0
type AlertObjective ¶ added in v0.31.0
type AlertPolicy ¶
type AlertPolicy struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata AlertPolicyMetadata `json:"metadata"` Spec AlertPolicySpec `json:"spec"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
AlertPolicy represents a set of conditions that can trigger an alert.
func (AlertPolicy) GetKind ¶ added in v0.28.0
func (a AlertPolicy) GetKind() manifest.Kind
func (AlertPolicy) GetManifestSource ¶ added in v0.28.0
func (a AlertPolicy) GetManifestSource() string
func (AlertPolicy) GetName ¶ added in v0.28.0
func (a AlertPolicy) GetName() string
func (AlertPolicy) GetOrganization ¶ added in v0.28.0
func (a AlertPolicy) GetOrganization() string
func (AlertPolicy) GetProject ¶ added in v0.28.0
func (a AlertPolicy) GetProject() string
func (AlertPolicy) GetVersion ¶ added in v0.28.0
func (a AlertPolicy) GetVersion() string
func (AlertPolicy) SetManifestSource ¶ added in v0.28.0
func (a AlertPolicy) SetManifestSource(src string) manifest.Object
func (AlertPolicy) SetOrganization ¶ added in v0.28.0
func (a AlertPolicy) SetOrganization(org string) manifest.Object
func (AlertPolicy) SetProject ¶ added in v0.28.0
func (a AlertPolicy) SetProject(project string) manifest.Object
func (AlertPolicy) Validate ¶ added in v0.28.0
func (a AlertPolicy) Validate() error
type AlertPolicyMetadata ¶ added in v0.28.0
type AlertPolicyMetadata struct { Name string `json:"name" validate:"required,objectName"` DisplayName string `json:"displayName,omitempty" validate:"omitempty,min=0,max=63"` Project string `json:"project,omitempty" validate:"objectName"` Labels Labels `json:"labels,omitempty" validate:"omitempty,labels"` }
type AlertPolicySpec ¶
type AlertPolicySpec struct { Description string `json:"description" validate:"description" example:"Error budget is at risk"` Severity string `json:"severity" validate:"required,severity" example:"High"` CoolDownDuration string `json:"coolDown,omitempty" validate:"omitempty,validDuration,nonNegativeDuration,durationAtLeast=5m" example:"5m"` //nolint:lll Conditions []AlertCondition `json:"conditions" validate:"required,min=1,dive"` AlertMethods []PublicAlertMethod `json:"alertMethods"` }
AlertPolicySpec represents content of AlertPolicy's Spec.
func (AlertPolicySpec) GetAlertMethods ¶
func (spec AlertPolicySpec) GetAlertMethods() []PublicAlertMethod
type AlertSilence ¶
type AlertSilence struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata AlertSilenceMetadata `json:"metadata"` Spec AlertSilenceSpec `json:"spec"` Status *AlertSilenceStatus `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
AlertSilence represents alerts silencing configuration for given SLO and AlertPolicy.
func (AlertSilence) GetKind ¶ added in v0.28.0
func (a AlertSilence) GetKind() manifest.Kind
func (AlertSilence) GetManifestSource ¶ added in v0.28.0
func (a AlertSilence) GetManifestSource() string
func (AlertSilence) GetName ¶ added in v0.28.0
func (a AlertSilence) GetName() string
func (AlertSilence) GetOrganization ¶ added in v0.28.0
func (a AlertSilence) GetOrganization() string
func (AlertSilence) GetProject ¶ added in v0.28.0
func (a AlertSilence) GetProject() string
func (AlertSilence) GetVersion ¶ added in v0.28.0
func (a AlertSilence) GetVersion() string
func (AlertSilence) SetManifestSource ¶ added in v0.28.0
func (a AlertSilence) SetManifestSource(src string) manifest.Object
func (AlertSilence) SetOrganization ¶ added in v0.28.0
func (a AlertSilence) SetOrganization(org string) manifest.Object
func (AlertSilence) SetProject ¶ added in v0.28.0
func (a AlertSilence) SetProject(project string) manifest.Object
func (AlertSilence) Validate ¶ added in v0.28.0
func (a AlertSilence) Validate() error
type AlertSilenceAlertPolicySource ¶
type AlertSilenceAlertPolicySource struct { Name string `json:"name" validate:"required"` Project string `json:"project,omitempty"` }
AlertSilenceAlertPolicySource represents AlertPolicy attached to the SLO.
type AlertSilenceMetadata ¶ added in v0.28.0
type AlertSilenceMetadata struct { Name string `json:"name" validate:"required,objectName" example:"name"` Project string `json:"project,omitempty" validate:"objectName" example:"default"` }
AlertSilenceMetadata defines only basic metadata fields - name and project which uniquely identifies object on project level.
type AlertSilencePeriod ¶
type AlertSilencePeriod struct { StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,omitempty"` Duration string `json:"duration,omitempty"` }
AlertSilencePeriod represents time range configuration for AlertSilence.
type AlertSilenceSpec ¶
type AlertSilenceSpec struct { Description string `json:"description" validate:"description"` Slo string `json:"slo" validate:"required"` AlertPolicy AlertSilenceAlertPolicySource `json:"alertPolicy" validate:"required"` Period AlertSilencePeriod `json:"period" validate:"required"` }
AlertSilenceSpec represents content of AlertSilence's Spec.
func (AlertSilenceSpec) GetParsedDuration ¶
func (a AlertSilenceSpec) GetParsedDuration() (time.Duration, error)
func (AlertSilenceSpec) GetParsedEndTimeUTC ¶
func (a AlertSilenceSpec) GetParsedEndTimeUTC() (time.Time, error)
func (AlertSilenceSpec) GetParsedStartTimeUTC ¶
func (a AlertSilenceSpec) GetParsedStartTimeUTC() (time.Time, error)
type AlertSilenceStatus ¶
type AlertSilenceStatus struct { From string `json:"from"` To string `json:"to"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` }
AlertSilenceStatus represents content of Status optional for AlertSilence object.
type AlertSpec ¶
type AlertSpec struct { AlertPolicy AlertObjectMetadata `json:"alertPolicy"` SLO AlertObjectMetadata `json:"slo"` Service AlertObjectMetadata `json:"service"` Objective AlertObjective `json:"objective"` Severity string `json:"severity" validate:"required,severity" example:"High"` Status string `json:"status" example:"Resolved"` TriggeredMetricTime string `json:"triggeredMetricTime"` TriggeredClockTime string `json:"triggeredClockTime"` ResolvedClockTime *string `json:"resolvedClockTime,omitempty"` ResolvedMetricTime *string `json:"resolvedMetricTime,omitempty"` CoolDown string `json:"coolDown"` Conditions []AlertCondition `json:"conditions"` }
AlertSpec represents content of Alert's Spec
type AmazonPrometheusAgentConfig ¶
type AmazonPrometheusAgentConfig struct { URL string `json:"url" validate:"required,url"` Region string `json:"region" validate:"required,max=255"` }
AmazonPrometheusAgentConfig represents content of Amazon Managed Service Configuration typical for Agent Object.
type AppDynamicsAgentConfig ¶
type AppDynamicsAgentConfig struct {
URL string `json:"url,omitempty" example:"https://nobl9.saas.appdynamics.com"`
}
AppDynamicsAgentConfig represents content of AppDynamics Configuration typical for Agent Object.
type AppDynamicsDirectConfig ¶
type AppDynamicsDirectConfig struct { URL string `json:"url,omitempty" validate:"httpsURL" example:"https://nobl9.saas.appdynamics.com"` ClientID string `json:"clientID,omitempty" example:"apiClientID@accountID"` ClientName string `json:"clientName,omitempty" example:"apiClientID"` AccountName string `json:"accountName,omitempty" example:"accountID"` ClientSecret string `json:"clientSecret,omitempty" example:"secret"` }
AppDynamicsDirectConfig represents content of AppDynamics Configuration typical for Direct Object.
func (*AppDynamicsDirectConfig) GenerateMissingFields ¶
func (a *AppDynamicsDirectConfig) GenerateMissingFields()
GenerateMissingFields - this function is responsible for generating ClientID from AccountName and ClientName when provided with new, also it generates AccountName and ClientName for old already existing configs.
type AzureMonitorAgentConfig ¶ added in v0.40.0
type AzureMonitorAgentConfig struct {
TenantID string `json:"tenantId" validate:"required,uuid_rfc4122" example:"abf988bf-86f1-41af-91ab-2d7cd011db46"`
}
AzureMonitorAgentConfig represents content of AzureMonitor Configuration typical for Agent Object.
type AzureMonitorDirectConfig ¶ added in v0.45.0
type AzureMonitorDirectConfig struct { TenantID string `json:"tenantId" validate:"required,uuid_rfc4122" example:"abf988bf-86f1-41af-91ab-2d7cd011db46"` ClientID string `json:"clientId"` ClientSecret string `json:"clientSecret"` }
AzureMonitorDirectConfig represents content of AzureMonitor Configuration typical for Direct Object.
type BigQueryAgentConfig ¶
type BigQueryAgentConfig struct { }
BigQueryAgentConfig represents content of BigQuery configuration. Since the agent does not require additional configuration this is just a marker struct.
type BigQueryDirectConfig ¶
type BigQueryDirectConfig struct {
ServiceAccountKey string `json:"serviceAccountKey,omitempty"`
}
BigQueryDirectConfig represents content of BigQuery configuration typical for Direct Object.
type CloudWatchAgentConfig ¶
type CloudWatchAgentConfig struct { }
CloudWatchAgentConfig represents content of CloudWatch Configuration typical for Agent Object.
type CloudWatchDirectConfig ¶
type CloudWatchDirectConfig struct { AccessKeyID string `json:"accessKeyID,omitempty"` SecretAccessKey string `json:"secretAccessKey,omitempty"` RoleARN string `json:"roleARN,omitempty" example:"arn:aws:iam::123456789012:role/SomeAccessRole"` //nolint: lll }
CloudWatchDirectConfig represents content of CloudWatch Configuration typical for Direct Object.
type DataExport ¶
type DataExport struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata DataExportMetadata `json:"metadata"` Spec DataExportSpec `json:"spec"` Status *DataExportStatus `json:"status"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
DataExport struct which mapped one to one with kind: DataExport yaml definition
func (DataExport) GetKind ¶ added in v0.28.0
func (d DataExport) GetKind() manifest.Kind
func (DataExport) GetManifestSource ¶ added in v0.28.0
func (d DataExport) GetManifestSource() string
func (DataExport) GetName ¶ added in v0.28.0
func (d DataExport) GetName() string
func (DataExport) GetOrganization ¶ added in v0.28.0
func (d DataExport) GetOrganization() string
func (DataExport) GetProject ¶ added in v0.28.0
func (d DataExport) GetProject() string
func (DataExport) GetVersion ¶ added in v0.28.0
func (d DataExport) GetVersion() string
func (DataExport) SetManifestSource ¶ added in v0.28.0
func (d DataExport) SetManifestSource(src string) manifest.Object
func (DataExport) SetOrganization ¶ added in v0.28.0
func (d DataExport) SetOrganization(org string) manifest.Object
func (DataExport) SetProject ¶ added in v0.28.0
func (d DataExport) SetProject(project string) manifest.Object
func (DataExport) Validate ¶ added in v0.28.0
func (d DataExport) Validate() error
type DataExportMetadata ¶ added in v0.28.0
type DataExportMetadata struct { Name string `json:"name" validate:"required,objectName"` DisplayName string `json:"displayName,omitempty" validate:"omitempty,min=0,max=63"` Project string `json:"project,omitempty" validate:"objectName"` Labels Labels `json:"labels,omitempty" validate:"omitempty,labels"` }
type DataExportSpec ¶
type DataExportSpec struct { ExportType string `json:"exportType" validate:"required,exportType" example:"Snowflake"` Spec interface{} `json:"spec" validate:"required"` }
DataExportSpec represents content of DataExport's Spec
func (*DataExportSpec) UnmarshalJSON ¶ added in v0.28.0
func (d *DataExportSpec) UnmarshalJSON(bytes []byte) error
type DataExportStatus ¶
type DataExportStatus struct { ExportJob DataExportStatusJob `json:"exportJob"` AWSExternalID *string `json:"awsExternalID,omitempty"` }
DataExportStatus represents content of Status optional for DataExport Object
type DataExportStatusJob ¶
type DataExportStatusJob struct { Timestamp string `json:"timestamp,omitempty" example:"2021-02-09T10:43:07Z"` State string `json:"state" example:"finished"` }
DataExportStatusJob represents content of ExportJob status
type DataSourceType ¶
type DataSourceType int
DataSourceType represents the type of data source, either Agent or Direct.
Beware that order of these constants is very important existing integrations are saved in db with type = DataSourceType. New integrations always have to be added as last item in this list to get new "type id".
ENUM(
Prometheus = 1 Datadog NewRelic AppDynamics Splunk Lightstep SplunkObservability Dynatrace ThousandEyes Graphite BigQuery Elasticsearch OpenTSDB GrafanaLoki CloudWatch Pingdom AmazonPrometheus Redshift SumoLogic Instana InfluxDB GoogleCloudMonitoring AzureMonitor Generic Honeycomb )
const ( // Prometheus is a DataSourceType of type Prometheus. Prometheus DataSourceType = iota + 1 // Datadog is a DataSourceType of type Datadog. Datadog // NewRelic is a DataSourceType of type NewRelic. NewRelic // AppDynamics is a DataSourceType of type AppDynamics. AppDynamics // Splunk is a DataSourceType of type Splunk. Splunk // Lightstep is a DataSourceType of type Lightstep. Lightstep // SplunkObservability is a DataSourceType of type SplunkObservability. SplunkObservability // Dynatrace is a DataSourceType of type Dynatrace. Dynatrace // ThousandEyes is a DataSourceType of type ThousandEyes. ThousandEyes // Graphite is a DataSourceType of type Graphite. Graphite // BigQuery is a DataSourceType of type BigQuery. BigQuery // Elasticsearch is a DataSourceType of type Elasticsearch. Elasticsearch // OpenTSDB is a DataSourceType of type OpenTSDB. OpenTSDB // GrafanaLoki is a DataSourceType of type GrafanaLoki. GrafanaLoki // CloudWatch is a DataSourceType of type CloudWatch. CloudWatch // Pingdom is a DataSourceType of type Pingdom. Pingdom // AmazonPrometheus is a DataSourceType of type AmazonPrometheus. AmazonPrometheus // Redshift is a DataSourceType of type Redshift. Redshift // SumoLogic is a DataSourceType of type SumoLogic. SumoLogic // Instana is a DataSourceType of type Instana. Instana // InfluxDB is a DataSourceType of type InfluxDB. InfluxDB // GoogleCloudMonitoring is a DataSourceType of type GoogleCloudMonitoring. GoogleCloudMonitoring // AzureMonitor is a DataSourceType of type AzureMonitor. AzureMonitor // Generic is a DataSourceType of type Generic. Generic // Honeycomb is a DataSourceType of type Honeycomb. Honeycomb )
func DataSourceTypeValues ¶ added in v0.60.0
func DataSourceTypeValues() []DataSourceType
DataSourceTypeValues returns a list of the values for DataSourceType
func ParseDataSourceType ¶ added in v0.60.0
func ParseDataSourceType(name string) (DataSourceType, error)
ParseDataSourceType attempts to convert a string to a DataSourceType.
func (DataSourceType) IsValid ¶ added in v0.60.0
func (x DataSourceType) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (DataSourceType) String ¶
func (x DataSourceType) String() string
String implements the Stringer interface.
type DatadogAgentConfig ¶
type DatadogAgentConfig struct {
Site string `json:"site,omitempty" validate:"site" example:"eu,us3.datadoghq.com"`
}
DatadogAgentConfig represents content of Datadog Configuration typical for Agent Object.
type DatadogDirectConfig ¶
type DatadogDirectConfig struct { Site string `json:"site,omitempty" validate:"site" example:"eu,us3.datadoghq.com"` APIKey string `json:"apiKey" example:"secret"` ApplicationKey string `json:"applicationKey" example:"secret"` }
DatadogDirectConfig represents content of Datadog Configuration typical for Direct Object.
type Direct ¶
type Direct struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata DirectMetadata `json:"metadata"` Spec DirectSpec `json:"spec"` Status *DirectStatus `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
Direct struct which mapped one to one with kind: Direct yaml definition
func (Direct) GetManifestSource ¶ added in v0.28.0
func (Direct) GetOrganization ¶ added in v0.28.0
func (Direct) GetProject ¶ added in v0.28.0
func (Direct) GetVersion ¶ added in v0.28.0
func (Direct) SetManifestSource ¶ added in v0.28.0
func (Direct) SetOrganization ¶ added in v0.28.0
func (Direct) SetProject ¶ added in v0.28.0
type DirectMetadata ¶ added in v0.28.0
type DirectMetadata struct { Name string `json:"name" validate:"required,objectName"` DisplayName string `json:"displayName,omitempty" validate:"omitempty,min=0,max=63"` Project string `json:"project,omitempty" validate:"objectName"` Labels Labels `json:"labels,omitempty" validate:"omitempty,labels"` }
type DirectSpec ¶
type DirectSpec struct { Description string `json:"description,omitempty" validate:"description" example:"Datadog description"` //nolint:lll SourceOf []string `json:"sourceOf" example:"Metrics,Services"` ReleaseChannel ReleaseChannel `json:"releaseChannel,omitempty" example:"beta,stable"` Datadog *DatadogDirectConfig `json:"datadog,omitempty"` LogCollectionEnabled *bool `json:"logCollectionEnabled,omitempty"` NewRelic *NewRelicDirectConfig `json:"newRelic,omitempty"` AppDynamics *AppDynamicsDirectConfig `json:"appDynamics,omitempty"` SplunkObservability *SplunkObservabilityDirectConfig `json:"splunkObservability,omitempty"` ThousandEyes *ThousandEyesDirectConfig `json:"thousandEyes,omitempty"` BigQuery *BigQueryDirectConfig `json:"bigQuery,omitempty"` Splunk *SplunkDirectConfig `json:"splunk,omitempty"` CloudWatch *CloudWatchDirectConfig `json:"cloudWatch,omitempty"` Pingdom *PingdomDirectConfig `json:"pingdom,omitempty"` Redshift *RedshiftDirectConfig `json:"redshift,omitempty"` SumoLogic *SumoLogicDirectConfig `json:"sumoLogic,omitempty"` Instana *InstanaDirectConfig `json:"instana,omitempty"` InfluxDB *InfluxDBDirectConfig `json:"influxdb,omitempty"` GCM *GCMDirectConfig `json:"gcm,omitempty"` Lightstep *LightstepDirectConfig `json:"lightstep,omitempty"` Dynatrace *DynatraceDirectConfig `json:"dynatrace,omitempty"` AzureMonitor *AzureMonitorDirectConfig `json:"azureMonitor,omitempty"` Honeycomb *HoneycombDirectConfig `json:"honeycomb,omitempty"` HistoricalDataRetrieval *HistoricalDataRetrieval `json:"historicalDataRetrieval,omitempty"` QueryDelay *QueryDelay `json:"queryDelay,omitempty"` }
DirectSpec represents content of Spec typical for Direct Object
func (DirectSpec) GetType ¶
func (spec DirectSpec) GetType() (string, error)
type DirectStatus ¶
type DirectStatus struct {
DirectType string `json:"directType" example:"Datadog"`
}
DirectStatus represents content of Status optional for Direct Object
type DiscordAlertMethod ¶
type DiscordAlertMethod struct {
URL string `json:"url" validate:"urlDiscord"` // Field required when AlertMethod is created.
}
DiscordAlertMethod represents a set of properties required to send message to Discord.
type Duration ¶ added in v0.61.3
type Duration struct { Value *int `json:"value" validate:"required,min=0,max=86400"` Unit DurationUnit `json:"unit" validate:"required"` }
type DurationUnit ¶ added in v0.61.3
type DurationUnit string
const ( Millisecond DurationUnit = "Millisecond" Second DurationUnit = "Second" Minute DurationUnit = "Minute" Hour DurationUnit = "Hour" )
func DurationUnitFromString ¶ added in v0.61.3
func DurationUnitFromString(unit string) (DurationUnit, error)
func (DurationUnit) Duration ¶ added in v0.61.3
func (d DurationUnit) Duration() time.Duration
func (DurationUnit) String ¶ added in v0.61.3
func (d DurationUnit) String() string
type DynatraceAgentConfig ¶
type DynatraceAgentConfig struct { URL string `` //nolint: lll /* 165-byte string literal not displayed */ }
DynatraceAgentConfig represents content of Dynatrace Configuration typical for Agent Object.
type DynatraceDirectConfig ¶
type DynatraceDirectConfig struct { URL string `` //nolint: lll /* 161-byte string literal not displayed */ DynatraceToken string `json:"dynatraceToken,omitempty"` }
DynatraceDirectConfig represents content of Dynatrace configuration typical for Direct Object.
type ElasticsearchAgentConfig ¶
type ElasticsearchAgentConfig struct { URL string `` //nolint: lll /* 148-byte string literal not displayed */ }
ElasticsearchAgentConfig represents content of Elasticsearch Configuration typical for Agent Object.
type EmailAlertMethod ¶
type EmailAlertMethod struct { To []string `json:"to,omitempty" validate:"omitempty,max=10,emails"` Cc []string `json:"cc,omitempty" validate:"omitempty,max=10,emails"` Bcc []string `json:"bcc,omitempty" validate:"omitempty,max=10,emails"` // Deprecated: Defining custom template for email alert method is now deprecated. This property is ignored. Subject string `json:"subject,omitempty" validate:"omitempty,max=90,allowedAlertMethodEmailSubjectFields"` // Deprecated: Defining custom template for email alert method is now deprecated. This property is ignored. Body string `json:"body,omitempty" validate:"omitempty,max=2000,allowedAlertMethodEmailBodyFields"` }
EmailAlertMethod represents a set of properties required to send an email.
type ErrInvalidPayload ¶
type ErrInvalidPayload struct {
Msg string
}
func (ErrInvalidPayload) Error ¶
func (e ErrInvalidPayload) Error() string
type GCMAgentConfig ¶
type GCMAgentConfig struct { }
GCMAgentConfig represents content of GCM configuration. Since the agent does not require additional configuration this is just a marker struct.
type GCMDirectConfig ¶
type GCMDirectConfig struct {
ServiceAccountKey string `json:"serviceAccountKey,omitempty"`
}
GCMDirectConfig represents content of GCM configuration typical for Direct Object.
type GCSDataExportSpec ¶
type GCSDataExportSpec struct {
BucketName string `json:"bucketName" validate:"required,min=3,max=222,gcsBucketName" example:"example-bucket.org.com"`
}
GCSDataExportSpec represents content of GCP Cloud Storage export type spec.
type GenericAgentConfig ¶ added in v0.52.0
type GenericAgentConfig struct { }
GenericAgentConfig represents content of Generic Configuration typical for Agent Object.
type GenericObject ¶ added in v0.42.0
type GenericObject map[string]interface{}
GenericObject represents a generic map[string]interface{} representation of manifest.Object. It's useful for scenarios where an implementation does not want to be tied to specific v1alpha versions.
func (GenericObject) GetKind ¶ added in v0.42.0
func (g GenericObject) GetKind() manifest.Kind
func (GenericObject) GetManifestSource ¶ added in v0.42.0
func (g GenericObject) GetManifestSource() string
func (GenericObject) GetName ¶ added in v0.42.0
func (g GenericObject) GetName() string
func (GenericObject) GetOrganization ¶ added in v0.42.0
func (g GenericObject) GetOrganization() string
func (GenericObject) GetProject ¶ added in v0.42.0
func (g GenericObject) GetProject() string
func (GenericObject) GetVersion ¶ added in v0.42.0
func (g GenericObject) GetVersion() string
func (GenericObject) SetManifestSource ¶ added in v0.42.0
func (g GenericObject) SetManifestSource(src string) manifest.Object
func (GenericObject) SetOrganization ¶ added in v0.42.0
func (g GenericObject) SetOrganization(org string) manifest.Object
func (GenericObject) SetProject ¶ added in v0.42.0
func (g GenericObject) SetProject(project string) manifest.Object
func (GenericObject) Validate ¶ added in v0.42.0
func (g GenericObject) Validate() error
type GrafanaLokiAgentConfig ¶
type GrafanaLokiAgentConfig struct {
URL string `json:"url,omitempty" validate:"required,url" example:"example of GrafanaLoki cluster URL"` //nolint: lll
}
GrafanaLokiAgentConfig represents content of GrafanaLoki Configuration typical for Agent Object.
type GraphiteAgentConfig ¶
type GraphiteAgentConfig struct {
URL string `json:"url,omitempty" validate:"required,url" example:"http://graphite.example.com"`
}
GraphiteAgentConfig represents content of Graphite Configuration typical for Agent Object.
type HistoricalDataRetrieval ¶
type HistoricalDataRetrieval struct { MinimumAgentVersion string `json:"minimumAgentVersion,omitempty" example:"0.0.9"` MaxDuration HistoricalRetrievalDuration `json:"maxDuration" validate:"required"` DefaultDuration HistoricalRetrievalDuration `json:"defaultDuration" validate:"required"` }
HistoricalDataRetrieval represents optional parameters for agent to regard when configuring TimeMachine-related SLO properties
type HistoricalRetrievalDuration ¶
type HistoricalRetrievalDuration struct { Value *int `json:"value" validate:"required,min=0,max=43200"` Unit HistoricalRetrievalDurationUnit `json:"unit" validate:"required"` }
HistoricalRetrievalDuration struct was previously called Duration. However, this name was too generic since we also needed to introduce a Duration struct for QueryDelay, which allowed for different time units. Time travel is allowed for days/hours/minutes, and query delay can be set to minutes/seconds. Separating those two structs allows for easier validation logic and avoidance of possible mismatches. Also, later on the database level we have time travel duration unit related enum, that's specifically named for data retrieval purposes. Thus, it was easier to split those Durations into separate structures.
func GetDataRetrievalMaxDuration ¶
func GetDataRetrievalMaxDuration(kind manifest.Kind, typeName string) (HistoricalRetrievalDuration, error)
func (HistoricalRetrievalDuration) BiggerThan ¶
func (d HistoricalRetrievalDuration) BiggerThan(b HistoricalRetrievalDuration) bool
func (HistoricalRetrievalDuration) IsZero ¶
func (d HistoricalRetrievalDuration) IsZero() bool
type HistoricalRetrievalDurationUnit ¶
type HistoricalRetrievalDurationUnit string
const ( HRDDay HistoricalRetrievalDurationUnit = "Day" HRDHour HistoricalRetrievalDurationUnit = "Hour" HRDMinute HistoricalRetrievalDurationUnit = "Minute" )
func HistoricalRetrievalDurationUnitFromString ¶
func HistoricalRetrievalDurationUnitFromString(unit string) (HistoricalRetrievalDurationUnit, error)
func (HistoricalRetrievalDurationUnit) IsValid ¶
func (hrdu HistoricalRetrievalDurationUnit) IsValid() bool
func (HistoricalRetrievalDurationUnit) String ¶
func (hrdu HistoricalRetrievalDurationUnit) String() string
type HoneycombAgentConfig ¶ added in v0.54.0
type HoneycombAgentConfig struct { }
HoneycombAgentConfig represents content of Honeycomb Configuration typical for Agent Object.
type HoneycombDirectConfig ¶ added in v0.54.0
type HoneycombDirectConfig struct {
APIKey string `json:"apiKey,omitempty" example:"lwPoPt20Gmdi4dwTdW9dTR"`
}
HoneycombDirectConfig represents content of Honeycomb Configuration typical for Direct Object.
type InfluxDBAgentConfig ¶
type InfluxDBAgentConfig struct {
URL string `json:"url" validate:"required,url"`
}
InfluxDBAgentConfig represents content of InfluxDB configuration typical fo Agent Object
type InfluxDBDirectConfig ¶
type InfluxDBDirectConfig struct { URL string `json:"url" validate:"required,url"` APIToken string `json:"apiToken"` OrganizationID string `json:"organizationID"` }
InfluxDBDirectConfig represents content of InfluxDB configuration typical for Direct Object.
type InstanaAgentConfig ¶
type InstanaAgentConfig struct {
URL string `json:"url" validate:"required,url"`
}
InstanaAgentConfig represents content of Instana configuration typical for Agent Object
type InstanaDirectConfig ¶
type InstanaDirectConfig struct { APIToken string `json:"apiToken"` URL string `json:"url" validate:"required,url,httpsURL"` }
InstanaDirectConfig represents content of Instana configuration typical for Direct Object.
type JiraAlertMethod ¶
type JiraAlertMethod struct { URL string `json:"url" validate:"required,httpsURL,url"` Username string `json:"username" validate:"required"` APIToken string `json:"apiToken"` // Field required when AlertMethod is created. ProjectKey string `json:"projectKey" validate:"required"` }
JiraAlertMethod represents a set of properties required create tickets in Jira.
type LightstepAgentConfig ¶
type LightstepAgentConfig struct { Organization string `json:"organization,omitempty" example:"LightStep-Play"` Project string `json:"project,omitempty" example:"play"` }
LightstepAgentConfig represents content of Lightstep Configuration typical for Agent Object.
type LightstepDirectConfig ¶
type Measurement ¶
type Measurement int16
Measurement is allowed measurement types used for comparing values and triggering alerts
const ( MeasurementBurnedBudget Measurement = iota + 1 MeasurementAverageBurnRate MeasurementTimeToBurnBudget MeasurementTimeToBurnEntireBudget )
func ParseMeasurement ¶
func ParseMeasurement(value string) (Measurement, error)
ParseMeasurement parses string to Measurement
func (Measurement) String ¶
func (m Measurement) String() string
type NewRelicAgentConfig ¶
type NewRelicAgentConfig struct {
AccountID int `json:"accountId,omitempty" example:"123654"`
}
NewRelicAgentConfig represents content of NewRelic Configuration typical for Agent Object.
type NewRelicDirectConfig ¶
type NewRelicDirectConfig struct { AccountID int `json:"accountId" validate:"required" example:"123654"` InsightsQueryKey string `json:"insightsQueryKey" validate:"newRelicApiKey" example:"secret"` }
NewRelicDirectConfig represents content of NewRelic Configuration typical for Direct Object.
type ObjectContext ¶ added in v0.28.0
type ObjectContext interface { GetOrganization() string SetOrganization(org string) manifest.Object }
ObjectContext defines method for interacting with contextual details of the Object which are not directly part of its manifest and are, from the users perspective, read only.
type ObjectError ¶ added in v0.48.0
type ObjectError struct { Object ObjectMetadata `json:"object"` Errors validation.PropertyErrors `json:"errors"` }
func ValidateObject ¶ added in v0.59.0
func ValidateObject[T manifest.Object](validator validation.Validator[T], s T) *ObjectError
func (*ObjectError) Error ¶ added in v0.48.0
func (o *ObjectError) Error() string
type ObjectMetadata ¶ added in v0.48.0
type OpenTSDBAgentConfig ¶
type OpenTSDBAgentConfig struct {
URL string `json:"url,omitempty" validate:"required,url" example:"example of OpenTSDB cluster URL"` //nolint: lll
}
OpenTSDBAgentConfig represents content of OpenTSDB Configuration typical for Agent Object.
type Operator ¶
type Operator int16
Operator is allowed comparing method for labeling sli
func GetExpectedOperatorForMeasurement ¶ added in v0.29.0
func GetExpectedOperatorForMeasurement(measurement Measurement) (Operator, error)
GetExpectedOperatorForMeasurement returns the operator that should be paired with a given measurement.
func ParseOperator ¶
ParseOperator parses string to Operator
type OpsgenieAlertMethod ¶
type OpsgenieAlertMethod struct { Auth string `json:"auth" validate:"opsgenieApiKey"` // Field required when AlertMethod is created. URL string `json:"url" validate:"optionalURL"` }
OpsgenieAlertMethod represents a set of properties required to send message to Opsgenie.
type PagerDutyAlertMethod ¶
type PagerDutyAlertMethod struct { IntegrationKey string `json:"integrationKey" validate:"pagerDutyIntegrationKey"` SendResolution *SendResolution `json:"sendResolution,omitempty"` }
PagerDutyAlertMethod represents a set of properties required to open an Incident in PagerDuty.
type PingdomAgentConfig ¶
type PingdomAgentConfig struct { }
PingdomAgentConfig represents content of Pingdom Configuration typical for Agent Object.
type PingdomDirectConfig ¶
type PingdomDirectConfig struct {
APIToken string `json:"apiToken"`
}
PingdomDirectConfig represents content of Pingdom Configuration typical for Direct Object.
type PrometheusAgentConfig ¶
type PrometheusAgentConfig struct { URL *string `json:"url,omitempty" example:"http://prometheus-service.monitoring:8080"` Region string `json:"region,omitempty" example:"eu-cental-1"` }
PrometheusAgentConfig represents content of Prometheus Configuration typical for Agent Object.
type PublicAlertMethod ¶
type PublicAlertMethod struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata AlertMethodMetadata `json:"metadata"` Spec PublicAlertMethodSpec `json:"spec"` Status *PublicAlertMethodStatus `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
PublicAlertMethod represents the configuration required to send a notification to an external service when an alert is triggered.
type PublicAlertMethodSpec ¶
type PublicAlertMethodSpec struct { Description string `json:"description" validate:"description" example:"Sends notification"` Webhook *PublicWebhookAlertMethod `json:"webhook,omitempty"` PagerDuty *PublicPagerDutyAlertMethod `json:"pagerduty,omitempty"` Slack *PublicSlackAlertMethod `json:"slack,omitempty"` Discord *PublicDiscordAlertMethod `json:"discord,omitempty"` Opsgenie *PublicOpsgenieAlertMethod `json:"opsgenie,omitempty"` ServiceNow *PublicServiceNowAlertMethod `json:"servicenow,omitempty"` Jira *PublicJiraAlertMethod `json:"jira,omitempty"` Teams *PublicTeamsAlertMethod `json:"msteams,omitempty"` Email *EmailAlertMethod `json:"email,omitempty"` }
PublicAlertMethodSpec represents content of AlertMethod's Spec without secrets.
type PublicAlertMethodStatus ¶
type PublicAlertMethodStatus struct { LastTestDate string `json:"lastTestDate,omitempty" example:"2021-02-09T10:43:07Z"` NextTestPossibleAt string `json:"nextTestPossibleAt,omitempty" example:"2021-02-09T10:43:07Z"` }
PublicAlertMethodStatus represents content of Status optional for PublicAlertMethod Object
type PublicAppDynamicsDirectConfig ¶
type PublicAppDynamicsDirectConfig struct { URL string `json:"url,omitempty" example:"https://nobl9.saas.appdynamics.com"` ClientID string `json:"clientID,omitempty" example:"apiClientID@accountID"` ClientName string `json:"clientName,omitempty" example:"apiClientID"` AccountName string `json:"accountName,omitempty" example:"accountID"` HiddenClientSecret string `json:"clientSecret,omitempty" example:"[hidden]"` }
PublicAppDynamicsDirectConfig represents public content of AppDynamics Configuration typical for Direct Object without secrets.
func (*PublicAppDynamicsDirectConfig) GenerateMissingFields ¶
func (a *PublicAppDynamicsDirectConfig) GenerateMissingFields()
GenerateMissingFields checks if there is no ClientName and AccountName
then separates ClientID into ClientName and AccountName.
type PublicAzureMonitorDirectConfig ¶ added in v0.45.0
type PublicAzureMonitorDirectConfig struct { TenantID string `json:"tenantId" validate:"required,uuid_rfc4122" example:"abf988bf-86f1-41af-91ab-2d7cd011db46"` //nolint: lll HiddenClientID string `json:"clientId"` HiddenClientSecret string `json:"clientSecret"` }
PublicAzureMonitorDirectConfig represents content of AzureMonitor Configuration typical for Direct Object without secrets.
type PublicBigQueryDirectConfig ¶
type PublicBigQueryDirectConfig struct {
HiddenServiceAccountKey string `json:"serviceAccountKey,omitempty"`
}
PublicBigQueryDirectConfig represents content of BigQuery configuration typical for Direct Object without secrets.
type PublicCloudWatchDirectConfig ¶
type PublicCloudWatchDirectConfig struct { HiddenAccessKeyID string `json:"accessKeyID,omitempty"` HiddenSecretAccessKey string `json:"secretAccessKey,omitempty"` HiddenRoleARN string `json:"roleARN,omitempty"` }
PublicCloudWatchDirectConfig represents content of CloudWatch Configuration typical for Direct Object without secrets.
type PublicDatadogDirectConfig ¶
type PublicDatadogDirectConfig struct { Site string `json:"site,omitempty" example:"eu,us3.datadoghq.com"` HiddenAPIKey string `json:"apiKey" example:"[hidden]"` HiddenApplicationKey string `json:"applicationKey" example:"[hidden]"` }
PublicDatadogDirectConfig represents content of Datadog Configuration typical for Direct Object without secrets.
type PublicDirect ¶
type PublicDirect struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata DirectMetadata `json:"metadata"` Spec PublicDirectSpec `json:"spec"` Status *DirectStatus `json:"status,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
PublicDirect struct which mapped one to one with kind: Direct yaml definition without secrets
func (PublicDirect) GetKind ¶ added in v0.54.0
func (p PublicDirect) GetKind() manifest.Kind
func (PublicDirect) GetManifestSource ¶ added in v0.56.0
func (p PublicDirect) GetManifestSource() string
func (PublicDirect) GetName ¶ added in v0.54.0
func (p PublicDirect) GetName() string
func (PublicDirect) GetProject ¶ added in v0.54.0
func (p PublicDirect) GetProject() string
func (PublicDirect) GetVersion ¶ added in v0.54.0
func (p PublicDirect) GetVersion() string
func (PublicDirect) SetManifestSource ¶ added in v0.56.0
func (p PublicDirect) SetManifestSource(src string) manifest.Object
func (PublicDirect) SetProject ¶ added in v0.54.0
func (p PublicDirect) SetProject(project string) manifest.Object
func (PublicDirect) Validate ¶ added in v0.54.0
func (p PublicDirect) Validate() error
type PublicDirectSpec ¶
type PublicDirectSpec struct { Description string `json:"description,omitempty" validate:"description" example:"Datadog description"` //nolint:lll SourceOf []string `json:"sourceOf" example:"Metrics,Services"` ReleaseChannel string `json:"releaseChannel,omitempty" example:"beta,stable"` LogCollectionEnabled bool `json:"logCollectionEnabled,omitempty"` Datadog *PublicDatadogDirectConfig `json:"datadog,omitempty"` NewRelic *PublicNewRelicDirectConfig `json:"newRelic,omitempty"` SplunkObservability *PublicSplunkObservabilityDirectConfig `json:"splunkObservability,omitempty"` AppDynamics *PublicAppDynamicsDirectConfig `json:"appDynamics,omitempty"` ThousandEyes *PublicThousandEyesDirectConfig `json:"thousandEyes,omitempty"` BigQuery *PublicBigQueryDirectConfig `json:"bigQuery,omitempty"` Splunk *PublicSplunkDirectConfig `json:"splunk,omitempty"` CloudWatch *PublicCloudWatchDirectConfig `json:"cloudWatch,omitempty"` Pingdom *PublicPingdomDirectConfig `json:"pingdom,omitempty"` Redshift *PublicRedshiftDirectConfig `json:"redshift,omitempty"` SumoLogic *PublicSumoLogicDirectConfig `json:"sumoLogic,omitempty"` Instana *PublicInstanaDirectConfig `json:"instana,omitempty"` InfluxDB *PublicInfluxDBDirectConfig `json:"influxdb,omitempty"` GCM *PublicGCMDirectConfig `json:"gcm,omitempty"` Lightstep *PublicLightstepDirectConfig `json:"lightstep,omitempty"` Dynatrace *PublicDynatraceDirectConfig `json:"dynatrace,omitempty"` AzureMonitor *PublicAzureMonitorDirectConfig `json:"azureMonitor,omitempty"` Honeycomb *PublicHoneycombDirectConfig `json:"honeycomb,omitempty"` HistoricalDataRetrieval *HistoricalDataRetrieval `json:"historicalDataRetrieval,omitempty"` QueryDelay *QueryDelay `json:"queryDelay,omitempty"` }
PublicDirectSpec represents content of Spec typical for Direct Object without secrets
type PublicDiscordAlertMethod ¶
type PublicDiscordAlertMethod struct {
HiddenURL string `json:"url"`
}
PublicDiscordAlertMethod represents a set of properties required to send message to Discord without secrets.
type PublicDynatraceDirectConfig ¶
type PublicDynatraceDirectConfig struct { URL string `` //nolint: lll /* 161-byte string literal not displayed */ HiddenDynatraceToken string `json:"dynatraceToken,omitempty"` }
PublicDynatraceDirectConfig represents content of Dynatrace configuration typical for Direct Object without secrets.
type PublicGCMDirectConfig ¶
type PublicGCMDirectConfig struct {
HiddenServiceAccountKey string `json:"serviceAccountKey,omitempty"`
}
PublicGCMDirectConfig represents content of GCM configuration typical for Direct Object without secrets.
type PublicHoneycombDirectConfig ¶ added in v0.54.0
type PublicHoneycombDirectConfig struct {
HiddenAPIKey string `json:"apiKey,omitempty"`
}
PublicHoneycombDirectConfig represents content of Honeycomb Configuration typical for Direct Object without secrets.
type PublicInfluxDBDirectConfig ¶
type PublicInfluxDBDirectConfig struct { URL string `json:"url"` HiddenAPIToken string `json:"apiToken"` HiddenOrganizationID string `json:"organizationID"` }
PublicInfluxDBDirectConfig represents content of InfluxDB configuration typical for Direct Object without secrets.
type PublicInstanaDirectConfig ¶
type PublicInstanaDirectConfig struct { HiddenAPIToken string `json:"apiToken"` URL string `json:"url"` }
PublicInstanaDirectConfig represents content of Instana configuration typical for Direct Object without secrets.
type PublicJiraAlertMethod ¶
type PublicJiraAlertMethod struct { URL string `json:"url" validate:"required,httpsURL,url"` Username string `json:"username" validate:"required"` ProjectKey string `json:"projectKey" validate:"required"` HiddenAPIToken string `json:"apiToken"` }
PublicJiraAlertMethod represents a set of properties required create tickets in Jira without secrets.
type PublicNewRelicDirectConfig ¶
type PublicNewRelicDirectConfig struct { AccountID int `json:"accountId,omitempty" example:"123654"` HiddenInsightsQueryKey string `json:"insightsQueryKey" example:"[hidden]"` }
PublicNewRelicDirectConfig represents content of NewRelic Configuration typical for Direct Object without secrets.
type PublicOpsgenieAlertMethod ¶
type PublicOpsgenieAlertMethod struct { HiddenAuth string `json:"auth"` URL string `json:"url" validate:"required,url"` }
PublicOpsgenieAlertMethod represents a set of properties required to send message to Opsgenie without secrets.
type PublicPagerDutyAlertMethod ¶
type PublicPagerDutyAlertMethod struct { HiddenIntegrationKey string `json:"integrationKey"` SendResolution *SendResolution `json:"sendResolution,omitempty"` }
PublicPagerDutyAlertMethod represents a set of properties required to open an Incident in PagerDuty without secrets.
type PublicPingdomDirectConfig ¶
type PublicPingdomDirectConfig struct {
HiddenAPIToken string `json:"apiToken"`
}
type PublicRedshiftDirectConfig ¶
type PublicRedshiftDirectConfig struct { HiddenAccessKeyID string `json:"accessKeyID,omitempty"` HiddenSecretAccessKey string `json:"secretAccessKey,omitempty"` SecretARN string `json:"secretARN"` HiddenRoleARN string `json:"roleARN,omitempty"` }
PublicRedshiftDirectConfig represents content of Redshift configuration typical for Direct Object without secrets.
type PublicServiceNowAlertMethod ¶
type PublicServiceNowAlertMethod struct { Username string `json:"username" validate:"required"` InstanceName string `json:"instanceName" validate:"required"` HiddenPassword string `json:"password"` }
PublicServiceNowAlertMethod represents a set of properties required to send message to ServiceNow without secrets.
type PublicSlackAlertMethod ¶
type PublicSlackAlertMethod struct {
HiddenURL string `json:"url"`
}
PublicSlackAlertMethod represents a set of properties required to send message to Slack without secrets.
type PublicSplunkDirectConfig ¶
type PublicSplunkDirectConfig struct { URL string `json:"url,omitempty" example:"https://api.eu0.signalfx.com"` HiddenAccessToken string `json:"accessToken,omitempty"` }
PublicSplunkDirectConfig represents content of Splunk Configuration typical for Direct Object.
type PublicSplunkObservabilityDirectConfig ¶
type PublicSplunkObservabilityDirectConfig struct { Realm string `json:"realm,omitempty" example:"us1"` HiddenAccessToken string `json:"accessToken,omitempty"` }
PublicSplunkObservabilityDirectConfig represents content of SplunkObservability Configuration typical for Direct Object.
type PublicSumoLogicDirectConfig ¶
type PublicSumoLogicDirectConfig struct { HiddenAccessID string `json:"accessID"` HiddenAccessKey string `json:"accessKey"` URL string `json:"url"` }
PublicSumoLogicDirectConfig represents content of SumoLogic configuration typical for Direct Object without secrets.
type PublicTeamsAlertMethod ¶
type PublicTeamsAlertMethod struct {
HiddenURL string `json:"url"`
}
PublicTeamsAlertMethod represents a set of properties required create Microsoft Teams notifications.
type PublicThousandEyesDirectConfig ¶
type PublicThousandEyesDirectConfig struct {
HiddenOauthBearerToken string `json:"oauthBearerToken,omitempty"`
}
PublicThousandEyesDirectConfig content of ThousandEyes Configuration typical for Direct Object
type PublicWebhookAlertMethod ¶
type PublicWebhookAlertMethod struct { HiddenURL string `json:"url"` Template *string `json:"template,omitempty" validate:"omitempty,allowedWebhookTemplateFields"` TemplateFields []string `json:"templateFields,omitempty" validate:"omitempty,min=1,allowedWebhookTemplateFields"` //nolint:lll Headers []WebhookHeader `json:"headers,omitempty"` }
PublicWebhookAlertMethod represents a set of properties required to send a webhook request without secrets.
type QueryDelay ¶
type QueryDelayDefaults ¶
func GetQueryDelayDefaults ¶
func GetQueryDelayDefaults() QueryDelayDefaults
GetQueryDelayDefaults serves an exported, single source of truth map that is now a part of v1alpha contract. Its entries are used in two places: in one of internal endpoints serving Query Delay defaults, and in internal telegraf intake configuration, where it is passed to plugins as Query Delay defaults.
WARNING: All string values of this map must satisfy the "customDuration" regex pattern.
func (QueryDelayDefaults) GetByName ¶
func (q QueryDelayDefaults) GetByName(name string) string
func (QueryDelayDefaults) GetByType ¶
func (q QueryDelayDefaults) GetByType(at DataSourceType) string
type RedshiftAgentConfig ¶
type RedshiftAgentConfig struct { }
RedshiftAgentConfig represents content of Redshift configuration typical for Agent Object Since the agent does not require additional configuration this is just a marker struct.
type RedshiftDirectConfig ¶
type RedshiftDirectConfig struct { AccessKeyID string `json:"accessKeyID,omitempty"` SecretAccessKey string `json:"secretAccessKey,omitempty"` SecretARN string `json:"secretARN"` RoleARN string `json:"roleARN,omitempty" example:"arn:aws:iam::123456789012:role/SomeAccessRole"` //nolint: lll }
RedshiftDirectConfig represents content of Redshift configuration typical for Direct Object.
type ReleaseChannel ¶ added in v0.23.0
type ReleaseChannel int
ReleaseChannel /* ENUM(stable = 1, beta, alpha)*/
const ( // ReleaseChannelStable is a ReleaseChannel of type Stable. ReleaseChannelStable ReleaseChannel = iota + 1 // ReleaseChannelBeta is a ReleaseChannel of type Beta. ReleaseChannelBeta // ReleaseChannelAlpha is a ReleaseChannel of type Alpha. ReleaseChannelAlpha )
func ParseReleaseChannel ¶ added in v0.23.0
func ParseReleaseChannel(name string) (ReleaseChannel, error)
ParseReleaseChannel attempts to convert a string to a ReleaseChannel.
func ReleaseChannelValues ¶ added in v0.23.0
func ReleaseChannelValues() []ReleaseChannel
ReleaseChannelValues returns a list of the values for ReleaseChannel
func (ReleaseChannel) IsValid ¶ added in v0.23.0
func (x ReleaseChannel) IsValid() bool
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (ReleaseChannel) MarshalText ¶ added in v0.23.0
func (r ReleaseChannel) MarshalText() ([]byte, error)
MarshalText implements the text marshaller method.
func (ReleaseChannel) String ¶ added in v0.23.0
func (x ReleaseChannel) String() string
String implements the Stringer interface.
func (*ReleaseChannel) UnmarshalText ¶ added in v0.23.0
func (r *ReleaseChannel) UnmarshalText(text []byte) error
UnmarshalText implements the text unmarshaller method.
type S3DataExportSpec ¶
type S3DataExportSpec struct { BucketName string `json:"bucketName" validate:"required,min=3,max=63,s3BucketName" example:"examplebucket"` RoleARN string `json:"roleArn" validate:"required,min=20,max=2048,roleARN" example:"arn:aws:iam::12345/role/n9-access"` //nolint:lll }
S3DataExportSpec represents content of Amazon S3 export type spec.
type SendResolution ¶
type SendResolution struct {
Message *string `json:"message"`
}
SendResolution If user set SendResolution, then “Send a notification after the cooldown period is over"
type ServiceNowAlertMethod ¶
type ServiceNowAlertMethod struct { Username string `json:"username" validate:"required"` Password string `json:"password"` // Field required when AlertMethod is created. InstanceName string `json:"instanceName" validate:"required"` }
ServiceNowAlertMethod represents a set of properties required to send message to ServiceNow.
type Severity ¶
type Severity int16
Severity level describe importance of triggered alert
func ParseSeverity ¶
ParseSeverity parses string to Severity
type SlackAlertMethod ¶
type SlackAlertMethod struct {
URL string `json:"url" validate:"optionalURL"` // Required when AlertMethod is created.
}
SlackAlertMethod represents a set of properties required to send message to Slack.
type SplunkAgentConfig ¶
type SplunkAgentConfig struct {
URL string `json:"url,omitempty" example:"https://localhost:8089/servicesNS/admin/"`
}
SplunkAgentConfig represents content of Splunk Configuration typical for Agent Object.
type SplunkDirectConfig ¶
type SplunkDirectConfig struct { URL string `json:"url,omitempty" validate:"httpsURL" example:"https://api.eu0.signalfx.com"` AccessToken string `json:"accessToken,omitempty"` }
SplunkDirectConfig represents content of Splunk Configuration typical for Direct Object.
type SplunkObservabilityAgentConfig ¶
type SplunkObservabilityAgentConfig struct {
Realm string `json:"realm,omitempty" validate:"required" example:"us1"`
}
SplunkObservabilityAgentConfig represents content of SplunkObservability Configuration typical for Agent Object.
type SplunkObservabilityDirectConfig ¶
type SplunkObservabilityDirectConfig struct { Realm string `json:"realm,omitempty" validate:"required" example:"us1"` AccessToken string `json:"accessToken,omitempty"` }
SplunkObservabilityDirectConfig represents content of SplunkObservability Configuration typical for Direct Object.
type SumoLogicAgentConfig ¶
type SumoLogicAgentConfig struct {
URL string `json:"url" validate:"required,url"`
}
SumoLogicAgentConfig represents content of Sumo Logic configuration typical for Agent Object.
type SumoLogicDirectConfig ¶
type SumoLogicDirectConfig struct { AccessID string `json:"accessID"` AccessKey string `json:"accessKey"` URL string `json:"url" validate:"required,url"` }
SumoLogicDirectConfig represents content of SumoLogic configuration typical for Direct Object.
type TeamsAlertMethod ¶
type TeamsAlertMethod struct {
URL string `json:"url" validate:"httpsURL"`
}
TeamsAlertMethod represents a set of properties required create Microsoft Teams notifications.
type TemplateVariable ¶
type TemplateVariable = string
TemplateVariable can be used with MessageRenderer to override how variables are rendered.
const ( TplVarProjectName TemplateVariable = "project_name" TplVarServiceName TemplateVariable = "service_name" TplVarServiceLabelsText TemplateVariable = "service_labels_text" TplVarOrganization TemplateVariable = "organization" TplVarAlertPolicyName TemplateVariable = "alert_policy_name" TplVarAlertPolicyLabelsText TemplateVariable = "alert_policy_labels_text" TplVarAlertPolicyDescription TemplateVariable = "alert_policy_description" TplVarAlertPolicyConditionsArray TemplateVariable = "alert_policy_conditions[]" TplVarAlertPolicyConditionsText TemplateVariable = "alert_policy_conditions_text" TplVarSeverity TemplateVariable = "severity" TplVarSloName TemplateVariable = "slo_name" TplVarSloLabelsText TemplateVariable = "slo_labels_text" TplVarSloDetailsLink TemplateVariable = "slo_details_link" TplVarObjectiveName TemplateVariable = "objective_name" TplVarTimestamp TemplateVariable = "timestamp" TplVarIsoTimestamp TemplateVariable = "iso_timestamp" TplVarBackwardCompatibleObjectiveName TemplateVariable = "experience_name" )
type ThousandEyesAgentConfig ¶
type ThousandEyesAgentConfig struct { }
ThousandEyesAgentConfig represents content of ThousandEyes Configuration typical for Agent Object.
type ThousandEyesDirectConfig ¶
type ThousandEyesDirectConfig struct {
OauthBearerToken string `json:"oauthBearerToken,omitempty"`
}
ThousandEyesDirectConfig represents content of ThousandEyes Configuration typical for Direct Object.
type Validate ¶
type Validate struct {
// contains filtered or unexported fields
}
Validate should not be used directly, create with NewValidator()
func NewValidator ¶
func NewValidator() *Validate
NewValidator returns an instance of preconfigured Validator for all available objects
type WebhookAlertMethod ¶
type WebhookAlertMethod struct { URL string `json:"url" validate:"optionalURL"` // Field required when AlertMethod is created. Template *string `json:"template,omitempty" validate:"omitempty,allowedWebhookTemplateFields"` TemplateFields []string `json:"templateFields,omitempty" validate:"omitempty,min=1,allowedWebhookTemplateFields"` //nolint:lll Headers []WebhookHeader `json:"headers,omitempty" validate:"omitempty,max=10,dive"` }
WebhookAlertMethod represents a set of properties required to send a webhook request.
type WebhookHeader ¶
Source Files ¶
- agent.go
- agent_object.go
- alert.go
- alert_method.go
- alert_method_object.go
- alert_object.go
- alert_policy.go
- alert_policy_object.go
- alert_silence.go
- alert_silence_object.go
- aws.go
- data_export.go
- data_export_object.go
- data_sources.go
- data_sources_enum.go
- direct.go
- direct_object.go
- errors.go
- generic_object.go
- labels.go
- measurement.go
- notification_template.go
- objects.go
- operator.go
- release_channel.go
- release_channel_enum.go
- severity.go
- validation.go
- validator.go
Directories ¶
Path | Synopsis |
---|---|
Package annotation defines Annotation object definitions.
|
Package annotation defines Annotation object definitions. |
Package parser provides parsing methods for v1alpha objects.
|
Package parser provides parsing methods for v1alpha objects. |
Package project defines Project object definitions.
|
Package project defines Project object definitions. |
Package rolebinding defines RoleBinding object definitions.
|
Package rolebinding defines RoleBinding object definitions. |
Package service defines Service object definitions.
|
Package service defines Service object definitions. |
Package slo defines SLO object definitions.
|
Package slo defines SLO object definitions. |
Package twindow provides enums and functions to operate with resources related to Time Windows
|
Package twindow provides enums and functions to operate with resources related to Time Windows |
Package usergroup defines UserGroup object definitions.
|
Package usergroup defines UserGroup object definitions. |