Documentation
¶
Index ¶
- Constants
- Variables
- func DetectorCheckStatus(ctx context.Context, state *DetectorCheckState, client *resty.Client) (*action_kit_api.StatusResult, error)
- func NewDetectorDiscovery() discovery_kit_sdk.TargetDiscovery
- func NewDetectorStateCheckAction() action_kit_sdk.Action[DetectorCheckState]
- type AuthorizedWriters
- type Detector
- type DetectorCheckState
- type DetectorStateCheckAction
- func (m *DetectorStateCheckAction) Describe() action_kit_api.ActionDescription
- func (m *DetectorStateCheckAction) NewEmptyState() DetectorCheckState
- func (m *DetectorStateCheckAction) Prepare(_ context.Context, state *DetectorCheckState, ...) (*action_kit_api.PrepareResult, error)
- func (m *DetectorStateCheckAction) Start(_ context.Context, _ *DetectorCheckState) (*action_kit_api.StartResult, error)
- func (m *DetectorStateCheckAction) Status(ctx context.Context, state *DetectorCheckState) (*action_kit_api.StatusResult, error)
- type Event
- type Filter
- type ImportQualifier
- type Incident
- type Input
- type PublishLabelOption
- type Response
- type Rule
- type TimeOptions
- type VisualizationOptions
Constants ¶
View Source
const ( NoIncident = "No Incidents" Anomalous = "ANOMALOUS" ManuallyResolved = "MANUALLY_RESOLVED" Ok = "OK" Stopped = "STOPPED" )
View Source
const (
TargetType = "com.steadybit.extension_splunk.detector"
)
Variables ¶
View Source
var (
RestyClient *resty.Client
)
Functions ¶
func DetectorCheckStatus ¶
func DetectorCheckStatus(ctx context.Context, state *DetectorCheckState, client *resty.Client) (*action_kit_api.StatusResult, error)
func NewDetectorDiscovery ¶
func NewDetectorDiscovery() discovery_kit_sdk.TargetDiscovery
func NewDetectorStateCheckAction ¶
func NewDetectorStateCheckAction() action_kit_sdk.Action[DetectorCheckState]
Types ¶
type AuthorizedWriters ¶
type Detector ¶
type Detector struct {
AuthorizedWriters AuthorizedWriters `json:"authorizedWriters"`
AutoOptimizationDisabled bool `json:"autoOptimizationDisabled"`
Created int64 `json:"created"`
Creator string `json:"creator"`
CustomProperties map[string]interface{} `json:"customProperties"`
Description string `json:"description"`
DetectorOrigin string `json:"detectorOrigin"`
ID string `json:"id"`
ImportQualifiers []ImportQualifier `json:"importQualifiers"`
LabelResolutions map[string]int `json:"labelResolutions"`
LastOptimized int64 `json:"lastOptimized"`
LastUpdated int64 `json:"lastUpdated"`
LastUpdatedBy string `json:"lastUpdatedBy"`
MaxDelay int64 `json:"maxDelay"`
MinDelay *int64 `json:"minDelay"` // pointer to handle null values
Name string `json:"name"`
OverMTSLimit bool `json:"overMTSLimit"`
PackageSpecifications string `json:"packageSpecifications"`
ProgramText string `json:"programText"`
Rules []Rule `json:"rules"`
SFMetricsInObjectProgramText []string `json:"sf_metricsInObjectProgramText"`
Status string `json:"status"`
Tags []string `json:"tags"`
Teams []string `json:"teams"`
Timezone *string `json:"timezone"` // pointer to handle null values
VisualizationOptions VisualizationOptions `json:"visualizationOptions"`
}
type DetectorCheckState ¶
type DetectorStateCheckAction ¶
type DetectorStateCheckAction struct{}
func (*DetectorStateCheckAction) Describe ¶
func (m *DetectorStateCheckAction) Describe() action_kit_api.ActionDescription
func (*DetectorStateCheckAction) NewEmptyState ¶
func (m *DetectorStateCheckAction) NewEmptyState() DetectorCheckState
func (*DetectorStateCheckAction) Prepare ¶
func (m *DetectorStateCheckAction) Prepare(_ context.Context, state *DetectorCheckState, request action_kit_api.PrepareActionRequestBody) (*action_kit_api.PrepareResult, error)
func (*DetectorStateCheckAction) Start ¶
func (m *DetectorStateCheckAction) Start(_ context.Context, _ *DetectorCheckState) (*action_kit_api.StartResult, error)
func (*DetectorStateCheckAction) Status ¶
func (m *DetectorStateCheckAction) Status(ctx context.Context, state *DetectorCheckState) (*action_kit_api.StatusResult, error)
type Event ¶
type Event struct {
AnomalyState string `json:"anomalyState"`
DetectLabel string `json:"detectLabel"`
DetectorId string `json:"detectorId"`
DetectorName string `json:"detectorName"`
EventAnnotations map[string]interface{} `json:"event_annotations"`
ID string `json:"id"`
IncidentId string `json:"incidentId"`
Inputs map[string]Input `json:"inputs"`
LinkedTeams []string `json:"linkedTeams"`
Severity string `json:"severity"`
Timestamp int64 `json:"timestamp"`
}
type ImportQualifier ¶
ImportQualifier represents each import qualifier.
type Incident ¶
type Incident struct {
Active bool `json:"active"`
AnomalyState string `json:"anomalyState"`
AnomalyStateUpdateTimestamp int64 `json:"anomalyStateUpdateTimestamp"`
DetectLabel string `json:"detectLabel"`
DetectorId string `json:"detectorId"`
DetectorName string `json:"detectorName"`
DisplayBody string `json:"displayBody"`
Events []Event `json:"events"`
IncidentId string `json:"incidentId"`
IsMuted bool `json:"isMuted"`
Severity string `json:"severity"`
TriggeredNotificationSent bool `json:"triggeredNotificationSent"`
TriggeredWhileMuted bool `json:"triggeredWhileMuted"`
}
type PublishLabelOption ¶
type Rule ¶
type Rule struct {
Description string `json:"description"`
DetectLabel string `json:"detectLabel"`
Disabled bool `json:"disabled"`
Notifications []interface{} `json:"notifications"`
ParameterizedBody string `json:"parameterizedBody,omitempty"`
ParameterizedSubject string `json:"parameterizedSubject,omitempty"`
Severity string `json:"severity"`
}
type TimeOptions ¶
type VisualizationOptions ¶
type VisualizationOptions struct {
DisableSampling bool `json:"disableSampling"`
PublishLabelOptions []PublishLabelOption `json:"publishLabelOptions"`
ShowDataMarkers bool `json:"showDataMarkers"`
ShowEventLines bool `json:"showEventLines"`
Time TimeOptions `json:"time"`
}
Click to show internal directories.
Click to hide internal directories.