processavailability

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OperatingSystems = struct {
	Aix     OperatingSystem
	Linux   OperatingSystem
	Windows OperatingSystem
}{
	"AIX",
	"LINUX",
	"WINDOWS",
}
View Source
var ProcessItems = struct {
	Commandline    ProcessItem
	Executable     ProcessItem
	Executablepath ProcessItem
	User           ProcessItem
}{
	"commandLine",
	"executable",
	"executablePath",
	"user",
}
View Source
var RuleTypes = struct {
	Ruletypehost    RuleType
	Ruletypeprocess RuleType
}{
	"RuleTypeHost",
	"RuleTypeProcess",
}

Functions

This section is empty.

Types

type DetectionCondition

type DetectionCondition struct {
	Condition             *string                `json:"condition,omitempty"`             // - $contains(svc) – Matches if svc appears anywhere in the process property value.\n- $eq(svc.exe) – Matches if svc.exe matches the process property value exactly.\n- $prefix(svc) – Matches if app matches the prefix of the process property value.\n- $suffix(svc.py) – Matches if svc.py matches the suffix of the process property value.\n\nFor example, $suffix(svc.py) would detect processes named loyaltysvc.py and paymentssvc.py.\n\nFor more details, see [Process availability](https://dt-url.net/v923x37).
	HostMetadataCondition *HostMetadataCondition `json:"hostMetadataCondition,omitempty"` // Host custom metadata refers to user-defined key-value pairs that you can assign to hosts monitored by Dynatrace.\n\nBy defining custom metadata, you can enrich the monitoring data with context specific to your organization's needs, such as environment names, team ownership, application versions, or any other relevant details.\n\nSee [Define tags and metadata for hosts](https://dt-url.net/w3hv0kbw).
	Property              *ProcessItem           `json:"property,omitempty"`              // Possible Values: `CommandLine`, `Executable`, `ExecutablePath`, `User`
	RuleType              RuleType               `json:"ruleType"`                        // Possible Values: `RuleTypeHost`, `RuleTypeProcess`
}

func (*DetectionCondition) HandlePreconditions added in v1.50.0

func (me *DetectionCondition) HandlePreconditions() error

func (*DetectionCondition) MarshalHCL

func (me *DetectionCondition) MarshalHCL(properties hcl.Properties) error

func (*DetectionCondition) Schema

func (me *DetectionCondition) Schema() map[string]*schema.Schema

func (*DetectionCondition) UnmarshalHCL

func (me *DetectionCondition) UnmarshalHCL(decoder hcl.Decoder) error

type DetectionConditions

type DetectionConditions []*DetectionCondition

func (DetectionConditions) MarshalHCL

func (me DetectionConditions) MarshalHCL(properties hcl.Properties) error

func (*DetectionConditions) Schema

func (me *DetectionConditions) Schema() map[string]*schema.Schema

func (*DetectionConditions) UnmarshalHCL

func (me *DetectionConditions) UnmarshalHCL(decoder hcl.Decoder) error

type HostMetadataCondition added in v1.50.0

type HostMetadataCondition struct {
	KeyMustExist      bool   `json:"keyMustExist"`      // When enabled, the condition requires a metadata key to exist and match the constraints; when disabled, the key is optional but must still match the constrains if it is present.
	MetadataCondition string `json:"metadataCondition"` // This string has to match a required format.\n\n- `$contains(production)` – Matches if `production` appears anywhere in the host metadata value.\n- `$eq(production)` – Matches if `production` matches the host metadata value exactly.\n- `$prefix(production)` – Matches if `production` matches the prefix of the host metadata value.\n- `$suffix(production)` – Matches if `production` matches the suffix of the host metadata value.\n\nAvailable logic operations:\n- `$not($eq(production))` – Matches if the host metadata value is different from `production`.\n- `$and($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` and ends with `main`.\n- `$or($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` or ends with `main`.\n\nBrackets **(** and **)** that are part of the matched property **must be escaped with a tilde (~)**
	MetadataKey       string `json:"metadataKey"`       // Key
}

func (*HostMetadataCondition) MarshalHCL added in v1.50.0

func (me *HostMetadataCondition) MarshalHCL(properties hcl.Properties) error

func (*HostMetadataCondition) Schema added in v1.50.0

func (me *HostMetadataCondition) Schema() map[string]*schema.Schema

func (*HostMetadataCondition) UnmarshalHCL added in v1.50.0

func (me *HostMetadataCondition) UnmarshalHCL(decoder hcl.Decoder) error

type MetadataItem

type MetadataItem struct {
	MetadataKey   string `json:"metadataKey"` // Type 'dt.' for key hints.
	MetadataValue string `json:"metadataValue"`
}

func (*MetadataItem) MarshalHCL

func (me *MetadataItem) MarshalHCL(properties hcl.Properties) error

func (*MetadataItem) Schema

func (me *MetadataItem) Schema() map[string]*schema.Schema

func (*MetadataItem) UnmarshalHCL

func (me *MetadataItem) UnmarshalHCL(decoder hcl.Decoder) error

type MetadataItems

type MetadataItems []*MetadataItem

func (MetadataItems) MarshalHCL

func (me MetadataItems) MarshalHCL(properties hcl.Properties) error

func (*MetadataItems) Schema

func (me *MetadataItems) Schema() map[string]*schema.Schema

func (*MetadataItems) UnmarshalHCL

func (me *MetadataItems) UnmarshalHCL(decoder hcl.Decoder) error

type OperatingSystem added in v1.50.0

type OperatingSystem string

type ProcessItem

type ProcessItem string

type RuleType added in v1.50.0

type RuleType string

type Settings

type Settings struct {
	Enabled          bool                `json:"enabled"`            // This setting is enabled (`true`) or disabled (`false`)
	Metadata         MetadataItems       `json:"metadata,omitempty"` // Set of additional key-value properties to be attached to the triggered event.
	Name             string              `json:"name"`               // Monitored rule name
	Rules            DetectionConditions `json:"rules,omitempty"`    // Define process detection rules by selecting a process property and a condition. Each monitoring rule can have multiple detection rules associated with it.
	Scope            *string             `json:"-" scope:"scope"`    // The scope of this setting (HOST, HOST_GROUP). Omit this property if you want to cover the whole environment.
	MinimumProcesses int                 `json:"minimumProcesses"`   // Specify a minimum number of processes matching the monitoring rule. If it's not satisfied, an alert will open.
	OperatingSystem  []OperatingSystem   `json:"operatingSystem"`    // Select the operating systems on which the monitoring rule should be applied.
	InsertAfter      string              `json:"-"`
}

func (*Settings) MarshalHCL

func (me *Settings) MarshalHCL(properties hcl.Properties) error

func (*Settings) Schema

func (me *Settings) Schema() map[string]*schema.Schema

func (*Settings) UnmarshalHCL

func (me *Settings) UnmarshalHCL(decoder hcl.Decoder) error

Jump to

Keyboard shortcuts

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