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
Package v1alpha represents objects available in API n9/v1alpha
Package v1alpha represents objects available in API n9/v1alpha
Index ¶
- Constants
- Variables
- func GetAvailablePercentiles() []string
- func GetTimeWindowType(timeWindow TimeWindow) twindow.TimeWindowTypeEnum
- func IsDNS1123Label(value string) []string
- func IsValidDirectType(directType string) bool
- func IsValidSourceOf(sourceOf string) bool
- func Parse(o manifest.ObjectGeneric, parsedObjects *APIObjects, onlyHeaders bool) (err error)
- func ReleaseChannelNames() []string
- func SourceOfToStringSlice(isMetrics, isServices bool) []string
- func ValidateTimeTravelDurationUnit(unit string) error
- type APIKeys
- type APIObjects
- type AWSRegion
- type Agent
- type AgentSpec
- type AgentStatus
- type AgentWithSLOs
- type AgentsSlice
- type Alert
- type AlertCondition
- type AlertMethod
- type AlertMethodSpec
- type AlertMethodWithAlertPolicy
- type AlertMethodsSlice
- type AlertPoliciesSlice
- type AlertPolicy
- type AlertPolicySpec
- type AlertPolicyWithSLOs
- type AlertSilence
- type AlertSilenceAlertPolicySource
- type AlertSilencePeriod
- type AlertSilenceSpec
- type AlertSilenceStatus
- type AlertSilencesSlice
- type AlertSpec
- type AlertThreshold
- type AlertsSlice
- type AmazonPrometheusAgentConfig
- type AmazonPrometheusMetric
- type AnalysisCalculation
- type AnalysisCalculationSummary
- type AnalysisMetadata
- type AnalysisMetricSpec
- type AnalysisPeriod
- type Annotation
- type AnnotationSpec
- type AnnotationStatus
- type AnnotationsSlice
- type AnomalyConfig
- type AnomalyConfigAlertMethod
- type AnomalyConfigNoData
- type AppDynamicsAgentConfig
- type AppDynamicsDirectConfig
- type AppDynamicsMetric
- type Attachment
- type BigQueryAgentConfig
- type BigQueryDirectConfig
- type BigQueryMetric
- type BudgetingMethod
- type BurnDownTimeSeries
- type BurnedBudget
- type Calendar
- type CloudWatchAgentConfig
- type CloudWatchDirectConfig
- type CloudWatchMetric
- type CloudWatchMetricDimension
- type CollectionJitterDuration
- type CollectionJitterDurationUnit
- type Composite
- type CompositeBurnRateCondition
- type CompositeTimeSeries
- type CompositeTimeSeriesStatus
- type CompositeVersion
- type CountMetricsSpec
- type CountsSLITimeSeries
- type DataExport
- type DataExportSpec
- type DataExportStatus
- type DataExportStatusJob
- type DataExportsSlice
- type DataSourceType
- type DataSources
- type DatadogAgentConfig
- type DatadogDirectConfig
- type DatadogMetric
- type Direct
- type DirectSpec
- type DirectStatus
- type DirectsSlice
- type DiscordAlertMethod
- type DownsamplingConfig
- type DynatraceAgentConfig
- type DynatraceDirectConfig
- type DynatraceMetric
- type ElasticsearchAgentConfig
- type ElasticsearchMetric
- type EmailAlertMethod
- type ErrInvalidPayload
- type ErrorDetails
- type FilterEntry
- type GCMAgentConfig
- type GCMDirectConfig
- type GCMMetric
- type GCSDataExportSpec
- type GrafanaLokiAgentConfig
- type GrafanaLokiMetric
- type GraphiteAgentConfig
- type GraphiteMetric
- type GroupMetadata
- type HistoricalDataRetrieval
- type HistoricalRetrievalDuration
- type HistoricalRetrievalDurationUnit
- type Indicator
- type InfluxDBAgentConfig
- type InfluxDBDirectConfig
- type InfluxDBMetric
- type InstanaAgentConfig
- type InstanaApplicationMetricGroupBy
- type InstanaApplicationMetricType
- type InstanaDirectConfig
- type InstanaInfrastructureMetricType
- type InstanaMetric
- type InstantaneousBurnRateTimeSeries
- type JiraAlertMethod
- type LightstepAgentConfig
- type LightstepDirectConfig
- type LightstepMetric
- type Measurement
- type Member
- type MetricSourceSpec
- type MetricSpec
- type NewRelicAgentConfig
- type NewRelicDirectConfig
- type NewRelicMetric
- type OpenTSDBAgentConfig
- type OpenTSDBMetric
- type Operator
- type OpsgenieAlertMethod
- type OrganizationInformation
- type PagerDutyAlertMethod
- type Percentiles
- type Period
- type PingdomAgentConfig
- type PingdomDirectConfig
- type PingdomMetric
- type Project
- type ProjectSpec
- type ProjectsSlice
- type PrometheusAgentConfig
- type PrometheusMetric
- type PublicAlertMethod
- type PublicAlertMethodSpec
- type PublicAlertMethodStatus
- type PublicAppDynamicsDirectConfig
- type PublicBigQueryDirectConfig
- type PublicCloudWatchDirectConfig
- type PublicDatadogDirectConfig
- type PublicDirect
- type PublicDirectSpec
- type PublicDirectWithSLOs
- type PublicDiscordAlertMethod
- type PublicDynatraceDirectConfig
- type PublicGCMDirectConfig
- 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 QueryValidationStatus
- type RawCountsSLITimeSeries
- type RawMetricSpec
- type RawSLIPercentilesTimeSeries
- type RawSLIThresholdTimeSeries
- type RedshiftAgentConfig
- type RedshiftDirectConfig
- type RedshiftMetric
- type ReleaseChannel
- type RoleBinding
- type RoleBindingSpec
- type RoleBindingsSlice
- type S3DataExportSpec
- type SLIAnalysis
- type SLO
- type SLOErrorBudgetStatus
- type SLOErrorBudgetStatusReport
- type SLOHistoryReport
- 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 SLOTimeSeries
- type SLOUnits
- type SLOs
- type SLOsSlice
- type SendResolution
- type Service
- type ServiceNowAlertMethod
- type ServiceSpec
- type ServiceStatus
- type ServiceWithSLOs
- type ServicesSlice
- 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 Threshold
- type ThresholdBase
- type ThresholdHistoryReport
- type ThresholdStatus
- type ThresholdTimeSeries
- type ThresholdTimeSeriesStatus
- type Tier
- type TimeSeriesData
- type TimeTravel
- type TimeTravelAvailability
- type TimeTravelDuration
- type TimeTravelStatus
- type TimeTravelWithStatus
- type TimeWindow
- type TimeWindowHistoryReport
- type TimeWindowTimeSeries
- type UpdatableAnalysisMetadata
- type UsageData
- type UsageSummary
- type UsageSummaryData
- type UsageSummaryMetadata
- type UserGroup
- type UserGroupSpec
- type UserGroupsSlice
- type Users
- type Validate
- type ValidationDetails
- type ValidationStatus
- 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 ( DatasourceStableChannel = "stable" DefaultAlertPolicyLastsForDuration = "0m" )
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 ( TestTypesIntroducedAgentVersion = "v0.33.0" AvailabilityAndThroughputIntroducedAgentVersion = "v0.52.0" DNSTestTypeIntroductionAgentVersion = "v0.68.0-beta01" )
const ( TimeTravelStatusFailed = "failed" TimeTravelStatusCompleted = "completed" )
Variants of TimeTravelStatus.Status.
const ( TimeTravelDataSourceTypeInvalid = "datasource_type_invalid" TimeTravelProjectDoesNotExist = "project_does_not_exist" TimeTravelDataSourceDoesNotExist = "data_source_does_not_exist" TimeTravelIntegrationDoesNotSupportReplay = "integration_does_not_support_replay" TimeTravelAgentVersionDoesNotSupportReplay = "agent_version_does_not_support_replay" TimeTravelMaxHistoricalDataRetrievalTooLow = "max_historical_data_retrieval_too_low" TimeTravelConcurrentReplayRunsLimitExhausted = "concurrent_replay_runs_limit_exhausted" TimeTravelUnknownAgentVersion = "unknown_agent_version" )
Variants of TimeTravelAvailability.Reason.
const ( DurationUnitMinute = "Minute" DurationUnitHour = "Hour" DurationUnitDay = "Day" )
const ( P1 string = "p1" P5 string = "p5" P10 string = "p10" P50 string = "p50" P90 string = "p90" P95 string = "p95" P99 string = "p99" )
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]+[_-]?)+$` )
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 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, ", "))
var ErrInvalidTimeTravelDurationUnit = errors.New("invalid duration unit")
var ThousandEyesTestAgentConfig map[string]thousandEyesConfig
ThousandEyesTestAgentConfig for each test type holds minimum agent version and supported release channels nolint:gochecknoglobals
Functions ¶
func GetAvailablePercentiles ¶
func GetAvailablePercentiles() []string
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 Parse ¶
func Parse(o manifest.ObjectGeneric, parsedObjects *APIObjects, onlyHeaders bool) (err error)
Parse takes care of all Object supported by n9/v1alpha apiVersion
func ReleaseChannelNames ¶ added in v0.23.0
func ReleaseChannelNames() []string
ReleaseChannelNames returns a list of possible string values of ReleaseChannel.
func SourceOfToStringSlice ¶
func ValidateTimeTravelDurationUnit ¶
ValidateTimeTravelDurationUnit check if given string is allowed period unit.
Types ¶
type APIObjects ¶
type APIObjects struct { SLOs SLOsSlice `json:"slos,omitempty"` Services ServicesSlice `json:"services,omitempty"` Agents AgentsSlice `json:"agents,omitempty"` AlertPolicies AlertPoliciesSlice `json:"alertpolicies,omitempty"` AlertSilences AlertSilencesSlice `json:"alertsilences,omitempty"` Alerts AlertsSlice `json:"alerts,omitempty"` AlertMethods AlertMethodsSlice `json:"alertmethods,omitempty"` Directs DirectsSlice `json:"directs,omitempty"` DataExports DataExportsSlice `json:"dataexports,omitempty"` Projects ProjectsSlice `json:"projects,omitempty"` RoleBindings RoleBindingsSlice `json:"rolebindings,omitempty"` Annotations AnnotationsSlice `json:"annotations,omitempty"` UserGroups UserGroupsSlice `json:"usergroups,omitempty"` }
APIObjects - all Objects available for this version of API Sorted in order of applying
func (APIObjects) Clone ¶
func (o APIObjects) Clone() APIObjects
func (APIObjects) Len ¶
func (o APIObjects) Len() int
func (APIObjects) Validate ¶
func (o APIObjects) Validate() (err error)
Validate performs validation of parsed APIObjects.
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 { manifest.ObjectHeader Spec AgentSpec `json:"spec"` Status AgentStatus `json:"status"` }
Agent struct which mapped one to one with kind: Agent yaml definition
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"` GCM *GCMAgentConfig `json:"gcm,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 AgentsSlice ¶
type AgentsSlice []Agent
func (AgentsSlice) Clone ¶
func (agents AgentsSlice) Clone() AgentsSlice
type Alert ¶
type Alert struct { manifest.ObjectHeader Spec AlertSpec `json:"spec"` }
Alert represents triggered alert
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" 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 AlertMethod ¶
type AlertMethod struct { manifest.ObjectHeader Spec AlertMethodSpec `json:"spec"` }
AlertMethod represents the configuration required to send a notification to an external service when an alert is triggered.
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 AlertMethodsSlice ¶
type AlertMethodsSlice []AlertMethod
func (AlertMethodsSlice) Clone ¶
func (alertMethods AlertMethodsSlice) Clone() AlertMethodsSlice
type AlertPoliciesSlice ¶
type AlertPoliciesSlice []AlertPolicy
func (AlertPoliciesSlice) Clone ¶
func (alertPolicies AlertPoliciesSlice) Clone() AlertPoliciesSlice
type AlertPolicy ¶
type AlertPolicy struct { manifest.ObjectHeader Spec AlertPolicySpec `json:"spec"` }
AlertPolicy represents a set of conditions that can trigger an alert.
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 { manifest.ObjectInternal APIVersion string `json:"apiVersion" validate:"required" example:"n9/v1alpha"` Kind manifest.Kind `json:"kind" validate:"required" example:"kind"` Metadata manifest.AlertSilenceMetadata `json:"metadata"` Spec AlertSilenceSpec `json:"spec"` Status AlertSilenceStatus `json:"status,omitempty"` }
AlertSilence represents alerts silencing configuration for given SLO and AlertPolicy.
type AlertSilenceAlertPolicySource ¶
type AlertSilenceAlertPolicySource struct { Name string `json:"name" validate:"required"` Project string `json:"project,omitempty"` }
AlertSilenceAlertPolicySource represents AlertPolicy attached to the SLO.
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 AlertSilencesSlice ¶
type AlertSilencesSlice []AlertSilence
func (AlertSilencesSlice) Clone ¶
func (alertSilences AlertSilencesSlice) Clone() AlertSilencesSlice
type AlertSpec ¶
type AlertSpec struct { AlertPolicy manifest.Metadata `json:"alertPolicy"` SLO manifest.Metadata `json:"slo"` Service manifest.Metadata `json:"service"` Threshold AlertThreshold `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 AlertThreshold ¶
type AlertsSlice ¶
type AlertsSlice []Alert
func (AlertsSlice) Clone ¶
func (alerts AlertsSlice) Clone() AlertsSlice
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 AnalysisCalculation ¶
type AnalysisCalculation struct { Value float64 `json:"value" validate:"required,numeric,gte=0" example:"2.9"` BudgetTarget float64 `json:"target" validate:"required,numeric,gte=0,lt=1" example:"0.9"` TimeSliceTarget float64 `json:"timeSliceTarget,omitempty" example:"0.9"` BudgetingMethod string `json:"budgetingMethod" validate:"required,budgetingMethod" example:"Occurrences"` Operator string `json:"op,omitempty" validate:"required,operator" example:"lte"` CreatedAt string `json:"createdAt"` }
func (AnalysisCalculation) IsValid ¶
func (c AnalysisCalculation) IsValid() error
type AnalysisMetadata ¶
type AnalysisMetadata struct { Name string `json:"name,omitempty"` UpdatableAnalysisMetadata }
type AnalysisMetricSpec ¶
type AnalysisMetricSpec struct { Kind manifest.Kind `json:"kind" validate:"required,metricSourceKind"` MetricSource string `json:"metricSource" validate:"required,objectName"` RawMetric *MetricSpec `json:"rawMetric,omitempty"` CountMetrics *CountMetricsSpec `json:"countMetrics,omitempty"` }
type AnalysisPeriod ¶
type AnalysisPeriod struct { StartTime string `json:"startTime" validate:"required,dateWithTime"` EndTime string `json:"endTime" validate:"required,dateWithTime"` TimeZone string `json:"timeZone" validate:"required,timeZone"` }
func (*AnalysisPeriod) GetEndDate ¶
func (p *AnalysisPeriod) GetEndDate() (time.Time, error)
func (*AnalysisPeriod) GetStartDate ¶
func (p *AnalysisPeriod) GetStartDate() (time.Time, error)
type Annotation ¶
type Annotation struct { manifest.ObjectHeader Spec AnnotationSpec `json:"spec"` Status AnnotationStatus `json:"status"` }
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 AnnotationsSlice ¶
type AnnotationsSlice []Annotation
func (AnnotationsSlice) Clone ¶
func (annotations AnnotationsSlice) Clone() AnnotationsSlice
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 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 BurnDownTimeSeries ¶
type BurnDownTimeSeries struct {
BurnDown []TimeSeriesData `json:"burnDown,omitempty"`
}
type BurnedBudget ¶
type BurnedBudget struct {
Value *float64 `json:"burnedBudget,omitempty"`
}
BurnedBudget represents content of burned budget for a given threshold.
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"` SecretAccessKey string `json:"secretAccessKey"` }
CloudWatchDirectConfig represents content of CloudWatch Configuration typical for Direct Object.
type CloudWatchMetric ¶
type CloudWatchMetric struct { 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 CompositeTimeSeries ¶
type CompositeTimeSeries struct { InstantaneousBurnRateTimeSeries Status CompositeTimeSeriesStatus `json:"status"` Operator *string `json:"op,omitempty"` CompositeBurnRateValue *float64 `json:"compositeBurnRateValue,omitempty"` BudgetTarget *float64 `json:"budgetTarget,omitempty"` BurnDownTimeSeries }
type CompositeTimeSeriesStatus ¶
type CompositeTimeSeriesStatus struct { BurnedBudget *float64 `json:"burnedBudget,omitempty" example:"0.25"` RemainingBudget *float64 `json:"errorBudgetRemainingPercentage,omitempty" example:"0.25"` RemainingBudgetDuration *float64 `json:"errorBudgetRemaining,omitempty" example:"300"` InstantaneousBurnRate *float64 `json:"instantaneousBurnRate,omitempty" example:"1.25"` Condition *string `json:"condition,omitempty" example:"ok"` }
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 CountsSLITimeSeries ¶
type CountsSLITimeSeries struct { GoodCount TimeSeriesData `json:"goodCount,omitempty"` BadCount TimeSeriesData `json:"badCount,omitempty"` TotalCount TimeSeriesData `json:"totalCount,omitempty"` }
type DataExport ¶
type DataExport struct { manifest.ObjectHeader Spec DataExportSpec `json:"spec"` Status DataExportStatus `json:"status"` }
DataExport struct which mapped one to one with kind: DataExport yaml definition
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
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 DataExportsSlice ¶
type DataExportsSlice []DataExport
func (DataExportsSlice) Clone ¶
func (dataExports DataExportsSlice) Clone() DataExportsSlice
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 )
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 DataSources ¶
type DataSources struct {
UsageData `json:"dataSources"`
}
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 { manifest.ObjectHeader Spec DirectSpec `json:"spec"` Status DirectStatus `json:"status"` }
Direct struct which mapped one to one with kind: Direct yaml definition
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"` 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 DirectsSlice ¶
type DirectsSlice []Direct
func (DirectsSlice) Clone ¶
func (directs DirectsSlice) Clone() DirectsSlice
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 DownsamplingConfig ¶
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 ErrorDetails ¶
type FilterEntry ¶
type FilterEntry struct { Label string `json:"label" validate:"required,prometheusLabelName"` Value string `json:"value" validate:"required"` }
FilterEntry represents single metric label to be matched against value
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 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 GroupMetadata ¶ added in v0.15.0
type GroupMetadata struct {
Name string `json:"name" validate:"required,objectName" example:"name"`
}
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 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 InstantaneousBurnRateTimeSeries ¶
type InstantaneousBurnRateTimeSeries struct {
InstantaneousBurnRate TimeSeriesData `json:"instantaneousBurnRate,omitempty"`
}
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 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"` }
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 json.Number `json:"accountId,omitempty" example:"123654"`
}
NewRelicAgentConfig represents content of NewRelic Configuration typical for Agent Object.
type NewRelicDirectConfig ¶
type NewRelicDirectConfig struct { AccountID json.Number `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 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 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 OrganizationInformation ¶
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 Percentiles ¶
type Percentiles struct { P1 TimeSeriesData `json:"p1,omitempty"` P5 TimeSeriesData `json:"p5,omitempty"` P10 TimeSeriesData `json:"p10,omitempty"` P50 TimeSeriesData `json:"p50,omitempty"` P90 TimeSeriesData `json:"p90,omitempty"` P95 TimeSeriesData `json:"p95,omitempty"` P99 TimeSeriesData `json:"p99,omitempty"` }
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 Project ¶
type Project struct { manifest.ObjectInternal APIVersion string `json:"apiVersion" validate:"required" example:"n9/v1alpha"` Kind manifest.Kind `json:"kind" validate:"required" example:"kind"` Metadata manifest.ProjectMetadata `json:"metadata"` Spec ProjectSpec `json:"spec"` }
Project struct which mapped one to one with kind: project yaml definition.
type ProjectSpec ¶
type ProjectSpec struct {
Description string `json:"description" validate:"description" example:"Bleeding edge web app"`
}
ProjectSpec represents content of Spec typical for Project Object.
type ProjectsSlice ¶
type ProjectsSlice []Project
func (ProjectsSlice) Clone ¶
func (projects ProjectsSlice) Clone() ProjectsSlice
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 { manifest.ObjectHeader Spec PublicAlertMethodSpec `json:"spec"` Status *PublicAlertMethodStatus `json:"status,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 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"` HiddenSecretAccessKey string `json:"secretAccessKey"` }
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 { manifest.ObjectHeader Spec PublicDirectSpec `json:"spec"` Status DirectStatus `json:"status"` }
PublicDirect struct which mapped one to one with kind: Direct yaml definition without secrets
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"` 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 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 json.Number `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"` HiddenSecretAccessKey string `json:"secretAccessKey"` SecretARN string `json:"secretARN"` }
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) 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 QueryValidationStatus ¶
type QueryValidationStatus struct {
ValidationStatus `json:"validationStatus"`
}
type RawCountsSLITimeSeries ¶
type RawCountsSLITimeSeries struct { RawGoodCount TimeSeriesData `json:"rawGoodCount,omitempty"` RawBadCount TimeSeriesData `json:"rawBadCount,omitempty"` RawTotalCount TimeSeriesData `json:"rawTotalCount,omitempty"` }
type RawMetricSpec ¶
type RawMetricSpec struct {
MetricQuery *MetricSpec `json:"query" validate:"required"`
}
RawMetricSpec represents integration with a metric source for a particular threshold
type RawSLIPercentilesTimeSeries ¶
type RawSLIPercentilesTimeSeries struct {
Percentiles *Percentiles `json:"percentiles,omitempty"`
}
type RawSLIThresholdTimeSeries ¶
type RawSLIThresholdTimeSeries struct {
Raw TimeSeriesData `json:"raw,omitempty"`
}
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"` SecretAccessKey string `json:"secretAccessKey"` SecretARN string `json:"secretARN"` }
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 RoleBinding ¶
type RoleBinding struct { manifest.ObjectInternal APIVersion string `json:"apiVersion" validate:"required" example:"n9/v1alpha"` Kind manifest.Kind `json:"kind" validate:"required" example:"kind"` Metadata manifest.RoleBindingMetadata `json:"metadata"` Spec RoleBindingSpec `json:"spec"` }
RoleBinding represents relation of User and Role
type RoleBindingSpec ¶
type RoleBindingsSlice ¶
type RoleBindingsSlice []RoleBinding
func (RoleBindingsSlice) Clone ¶
func (roleBindings RoleBindingsSlice) Clone() RoleBindingsSlice
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 SLIAnalysis ¶
type SLIAnalysis struct { Metadata AnalysisMetadata `json:"metadata"` MetricSpec AnalysisMetricSpec `json:"metricSpec"` CalculationSpec *AnalysisCalculation `json:"calculationSpec,omitempty"` Period AnalysisPeriod `json:"period"` Status string `json:"status"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` }
func (*SLIAnalysis) AllMetricSpecs ¶
func (s *SLIAnalysis) AllMetricSpecs() []*MetricSpec
AllMetricSpecs returns slice of all metrics defined in SLIAnalysis regardless of their type.
func (*SLIAnalysis) DataSourceType ¶
func (s *SLIAnalysis) DataSourceType() int32
DataSourceType returns data source type for SLIAnalysis.
func (SLIAnalysis) IsValid ¶
func (s SLIAnalysis) IsValid() error
type SLO ¶
type SLO struct { manifest.ObjectHeader Spec SLOSpec `json:"spec"` Status *SLOStatus `json:"status,omitempty"` }
SLO struct which mapped one to one with kind: slo yaml definition, external usage
type SLOErrorBudgetStatus ¶
type SLOErrorBudgetStatus struct { manifest.MetadataHolder TimeWindow TimeWindow `json:"timeWindow"` ThresholdSummary []ThresholdStatus `json:"thresholdSummary"` }
type SLOErrorBudgetStatusReport ¶
type SLOErrorBudgetStatusReport struct { Service Service `json:"service"` SLOs []SLOErrorBudgetStatus `json:"slos"` }
type SLOHistoryReport ¶
type SLOHistoryReport struct { manifest.MetadataHolder TimeWindows []TimeWindowHistoryReport `json:"timewindows,omitempty"` }
type SLOSpec ¶
type SLOSpec struct { Description string `json:"description" validate:"description" example:"Total count of server requests"` //nolint:lll Indicator Indicator `json:"indicator"` BudgetingMethod string `json:"budgetingMethod" validate:"required,budgetingMethod" example:"Occurrences"` Thresholds []Threshold `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 thresholds.
func (*SLOSpec) CountMetrics ¶
func (slo *SLOSpec) CountMetrics() []*MetricSpec
CountMetrics returns a flat slice of all count metrics defined in this SLOSpec's thresholds.
func (*SLOSpec) CountMetricsCount ¶
CountMetricsCount returns total number of all count metrics defined in this SLOSpec's thresholds.
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 thresholds.
func (*SLOSpec) RawMetrics ¶
func (slo *SLOSpec) RawMetrics() []*MetricSpec
RawMetrics returns raw metric spec.
type SLOStatus ¶
type SLOStatus struct {
TimeTravelStatus *TimeTravelStatus `json:"timeTravel,omitempty"`
}
type SLOTimeSeries ¶
type SLOTimeSeries struct { manifest.MetadataHolder TimeWindows []TimeWindowTimeSeries `json:"timewindows,omitempty"` Status *SLOStatus `json:"status,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 Service ¶
type Service struct { manifest.ObjectHeader Spec ServiceSpec `json:"spec"` Status *ServiceStatus `json:"status,omitempty"` }
Service struct which mapped one to one with kind: service yaml definition
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 ServiceSpec ¶
type ServiceSpec struct {
Description string `json:"description" validate:"description" example:"Bleeding edge web app"`
}
ServiceSpec represents content of Spec typical for Service Object.
type ServiceStatus ¶
type ServiceStatus struct {
SloCount int `json:"sloCount"`
}
ServiceStatus represents content of Status optional for Service Object.
type ServiceWithSLOs ¶
ServiceWithSLOs struct which mapped one to one with kind: service and slo yaml definition.
type ServicesSlice ¶
type ServicesSlice []Service
func (ServicesSlice) Clone ¶
func (services ServicesSlice) Clone() ServicesSlice
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 Threshold ¶
type Threshold struct { ThresholdBase // <!-- 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"` // <!-- Go struct field and type names renaming thresholds to objectives has been postponed after GA as requested // in PC-1240. --> 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"` }
Threshold represents single threshold for SLO, for internal usage
func (*Threshold) HasCountMetrics ¶
HasCountMetrics returns true if Threshold has count metrics.
func (*Threshold) HasRawMetricQuery ¶
HasRawMetricQuery returns true if Threshold has raw metric with query set.
type ThresholdBase ¶
type ThresholdBase 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:"-"` }
ThresholdBase base structure representing a threshold
type ThresholdHistoryReport ¶
type ThresholdHistoryReport struct { ThresholdBase BurnDownTimeSeries }
type ThresholdStatus ¶
type ThresholdStatus struct { Threshold Status struct { BurnedBudget } `json:"status"` }
type ThresholdTimeSeries ¶
type ThresholdTimeSeries struct { ThresholdBase InstantaneousBurnRateTimeSeries Status ThresholdTimeSeriesStatus `json:"status"` QueryValidationStatus Downsampling DownsamplingConfig `json:"downsampling,omitempty"` Operator *string `json:"op,omitempty"` CountsSLITimeSeries RawCountsSLITimeSeries BurnDownTimeSeries RawSLIPercentilesTimeSeries RawSLIThresholdTimeSeries }
type ThresholdTimeSeriesStatus ¶
type ThresholdTimeSeriesStatus struct { BurnedBudget *float64 `json:"burnedBudget,omitempty" example:"0.25"` RemainingBudget *float64 `json:"errorBudgetRemainingPercentage,omitempty" example:"0.25"` RemainingBudgetDuration *float64 `json:"errorBudgetRemaining,omitempty" example:"300"` InstantaneousBurnRate *float64 `json:"instantaneousBurnRate,omitempty" example:"1.25"` Condition *string `json:"condition,omitempty" example:"ok"` }
type TimeSeriesData ¶
type TimeSeriesData [][]interface{}
type TimeTravel ¶
type TimeTravel struct { Project string `json:"project" validate:"required"` Slo string `json:"slo" validate:"required"` Duration TimeTravelDuration `json:"duration"` }
TimeTravel Struct used for posting timeTravel entity.
func ParseJSONToTimeTravelStruct ¶
func ParseJSONToTimeTravelStruct(data io.Reader) (TimeTravel, error)
ParseJSONToTimeTravelStruct parse raw json into v1alpha.TimeTravel struct with validation.
type TimeTravelAvailability ¶
type TimeTravelDuration ¶
type TimeTravelStatus ¶
type TimeTravelWithStatus ¶
type TimeTravelWithStatus struct { Project string `json:"project" validate:"required"` Slo string `json:"slo" validate:"required"` Status TimeTravelStatus `json:"status"` }
TimeTravelWithStatus used for returning TimeTravel data with status.
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 TimeWindowHistoryReport ¶
type TimeWindowHistoryReport struct { TimeWindow `json:"timewindow,omitempty"` Thresholds []ThresholdHistoryReport `json:"objectives,omitempty"` }
type TimeWindowTimeSeries ¶
type TimeWindowTimeSeries struct { TimeWindow `json:"timewindow,omitempty"` // <!-- Go struct field and type names renaming thresholds to objectives has been postponed after GA as requested // in PC-1240. --> Thresholds []ThresholdTimeSeries `json:"objectives,omitempty"` Composite *CompositeTimeSeries `json:"composite,omitempty"` }
type UpdatableAnalysisMetadata ¶
type UpdatableAnalysisMetadata struct { Project string `json:"project" validate:"required,objectName"` DisplayName string `json:"displayName" validate:"min=0,max=63,required"` }
func (UpdatableAnalysisMetadata) IsValid ¶
func (s UpdatableAnalysisMetadata) IsValid() error
type UsageSummary ¶
type UsageSummary struct { SLOs SLOUnits DataSources *APIKeys `json:"apiKeys,omitempty"` Users }
type UsageSummaryData ¶
type UsageSummaryData struct { UsageSummaryMetadata `json:"metadata"` UsageSummary `json:"usageSummary"` }
type UsageSummaryMetadata ¶
type UsageSummaryMetadata struct { *Tier `json:"tier,omitempty" validate:"omitempty"` GeneratedAt string `json:"generatedAt,omitempty" validate:"omitempty" example:"2021-07-09T13:34:48Z"` }
UsageSummaryMetadata represents metadata part of usageSummary object
type UserGroup ¶ added in v0.15.0
type UserGroup struct { manifest.ObjectInternal APIVersion string `json:"apiVersion" validate:"required" example:"n9/v1alpha"` Kind manifest.Kind `json:"kind" validate:"required" example:"kind"` Metadata GroupMetadata `json:"metadata"` Spec UserGroupSpec `json:"spec"` }
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 UserGroupsSlice ¶ added in v0.15.0
type UserGroupsSlice []UserGroup
func (UserGroupsSlice) Clone ¶ added in v0.15.0
func (u UserGroupsSlice) Clone() UserGroupsSlice
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 ValidationDetails ¶
type ValidationDetails struct { *ErrorDetails *MetricSpec }
type ValidationStatus ¶
type ValidationStatus struct { GoodMetricValidation *ValidationDetails `json:"goodMetric,omitempty"` BadMetricValidation *ValidationDetails `json:"badMetric,omitempty"` TotalMetricValidation *ValidationDetails `json:"totalMetric,omitempty"` RawMetricValidation *ValidationDetails `json:"rawMetric,omitempty"` }
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
- alert.go
- alert_method.go
- alert_policy.go
- alert_silence.go
- annotation.go
- aws.go
- composite.go
- data_export.go
- data_sources.go
- direct.go
- measurement.go
- method.go
- metrics.go
- notification_template.go
- objects.go
- operator.go
- project.go
- query_validator.go
- release_channel.go
- release_channel_enum.go
- reports.go
- role_binding.go
- service.go
- severity.go
- sli_analysis.go
- slo.go
- thousandeyes.go
- time_travel.go
- ts.go
- user_groups.go
- validator.go