Skip to content

Commit 240cfa8

Browse files
committed
[PLAT-16365][YBA CLI]Alerts - alerts and alert configurations
Summary: Alert command: ``` yba alert Manage YugabyteDB Anywhere alerts Usage: yba alert [flags] yba alert [command] Available Commands: acknowledge Acknowledge YugabyteDB Anywhere alert count Count YugabyteDB Anywhere alerts describe Describe YugabyteDB Anywhere alert list List YugabyteDB Anywhere alerts policy Manage YugabyteDB Anywhere alert policies Flags: -h, --help help for alert Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` List alerts command: ``` yba alert list -h List alerts in YugabyteDB Anywhere Usage: yba alert list [flags] Aliases: list, ls Examples: yba alert list --source-name <source-listname> Flags: --configuration-uuid string [Optional] Configuration UUID to filter alerts. --configuration-types string [Optional] Comma separated list of configuration types. --severities string [Optional] Comma separated list of severities. Allowed values: severe, warning. --source-uuids string [Optional] Comma separated list of source UUIDs. --source-name string [Optional] Source name to filter alerts. --states string [Optional] Comma separated list of states. Allowed values: active, acknowledged, suspended, resolved. --uuids string [Optional] Comma separated list of alert UUIDs. --sorting-field string [Optional] Field to sort alerts. Allowed values: severity, create-time, source-name, name, state, uuid. (default "create-time") --direction string [Optional] Direction to sort alerts. Allowed values: asc, desc. (default "desc") -f, --force [Optional] Bypass the prompt for non-interactive usage. -h, --help help for list Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Describe alert: ``` yba alert describe -h Describe alert in YugabyteDB Anywhere Usage: yba alert describe [flags] Aliases: describe, get Examples: yba alert describe --uuid <alert-uuid> Flags: -u, --uuid string [Required] UUID of alert to describe. -h, --help help for describe Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Count alerts: ``` yba alert count -h Count alerts in YugabyteDB Anywhere Usage: yba alert count [flags] Examples: yba alert count Flags: --configuration-uuid string [Optional] Configuration UUID to filter alerts. --configuration-types string [Optional] Comma separated list of configuration types. --severities string [Optional] Comma separated list of severities. Allowed values: severe, warning. --source-uuids string [Optional] Comma separated list of source UUIDs. --source-name string [Optional] Source name to filter alerts. --states string [Optional] Comma separated list of states. Allowed values: active, acknowledged, suspended, resolved. --uuids string [Optional] Comma separated list of alert UUIDs. -h, --help help for count Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Acknowledge alert: ``` yba alert acknowledge -h Acknowledge alert in YugabyteDB Anywhere Usage: yba alert acknowledge [flags] Examples: yba alert acknowledge --uuid <alert-uuid> Flags: -u, --uuid string [Required] UUID of alert to acknowledge. -h, --help help for acknowledge Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Policy commands: ``` yba alert policy Manage YugabyteDB Anywhere alert policies Usage: yba alert policy [flags] yba alert policy [command] Aliases: policy, configuration Available Commands: create Create an alert policy in YugabyteDB Anywhere delete Delete YugabyteDB Anywhere alert policy describe Describe YugabyteDB Anywhere alert policy list List YugabyteDB Anywhere alerts test-alert Send a test alert corresponding to YugabyteDB Anywhere alert policy update Update an alert policy in YugabyteDB Anywhere Flags: -h, --help help for policy Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Create policy: ``` yba alert policy create -h Create an alert policy in YugabyteDB Anywhere Usage: yba alert policy create [flags] Aliases: create, add Examples: yba alert policy create --name <alert-policy-name> \ --alert-type <alert-type> --alert-severity <alert-severity> --alert-config <alert-config> Flags: -n, --name string [Required] Name of alert policy to create. Use single quotes ('') to provide values with special characters. --description string [Optional] Description of alert policy to create. --target-uuids string [Optional] Comma separated list of target UUIDs for the alert policy. If left empty, the alert policy will be created for all targets of the target type. Allowed for target type: universe. --threshold stringArray [Optional] Threshold for the configuration corresponding to severity. Each threshold needs to be added as a separate --threshold flag.Provide the following double colon (::) separated fields as key-value pairs: "severity=<severity>::condition=<condition>::threshold=<threshold>". Allowed values for severity: severe, warning. Allowed values for condition: greater-than, less-than, not-equal. Threshold should be a double. Example: "severity=severe::condition=greater-than::threshold=60000". --template string [Required] Template name for the alert policy. Use single quotes ('') to provide values with special characters. Run "yba alert template list" to check list of available template names. --duration int [Optional] Duration in seconds, while condition is met to raise an alert. (default 0) --destination-type string [Optional] Destination type to create alert policy. Allowed values: no, default, selected --destination string [Optional] Destination name to send alerts. Run "yba alert destination list" to check list of available destinations. Required if destination-type is selected. -h, --help help for create Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Delete policy: ``` yba alert policy delete -h Delete an alert policy in YugabyteDB Anywhere Usage: yba alert policy delete [flags] Aliases: delete, remove, rm Examples: yba alert policy delete --name <alert-configuration-name> Flags: -n, --name string [Required] Name of alert policy to delete. Use single quotes ('') to provide values with special characters. -f, --force [Optional] Bypass the prompt for non-interactive usage. -h, --help help for delete Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Describe policy: ``` Describe an alert policy in YugabyteDB Anywhere Usage: yba alert policy describe [flags] Aliases: describe, get Examples: yba alert policy describe --name <alert-configuration-name> Flags: -n, --name string [Required] Name of alert policy to describe. Use single quotes ('') to provide values with special characters. -h, --help help for describe Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default ``` List policies: ``` yba alert policy list -h List alert policiess in YugabyteDB Anywhere Usage: yba alert policy list [flags] Aliases: list, ls Examples: yba alert policy list --source-name <source-name> Flags: --active [Optional] Filter active alert configurations. (default true) --destination-type string [Optional] Destination type to filter alert configurations. Allowed values: no, default, selected --destination string [Optional] Destination name to filter alert configurations. Required if destination-type is selected. --name string [Optional] Name to filter alert configurations. --severity string [Optional] Severity to filter alert configurations. Allowed values: severe, warning. --target-uuids string [Optional] Comma separated list of target UUIDs for the alert policy. --target-type string [Optional] Target type to filter alert configurations. Allowed values: platform, universe. --template string [Optional] Template type to filter alert configurations. Allowed values (case-sensitive) are listed: https://github.com/yugabyte/yugabyte-db/blob/master/managed/src/main/java/com/yugabyte/yw/common/AlertTemplate.java --uuids string [Optional] Comma separated list of alert policy UUIDs. --sorting-field string [Optional] Field to sort alerts. Allowed values: uuid, name, active, target-type, target, create-time, template, severity, destination, alert-count. (default "create-time") --direction string [Optional] Direction to sort alerts. Allowed values: asc, desc. (default "desc") -f, --force [Optional] Bypass the prompt for non-interactive usage. -h, --help help for list Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Test alert: ``` yba alert policy test-alert -h Send a test alert corresponding to an alert policy in YugabyteDB Anywhere Usage: yba alert policy test-alert [flags] Aliases: test-alert, testalert, test Examples: yba alert policy test-alert --name <alert-configuration-name> Flags: -n, --name string [Required] Name of alert policy to test alerts. Use single quotes ('') to provide values with special characters. -h, --help help for test-alert Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Update alert policies: ``` yba alert policy update -h Update an alert policy in YugabyteDB Anywhere Usage: yba alert policy update [flags] Aliases: update, edit Examples: yba alert policy update --name <alert-policy-name> \ --alert-type <alert-type> --alert-severity <alert-severity> --alert-config <alert-config> Flags: -n, --name string [Required] Name of alert policy to update. Use single quotes ('') to provide values with special characters. --new-name string [Optional] Update name of alert policy. --description string [Optional] Update description of alert policy. --target-type string [Optional] Update target type of alert policy. Allowed values: platform, universe. --target-uuids string [Optional] Comma separated list of target UUIDs for the alert policy. If empty string is specified, the alert policy will be updated for all targets of the target type. Allowed for target type: universe. --add-threshold stringArray [Optional] Threshold for the configuration corresponding to severity.Each threshold needs to be added as a separate --add-threshold flag. Provide the following double colon (::) separated fields as key-value pairs: "severity=<severity>::condition=<condition>::threshold=<threshold>". Allowed values for severity: severe, warning. Allowed values for condition: greater-than, less-than, not-equal. Threshold should be a double. Example: "severity=severe::condition=greater-than::threshold=60000". --edit-threshold stringArray [Optional] Threshold for the configuration corresponding to severity. Each threshold needs to be edited as a separate --edit-threshold flag.Provide the following double colon (::) separated fields as key-value pairs: "severity=<severity>::condition=<condition>::threshold=<threshold>". Allowed values for severity: severe, warning. Allowed values for condition: greater-than, less-than, not-equal. Threshold should be a double. Example: "severity=severe::condition=greater-than::threshold=60000". --remove-threshold stringArray [Optional] Provide the comma separated severities to be removed from threshold. Allowed values: severe, warning. --threshold-unit string [Optional] Update threshold unit for the configuration. Allowed values are listed: https://github.com/yugabyte/yugabyte-db/blob/master/managed/src/main/java/com/yugabyte/yw/models/common/Unit.java. --template string [Optional] Update template name for the alert policy. Allowed values (case-sensitive) are listed: https://github.com/yugabyte/yugabyte-db/blob/master/managed/src/main/java/com/yugabyte/yw/common/AlertTemplate.java --duration int [Optional] Update duration in seconds, while condition is met to raise an alert. --destination-type string [Optional] Destination type to update alert policy. Allowed values: no, default, selected --destination string [Optional] Destination name to send alerts. Run "yba alert destination list" to check list of available destinations. Required if destination-type is selected. --state string [Optional] Set state of the alert policy. Allowed values: enable, disable.) (default "enable") -h, --help help for update Global Flags: -a, --apiToken string YugabyteDB Anywhere api token. --config string Config file, defaults to $HOME/.yba-cli.yaml --debug Use debug mode, same as --logLevel debug. --disable-color Disable colors in output. (default false) -H, --host string YugabyteDB Anywhere Host (default "http://localhost:9000") -l, --logLevel string Select the desired log level format. Allowed values: debug, info, warn, error, fatal. (default "info") -o, --output string Select the desired output format. Allowed values: table, json, pretty. (default "table") --timeout duration Wait command timeout, example: 5m, 1h. (default 168h0m0s) --wait Wait until the task is completed, otherwise it will exit immediately. (default true) ``` Test Plan: Describe alert policy: ``` yba alert policy get -n dkumar-cli General Name UUID Target Type Destination Is Active dkumar-cli e8f63a74-9926-461b-927a-ec44cde5886c UNIVERSE true Target All targets of target type UNIVERSE Template Description YSQL P99 latency is high(YSQL_OP_P99_LATENCY) Create Time Alert Count Duration (in seconds) Tue, 04 Mar 2025 13:06:21 +0000 0.00 0 Maintenance Window UUIDs - Labels null Threshold Unit MILLISECOND Thresholds { "SEVERE": { "condition": "GREATER_THAN", "threshold": 6000 } } ``` Deleting policy: ``` yba alert policy rm -n dkumar-cli ? Are you sure you want to delete alert policy: dkumar-cli Yes The alert policy dkumar-cli (a53f5b66-74a8-4c7a-b69a-5c05660bbb36) has been deleted ``` Creating policy: ``` yba alert policy create --name dkumar-cli-1 --template "YSQL P99 latency is high" --destination-type selected --destination dkumar Successfully added alert policy dkumar-cli-1 (28f33f4a-a366-4fc7-930a-8b0d901d66b9) Name UUID Target Type Destination Is Active dkumar-cli-1 28f33f4a-a366-4fc7-930a-8b0d901d66b9 UNIVERSE dkumar(21f96dc2-d678-4bd5-ae46-264a78dbab1e) true ``` Updating policy: ``` yba alert policy update -n dkumar-cli-test --new-name dkumar-cli --destination-type no Successfully updated alert policy dkumar-cli-test (e8f63a74-9926-461b-927a-ec44cde5886c) Name UUID Target Type Destination Is Active dkumar-cli e8f63a74-9926-461b-927a-ec44cde5886c UNIVERSE true ``` Reviewers: amalyshev, skurapati Reviewed By: amalyshev Subscribers: anijhawan, yugaware Differential Revision: https://phorge.dev.yugabyte.com/D41868
1 parent 918e824 commit 240cfa8

File tree

67 files changed

+4626
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4626
-222
lines changed

managed/src/main/java/com/yugabyte/yw/controllers/AlertController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ public Result deleteAlertDestination(
875875
@ApiOperation(
876876
notes = "WARNING: This is a preview API that could change.",
877877
value = "List alert destinations",
878-
response = AlertDefinition.class,
878+
response = AlertDestination.class,
879879
responseContainer = "List")
880880
@AuthzPath({
881881
@RequiredPermissionOnResource(

managed/src/main/java/com/yugabyte/yw/forms/filters/AlertApiFilter.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.yugabyte.yw.models.Alert;
1313
import com.yugabyte.yw.models.AlertConfiguration;
1414
import com.yugabyte.yw.models.filters.AlertFilter;
15+
import io.swagger.annotations.ApiModelProperty;
1516
import java.util.Set;
1617
import java.util.UUID;
1718
import lombok.Data;
@@ -22,12 +23,25 @@
2223
@Data
2324
@NoArgsConstructor
2425
public class AlertApiFilter {
26+
@ApiModelProperty(value = "The uuids of the alerts.")
2527
private Set<UUID> uuids;
28+
29+
@ApiModelProperty(value = "The uuid of the alert configuration.")
2630
private UUID configurationUuid;
31+
32+
@ApiModelProperty(value = "The severity of the alerts.")
2733
private Set<AlertConfiguration.Severity> severities;
34+
35+
@ApiModelProperty(value = "Alert Configuration Target Types")
2836
private Set<AlertConfiguration.TargetType> configurationTypes;
37+
38+
@ApiModelProperty(value = "The state of the alerts.")
2939
private Set<Alert.State> states;
40+
41+
@ApiModelProperty(value = "The source name of the alerts.")
3042
private String sourceName;
43+
44+
@ApiModelProperty(value = "The source uuids of the alerts.")
3145
private Set<UUID> sourceUUIDs;
3246

3347
public AlertFilter toFilter() {

managed/src/main/java/com/yugabyte/yw/forms/filters/AlertConfigurationApiFilter.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.yugabyte.yw.models.filters.AlertConfigurationFilter;
1717
import com.yugabyte.yw.models.filters.AlertConfigurationFilter.AlertConfigurationFilterBuilder;
1818
import com.yugabyte.yw.models.filters.AlertConfigurationFilter.DestinationType;
19+
import io.swagger.annotations.ApiModelProperty;
1920
import java.util.Set;
2021
import java.util.UUID;
2122
import lombok.Data;
@@ -25,14 +26,32 @@
2526
@Data
2627
@NoArgsConstructor
2728
public class AlertConfigurationApiFilter {
29+
30+
@ApiModelProperty(value = "The uuids of the alert configurations.")
2831
private Set<UUID> uuids;
32+
33+
@ApiModelProperty(value = "The name of the alert configuration.")
2934
private String name;
35+
36+
@ApiModelProperty(value = "Whether the alert configuration is active.")
3037
private Boolean active;
38+
39+
@ApiModelProperty(value = "The target type of the alert configuration.")
3140
private AlertConfiguration.TargetType targetType;
41+
42+
@ApiModelProperty(value = "The target of the alert configuration.")
3243
private AlertConfigurationTarget target;
44+
45+
@ApiModelProperty(value = "The template of the alert configuration.")
3346
private AlertTemplate template;
47+
48+
@ApiModelProperty(value = "The severity of the alert configuration.")
3449
private Severity severity;
50+
51+
@ApiModelProperty(value = "The destination type of the alert configuration. ")
3552
private DestinationType destinationType;
53+
54+
@ApiModelProperty(value = "The destination uuid of the alert configuration. ")
3655
private UUID destinationUuid;
3756

3857
public AlertConfigurationFilter toFilter() {

managed/src/main/java/com/yugabyte/yw/forms/filters/AlertTemplateApiFilter.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111

1212
import com.yugabyte.yw.models.AlertConfiguration;
1313
import com.yugabyte.yw.models.filters.AlertTemplateFilter;
14+
import io.swagger.annotations.ApiModelProperty;
1415
import lombok.Data;
1516
import lombok.NoArgsConstructor;
1617

1718
@Data
1819
@NoArgsConstructor
1920
public class AlertTemplateApiFilter {
21+
@ApiModelProperty(value = "The name of the alert template.")
2022
private String name;
23+
24+
@ApiModelProperty(value = "The target type of the alert template.")
2125
private AlertConfiguration.TargetType targetType;
2226

2327
public AlertTemplateFilter toFilter() {

managed/src/main/resources/swagger-strict.json

Lines changed: 21 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@
425425
"AlertApiFilter" : {
426426
"properties" : {
427427
"configurationTypes" : {
428+
"description" : "Alert Configuration Target Types",
428429
"items" : {
429430
"enum" : [
430431
"PLATFORM",
@@ -436,10 +437,12 @@
436437
"uniqueItems" : true
437438
},
438439
"configurationUuid" : {
440+
"description" : "The uuid of the alert configuration.",
439441
"format" : "uuid",
440442
"type" : "string"
441443
},
442444
"severities" : {
445+
"description" : "The severity of the alerts.",
443446
"items" : {
444447
"enum" : [
445448
"SEVERE",
@@ -451,9 +454,11 @@
451454
"uniqueItems" : true
452455
},
453456
"sourceName" : {
457+
"description" : "The source name of the alerts.",
454458
"type" : "string"
455459
},
456460
"sourceUUIDs" : {
461+
"description" : "The source uuids of the alerts.",
457462
"items" : {
458463
"format" : "uuid",
459464
"type" : "string"
@@ -462,6 +467,7 @@
462467
"uniqueItems" : true
463468
},
464469
"states" : {
470+
"description" : "The state of the alerts.",
465471
"items" : {
466472
"enum" : [
467473
"ACTIVE",
@@ -475,6 +481,7 @@
475481
"uniqueItems" : true
476482
},
477483
"uuids" : {
484+
"description" : "The uuids of the alerts.",
478485
"items" : {
479486
"format" : "uuid",
480487
"type" : "string"
@@ -483,15 +490,6 @@
483490
"uniqueItems" : true
484491
}
485492
},
486-
"required" : [
487-
"configurationTypes",
488-
"configurationUuid",
489-
"severities",
490-
"sourceName",
491-
"sourceUUIDs",
492-
"states",
493-
"uuids"
494-
],
495493
"type" : "object"
496494
},
497495
"AlertChannel" : {
@@ -936,9 +934,11 @@
936934
"AlertConfigurationApiFilter" : {
937935
"properties" : {
938936
"active" : {
937+
"description" : "Whether the alert configuration is active.",
939938
"type" : "boolean"
940939
},
941940
"destinationType" : {
941+
"description" : "The destination type of the alert configuration. ",
942942
"enum" : [
943943
"NO_DESTINATION",
944944
"DEFAULT_DESTINATION",
@@ -947,30 +947,36 @@
947947
"type" : "string"
948948
},
949949
"destinationUuid" : {
950+
"description" : "The destination uuid of the alert configuration. ",
950951
"format" : "uuid",
951952
"type" : "string"
952953
},
953954
"name" : {
955+
"description" : "The name of the alert configuration.",
954956
"type" : "string"
955957
},
956958
"severity" : {
959+
"description" : "The severity of the alert configuration.",
957960
"enum" : [
958961
"SEVERE",
959962
"WARNING"
960963
],
961964
"type" : "string"
962965
},
963966
"target" : {
964-
"$ref" : "#/definitions/AlertConfigurationTarget"
967+
"$ref" : "#/definitions/AlertConfigurationTarget",
968+
"description" : "The target of the alert configuration."
965969
},
966970
"targetType" : {
971+
"description" : "The target type of the alert configuration.",
967972
"enum" : [
968973
"PLATFORM",
969974
"UNIVERSE"
970975
],
971976
"type" : "string"
972977
},
973978
"template" : {
979+
"description" : "The template of the alert configuration.",
974980
"enum" : [
975981
"REPLICATION_LAG",
976982
"CLOCK_SKEW",
@@ -1057,6 +1063,7 @@
10571063
"type" : "string"
10581064
},
10591065
"uuids" : {
1066+
"description" : "The uuids of the alert configurations.",
10601067
"items" : {
10611068
"format" : "uuid",
10621069
"type" : "string"
@@ -1065,17 +1072,6 @@
10651072
"uniqueItems" : true
10661073
}
10671074
},
1068-
"required" : [
1069-
"active",
1070-
"destinationType",
1071-
"destinationUuid",
1072-
"name",
1073-
"severity",
1074-
"target",
1075-
"targetType",
1076-
"template",
1077-
"uuids"
1078-
],
10791075
"type" : "object"
10801076
},
10811077
"AlertConfigurationPagedApiQuery" : {
@@ -1439,75 +1435,6 @@
14391435
],
14401436
"type" : "object"
14411437
},
1442-
"AlertDefinition" : {
1443-
"properties" : {
1444-
"configurationUUID" : {
1445-
"format" : "uuid",
1446-
"type" : "string"
1447-
},
1448-
"customerUUID" : {
1449-
"format" : "uuid",
1450-
"type" : "string"
1451-
},
1452-
"labels" : {
1453-
"items" : {
1454-
"$ref" : "#/definitions/AlertDefinitionLabel"
1455-
},
1456-
"type" : "array"
1457-
},
1458-
"universeUUID" : {
1459-
"format" : "uuid",
1460-
"type" : "string"
1461-
},
1462-
"uuid" : {
1463-
"format" : "uuid",
1464-
"type" : "string"
1465-
},
1466-
"version" : {
1467-
"format" : "int32",
1468-
"type" : "integer"
1469-
}
1470-
},
1471-
"required" : [
1472-
"configurationUUID",
1473-
"customerUUID",
1474-
"labels",
1475-
"universeUUID",
1476-
"uuid",
1477-
"version"
1478-
],
1479-
"type" : "object"
1480-
},
1481-
"AlertDefinitionLabel" : {
1482-
"properties" : {
1483-
"key" : {
1484-
"$ref" : "#/definitions/AlertDefinitionLabelKey"
1485-
},
1486-
"name" : {
1487-
"type" : "string"
1488-
},
1489-
"value" : {
1490-
"type" : "string"
1491-
}
1492-
},
1493-
"required" : [
1494-
"key",
1495-
"name",
1496-
"value"
1497-
],
1498-
"type" : "object"
1499-
},
1500-
"AlertDefinitionLabelKey" : {
1501-
"properties" : {
1502-
"name" : {
1503-
"type" : "string"
1504-
}
1505-
},
1506-
"required" : [
1507-
"name"
1508-
],
1509-
"type" : "object"
1510-
},
15111438
"AlertDestination" : {
15121439
"description" : "Alert notification destination",
15131440
"properties" : {
@@ -1680,20 +1607,18 @@
16801607
"AlertTemplateApiFilter" : {
16811608
"properties" : {
16821609
"name" : {
1610+
"description" : "The name of the alert template.",
16831611
"type" : "string"
16841612
},
16851613
"targetType" : {
1614+
"description" : "The target type of the alert template.",
16861615
"enum" : [
16871616
"PLATFORM",
16881617
"UNIVERSE"
16891618
],
16901619
"type" : "string"
16911620
}
16921621
},
1693-
"required" : [
1694-
"name",
1695-
"targetType"
1696-
],
16971622
"type" : "object"
16981623
},
16991624
"AlertTemplateSettings" : {
@@ -29141,7 +29066,7 @@
2914129066
"description" : "successful operation",
2914229067
"schema" : {
2914329068
"items" : {
29144-
"$ref" : "#/definitions/AlertDefinition"
29069+
"$ref" : "#/definitions/AlertDestination"
2914529070
},
2914629071
"type" : "array"
2914729072
}
@@ -29152,7 +29077,7 @@
2915229077
"description" : "successful operation",
2915329078
"schema" : {
2915429079
"items" : {
29155-
"$ref" : "#/definitions/AlertDefinition"
29080+
"$ref" : "#/definitions/AlertDestination"
2915629081
},
2915729082
"type" : "array"
2915829083
}

0 commit comments

Comments
 (0)