Documentation ¶
Overview ¶
Package v1alpha represents objects available in API n9/v1alpha
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 GetTimeWindowType(timeWindow TimeWindow) twindow.TimeWindowTypeEnum
- func IsDNS1123Label(value string) []string
- func IsValidDirectType(directType string) bool
- func IsValidSourceOf(sourceOf string) bool
- func NewObjectError(object manifest.Object, errs []error) error
- 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 AgentWithSLOs
- 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 AlertPolicyWithSLOs
- 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 AmazonPrometheusMetric
- type Annotation
- func (a Annotation) GetKind() manifest.Kind
- func (a Annotation) GetManifestSource() string
- func (a Annotation) GetName() string
- func (a Annotation) GetOrganization() string
- func (a Annotation) GetProject() string
- func (a Annotation) GetVersion() string
- func (a Annotation) SetManifestSource(src string) manifest.Object
- func (a Annotation) SetOrganization(org string) manifest.Object
- func (a Annotation) SetProject(project string) manifest.Object
- func (a Annotation) Validate() error
- type AnnotationMetadata
- type AnnotationSpec
- type AnnotationStatus
- type AnomalyConfig
- type AnomalyConfigAlertMethod
- type AnomalyConfigNoData
- type AppDynamicsAgentConfig
- type AppDynamicsDirectConfig
- type AppDynamicsMetric
- type Attachment
- type AzureMonitorAgentConfig
- type AzureMonitorDirectConfig
- type AzureMonitorMetric
- type AzureMonitorMetricDimension
- type BigQueryAgentConfig
- type BigQueryDirectConfig
- type BigQueryMetric
- type BudgetingMethod
- type Calendar
- type CloudWatchAgentConfig
- type CloudWatchDirectConfig
- type CloudWatchMetric
- type CloudWatchMetricDimension
- type CollectionJitterDuration
- type CollectionJitterDurationUnit
- type Composite
- type CompositeBurnRateCondition
- type CompositeVersion
- type CountMetricsSpec
- 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 DatadogMetric
- 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 DynatraceAgentConfig
- type DynatraceDirectConfig
- type DynatraceMetric
- type ElasticsearchAgentConfig
- type ElasticsearchMetric
- type EmailAlertMethod
- type ErrInvalidPayload
- type GCMAgentConfig
- type GCMDirectConfig
- type GCMMetric
- type GCSDataExportSpec
- type GenericAgentConfig
- type GenericMetric
- 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 GrafanaLokiMetric
- type GraphiteAgentConfig
- type GraphiteMetric
- type HistoricalDataRetrieval
- type HistoricalRetrievalDuration
- type HistoricalRetrievalDurationUnit
- type HoneycombAgentConfig
- type HoneycombDirectConfig
- type Indicator
- type InfluxDBAgentConfig
- type InfluxDBDirectConfig
- type InfluxDBMetric
- type InstanaAgentConfig
- type InstanaApplicationMetricGroupBy
- type InstanaApplicationMetricType
- type InstanaDirectConfig
- type InstanaInfrastructureMetricType
- type InstanaMetric
- type JiraAlertMethod
- type Key
- type Labels
- type LightstepAgentConfig
- type LightstepDirectConfig
- type LightstepMetric
- type Measurement
- type Member
- type MetricSourceSpec
- type MetricSpec
- type NewRelicAgentConfig
- type NewRelicDirectConfig
- type NewRelicMetric
- type ObjectContext
- type ObjectError
- type ObjectMetadata
- type Objective
- type ObjectiveBase
- type OpenTSDBAgentConfig
- type OpenTSDBMetric
- type Operator
- type OpsgenieAlertMethod
- type PagerDutyAlertMethod
- type Period
- type PingdomAgentConfig
- type PingdomDirectConfig
- type PingdomMetric
- type PrometheusAgentConfig
- type PrometheusMetric
- 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 PublicDirectWithSLOs
- 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 QueryDelayDuration
- type QueryDelayDurationUnit
- type QueryIntervalDuration
- type QueryIntervalDurationUnit
- type RawMetricSpec
- type RedshiftAgentConfig
- type RedshiftDirectConfig
- type RedshiftMetric
- type ReleaseChannel
- type ReplayStatus
- type RoleBinding
- func (r RoleBinding) GetKind() manifest.Kind
- func (r RoleBinding) GetManifestSource() string
- func (r RoleBinding) GetName() string
- func (r RoleBinding) GetOrganization() string
- func (r RoleBinding) GetVersion() string
- func (r RoleBinding) SetManifestSource(src string) manifest.Object
- func (r RoleBinding) SetOrganization(org string) manifest.Object
- func (r RoleBinding) Validate() error
- type RoleBindingMetadata
- type RoleBindingSpec
- type S3DataExportSpec
- type SLO
- func (s SLO) GetKind() manifest.Kind
- func (s SLO) GetManifestSource() string
- func (s SLO) GetName() string
- func (s SLO) GetOrganization() string
- func (s SLO) GetProject() string
- func (s SLO) GetVersion() string
- func (s SLO) SetManifestSource(src string) manifest.Object
- func (s SLO) SetOrganization(org string) manifest.Object
- func (s SLO) SetProject(project string) manifest.Object
- func (s SLO) Validate() error
- type SLOMetadata
- type SLOSpec
- func (slo *SLOSpec) AllMetricSpecs() []*MetricSpec
- func (slo *SLOSpec) CountMetricPairs() []*CountMetricsSpec
- func (slo *SLOSpec) CountMetrics() []*MetricSpec
- func (slo *SLOSpec) CountMetricsCount() int
- func (slo *SLOSpec) GoodTotalCountMetrics() (good, total []*MetricSpec)
- func (slo *SLOSpec) HasCountMetrics() bool
- func (slo *SLOSpec) HasRawMetric() bool
- func (slo *SLOSpec) IsComposite() bool
- func (slo *SLOSpec) ObjectivesRawMetricsCount() int
- func (slo *SLOSpec) RawMetrics() []*MetricSpec
- type SLOStatus
- type SendResolution
- type ServiceNowAlertMethod
- type Severity
- type SlackAlertMethod
- type SourceOf
- type SplunkAgentConfig
- type SplunkDirectConfig
- type SplunkMetric
- type SplunkObservabilityAgentConfig
- type SplunkObservabilityDirectConfig
- type SplunkObservabilityMetric
- type SumoLogicAgentConfig
- type SumoLogicDirectConfig
- type SumoLogicMetric
- type TeamsAlertMethod
- type TemplateVariable
- type ThousandEyesAgentConfig
- type ThousandEyesDirectConfig
- type ThousandEyesMetric
- type TimeWindow
- type UserGroup
- func (u UserGroup) GetKind() manifest.Kind
- func (u UserGroup) GetManifestSource() string
- func (u UserGroup) GetName() string
- func (u UserGroup) GetOrganization() string
- func (u UserGroup) GetVersion() string
- func (u UserGroup) SetManifestSource(src string) manifest.Object
- func (u UserGroup) SetOrganization(org string) manifest.Object
- func (u UserGroup) Validate() error
- type UserGroupMetadata
- type UserGroupSpec
- type Validate
- type Value
- type WebhookAlertMethod
- type WebhookHeader
Constants ¶
const ( DataExportTypeS3 string = "S3" DataExportTypeSnowflake string = "Snowflake" DataExportTypeGCS string = "GCS" )
const ( HRDDay HistoricalRetrievalDurationUnit = "Day" HRDHour HistoricalRetrievalDurationUnit = "Hour" HRDMinute HistoricalRetrievalDurationUnit = "Minute" QDDMinute QueryDelayDurationUnit = "Minute" QDDSecond QueryDelayDurationUnit = "Second" QDDMinuteAlias = "M" QDDSecondAlias = "S" QIDMinute QueryIntervalDurationUnit = "Minute" QIDSecond QueryIntervalDurationUnit = "Second" QIDMinuteAlias = "M" QIDSecondAlias = "S" CJDMinute CollectionJitterDurationUnit = "Minute" CJDSecond CollectionJitterDurationUnit = "Second" CJDMinuteAlias = "M" CJDSecondAlias = "S" )
const ( ThousandEyesNetLatency = "net-latency" ThousandEyesNetLoss = "net-loss" ThousandEyesWebPageLoad = "web-page-load" ThousandEyesWebDOMLoad = "web-dom-load" ThousandEyesHTTPResponseTime = "http-response-time" ThousandEyesServerAvailability = "http-server-availability" ThousandEyesServerThroughput = "http-server-throughput" ThousandEyesServerTotalTime = "http-server-total-time" ThousandEyesDNSServerResolutionTime = "dns-server-resolution-time" ThousandEyesDNSSECValid = "dns-dnssec-valid" )
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 CloudWatchNamespaceRegex string = `^[0-9A-Za-z.\-_/#:]{1,255}$` HeaderNameRegex string = `^([a-zA-Z0-9]+[_-]?)+$` AzureResourceIDRegex string = `` //nolint:lll /* 133-byte string literal not displayed */ )
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 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 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 GetTimeWindowType ¶
func GetTimeWindowType(timeWindow TimeWindow) twindow.TimeWindowTypeEnum
GetTimeWindowType function returns value of TimeWindowTypeEnum for given time window
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 IsValidSourceOf ¶
func NewObjectError ¶ added in v0.48.0
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 AgentWithSLOs ¶
AgentWithSLOs struct which mapped one to one with kind: agent and slo yaml definition
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,dive"` 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 AlertPolicyWithSLOs ¶
type AlertPolicyWithSLOs struct { AlertPolicy AlertPolicy `json:"alertPolicy"` SLOs []SLO `json:"slos"` }
AlertPolicyWithSLOs struct which mapped one to one with kind: alert policy and slo yaml definition
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,dive"` Period AlertSilencePeriod `json:"period" validate:"required,dive"` }
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 AmazonPrometheusMetric ¶
type AmazonPrometheusMetric struct {
PromQL *string `json:"promql" validate:"required" example:"cpu_usage_user{cpu=\"cpu-total\"}"`
}
AmazonPrometheusMetric represents metric from Amazon Managed Prometheus
type Annotation ¶
type Annotation struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata AnnotationMetadata `json:"metadata"` Spec AnnotationSpec `json:"spec"` Status *AnnotationStatus `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
func (Annotation) GetKind ¶ added in v0.28.0
func (a Annotation) GetKind() manifest.Kind
func (Annotation) GetManifestSource ¶ added in v0.28.0
func (a Annotation) GetManifestSource() string
func (Annotation) GetName ¶ added in v0.28.0
func (a Annotation) GetName() string
func (Annotation) GetOrganization ¶ added in v0.28.0
func (a Annotation) GetOrganization() string
func (Annotation) GetProject ¶ added in v0.28.0
func (a Annotation) GetProject() string
func (Annotation) GetVersion ¶ added in v0.28.0
func (a Annotation) GetVersion() string
func (Annotation) SetManifestSource ¶ added in v0.28.0
func (a Annotation) SetManifestSource(src string) manifest.Object
func (Annotation) SetOrganization ¶ added in v0.28.0
func (a Annotation) SetOrganization(org string) manifest.Object
func (Annotation) SetProject ¶ added in v0.28.0
func (a Annotation) SetProject(project string) manifest.Object
func (Annotation) Validate ¶ added in v0.28.0
func (a Annotation) Validate() error
type AnnotationMetadata ¶ added in v0.28.0
type AnnotationSpec ¶
type AnnotationSpec struct { Slo string `json:"slo" validate:"required"` ObjectiveName string `json:"objectiveName,omitempty"` Description string `json:"description" validate:"required,max=1000"` StartTime string `json:"startTime" validate:"required" example:"2006-01-02T17:04:05Z"` EndTime string `json:"endTime" validate:"required" example:"2006-01-02T17:04:05Z"` }
func (AnnotationSpec) GetParsedEndTime ¶
func (a AnnotationSpec) GetParsedEndTime() (time.Time, error)
func (AnnotationSpec) GetParsedStartTime ¶
func (a AnnotationSpec) GetParsedStartTime() (time.Time, error)
type AnnotationStatus ¶
type AnnotationStatus struct { UpdatedAt string `json:"updatedAt" example:"2006-01-02T17:04:05Z"` IsSystem bool `json:"isSystem" example:"false"` }
AnnotationStatus represents content of Status optional for Annotation Object
type AnomalyConfig ¶
type AnomalyConfig struct {
NoData *AnomalyConfigNoData `json:"noData" validate:"omitempty"`
}
AnomalyConfig represents relationship between anomaly type and selected notification methods. This will be removed (moved into Anomaly Policy) in PC-8502
type AnomalyConfigAlertMethod ¶
type AnomalyConfigAlertMethod struct { Name string `json:"name" validate:"required,objectName" example:"slack-monitoring-channel"` Project string `json:"project,omitempty" validate:"objectName" example:"default"` }
AnomalyConfigAlertMethod represents a single alert method used in AnomalyConfig defined by name and project.
type AnomalyConfigNoData ¶
type AnomalyConfigNoData struct {
AlertMethods []AnomalyConfigAlertMethod `json:"alertMethods" validate:"required"`
}
AnomalyConfigNoData contains alertMethods used for No Data anomaly type.
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 AppDynamicsMetric ¶
type AppDynamicsMetric struct { ApplicationName *string `json:"applicationName" validate:"required,notEmpty"` MetricPath *string `json:"metricPath" validate:"required,unambiguousAppDynamicMetricPath"` }
AppDynamicsMetric represents metric from AppDynamics
type Attachment ¶
type Attachment struct { URL string `json:"url" validate:"required,url"` DisplayName *string `json:"displayName,omitempty" validate:"max=63"` }
Attachment represents user defined URL attached to SLO
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 AzureMonitorMetric ¶ added in v0.41.0
type AzureMonitorMetric struct { ResourceID string `` //nolint:lll /* 180-byte string literal not displayed */ MetricName string `json:"metricName" validate:"required"` Aggregation string `json:"aggregation" validate:"required"` Dimensions []AzureMonitorMetricDimension `json:"dimensions,omitempty" validate:"uniqueDimensionNames,dive"` MetricNamespace string `json:"metricNamespace,omitempty"` }
AzureMonitorMetric represents metric from AzureMonitor
type AzureMonitorMetricDimension ¶ added in v0.41.0
type AzureMonitorMetricDimension struct { Name *string `json:"name" validate:"required,max=255,ascii,notBlank"` Value *string `json:"value" validate:"required,max=255,ascii,notBlank"` }
AzureMonitorMetricDimension represents name/value pair that is part of the identity of a metric.
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 BigQueryMetric ¶
type BigQueryMetric struct { Query string `json:"query" validate:"required,bigQueryRequiredColumns"` ProjectID string `json:"projectId" validate:"required"` Location string `json:"location" validate:"required"` }
BigQueryMetric represents metric from BigQuery
type BudgetingMethod ¶
type BudgetingMethod int
BudgetingMethod indicates algorithm to calculate error budget
const ( // BudgetingMethodOccurrences method uses ratio of counts of good events and total count of event BudgetingMethodOccurrences BudgetingMethod = iota + 1 // BudgetingMethodTimeslices method uses ratio of good time slices vs. total time slices in a budgeting period BudgetingMethodTimeslices )
func ParseBudgetingMethod ¶
func ParseBudgetingMethod(value string) (BudgetingMethod, error)
func (BudgetingMethod) String ¶
func (m BudgetingMethod) String() string
type Calendar ¶
type Calendar struct { StartTime string `json:"startTime" validate:"required,dateWithTime,minDateTime" example:"2020-01-21 12:30:00"` TimeZone string `json:"timeZone" validate:"required,timeZone" example:"America/New_York"` }
Calendar struct represents calendar time window
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 CloudWatchMetric ¶
type CloudWatchMetric struct { AccountID *string `json:"accountId,omitempty"` Region *string `json:"region" validate:"required,max=255"` Namespace *string `json:"namespace,omitempty"` MetricName *string `json:"metricName,omitempty"` Stat *string `json:"stat,omitempty"` Dimensions []CloudWatchMetricDimension `json:"dimensions,omitempty" validate:"max=10,uniqueDimensionNames,dive"` SQL *string `json:"sql,omitempty"` JSON *string `json:"json,omitempty"` }
CloudWatchMetric represents metric from CloudWatch.
func (CloudWatchMetric) IsJSONConfiguration ¶
func (c CloudWatchMetric) IsJSONConfiguration() bool
IsJSONConfiguration returns true if the struct represents CloudWatch JSON configuration.
func (CloudWatchMetric) IsSQLConfiguration ¶
func (c CloudWatchMetric) IsSQLConfiguration() bool
IsSQLConfiguration returns true if the struct represents CloudWatch SQL configuration.
func (CloudWatchMetric) IsStandardConfiguration ¶
func (c CloudWatchMetric) IsStandardConfiguration() bool
IsStandardConfiguration returns true if the struct represents CloudWatch standard configuration.
type CloudWatchMetricDimension ¶
type CloudWatchMetricDimension struct { Name *string `json:"name" validate:"required,max=255,ascii,notBlank"` Value *string `json:"value" validate:"required,max=255,ascii,notBlank"` }
CloudWatchMetricDimension represents name/value pair that is part of the identity of a metric.
type CollectionJitterDuration ¶ added in v0.18.1
type CollectionJitterDuration struct { Value *int `json:"value" validate:"required,min=0,max=86400"` Unit CollectionJitterDurationUnit `json:"unit" validate:"required"` }
func (CollectionJitterDuration) String ¶ added in v0.18.1
func (cjd CollectionJitterDuration) String() string
type CollectionJitterDurationUnit ¶ added in v0.18.1
type CollectionJitterDurationUnit string
type Composite ¶
type Composite struct { BudgetTarget float64 `json:"target" validate:"required,numeric,gte=0,lt=1" example:"0.9"` BurnRateCondition *CompositeBurnRateCondition `json:"burnRateCondition,omitempty"` }
Composite represents configuration for Composite SLO.
type CompositeBurnRateCondition ¶
type CompositeBurnRateCondition struct { Value float64 `json:"value" validate:"numeric,gte=0,lte=1000" example:"2"` Operator string `json:"op" validate:"required,oneof=gt" example:"gt"` }
CompositeBurnRateCondition represents configuration for Composite SLO with occurrences budgeting method.
type CompositeVersion ¶
CompositeVersion represents composite version history stored for restoring process.
type CountMetricsSpec ¶
type CountMetricsSpec struct { Incremental *bool `json:"incremental" validate:"required"` GoodMetric *MetricSpec `json:"good,omitempty"` BadMetric *MetricSpec `json:"bad,omitempty"` TotalMetric *MetricSpec `json:"total" validate:"required"` }
CountMetricsSpec represents set of two time series of good and total counts
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
const ( Prometheus DataSourceType = iota + 1 Datadog NewRelic AppDynamics Splunk Lightstep SplunkObservability Dynatrace ThousandEyes Graphite BigQuery Elasticsearch OpenTSDB GrafanaLoki CloudWatch Pingdom AmazonPrometheus Redshift SumoLogic Instana InfluxDB GCM AzureMonitor Generic Honeycomb )
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".
func (DataSourceType) String ¶
func (dst DataSourceType) String() string
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 DatadogMetric ¶
type DatadogMetric struct {
Query *string `json:"query" validate:"required"`
}
DatadogMetric represents metric from Datadog
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 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 DynatraceMetric ¶
type DynatraceMetric struct {
MetricSelector *string `json:"metricSelector" validate:"required"`
}
DynatraceMetric represents metric from Dynatrace.
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 ElasticsearchMetric ¶
type ElasticsearchMetric struct { Index *string `json:"index" validate:"required"` Query *string `json:"query" validate:"required,elasticsearchBeginEndTimeRequired"` }
ElasticsearchMetric represents metric from Elasticsearch.
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 GCMMetric ¶
type GCMMetric struct { Query string `json:"query" validate:"required"` ProjectID string `json:"projectId" validate:"required"` }
GCMMetric represents metric from GCM
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 GenericMetric ¶ added in v0.52.0
type GenericMetric struct {
Query *string `json:"query" validate:"required"`
}
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 GrafanaLokiMetric ¶
type GrafanaLokiMetric struct {
Logql *string `json:"logql" validate:"required"`
}
GrafanaLokiMetric represents metric from GrafanaLokiMetric.
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 GraphiteMetric ¶
type GraphiteMetric struct {
MetricPath *string `json:"metricPath" validate:"required,metricPathGraphite"`
}
GraphiteMetric represents metric from Graphite.
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
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 Indicator ¶
type Indicator struct { MetricSource MetricSourceSpec `json:"metricSource" validate:"required"` RawMetric *MetricSpec `json:"rawMetric,omitempty"` }
Indicator represents integration with metric source can be. e.g. Prometheus, Datadog, for internal usage
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 InfluxDBMetric ¶
type InfluxDBMetric struct {
Query *string `json:"query" validate:"required,influxDBRequiredPlaceholders"`
}
InfluxDBMetric represents metric from InfluxDB
type InstanaAgentConfig ¶
type InstanaAgentConfig struct {
URL string `json:"url" validate:"required,url"`
}
InstanaAgentConfig represents content of Instana configuration typical for Agent Object
type InstanaApplicationMetricType ¶
type InstanaApplicationMetricType struct { MetricID string `json:"metricId" validate:"required,oneof=calls erroneousCalls errors latency"` //nolint:lll Aggregation string `json:"aggregation" validate:"required"` GroupBy InstanaApplicationMetricGroupBy `json:"groupBy" validate:"required"` APIQuery string `json:"apiQuery" validate:"required,json"` IncludeInternal bool `json:"includeInternal,omitempty"` IncludeSynthetic bool `json:"includeSynthetic,omitempty"` }
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 InstanaInfrastructureMetricType ¶
type InstanaInfrastructureMetricType struct { MetricRetrievalMethod string `json:"metricRetrievalMethod" validate:"required,oneof=query snapshot"` Query *string `json:"query,omitempty"` SnapshotID *string `json:"snapshotId,omitempty"` MetricID string `json:"metricId" validate:"required"` PluginID string `json:"pluginId" validate:"required"` }
type InstanaMetric ¶
type InstanaMetric struct { MetricType string `json:"metricType" validate:"required,oneof=infrastructure application"` //nolint:lll Infrastructure *InstanaInfrastructureMetricType `json:"infrastructure,omitempty"` Application *InstanaApplicationMetricType `json:"application,omitempty"` }
InstanaMetric represents metric from Redshift.
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 LightstepMetric ¶
type LightstepMetric struct { StreamID *string `json:"streamId,omitempty"` TypeOfData *string `json:"typeOfData" validate:"required,oneof=latency error_rate good total metric"` Percentile *float64 `json:"percentile,omitempty"` UQL *string `json:"uql,omitempty"` }
LightstepMetric represents metric from Lightstep
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 MetricSourceSpec ¶
type MetricSourceSpec struct { Project string `json:"project,omitempty" validate:"omitempty,objectName" example:"default"` Name string `json:"name" validate:"required,objectName" example:"prometheus-source"` Kind manifest.Kind `json:"kind,omitempty" validate:"omitempty,metricSourceKind" example:"Agent"` }
type MetricSpec ¶
type MetricSpec struct { Prometheus *PrometheusMetric `json:"prometheus,omitempty"` Datadog *DatadogMetric `json:"datadog,omitempty"` NewRelic *NewRelicMetric `json:"newRelic,omitempty"` AppDynamics *AppDynamicsMetric `json:"appDynamics,omitempty"` Splunk *SplunkMetric `json:"splunk,omitempty"` Lightstep *LightstepMetric `json:"lightstep,omitempty"` SplunkObservability *SplunkObservabilityMetric `json:"splunkObservability,omitempty"` Dynatrace *DynatraceMetric `json:"dynatrace,omitempty"` Elasticsearch *ElasticsearchMetric `json:"elasticsearch,omitempty"` ThousandEyes *ThousandEyesMetric `json:"thousandEyes,omitempty"` Graphite *GraphiteMetric `json:"graphite,omitempty"` BigQuery *BigQueryMetric `json:"bigQuery,omitempty"` OpenTSDB *OpenTSDBMetric `json:"opentsdb,omitempty"` GrafanaLoki *GrafanaLokiMetric `json:"grafanaLoki,omitempty"` CloudWatch *CloudWatchMetric `json:"cloudWatch,omitempty"` Pingdom *PingdomMetric `json:"pingdom,omitempty"` AmazonPrometheus *AmazonPrometheusMetric `json:"amazonPrometheus,omitempty"` Redshift *RedshiftMetric `json:"redshift,omitempty"` SumoLogic *SumoLogicMetric `json:"sumoLogic,omitempty"` Instana *InstanaMetric `json:"instana,omitempty"` InfluxDB *InfluxDBMetric `json:"influxdb,omitempty"` GCM *GCMMetric `json:"gcm,omitempty"` AzureMonitor *AzureMonitorMetric `json:"azureMonitor,omitempty"` Generic *GenericMetric `json:"generic,omitempty"` }
MetricSpec defines single time series obtained from data source
func (*MetricSpec) DataSourceType ¶
func (m *MetricSpec) DataSourceType() DataSourceType
DataSourceType returns a type of data source.
func (*MetricSpec) Query ¶
func (m *MetricSpec) Query() interface{}
Query returns interface containing metric query for this MetricSpec.
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 NewRelicMetric ¶
type NewRelicMetric struct {
NRQL *string `json:"nrql" validate:"required,noSinceOrUntil"`
}
NewRelicMetric represents metric from NewRelic
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 []error `json:"errors"` }
func (*ObjectError) Error ¶ added in v0.48.0
func (o *ObjectError) Error() string
func (*ObjectError) MarshalJSON ¶ added in v0.48.0
func (o *ObjectError) MarshalJSON() ([]byte, error)
func (*ObjectError) UnmarshalJSON ¶ added in v0.48.0
func (o *ObjectError) UnmarshalJSON(bytes []byte) error
type ObjectMetadata ¶ added in v0.48.0
type Objective ¶ added in v0.31.0
type Objective struct { ObjectiveBase `json:",inline"` // <!-- Go struct field and type names renaming budgetTarget to target has been postponed after GA as requested // in PC-1240. --> BudgetTarget *float64 `json:"target" validate:"required,numeric,gte=0,lt=1" example:"0.9"` TimeSliceTarget *float64 `json:"timeSliceTarget,omitempty" example:"0.9"` CountMetrics *CountMetricsSpec `json:"countMetrics,omitempty"` RawMetric *RawMetricSpec `json:"rawMetric,omitempty"` Operator *string `json:"op,omitempty" example:"lte"` }
Objective represents single objective for SLO, for internal usage
func (*Objective) HasCountMetrics ¶ added in v0.31.0
HasCountMetrics returns true if Objective has count metrics.
func (*Objective) HasRawMetricQuery ¶ added in v0.31.0
HasRawMetricQuery returns true if Objective has raw metric with query set.
type ObjectiveBase ¶ added in v0.31.0
type ObjectiveBase struct { DisplayName string `json:"displayName" validate:"omitempty,min=0,max=63" example:"Good"` Value float64 `json:"value" validate:"numeric" example:"100"` Name string `json:"name" validate:"omitempty,objectName"` NameChanged bool `json:"-"` }
ObjectiveBase base structure representing an objective.
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 OpenTSDBMetric ¶
type OpenTSDBMetric struct {
Query *string `json:"query" validate:"required"`
}
OpenTSDBMetric represents metric from OpenTSDB.
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 PingdomMetric ¶
type PingdomMetric struct { CheckID *string `json:"checkId" validate:"required,notBlank,numeric" example:"1234567"` CheckType *string `json:"checkType" validate:"required,pingdomCheckTypeFieldValid" example:"uptime"` Status *string `json:"status,omitempty" validate:"omitempty,pingdomStatusValid" example:"up,down"` }
PingdomMetric represents metric from Pingdom.
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 PrometheusMetric ¶
type PrometheusMetric struct {
PromQL *string `json:"promql" validate:"required" example:"cpu_usage_user{cpu=\"cpu-total\"}"`
}
PrometheusMetric represents metric from Prometheus
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 PublicDirectWithSLOs ¶
type PublicDirectWithSLOs struct { Direct PublicDirect `json:"direct"` SLOs []SLO `json:"slos"` }
PublicDirectWithSLOs struct which mapped one to one with kind: direct and slo yaml definition
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 QueryDelay struct { MinimumAgentVersion string `json:"minimumAgentVersion,omitempty" example:"0.0.9"` QueryDelayDuration }
type QueryDelayDefaults ¶
type QueryDelayDefaults map[string]QueryDelayDuration
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 QueryDelayDuration ¶
type QueryDelayDuration struct { Value *int `json:"value" validate:"required,min=0,max=86400"` Unit QueryDelayDurationUnit `json:"unit" validate:"required"` }
func (QueryDelayDuration) BiggerThanMax ¶
func (qdd QueryDelayDuration) BiggerThanMax() bool
func (QueryDelayDuration) Duration ¶
func (qdd QueryDelayDuration) Duration() time.Duration
func (QueryDelayDuration) IsZero ¶
func (qdd QueryDelayDuration) IsZero() bool
func (QueryDelayDuration) LesserThan ¶
func (qdd QueryDelayDuration) LesserThan(b QueryDelayDuration) bool
func (QueryDelayDuration) String ¶
func (qdd QueryDelayDuration) String() string
type QueryDelayDurationUnit ¶
type QueryDelayDurationUnit string
func QueryDelayDurationUnitFromString ¶
func QueryDelayDurationUnitFromString(unit string) (QueryDelayDurationUnit, error)
func (QueryDelayDurationUnit) IsValid ¶
func (qddu QueryDelayDurationUnit) IsValid() bool
func (QueryDelayDurationUnit) String ¶
func (qddu QueryDelayDurationUnit) String() string
type QueryIntervalDuration ¶
type QueryIntervalDuration struct { Value *int `json:"value" validate:"required,min=0,max=86400"` Unit QueryIntervalDurationUnit `json:"unit" validate:"required"` }
func (QueryIntervalDuration) Duration ¶ added in v0.53.2
func (qid QueryIntervalDuration) Duration() time.Duration
func (QueryIntervalDuration) IsZero ¶ added in v0.53.2
func (qid QueryIntervalDuration) IsZero() bool
func (QueryIntervalDuration) LesserThan ¶ added in v0.53.2
func (qid QueryIntervalDuration) LesserThan(b QueryIntervalDuration) bool
func (QueryIntervalDuration) String ¶
func (qid QueryIntervalDuration) String() string
type QueryIntervalDurationUnit ¶
type QueryIntervalDurationUnit string
func QueryIntervalDurationUnitFromString ¶
func QueryIntervalDurationUnitFromString(unit string) (QueryIntervalDurationUnit, error)
func (QueryIntervalDurationUnit) IsValid ¶
func (qidu QueryIntervalDurationUnit) IsValid() bool
func (QueryIntervalDurationUnit) String ¶
func (qidu QueryIntervalDurationUnit) String() string
type RawMetricSpec ¶
type RawMetricSpec struct {
MetricQuery *MetricSpec `json:"query" validate:"required"`
}
RawMetricSpec represents integration with a metric source for a particular objective.
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 RedshiftMetric ¶
type RedshiftMetric struct { Region *string `json:"region" validate:"required,max=255"` ClusterID *string `json:"clusterId" validate:"required"` DatabaseName *string `json:"databaseName" validate:"required"` Query *string `json:"query" validate:"required,redshiftRequiredColumns"` }
RedshiftMetric represents metric from Redshift.
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 ReplayStatus ¶ added in v0.33.0
type RoleBinding ¶
type RoleBinding struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata RoleBindingMetadata `json:"metadata"` Spec RoleBindingSpec `json:"spec"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
RoleBinding represents relation of User and Role
func (RoleBinding) GetKind ¶ added in v0.28.0
func (r RoleBinding) GetKind() manifest.Kind
func (RoleBinding) GetManifestSource ¶ added in v0.28.0
func (r RoleBinding) GetManifestSource() string
func (RoleBinding) GetName ¶ added in v0.28.0
func (r RoleBinding) GetName() string
func (RoleBinding) GetOrganization ¶ added in v0.28.0
func (r RoleBinding) GetOrganization() string
func (RoleBinding) GetVersion ¶ added in v0.28.0
func (r RoleBinding) GetVersion() string
func (RoleBinding) SetManifestSource ¶ added in v0.28.0
func (r RoleBinding) SetManifestSource(src string) manifest.Object
func (RoleBinding) SetOrganization ¶ added in v0.28.0
func (r RoleBinding) SetOrganization(org string) manifest.Object
func (RoleBinding) Validate ¶ added in v0.28.0
func (r RoleBinding) Validate() error
type RoleBindingMetadata ¶ added in v0.28.0
type RoleBindingMetadata struct {
Name string `json:"name" validate:"required,objectName" example:"name"`
}
type RoleBindingSpec ¶
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 SLO ¶
type SLO struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata SLOMetadata `json:"metadata"` Spec SLOSpec `json:"spec"` Status *SLOStatus `json:"status,omitempty"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
SLO struct which mapped one to one with kind: slo yaml definition, external usage
func (SLO) GetManifestSource ¶ added in v0.28.0
func (SLO) GetOrganization ¶ added in v0.28.0
func (SLO) GetProject ¶ added in v0.28.0
func (SLO) GetVersion ¶ added in v0.28.0
func (SLO) SetManifestSource ¶ added in v0.28.0
func (SLO) SetOrganization ¶ added in v0.28.0
type SLOMetadata ¶ added in v0.28.0
type SLOMetadata 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 SLOSpec ¶
type SLOSpec struct { Description string `json:"description" validate:"description" example:"Total count of server requests"` Indicator Indicator `json:"indicator"` BudgetingMethod string `json:"budgetingMethod" validate:"required,budgetingMethod" example:"Occurrences"` Objectives []Objective `json:"objectives" validate:"required,dive"` Service string `json:"service" validate:"required,objectName" example:"webapp-service"` TimeWindows []TimeWindow `json:"timeWindows" validate:"required,len=1,dive"` AlertPolicies []string `json:"alertPolicies" validate:"omitempty"` Attachments []Attachment `json:"attachments,omitempty" validate:"omitempty,max=20,dive"` CreatedAt string `json:"createdAt,omitempty"` Composite *Composite `json:"composite,omitempty" validate:"omitempty"` AnomalyConfig *AnomalyConfig `json:"anomalyConfig,omitempty" validate:"omitempty"` }
SLOSpec represents content of Spec typical for SLO Object
func (*SLOSpec) AllMetricSpecs ¶
func (slo *SLOSpec) AllMetricSpecs() []*MetricSpec
AllMetricSpecs returns slice of all metrics defined in SLO regardless of their type.
func (*SLOSpec) CountMetricPairs ¶
func (slo *SLOSpec) CountMetricPairs() []*CountMetricsSpec
CountMetricPairs returns a slice of all count metrics defined in this SLOSpec's objectives.
func (*SLOSpec) CountMetrics ¶
func (slo *SLOSpec) CountMetrics() []*MetricSpec
CountMetrics returns a flat slice of all count metrics defined in this SLOSpec's objectives.
func (*SLOSpec) CountMetricsCount ¶
CountMetricsCount returns total number of all count metrics defined in this SLOSpec's objectives.
func (*SLOSpec) GoodTotalCountMetrics ¶
func (slo *SLOSpec) GoodTotalCountMetrics() (good, total []*MetricSpec)
func (*SLOSpec) HasCountMetrics ¶
HasCountMetrics returns true if SLOSpec has count metrics.
func (*SLOSpec) HasRawMetric ¶
HasRawMetric returns true if SLOSpec has raw metric.
func (*SLOSpec) IsComposite ¶
IsComposite returns true if SLOSpec contains composite type.
func (*SLOSpec) ObjectivesRawMetricsCount ¶
ObjectivesRawMetricsCount returns total number of all raw metrics defined in this SLO Spec's objectives.
func (*SLOSpec) RawMetrics ¶
func (slo *SLOSpec) RawMetrics() []*MetricSpec
RawMetrics returns raw metric spec.
type SLOStatus ¶
type SLOStatus struct {
ReplayStatus *ReplayStatus `json:"timeTravel,omitempty"`
}
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 SplunkMetric ¶
type SplunkMetric struct {
Query *string `json:"query" validate:"required,notEmpty,splunkQueryValid"`
}
SplunkMetric represents metric from Splunk
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 SplunkObservabilityMetric ¶
type SplunkObservabilityMetric struct {
Program *string `json:"program" validate:"required"`
}
SplunkObservabilityMetric represents metric from SplunkObservability
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 SumoLogicMetric ¶
type SumoLogicMetric struct { Type *string `json:"type" validate:"required"` Query *string `json:"query" validate:"required"` Quantization *string `json:"quantization,omitempty"` Rollup *string `json:"rollup,omitempty"` }
SumoLogicMetric represents metric from Sumo Logic.
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 ThousandEyesMetric ¶
type ThousandEyesMetric struct { TestID *int64 `json:"testID" validate:"required,gte=0"` TestType *string `json:"testType" validate:"supportedThousandEyesTestType"` }
ThousandEyesMetric represents metric from ThousandEyes
type TimeWindow ¶
type TimeWindow struct { Unit string `json:"unit" validate:"required,timeUnit" example:"Week"` Count int `json:"count" validate:"required,gt=0" example:"1"` IsRolling bool `json:"isRolling" example:"true"` Calendar *Calendar `json:"calendar,omitempty"` // Period is only returned in `/get/slo` requests it is ignored for `/apply` Period *Period `json:"period,omitempty"` }
TimeWindow represents content of time window
type UserGroup ¶ added in v0.15.0
type UserGroup struct { APIVersion string `json:"apiVersion"` Kind manifest.Kind `json:"kind"` Metadata UserGroupMetadata `json:"metadata"` Spec UserGroupSpec `json:"spec"` Organization string `json:"organization,omitempty"` ManifestSource string `json:"manifestSrc,omitempty"` }
func (UserGroup) GetManifestSource ¶ added in v0.28.0
func (UserGroup) GetOrganization ¶ added in v0.28.0
func (UserGroup) GetVersion ¶ added in v0.28.0
func (UserGroup) SetManifestSource ¶ added in v0.28.0
func (UserGroup) SetOrganization ¶ added in v0.28.0
type UserGroupMetadata ¶ added in v0.28.0
type UserGroupMetadata struct {
Name string `json:"name" validate:"required,objectName" example:"name"`
}
type UserGroupSpec ¶ added in v0.15.0
type UserGroupSpec struct { DisplayName string `json:"displayName"` Members []Member `json:"members"` }
UserGroupSpec represents content of UserGroup's Spec
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
- annotation.go
- annotation_object.go
- aws.go
- data_export.go
- data_export_object.go
- data_sources.go
- direct.go
- direct_object.go
- errors.go
- generic_object.go
- labels.go
- measurement.go
- method.go
- metrics.go
- notification_template.go
- objects.go
- operator.go
- release_channel.go
- release_channel_enum.go
- role_binding.go
- role_binding_object.go
- severity.go
- slo.go
- slo_object.go
- user_groups.go
- user_groups_object.go
- validation.go
- validator.go
Directories ¶
Path | Synopsis |
---|---|
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 service defines Service object definitions.
|
Package service defines Service 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 |