Understanding the alerting.edgelq.com service APIv1, in proto package ntt.alerting.v1.

Service alerting.edgelq.com in version v1, proto package ntt.alerting.v1

Here is the list of resources supported in Alerting service APIv1:

Alert Resource

Alert describes an abnormal situation indicated by TimeSeries or Logs. Alert is always associated with a single resource type, as indicated in Policy object. It contains relevant information: TimeSeries/Logs values that caused the issue, starting time, ending time, if alert stopped, current handling state (by both operator and AI agent). Each Alert belongs to a single TsCondition/LogCondition resource, and is always associated with some unique TsEntry - they share alerting resource reference. Relationship Alert <-> TsEntry is N <-> 1 Relationship Alert <-> TsCondition/LogCondition is N <-> 1

Name patterns:

  • projects/{project}/policies/{policy}/tsConditions/{ts_condition}/regions/{region}/alerts/{alert}
  • projects/{project}/policies/{policy}/logConditions/{log_condition}/regions/{region}/alerts/{alert}

Parent resources:

This section covers the methods and messages to interact with Alert resource.

Alert Methods

Here is the list of Alert resource methods:

GetAlert Method

GetAlert

rpc GetAlert(GetAlertRequest) returns (Alert)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.get

The equivalent REST API is:

GET /v1/{name=projects/*/policies/*/tsConditions/*/regions/*/alerts/*} 
GET /v1/{name=projects/*/policies/*/logConditions/*/regions/*/alerts/*} 

BatchGetAlerts Method

BatchGetAlerts

rpc BatchGetAlerts(BatchGetAlertsRequest) returns (BatchGetAlertsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.batchGet

The equivalent REST API is:

GET /v1/alerts:batchGet 

ListAlerts Method

ListAlerts

rpc ListAlerts(ListAlertsRequest) returns (ListAlertsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.list

The equivalent REST API is:

GET /v1/{parent=projects/*/policies/*/tsConditions/*/regions/*}/alerts 
GET /v1/{parent=projects/*/policies/*/logConditions/*/regions/*}/alerts 

WatchAlert Method

WatchAlert

rpc WatchAlert(WatchAlertRequest) returns (WatchAlertResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policies/*/tsConditions/*/regions/*/alerts/*}:watch 
POST /v1/{name=projects/*/policies/*/logConditions/*/regions/*/alerts/*}:watch 

WatchAlerts Method

WatchAlerts

rpc WatchAlerts(WatchAlertsRequest) returns (WatchAlertsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.watch

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*/tsConditions/*/regions/*}/alerts:watch 
POST /v1/{parent=projects/*/policies/*/logConditions/*/regions/*}/alerts:watch 

CreateAlert Method

CreateAlert

rpc CreateAlert(CreateAlertRequest) returns (Alert)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.create

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*/tsConditions/*/regions/*}/alerts (BODY: alert)
POST /v1/{parent=projects/*/policies/*/logConditions/*/regions/*}/alerts 

UpdateAlert Method

UpdateAlert

rpc UpdateAlert(UpdateAlertRequest) returns (Alert)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.update

The equivalent REST API is:

PUT /v1/{alert.name=projects/*/policies/*/tsConditions/*/regions/*/alerts/*} (BODY: alert)
PUT /v1/{alert.name=projects/*/policies/*/logConditions/*/regions/*/alerts/*} 

DeleteAlert Method

DeleteAlert

rpc DeleteAlert(DeleteAlertRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policies/*/tsConditions/*/regions/*/alerts/*} 
DELETE /v1/{name=projects/*/policies/*/logConditions/*/regions/*/alerts/*} 

BulkSaveAlerts Method

BulkSaveAlerts

rpc BulkSaveAlerts(BulkSaveAlertsRequest) returns (BulkSaveAlertsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.bulkSave

The equivalent REST API is:

POST /v1/alerts:bulkSaveAlerts 

BulkMarkAsNotified Method

BulkMarkAsNotified

rpc BulkMarkAsNotified(BulkMarkAsNotifiedRequest) returns (BulkMarkAsNotifiedResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/alerts.bulkMarkAsNotified

The equivalent REST API is:

POST /v1/alerts:bulkMarkAsNotified 

Alert Messages

Here is the list of Alert resource messages:

Alert Message

NameTypeDescription
namestring (name of Alert)Name of Alert When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-zA-Z0-9_.:-]{1,128}
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringDisplay name informing about basic params (condition display name and alerting resource)
alerting_resourceOwnerReferenceAlerting resource points to the original resource which generated alert. This meta reference works like dynamic type (any service, any resource). TODO: We could use of “DynamicReference” message type. It can be similar to OwnerReference, except it works more like reference (uses EstablishReferences…). It can support most normal behaviors, like CASCADE DELETE/UNSET.
ts_infoAlert.TsInfoInforms about alert based on TimeSeries data.
log_infoAlert.LogInfoInforms about alert based on Log data.
stateAlert.StateState of alert
internalAlert.InternalInternal field.

Alert.TsInfo Message

TsInfo contains Alert data created based on TimeSeries data.

NameTypeDescription
typeAlert.TsInfo.TypeType of TimeSeries alert - based on ANOMALY or THRESHOLD.
anomaly_window_size.google.protobuf.DurationIf alert type is ANOMALY, then this field is populated and informs for what window size anomaly was detected.
common_keybytesBinary key describing common metric/resource labels
metric_typesrepeated stringList of metric types used in TsCondition
resource_typesrepeated stringList of resource types used in TsCondition
common_metric_labelsmap<string, string>Metric labels by which we grouped TimeSeries data.
common_resource_labelsmap<string, string>Resource labels by which we grouped TimeSeries data.
time_seriesrepeated Alert.TsInfo.TimeSeriesAll TimeSeries corresponding to each TsCondition.Spec.Query object, according to unique combination of group by fields: resource/metric labels.

Alert.LogInfo Message

LogInfo contains Alert data created based on Log data.

NameTypeDescription
common_keybytesBinary key describing common labels
log_typesrepeated stringList of log descriptor types specified in parent LogCondition
common_log_labelsmap<string, string>Log labels by which we grouped Logs data.
violating_logstringContent of violating log

Alert.State Message

State is responsible for managing lifecycle of Alert. Each Alert

NameTypeDescription
is_firingboolInforms if alert is still firing
start_time.google.protobuf.TimestampTime when alert was raised
end_time.google.protobuf.TimestampTime when alert was silenced, if no longer firing
notification_statusesrepeated Alert.State.NotificationInforms where notifications about alert state changes must be sent.
escalation_levelAlert.State.EscalationLevelInforms who is handling alert as of now.
ai_agent_handling_stateAlert.State.AiHandlingStateInforms current state of alert handling by AI Agent if escalation level is AI_AGENT. If alert is on operator side, it will contain last decision made by AI agent.
ai_agent_last_state_change_time.google.protobuf.TimestampInforms when was the last state change of ai_agent_handling_state field.
ai_agent_diagnosis_notesstringContains AI Agent troubleshooting notes. If agent SSHed to alerting resource, it will also contain history of shell for visibility purposes.
ai_remediation_argstringOptional remediation information from AI Agent. This field may be populated when field ai_agent_handling_state switches to AI_REMEDIATION_PROPOSED, if necessary. For example, if AI Agent wants to SSH and execute some commands, it will contain these commands.
ai_remediationPolicySpec.AIAgentHandling.RemediationRemediation type proposed by AI Agent to fix an alert. This field is populated when field ai_agent_handling_state switches to AI_REMEDIATION_PROPOSED. Informs what kind of remediation AI Agent wants to execute.
ai_conversationstringOptional AI conversation reference used for troubleshooting. Format: “projects/{project}/conversations/{conversation}”
operator_handling_stateAlert.State.OperatorHandlingStateInforms current state of alert handling by Operator if escalation level is OPERATOR. If alert is on AI_AGENT side, it will contain last decision made by operator.
operator_last_state_change_time.google.protobuf.TimestampInforms when was the last state change of operator_handling_state field.
operator_notesstringOptional operator notes.
lifecycle_completedboolAlert has ended and any needed notifications are processed

Alert.Internal Message

Internal data.

NameTypeDescription
alerting_locationPolicySpec.ProcessingLocation

Alert.TsInfo.TimeSeries Message

TimeSeries object matches single TsCondition.Spec.Query object in parent TsCondition. It contains TimeSeries data points at a time of violation, along with relevant information, like thresholds specified in TsEntry.

NameTypeDescription
query_namestringQuery name of the matching TsCondition.Spec.Query object
valuesrepeated doubleTimeSeries data values during violation start. They will be outside of lower/upper thresholds range for THRESHOLD type alerts.
anomaliesrepeated doubleCorresponding detected anomaly values (square errors). Populated for ANOMALY type of alerts. They will be larger than anomaly threshold for ANOMALY type of alerts.
upper_thresholdAlertingThresholdUpper threshold that was active during violation. Populated for THRESHOLD type of alerts.
lower_thresholdAlertingThresholdLower threshold that was active during violation. Populated for THRESHOLD type of alerts.
anomaly_thresholddoubleAnomaly threshold that was active during violation. Populated for ANOMALY type of alerts.
after_duration.google.protobuf.DurationInforms how long violation was active at the time of raising alert.

Alert.State.Notification Message

Notification informs about pending notifications that must be sent due to changes in Alert state.

NameTypeDescription
kindNotificationChannelSpec.EventKindKind informs what type of State has changed, and for which we need to send notifications.
pending_channelsrepeated string (reference to NotificationChannel)Informs about list of channels to where notification should be sent according to the corresponding kind.

GetAlertRequest Message

A request message of the GetAlert method.

NameTypeDescription
namestring (name of Alert)Name of ntt.alerting.v1.Alert
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetAlertsRequest Message

A request message of the BatchGetAlerts method.

NameTypeDescription
namesrepeated string (name of Alert)Names of Alerts
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetAlertsResponse Message

A response message of the BatchGetAlerts method.

NameTypeDescription
alertsrepeated Alertfound Alerts
missingrepeated string (name of Alert)list of not found Alerts

ListAlertsRequest Message

A request message of the ListAlerts method.

NameTypeDescription
parentstring (parent name of Alert)Parent name of ntt.alerting.v1.Alert
page_sizeint32Requested page size. Server may return fewer Alerts than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Alert)A token identifying a page of results the server should return. Typically, this is the value of ListAlertsResponse.next_page_token.
order_bystring (orderBy of Alert)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Alert)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListAlertsResponse Message

A response message of the ListAlerts method.

NameTypeDescription
alertsrepeated AlertThe list of Alerts
prev_page_tokenstring (cursor of Alert)A token to retrieve previous page of results. Pass this value in the ListAlertsRequest.page_token.
next_page_tokenstring (cursor of Alert)A token to retrieve next page of results. Pass this value in the ListAlertsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Alerts across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchAlertRequest Message

A request message of the WatchAlert method.

NameTypeDescription
namestring (name of Alert)Name of ntt.alerting.v1.Alert
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchAlertResponse Message

A response message of the WatchAlert method.

NameTypeDescription
changeAlertChange

WatchAlertsRequest Message

A request message of the WatchAlerts method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of Alert)Parent name of ntt.alerting.v1.Alert
page_sizeint32Requested page size. Server may return fewer Alerts than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Alert)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Alert)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Alert)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Alert that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Alert that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchAlertsResponse Message

A response message of the WatchAlerts method.

NameTypeDescription
alert_changesrepeated AlertChangeChanges of Alerts
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Alerts will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchAlertsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Alerts will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchAlertsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Alert)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Alert)New token to retrieve next page of results.

CreateAlertRequest Message

A request message of the CreateAlert method.

NameTypeDescription
parentstring (parent name of Alert)Parent name of ntt.alerting.v1.Alert
alertAlertAlert resource body
response_maskCreateAlertRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateAlertRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateAlertRequest Message

A request message of the UpdateAlert method.

NameTypeDescription
alertAlertAlert resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateAlertRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateAlertRequest.ResponseMaskreduce message response size.

UpdateAlertRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateAlertConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateAlertRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteAlertRequest Message

A request message of the DeleteAlert method.

NameTypeDescription
namestring (name of Alert)Name of ntt.alerting.v1.Alert
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

BulkSaveAlertsRequest Message

A request message of the BulkSaveAlerts method.

NameTypeDescription
projectstring (name of Project)
alertsrepeated Alert
update_mask.google.protobuf.FieldMask

BulkSaveAlertsResponse Message

A response message of the BulkSaveAlerts method.

NameTypeDescription
alertsrepeated Alert

BulkMarkAsNotifiedRequest Message

NameTypeDescription
projectstring (name of Project)
alertsrepeated string (name of Alert)
channelsrepeated string (name of NotificationChannel)

BulkMarkAsNotifiedResponse Message

NameTypeDescription
nonenonenone

Alert Enumerations

Here is the list of Alert resource enumerations:

Alert.TsInfo.Type Enumeration

Type of TimeSeries based alert

NameDescription
UNDEFINED
ANOMALYANOMALY indicates that irregular data pattern was spotted in time series data (anomaly values crossed anomaly thresholds).
THRESHOLDTHRESHOLD indicates that time series values crossed specified thresholds (lower or upper threshold).

Alert.State.AiHandlingState Enumeration

AiHandlingState informs what is a handling state of an alert from AI agent point of view. It is active when escalation_level points to AI_AGENT.

NameDescription
AI_AGENT_NOT_INVOLVEDAI Agent is not involved in handling this alert.
AI_AWAITING_HANDLINGAlert is new and awaits handling by AI agent. This is always initial state for AI agent after firing. It can move to AI_ESCALATED_TO_OPERATOR, AI_IGNORE_AS_TEMPORARY, AI_ADJUST_CND_ENTRY, or AI_REMEDIATION_PROPOSED.
AI_ESCALATED_TO_OPERATORThis state is active is AI agent escalated alert to an operator, due to inability to solve it. This is terminal state after which handling is passed to OPERATOR, escalation_level changes.
AI_IGNORE_AS_TEMPORARYAI Agent informed that, while TimeSeries/Logs data indeed contain abnormal values, they are caused by transient and unharmful reason, and it should stop firing soon. This is false positive alert. This is semi-terminal state. It can move to AI_ESCALATED_TO_OPERATOR if alert persist despite being flagged as transient issue.
AI_ADJUST_CND_ENTRYAI Agent informed that this alert is a false positive, and TimeSeries/Logs violating entries in fact should not be classified as a violation. Switching alert to this state will cause corresponding TsEntry to adjust its thresholds, or retrain AI anomaly detection models. This is usually a terminal state, after which alert is silenced and TsEntry tries to assume violating data is normal. However, if thresholds cannot be updated, alert will switch to AI_ESCALATED_TO_OPERATOR.
AI_REMEDIATION_PROPOSEDAI Agent identified this is a genuine alert, but for which it is able to fix. Remediation is only proposed, and requires approval from OPERATOR. Note that this is unique situation, where field escalation_level in State object points to AI_AGENT, but OPERATOR is requires to provide an update. Alert is technically still being handled by AI Agent, but waiting for OPERATOR confirmation.
AI_REMEDIATION_APPROVEDThis state is followed by AI_REMEDIATION_PROPOSED after OPERATOR agrees to execute, or if automatic approval is enabled. AI Agent will then proceed to applying remediation. It will move to AI_REMEDIATION_APPLIED after remediation is applied.
AI_REMEDIATION_APPLIEDThis state indicates that remediation has been applied. If after some time issue persists, then it switches to AI_ESCALATED_TO_OPERATOR.

Alert.State.OperatorHandlingState Enumeration

AiHandlingState informs what is a handling state of an alert from OPERATOR point of view.

NameDescription
OP_NOT_INVOLVEDOperator is not involved in handling this alert.
OP_AWAITING_HANDLINGAlert waits for Operator to handle it. This is initial state when escalation level switches to OPERATOR. From here, it can switch to any of remaining states. It may be also switched back to AI Agent if operator will it.
OP_ACKNOWLEDGEDThis can be a first state of Alert after OP_AWAITING_HANDLING, if operator wants to acknowledge alert without informing about final decision.
OP_IGNORE_AS_TEMPORARYOperator informed that, while TimeSeries/Logs data indeed contain abnormal values, they are caused by transient and unharmful reason, and it should stop firing soon. This is false positive alert. This may be terminal state if alert stops firing soon. Otherwise, it will go back to OP_AWAITING_HANDLING.
OP_ADJUST_CND_ENTRYOperator informed that this alert is a false positive, and TimeSeries/Logs violating entries in fact should not be classified as a violation. Switching alert to this state will cause corresponding TsEntry to adjust its thresholds, or retrain AI anomaly detection models, whatever is relevant. This is usually a terminal state, after which alert is silenced and TsEntry tries to assume violating data is normal. However, if thresholds cannot be updated, alert will switch to OP_AWAITING_HANDLING automatically.
OP_REMEDIATION_APPLIEDThis state indicates that remediation has been applied. If after some time issue persists, then it switches to OP_AWAITING_HANDLING.

Alert.State.EscalationLevel Enumeration

EscalationLevel informs who is handling an alert.

NameDescription
NONENone is invalid state.
AI_AGENTAlert is handled by AI Agent now
OPERATORAlert is handled by OPERATOR now.

Document Resource

Document can be attached to Policy, TsCondition or LogCondition resources. They should contain documentation that can be relevant when diagnosing & resolving alerts. They are especially important for AI Agent handling.

Name patterns:

  • projects/{project}/documents/{document}

Parent resources:

This section covers the methods and messages to interact with Document resource.

Document Methods

Here is the list of Document resource methods:

GetDocument Method

GetDocument

rpc GetDocument(GetDocumentRequest) returns (Document)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.get

The equivalent REST API is:

GET /v1/{name=projects/*/documents/*} 

BatchGetDocuments Method

BatchGetDocuments

rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (BatchGetDocumentsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.batchGet

The equivalent REST API is:

GET /v1/documents:batchGet 

ListDocuments Method

ListDocuments

rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.list

The equivalent REST API is:

GET /v1/{parent=projects/*}/documents 

WatchDocument Method

WatchDocument

rpc WatchDocument(WatchDocumentRequest) returns (WatchDocumentResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.watch

The equivalent REST API is:

POST /v1/{name=projects/*/documents/*}:watch 

WatchDocuments Method

WatchDocuments

rpc WatchDocuments(WatchDocumentsRequest) returns (WatchDocumentsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.watch

The equivalent REST API is:

POST /v1/{parent=projects/*}/documents:watch 

CreateDocument Method

CreateDocument

rpc CreateDocument(CreateDocumentRequest) returns (Document)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.create

The equivalent REST API is:

POST /v1/{parent=projects/*}/documents (BODY: document)

UpdateDocument Method

UpdateDocument

rpc UpdateDocument(UpdateDocumentRequest) returns (Document)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.update

The equivalent REST API is:

PUT /v1/{document.name=projects/*/documents/*} (BODY: document)

DeleteDocument Method

DeleteDocument

rpc DeleteDocument(DeleteDocumentRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/documents/*} 

SearchDocuments Method

SearchDocuments

rpc SearchDocuments(SearchDocumentsRequest) returns (SearchDocumentsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/documents.search

The equivalent REST API is:

GET /v1/{parent=projects/*}/documents:search 

Document Messages

Here is the list of Document resource messages:

Document Message

NameTypeDescription
namestring (name of Document)Name of Document When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
titlestringDocument title
contentstringDocumentation content for operators
mime_typestringdocumentation mime type. Only "text/markdown" is supported.

GetDocumentRequest Message

A request message of the GetDocument method.

NameTypeDescription
namestring (name of Document)Name of ntt.alerting.v1.Document
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetDocumentsRequest Message

A request message of the BatchGetDocuments method.

NameTypeDescription
namesrepeated string (name of Document)Names of Documents
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetDocumentsResponse Message

A response message of the BatchGetDocuments method.

NameTypeDescription
documentsrepeated Documentfound Documents
missingrepeated string (name of Document)list of not found Documents

ListDocumentsRequest Message

A request message of the ListDocuments method.

NameTypeDescription
parentstring (parent name of Document)Parent name of ntt.alerting.v1.Document
page_sizeint32Requested page size. Server may return fewer Documents than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Document)A token identifying a page of results the server should return. Typically, this is the value of ListDocumentsResponse.next_page_token.
order_bystring (orderBy of Document)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Document)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListDocumentsResponse Message

A response message of the ListDocuments method.

NameTypeDescription
documentsrepeated DocumentThe list of Documents
prev_page_tokenstring (cursor of Document)A token to retrieve previous page of results. Pass this value in the ListDocumentsRequest.page_token.
next_page_tokenstring (cursor of Document)A token to retrieve next page of results. Pass this value in the ListDocumentsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Documents across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchDocumentRequest Message

A request message of the WatchDocument method.

NameTypeDescription
namestring (name of Document)Name of ntt.alerting.v1.Document
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchDocumentResponse Message

A response message of the WatchDocument method.

NameTypeDescription
changeDocumentChange

WatchDocumentsRequest Message

A request message of the WatchDocuments method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of Document)Parent name of ntt.alerting.v1.Document
page_sizeint32Requested page size. Server may return fewer Documents than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Document)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Document)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Document)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Document that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Document that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchDocumentsResponse Message

A response message of the WatchDocuments method.

NameTypeDescription
document_changesrepeated DocumentChangeChanges of Documents
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Documents will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchDocumentsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Documents will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchDocumentsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Document)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Document)New token to retrieve next page of results.

CreateDocumentRequest Message

A request message of the CreateDocument method.

NameTypeDescription
parentstring (parent name of Document)Parent name of ntt.alerting.v1.Document
documentDocumentDocument resource body
response_maskCreateDocumentRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateDocumentRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateDocumentRequest Message

A request message of the UpdateDocument method.

NameTypeDescription
documentDocumentDocument resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateDocumentRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateDocumentRequest.ResponseMaskreduce message response size.

UpdateDocumentRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateDocumentConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateDocumentRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteDocumentRequest Message

A request message of the DeleteDocument method.

NameTypeDescription
namestring (name of Document)Name of ntt.alerting.v1.Document
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SearchDocumentsRequest Message

A request message of the SearchDocuments method.

NameTypeDescription
parentstring (parent name of Document)Parent name of ntt.alerting.v1.Document
page_sizeint32Requested page size. Server may return fewer Documents than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Document)A token identifying a page of results the server should return. Typically, this is the value of SearchDocumentsResponse.next_page_token.
order_bystring (orderBy of Document)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Document)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
phrasestringOptional search phrase used to further filter results.

SearchDocumentsResponse Message

A response message of the SearchDocuments method.

NameTypeDescription
documentsrepeated DocumentThe list of Documents
prev_page_tokenstring (cursor of Document)A token to retrieve previous page of results. Pass this value in the SearchDocumentsRequest.page_token.
next_page_tokenstring (cursor of Document)A token to retrieve next page of results. Pass this value in the SearchDocumentsRequest.page_token.
current_offsetint32Current offset from the first page (0 if no page tokens were given). Page index can be computed from offset and limit provided in a request
total_results_countint32Number of total Documents across all pages.

LogCondition Resource

LogCondition describes when Alert based on Logs data should be raised.

Name patterns:

  • projects/{project}/policies/{policy}/logConditions/{log_condition}

Parent resources:

This section covers the methods and messages to interact with LogCondition resource.

LogCondition Methods

Here is the list of LogCondition resource methods:

GetLogCondition Method

GetLogCondition

rpc GetLogCondition(GetLogConditionRequest) returns (LogCondition)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.get

The equivalent REST API is:

GET /v1/{name=projects/*/policies/*/logConditions/*} 

BatchGetLogConditions Method

BatchGetLogConditions

rpc BatchGetLogConditions(BatchGetLogConditionsRequest) returns (BatchGetLogConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.batchGet

The equivalent REST API is:

GET /v1/logConditions:batchGet 

ListLogConditions Method

ListLogConditions

rpc ListLogConditions(ListLogConditionsRequest) returns (ListLogConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.list

The equivalent REST API is:

GET /v1/{parent=projects/*/policies/*}/logConditions 

WatchLogCondition Method

WatchLogCondition

rpc WatchLogCondition(WatchLogConditionRequest) returns (WatchLogConditionResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policies/*/logConditions/*}:watch 

WatchLogConditions Method

WatchLogConditions

rpc WatchLogConditions(WatchLogConditionsRequest) returns (WatchLogConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.watch

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*}/logConditions:watch 

CreateLogCondition Method

CreateLogCondition

rpc CreateLogCondition(CreateLogConditionRequest) returns (LogCondition)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.create

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*}/logConditions (BODY: log_condition)

UpdateLogCondition Method

UpdateLogCondition

rpc UpdateLogCondition(UpdateLogConditionRequest) returns (LogCondition)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.update

The equivalent REST API is:

PUT /v1/{log_condition.name=projects/*/policies/*/logConditions/*} (BODY: log_condition)

DeleteLogCondition Method

DeleteLogCondition

rpc DeleteLogCondition(DeleteLogConditionRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policies/*/logConditions/*} 

SearchLogConditions Method

SearchLogConditions

rpc SearchLogConditions(SearchLogConditionsRequest) returns (SearchLogConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditions.search

The equivalent REST API is:

GET /v1/{parent=projects/*/policies/*}/logConditions:search 

LogCondition Messages

Here is the list of LogCondition resource messages:

LogCondition Message

NameTypeDescription
namestring (name of LogCondition)Name of LogCondition When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringDisplay Name
descriptionstringLong description
supporting_docsrepeated string (reference to Document)List of documents useful for troubleshooting and fixing alerts triggered by this condition.
specLogCndSpecDefines what query is being monitored, and what content must trigger an Alert.
internalLogCondition.InternalInternal field.
template_sourceLogCondition.TemplateSourcetemplate source for current LogCondition

LogCondition.Internal Message

Internal data.

NameTypeDescription
alerting_locationPolicySpec.ProcessingLocationInforms if log condition is processed at the backend or on edge.

LogCondition.TemplateSource Message

TemplateSource describes where condition is coming from originally.

NameTypeDescription
templatestring (reference to LogConditionTemplate)Reference to template
updated_fields.google.protobuf.FieldMaskList of modified fields compared to the template. It is a mask of Spec object.

GetLogConditionRequest Message

A request message of the GetLogCondition method.

NameTypeDescription
namestring (name of LogCondition)Name of ntt.alerting.v1.LogCondition
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetLogConditionsRequest Message

A request message of the BatchGetLogConditions method.

NameTypeDescription
namesrepeated string (name of LogCondition)Names of LogConditions
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetLogConditionsResponse Message

A response message of the BatchGetLogConditions method.

NameTypeDescription
log_conditionsrepeated LogConditionfound LogConditions
missingrepeated string (name of LogCondition)list of not found LogConditions

ListLogConditionsRequest Message

A request message of the ListLogConditions method.

NameTypeDescription
parentstring (parent name of LogCondition)Parent name of ntt.alerting.v1.LogCondition
page_sizeint32Requested page size. Server may return fewer LogConditions than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of LogCondition)A token identifying a page of results the server should return. Typically, this is the value of ListLogConditionsResponse.next_page_token.
order_bystring (orderBy of LogCondition)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of LogCondition)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListLogConditionsResponse Message

A response message of the ListLogConditions method.

NameTypeDescription
log_conditionsrepeated LogConditionThe list of LogConditions
prev_page_tokenstring (cursor of LogCondition)A token to retrieve previous page of results. Pass this value in the ListLogConditionsRequest.page_token.
next_page_tokenstring (cursor of LogCondition)A token to retrieve next page of results. Pass this value in the ListLogConditionsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total LogConditions across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchLogConditionRequest Message

A request message of the WatchLogCondition method.

NameTypeDescription
namestring (name of LogCondition)Name of ntt.alerting.v1.LogCondition
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchLogConditionResponse Message

A response message of the WatchLogCondition method.

NameTypeDescription
changeLogConditionChange

WatchLogConditionsRequest Message

A request message of the WatchLogConditions method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of LogCondition)Parent name of ntt.alerting.v1.LogCondition
page_sizeint32Requested page size. Server may return fewer LogConditions than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of LogCondition)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of LogCondition)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of LogCondition)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to LogCondition that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to LogCondition that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchLogConditionsResponse Message

A response message of the WatchLogConditions method.

NameTypeDescription
log_condition_changesrepeated LogConditionChangeChanges of LogConditions
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All LogConditions will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchLogConditionsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (LogConditions will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchLogConditionsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of LogCondition)New token to retrieve previous page of results.
next_page_tokenstring (cursor of LogCondition)New token to retrieve next page of results.

CreateLogConditionRequest Message

A request message of the CreateLogCondition method.

NameTypeDescription
parentstring (parent name of LogCondition)Parent name of ntt.alerting.v1.LogCondition
log_conditionLogConditionLogCondition resource body
response_maskCreateLogConditionRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateLogConditionRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateLogConditionRequest Message

A request message of the UpdateLogCondition method.

NameTypeDescription
log_conditionLogConditionLogCondition resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateLogConditionRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateLogConditionRequest.ResponseMaskreduce message response size.

UpdateLogConditionRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateLogConditionConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateLogConditionRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteLogConditionRequest Message

A request message of the DeleteLogCondition method.

NameTypeDescription
namestring (name of LogCondition)Name of ntt.alerting.v1.LogCondition
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SearchLogConditionsRequest Message

A request message of the SearchLogConditions method.

NameTypeDescription
parentstring (parent name of LogCondition)Parent name of ntt.alerting.v1.LogCondition
page_sizeint32Requested page size. Server may return fewer LogConditions than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of LogCondition)A token identifying a page of results the server should return. Typically, this is the value of SearchLogConditionsResponse.next_page_token.
order_bystring (orderBy of LogCondition)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of LogCondition)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
phrasestringOptional search phrase used to further filter results.

SearchLogConditionsResponse Message

A response message of the SearchLogConditions method.

NameTypeDescription
log_conditionsrepeated LogConditionThe list of LogConditions
prev_page_tokenstring (cursor of LogCondition)A token to retrieve previous page of results. Pass this value in the SearchLogConditionsRequest.page_token.
next_page_tokenstring (cursor of LogCondition)A token to retrieve next page of results. Pass this value in the SearchLogConditionsRequest.page_token.
current_offsetint32Current offset from the first page (0 if no page tokens were given). Page index can be computed from offset and limit provided in a request
total_results_countint32Number of total LogConditions across all pages.

LogConditionTemplate Resource

LogConditionTemplate provides pre-defined templates for LogCondition resources. They may be public ones (available for all projects to be copied), but also can be private and available in selected projects only. They are always provided within Policy template.

Name patterns:

  • projects/{project}/policyTemplates/{policy_template}/logConditionTemplates/{log_condition_template}

Parent resources:

This section covers the methods and messages to interact with LogConditionTemplate resource.

LogConditionTemplate Methods

Here is the list of LogConditionTemplate resource methods:

GetLogConditionTemplate Method

GetLogConditionTemplate

rpc GetLogConditionTemplate(GetLogConditionTemplateRequest) returns (LogConditionTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.get

The equivalent REST API is:

GET /v1/{name=projects/*/policyTemplates/*/logConditionTemplates/*} 

BatchGetLogConditionTemplates Method

BatchGetLogConditionTemplates

rpc BatchGetLogConditionTemplates(BatchGetLogConditionTemplatesRequest) returns (BatchGetLogConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.batchGet

The equivalent REST API is:

GET /v1/logConditionTemplates:batchGet 

ListLogConditionTemplates Method

ListLogConditionTemplates

rpc ListLogConditionTemplates(ListLogConditionTemplatesRequest) returns (ListLogConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.list

The equivalent REST API is:

GET /v1/{parent=projects/*/policyTemplates/*}/logConditionTemplates 

WatchLogConditionTemplate Method

WatchLogConditionTemplate

rpc WatchLogConditionTemplate(WatchLogConditionTemplateRequest) returns (WatchLogConditionTemplateResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policyTemplates/*/logConditionTemplates/*}:watch 

WatchLogConditionTemplates Method

WatchLogConditionTemplates

rpc WatchLogConditionTemplates(WatchLogConditionTemplatesRequest) returns (WatchLogConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.watch

The equivalent REST API is:

POST /v1/{parent=projects/*/policyTemplates/*}/logConditionTemplates:watch 

CreateLogConditionTemplate Method

CreateLogConditionTemplate

rpc CreateLogConditionTemplate(CreateLogConditionTemplateRequest) returns (LogConditionTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.create

The equivalent REST API is:

POST /v1/{parent=projects/*/policyTemplates/*}/logConditionTemplates (BODY: log_condition_template)

UpdateLogConditionTemplate Method

UpdateLogConditionTemplate

rpc UpdateLogConditionTemplate(UpdateLogConditionTemplateRequest) returns (LogConditionTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.update

The equivalent REST API is:

PUT /v1/{log_condition_template.name=projects/*/policyTemplates/*/logConditionTemplates/*} (BODY: log_condition_template)

DeleteLogConditionTemplate Method

DeleteLogConditionTemplate

rpc DeleteLogConditionTemplate(DeleteLogConditionTemplateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policyTemplates/*/logConditionTemplates/*} 

SearchLogConditionTemplates Method

SearchLogConditionTemplates

rpc SearchLogConditionTemplates(SearchLogConditionTemplatesRequest) returns (SearchLogConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/logConditionTemplates.search

The equivalent REST API is:

GET /v1/{parent=projects/*/policyTemplates/*}/logConditionTemplates:search 

LogConditionTemplate Messages

Here is the list of LogConditionTemplate resource messages:

LogConditionTemplate Message

NameTypeDescription
namestring (name of LogConditionTemplate)Name of LogConditionTemplate When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringDisplay Name
descriptionstringLong description
supporting_docsrepeated string (reference to Document)List of supporting documents. Pointed documents must be copied if LogCondition is created in different project.
spec_templateLogCndSpecPre defined template for LogCondition.Spec.

GetLogConditionTemplateRequest Message

A request message of the GetLogConditionTemplate method.

NameTypeDescription
namestring (name of LogConditionTemplate)Name of ntt.alerting.v1.LogConditionTemplate
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetLogConditionTemplatesRequest Message

A request message of the BatchGetLogConditionTemplates method.

NameTypeDescription
namesrepeated string (name of LogConditionTemplate)Names of LogConditionTemplates
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetLogConditionTemplatesResponse Message

A response message of the BatchGetLogConditionTemplates method.

NameTypeDescription
log_condition_templatesrepeated LogConditionTemplatefound LogConditionTemplates
missingrepeated string (name of LogConditionTemplate)list of not found LogConditionTemplates

ListLogConditionTemplatesRequest Message

A request message of the ListLogConditionTemplates method.

NameTypeDescription
parentstring (parent name of LogConditionTemplate)Parent name of ntt.alerting.v1.LogConditionTemplate
page_sizeint32Requested page size. Server may return fewer LogConditionTemplates than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of LogConditionTemplate)A token identifying a page of results the server should return. Typically, this is the value of ListLogConditionTemplatesResponse.next_page_token.
order_bystring (orderBy of LogConditionTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of LogConditionTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListLogConditionTemplatesResponse Message

A response message of the ListLogConditionTemplates method.

NameTypeDescription
log_condition_templatesrepeated LogConditionTemplateThe list of LogConditionTemplates
prev_page_tokenstring (cursor of LogConditionTemplate)A token to retrieve previous page of results. Pass this value in the ListLogConditionTemplatesRequest.page_token.
next_page_tokenstring (cursor of LogConditionTemplate)A token to retrieve next page of results. Pass this value in the ListLogConditionTemplatesRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total LogConditionTemplates across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchLogConditionTemplateRequest Message

A request message of the WatchLogConditionTemplate method.

NameTypeDescription
namestring (name of LogConditionTemplate)Name of ntt.alerting.v1.LogConditionTemplate
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchLogConditionTemplateResponse Message

A response message of the WatchLogConditionTemplate method.

NameTypeDescription
changeLogConditionTemplateChange

WatchLogConditionTemplatesRequest Message

A request message of the WatchLogConditionTemplates method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of LogConditionTemplate)Parent name of ntt.alerting.v1.LogConditionTemplate
page_sizeint32Requested page size. Server may return fewer LogConditionTemplates than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of LogConditionTemplate)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of LogConditionTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of LogConditionTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to LogConditionTemplate that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to LogConditionTemplate that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchLogConditionTemplatesResponse Message

A response message of the WatchLogConditionTemplates method.

NameTypeDescription
log_condition_template_changesrepeated LogConditionTemplateChangeChanges of LogConditionTemplates
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All LogConditionTemplates will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchLogConditionTemplatesResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (LogConditionTemplates will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchLogConditionTemplatesResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of LogConditionTemplate)New token to retrieve previous page of results.
next_page_tokenstring (cursor of LogConditionTemplate)New token to retrieve next page of results.

CreateLogConditionTemplateRequest Message

A request message of the CreateLogConditionTemplate method.

NameTypeDescription
parentstring (parent name of LogConditionTemplate)Parent name of ntt.alerting.v1.LogConditionTemplate
log_condition_templateLogConditionTemplateLogConditionTemplate resource body
response_maskCreateLogConditionTemplateRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateLogConditionTemplateRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateLogConditionTemplateRequest Message

A request message of the UpdateLogConditionTemplate method.

NameTypeDescription
log_condition_templateLogConditionTemplateLogConditionTemplate resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateLogConditionTemplateRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateLogConditionTemplateRequest.ResponseMaskreduce message response size.

UpdateLogConditionTemplateRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateLogConditionTemplateConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateLogConditionTemplateRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteLogConditionTemplateRequest Message

A request message of the DeleteLogConditionTemplate method.

NameTypeDescription
namestring (name of LogConditionTemplate)Name of ntt.alerting.v1.LogConditionTemplate
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SearchLogConditionTemplatesRequest Message

A request message of the SearchLogConditionTemplates method.

NameTypeDescription
parentstring (parent name of LogConditionTemplate)Parent name of ntt.alerting.v1.LogConditionTemplate
page_sizeint32Requested page size. Server may return fewer LogConditionTemplates than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of LogConditionTemplate)A token identifying a page of results the server should return. Typically, this is the value of SearchLogConditionTemplatesResponse.next_page_token.
order_bystring (orderBy of LogConditionTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of LogConditionTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
phrasestringOptional search phrase used to further filter results.

SearchLogConditionTemplatesResponse Message

A response message of the SearchLogConditionTemplates method.

NameTypeDescription
log_condition_templatesrepeated LogConditionTemplateThe list of LogConditionTemplates
prev_page_tokenstring (cursor of LogConditionTemplate)A token to retrieve previous page of results. Pass this value in the SearchLogConditionTemplatesRequest.page_token.
next_page_tokenstring (cursor of LogConditionTemplate)A token to retrieve next page of results. Pass this value in the SearchLogConditionTemplatesRequest.page_token.
current_offsetint32Current offset from the first page (0 if no page tokens were given). Page index can be computed from offset and limit provided in a request
total_results_countint32Number of total LogConditionTemplates across all pages.

NotificationChannel Resource

NotificationChannel specifies channel where notifications about alert updates can be sent.

Name patterns:

  • projects/{project}/notificationChannels/{notification_channel}

Parent resources:

This section covers the methods and messages to interact with NotificationChannel resource.

NotificationChannel Methods

Here is the list of NotificationChannel resource methods:

GetNotificationChannel Method

GetNotificationChannel

rpc GetNotificationChannel(GetNotificationChannelRequest) returns (NotificationChannel)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.get

The equivalent REST API is:

GET /v1/{name=projects/*/notificationChannels/*} 

BatchGetNotificationChannels Method

BatchGetNotificationChannels

rpc BatchGetNotificationChannels(BatchGetNotificationChannelsRequest) returns (BatchGetNotificationChannelsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.batchGet

The equivalent REST API is:

GET /v1/notificationChannels:batchGet 

ListNotificationChannels Method

ListNotificationChannels

rpc ListNotificationChannels(ListNotificationChannelsRequest) returns (ListNotificationChannelsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.list

The equivalent REST API is:

GET /v1/{parent=projects/*}/notificationChannels 

WatchNotificationChannel Method

WatchNotificationChannel

rpc WatchNotificationChannel(WatchNotificationChannelRequest) returns (WatchNotificationChannelResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.watch

The equivalent REST API is:

POST /v1/{name=projects/*/notificationChannels/*}:watch 

WatchNotificationChannels Method

WatchNotificationChannels

rpc WatchNotificationChannels(WatchNotificationChannelsRequest) returns (WatchNotificationChannelsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.watch

The equivalent REST API is:

POST /v1/{parent=projects/*}/notificationChannels:watch 

CreateNotificationChannel Method

CreateNotificationChannel

rpc CreateNotificationChannel(CreateNotificationChannelRequest) returns (NotificationChannel)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.create

The equivalent REST API is:

POST /v1/{parent=projects/*}/notificationChannels (BODY: notification_channel)

UpdateNotificationChannel Method

UpdateNotificationChannel

rpc UpdateNotificationChannel(UpdateNotificationChannelRequest) returns (NotificationChannel)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.update

The equivalent REST API is:

PUT /v1/{notification_channel.name=projects/*/notificationChannels/*} (BODY: notification_channel)

DeleteNotificationChannel Method

DeleteNotificationChannel

rpc DeleteNotificationChannel(DeleteNotificationChannelRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/notificationChannels/*} 

TestNotificationChannel Method

TestNotificationChannel

rpc TestNotificationChannel(TestNotificationChannelRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/notificationChannels.test

The equivalent REST API is:

POST /v1/{name=projects/*/notificationChannels/*}:test 

NotificationChannel Messages

Here is the list of NotificationChannel resource messages:

NotificationChannel Message

NameTypeDescription
namestring (name of NotificationChannel)Name of NotificationChannel When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringDisplay Name
descriptionstringdescription
specNotificationChannelSpecSpecification
stateNotificationChannel.StateState

NotificationChannel.State Message

State of NotificationChannel

NameTypeDescription
statusNotificationChannel.State.StatusStatus
errorNotificationChannel.State.ErrorError

NotificationChannel.State.Error Message

Error of NotificationChannel

NameTypeDescription
time.google.protobuf.Timestamp
messagestring

GetNotificationChannelRequest Message

A request message of the GetNotificationChannel method.

NameTypeDescription
namestring (name of NotificationChannel)Name of ntt.alerting.v1.NotificationChannel
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetNotificationChannelsRequest Message

A request message of the BatchGetNotificationChannels method.

NameTypeDescription
namesrepeated string (name of NotificationChannel)Names of NotificationChannels
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetNotificationChannelsResponse Message

A response message of the BatchGetNotificationChannels method.

NameTypeDescription
notification_channelsrepeated NotificationChannelfound NotificationChannels
missingrepeated string (name of NotificationChannel)list of not found NotificationChannels

ListNotificationChannelsRequest Message

A request message of the ListNotificationChannels method.

NameTypeDescription
parentstring (parent name of NotificationChannel)Parent name of ntt.alerting.v1.NotificationChannel
page_sizeint32Requested page size. Server may return fewer NotificationChannels than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of NotificationChannel)A token identifying a page of results the server should return. Typically, this is the value of ListNotificationChannelsResponse.next_page_token.
order_bystring (orderBy of NotificationChannel)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of NotificationChannel)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListNotificationChannelsResponse Message

A response message of the ListNotificationChannels method.

NameTypeDescription
notification_channelsrepeated NotificationChannelThe list of NotificationChannels
prev_page_tokenstring (cursor of NotificationChannel)A token to retrieve previous page of results. Pass this value in the ListNotificationChannelsRequest.page_token.
next_page_tokenstring (cursor of NotificationChannel)A token to retrieve next page of results. Pass this value in the ListNotificationChannelsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total NotificationChannels across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchNotificationChannelRequest Message

A request message of the WatchNotificationChannel method.

NameTypeDescription
namestring (name of NotificationChannel)Name of ntt.alerting.v1.NotificationChannel
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchNotificationChannelResponse Message

A response message of the WatchNotificationChannel method.

NameTypeDescription
changeNotificationChannelChange

WatchNotificationChannelsRequest Message

A request message of the WatchNotificationChannels method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of NotificationChannel)Parent name of ntt.alerting.v1.NotificationChannel
page_sizeint32Requested page size. Server may return fewer NotificationChannels than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of NotificationChannel)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of NotificationChannel)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of NotificationChannel)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to NotificationChannel that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to NotificationChannel that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchNotificationChannelsResponse Message

A response message of the WatchNotificationChannels method.

NameTypeDescription
notification_channel_changesrepeated NotificationChannelChangeChanges of NotificationChannels
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All NotificationChannels will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchNotificationChannelsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (NotificationChannels will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchNotificationChannelsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of NotificationChannel)New token to retrieve previous page of results.
next_page_tokenstring (cursor of NotificationChannel)New token to retrieve next page of results.

CreateNotificationChannelRequest Message

A request message of the CreateNotificationChannel method.

NameTypeDescription
parentstring (parent name of NotificationChannel)Parent name of ntt.alerting.v1.NotificationChannel
notification_channelNotificationChannelNotificationChannel resource body
response_maskCreateNotificationChannelRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateNotificationChannelRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateNotificationChannelRequest Message

A request message of the UpdateNotificationChannel method.

NameTypeDescription
notification_channelNotificationChannelNotificationChannel resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateNotificationChannelRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateNotificationChannelRequest.ResponseMaskreduce message response size.

UpdateNotificationChannelRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateNotificationChannelConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateNotificationChannelRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteNotificationChannelRequest Message

A request message of the DeleteNotificationChannel method.

NameTypeDescription
namestring (name of NotificationChannel)Name of ntt.alerting.v1.NotificationChannel
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

TestNotificationChannelRequest Message

A request message of the TestNotificationChannel method.

NameTypeDescription
namestring (name of NotificationChannel)Name of ntt.alerting.v1.NotificationChannel

NotificationChannel Enumerations

Here is the list of NotificationChannel resource enumerations:

NotificationChannel.State.Status Enumeration

State of NotificationChannel

NameDescription
STATE_UNSPECIFIEDState is unknown
ACTIVENotificationChannel is active
DISABLEDNotificationChannel is disabled
ERRORError of NotificationChannel

Policy Resource

Policy groups log or time series based conditions that focus on monitoring same alerting resources. For example, one Policy should be created for alerts triggered by devices, and another for alerts triggered by Pods. Policy also provides common specification parts for all conditions within: It binds them with notification channels, defines processing location (Backend or Edge), instructs if and how AI agent should be investigating issues.

Name patterns:

  • projects/{project}/policies/{policy}

Parent resources:

This section covers the methods and messages to interact with Policy resource.

Policy Methods

Here is the list of Policy resource methods:

GetPolicy Method

GetPolicy

rpc GetPolicy(GetPolicyRequest) returns (Policy)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.get

The equivalent REST API is:

GET /v1/{name=projects/*/policies/*} 

BatchGetPolicies Method

BatchGetPolicies

rpc BatchGetPolicies(BatchGetPoliciesRequest) returns (BatchGetPoliciesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.batchGet

The equivalent REST API is:

GET /v1/policies:batchGet 

ListPolicies Method

ListPolicies

rpc ListPolicies(ListPoliciesRequest) returns (ListPoliciesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.list

The equivalent REST API is:

GET /v1/{parent=projects/*}/policies 

WatchPolicy Method

WatchPolicy

rpc WatchPolicy(WatchPolicyRequest) returns (WatchPolicyResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policies/*}:watch 

WatchPolicies Method

WatchPolicies

rpc WatchPolicies(WatchPoliciesRequest) returns (WatchPoliciesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.watch

The equivalent REST API is:

POST /v1/{parent=projects/*}/policies:watch 

CreatePolicy Method

CreatePolicy

rpc CreatePolicy(CreatePolicyRequest) returns (Policy)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.create

The equivalent REST API is:

POST /v1/{parent=projects/*}/policies (BODY: policy)

UpdatePolicy Method

UpdatePolicy

rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.update

The equivalent REST API is:

PUT /v1/{policy.name=projects/*/policies/*} (BODY: policy)

DeletePolicy Method

DeletePolicy

rpc DeletePolicy(DeletePolicyRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policies/*} 

SearchPolicies Method

SearchPolicies

rpc SearchPolicies(SearchPoliciesRequest) returns (SearchPoliciesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policies.search

The equivalent REST API is:

GET /v1/{parent=projects/*}/policies:search 

Policy Messages

Here is the list of Policy resource messages:

Policy Message

NameTypeDescription
namestring (name of Policy)Name of Policy When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringdisplay name
descriptionstringLong description
supporting_docsrepeated string (reference to Document)List of documents useful for troubleshooting and fixing alerts triggered by conditions in this policy.
specPolicySpecPolicy specification
template_sourcePolicy.TemplateSourcetemplate source for current Policy
notification_channelsrepeated string (reference to NotificationChannel)List of attached notification channels

Policy.TemplateSource Message

TemplateSource describes where policy is coming from originally.

NameTypeDescription
templatestring (reference to PolicyTemplate)Reference to template
updated_fields.google.protobuf.FieldMaskList of modified fields compared to the template. It is a mask of Spec object.

GetPolicyRequest Message

A request message of the GetPolicy method.

NameTypeDescription
namestring (name of Policy)Name of ntt.alerting.v1.Policy
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetPoliciesRequest Message

A request message of the BatchGetPolicies method.

NameTypeDescription
namesrepeated string (name of Policy)Names of Policies
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetPoliciesResponse Message

A response message of the BatchGetPolicies method.

NameTypeDescription
policiesrepeated Policyfound Policies
missingrepeated string (name of Policy)list of not found Policies

ListPoliciesRequest Message

A request message of the ListPolicies method.

NameTypeDescription
parentstring (parent name of Policy)Parent name of ntt.alerting.v1.Policy
page_sizeint32Requested page size. Server may return fewer Policies than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Policy)A token identifying a page of results the server should return. Typically, this is the value of ListPoliciesResponse.next_page_token.
order_bystring (orderBy of Policy)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Policy)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListPoliciesResponse Message

A response message of the ListPolicies method.

NameTypeDescription
policiesrepeated PolicyThe list of Policies
prev_page_tokenstring (cursor of Policy)A token to retrieve previous page of results. Pass this value in the ListPoliciesRequest.page_token.
next_page_tokenstring (cursor of Policy)A token to retrieve next page of results. Pass this value in the ListPoliciesRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total Policies across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchPolicyRequest Message

A request message of the WatchPolicy method.

NameTypeDescription
namestring (name of Policy)Name of ntt.alerting.v1.Policy
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchPolicyResponse Message

A response message of the WatchPolicy method.

NameTypeDescription
changePolicyChange

WatchPoliciesRequest Message

A request message of the WatchPolicies method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of Policy)Parent name of ntt.alerting.v1.Policy
page_sizeint32Requested page size. Server may return fewer Policies than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of Policy)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of Policy)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of Policy)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to Policy that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to Policy that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchPoliciesResponse Message

A response message of the WatchPolicies method.

NameTypeDescription
policy_changesrepeated PolicyChangeChanges of Policies
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All Policies will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchPoliciesResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (Policies will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchPoliciesResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of Policy)New token to retrieve previous page of results.
next_page_tokenstring (cursor of Policy)New token to retrieve next page of results.

CreatePolicyRequest Message

A request message of the CreatePolicy method.

NameTypeDescription
parentstring (parent name of Policy)Parent name of ntt.alerting.v1.Policy
policyPolicyPolicy resource body
response_maskCreatePolicyRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreatePolicyRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdatePolicyRequest Message

A request message of the UpdatePolicy method.

NameTypeDescription
policyPolicyPolicy resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdatePolicyRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdatePolicyRequest.ResponseMaskreduce message response size.

UpdatePolicyRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_statePolicyConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdatePolicyRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeletePolicyRequest Message

A request message of the DeletePolicy method.

NameTypeDescription
namestring (name of Policy)Name of ntt.alerting.v1.Policy
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SearchPoliciesRequest Message

A request message of the SearchPolicies method.

NameTypeDescription
parentstring (parent name of Policy)Parent name of ntt.alerting.v1.Policy
page_sizeint32Requested page size. Server may return fewer Policies than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of Policy)A token identifying a page of results the server should return. Typically, this is the value of SearchPoliciesResponse.next_page_token.
order_bystring (orderBy of Policy)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of Policy)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
phrasestringOptional search phrase used to further filter results.

SearchPoliciesResponse Message

A response message of the SearchPolicies method.

NameTypeDescription
policiesrepeated PolicyThe list of Policies
prev_page_tokenstring (cursor of Policy)A token to retrieve previous page of results. Pass this value in the SearchPoliciesRequest.page_token.
next_page_tokenstring (cursor of Policy)A token to retrieve next page of results. Pass this value in the SearchPoliciesRequest.page_token.
current_offsetint32Current offset from the first page (0 if no page tokens were given). Page index can be computed from offset and limit provided in a request
total_results_countint32Number of total Policies across all pages.

PolicyTemplate Resource

PolicyTemplate provides pre-defined templates for Policy resources. They may be public ones (available for all projects to be copied), but also can be private and available in selected projects only.

Name patterns:

  • projects/{project}/policyTemplates/{policy_template}

Parent resources:

This section covers the methods and messages to interact with PolicyTemplate resource.

PolicyTemplate Methods

Here is the list of PolicyTemplate resource methods:

GetPolicyTemplate Method

GetPolicyTemplate

rpc GetPolicyTemplate(GetPolicyTemplateRequest) returns (PolicyTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.get

The equivalent REST API is:

GET /v1/{name=projects/*/policyTemplates/*} 

BatchGetPolicyTemplates Method

BatchGetPolicyTemplates

rpc BatchGetPolicyTemplates(BatchGetPolicyTemplatesRequest) returns (BatchGetPolicyTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.batchGet

The equivalent REST API is:

GET /v1/policyTemplates:batchGet 

ListPolicyTemplates Method

ListPolicyTemplates

rpc ListPolicyTemplates(ListPolicyTemplatesRequest) returns (ListPolicyTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.list

The equivalent REST API is:

GET /v1/{parent=projects/*}/policyTemplates 

WatchPolicyTemplate Method

WatchPolicyTemplate

rpc WatchPolicyTemplate(WatchPolicyTemplateRequest) returns (WatchPolicyTemplateResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policyTemplates/*}:watch 

WatchPolicyTemplates Method

WatchPolicyTemplates

rpc WatchPolicyTemplates(WatchPolicyTemplatesRequest) returns (WatchPolicyTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.watch

The equivalent REST API is:

POST /v1/{parent=projects/*}/policyTemplates:watch 

CreatePolicyTemplate Method

CreatePolicyTemplate

rpc CreatePolicyTemplate(CreatePolicyTemplateRequest) returns (PolicyTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.create

The equivalent REST API is:

POST /v1/{parent=projects/*}/policyTemplates (BODY: policy_template)

UpdatePolicyTemplate Method

UpdatePolicyTemplate

rpc UpdatePolicyTemplate(UpdatePolicyTemplateRequest) returns (PolicyTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.update

The equivalent REST API is:

PUT /v1/{policy_template.name=projects/*/policyTemplates/*} (BODY: policy_template)

DeletePolicyTemplate Method

DeletePolicyTemplate

rpc DeletePolicyTemplate(DeletePolicyTemplateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policyTemplates/*} 

SearchPolicyTemplates Method

SearchPolicyTemplates

rpc SearchPolicyTemplates(SearchPolicyTemplatesRequest) returns (SearchPolicyTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/policyTemplates.search

The equivalent REST API is:

GET /v1/{parent=projects/*}/policyTemplates:search 

PolicyTemplate Messages

Here is the list of PolicyTemplate resource messages:

PolicyTemplate Message

NameTypeDescription
namestring (name of PolicyTemplate)Name of PolicyTemplate When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringDisplay Name
descriptionstringLong description
supporting_docsrepeated string (reference to Document)List of supporting documents. Pointed documents must be copied if Policy is created in different project.
spec_templatePolicySpecSpec template

GetPolicyTemplateRequest Message

A request message of the GetPolicyTemplate method.

NameTypeDescription
namestring (name of PolicyTemplate)Name of ntt.alerting.v1.PolicyTemplate
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetPolicyTemplatesRequest Message

A request message of the BatchGetPolicyTemplates method.

NameTypeDescription
namesrepeated string (name of PolicyTemplate)Names of PolicyTemplates
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetPolicyTemplatesResponse Message

A response message of the BatchGetPolicyTemplates method.

NameTypeDescription
policy_templatesrepeated PolicyTemplatefound PolicyTemplates
missingrepeated string (name of PolicyTemplate)list of not found PolicyTemplates

ListPolicyTemplatesRequest Message

A request message of the ListPolicyTemplates method.

NameTypeDescription
parentstring (parent name of PolicyTemplate)Parent name of ntt.alerting.v1.PolicyTemplate
page_sizeint32Requested page size. Server may return fewer PolicyTemplates than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of PolicyTemplate)A token identifying a page of results the server should return. Typically, this is the value of ListPolicyTemplatesResponse.next_page_token.
order_bystring (orderBy of PolicyTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of PolicyTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListPolicyTemplatesResponse Message

A response message of the ListPolicyTemplates method.

NameTypeDescription
policy_templatesrepeated PolicyTemplateThe list of PolicyTemplates
prev_page_tokenstring (cursor of PolicyTemplate)A token to retrieve previous page of results. Pass this value in the ListPolicyTemplatesRequest.page_token.
next_page_tokenstring (cursor of PolicyTemplate)A token to retrieve next page of results. Pass this value in the ListPolicyTemplatesRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total PolicyTemplates across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchPolicyTemplateRequest Message

A request message of the WatchPolicyTemplate method.

NameTypeDescription
namestring (name of PolicyTemplate)Name of ntt.alerting.v1.PolicyTemplate
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchPolicyTemplateResponse Message

A response message of the WatchPolicyTemplate method.

NameTypeDescription
changePolicyTemplateChange

WatchPolicyTemplatesRequest Message

A request message of the WatchPolicyTemplates method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of PolicyTemplate)Parent name of ntt.alerting.v1.PolicyTemplate
page_sizeint32Requested page size. Server may return fewer PolicyTemplates than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of PolicyTemplate)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of PolicyTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of PolicyTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to PolicyTemplate that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to PolicyTemplate that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchPolicyTemplatesResponse Message

A response message of the WatchPolicyTemplates method.

NameTypeDescription
policy_template_changesrepeated PolicyTemplateChangeChanges of PolicyTemplates
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All PolicyTemplates will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchPolicyTemplatesResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (PolicyTemplates will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchPolicyTemplatesResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of PolicyTemplate)New token to retrieve previous page of results.
next_page_tokenstring (cursor of PolicyTemplate)New token to retrieve next page of results.

CreatePolicyTemplateRequest Message

A request message of the CreatePolicyTemplate method.

NameTypeDescription
parentstring (parent name of PolicyTemplate)Parent name of ntt.alerting.v1.PolicyTemplate
policy_templatePolicyTemplatePolicyTemplate resource body
response_maskCreatePolicyTemplateRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreatePolicyTemplateRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdatePolicyTemplateRequest Message

A request message of the UpdatePolicyTemplate method.

NameTypeDescription
policy_templatePolicyTemplatePolicyTemplate resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdatePolicyTemplateRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdatePolicyTemplateRequest.ResponseMaskreduce message response size.

UpdatePolicyTemplateRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_statePolicyTemplateConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdatePolicyTemplateRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeletePolicyTemplateRequest Message

A request message of the DeletePolicyTemplate method.

NameTypeDescription
namestring (name of PolicyTemplate)Name of ntt.alerting.v1.PolicyTemplate
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SearchPolicyTemplatesRequest Message

A request message of the SearchPolicyTemplates method.

NameTypeDescription
parentstring (parent name of PolicyTemplate)Parent name of ntt.alerting.v1.PolicyTemplate
page_sizeint32Requested page size. Server may return fewer PolicyTemplates than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of PolicyTemplate)A token identifying a page of results the server should return. Typically, this is the value of SearchPolicyTemplatesResponse.next_page_token.
order_bystring (orderBy of PolicyTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of PolicyTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
phrasestringOptional search phrase used to further filter results.

SearchPolicyTemplatesResponse Message

A response message of the SearchPolicyTemplates method.

NameTypeDescription
policy_templatesrepeated PolicyTemplateThe list of PolicyTemplates
prev_page_tokenstring (cursor of PolicyTemplate)A token to retrieve previous page of results. Pass this value in the SearchPolicyTemplatesRequest.page_token.
next_page_tokenstring (cursor of PolicyTemplate)A token to retrieve next page of results. Pass this value in the SearchPolicyTemplatesRequest.page_token.
current_offsetint32Current offset from the first page (0 if no page tokens were given). Page index can be computed from offset and limit provided in a request
total_results_countint32Number of total PolicyTemplates across all pages.

TsCondition Resource

TsCondition describes when Alert based on TimeSeries data should be raised.

Name patterns:

  • projects/{project}/policies/{policy}/tsConditions/{ts_condition}

Parent resources:

This section covers the methods and messages to interact with TsCondition resource.

TsCondition Methods

Here is the list of TsCondition resource methods:

GetTsCondition Method

GetTsCondition

rpc GetTsCondition(GetTsConditionRequest) returns (TsCondition)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.get

The equivalent REST API is:

GET /v1/{name=projects/*/policies/*/tsConditions/*} 

BatchGetTsConditions Method

BatchGetTsConditions

rpc BatchGetTsConditions(BatchGetTsConditionsRequest) returns (BatchGetTsConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.batchGet

The equivalent REST API is:

GET /v1/tsConditions:batchGet 

ListTsConditions Method

ListTsConditions

rpc ListTsConditions(ListTsConditionsRequest) returns (ListTsConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.list

The equivalent REST API is:

GET /v1/{parent=projects/*/policies/*}/tsConditions 

WatchTsCondition Method

WatchTsCondition

rpc WatchTsCondition(WatchTsConditionRequest) returns (WatchTsConditionResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policies/*/tsConditions/*}:watch 

WatchTsConditions Method

WatchTsConditions

rpc WatchTsConditions(WatchTsConditionsRequest) returns (WatchTsConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.watch

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*}/tsConditions:watch 

CreateTsCondition Method

CreateTsCondition

rpc CreateTsCondition(CreateTsConditionRequest) returns (TsCondition)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.create

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*}/tsConditions (BODY: ts_condition)

UpdateTsCondition Method

UpdateTsCondition

rpc UpdateTsCondition(UpdateTsConditionRequest) returns (TsCondition)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.update

The equivalent REST API is:

PUT /v1/{ts_condition.name=projects/*/policies/*/tsConditions/*} (BODY: ts_condition)

DeleteTsCondition Method

DeleteTsCondition

rpc DeleteTsCondition(DeleteTsConditionRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policies/*/tsConditions/*} 

SearchTsConditions Method

SearchTsConditions

rpc SearchTsConditions(SearchTsConditionsRequest) returns (SearchTsConditionsResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditions.search

The equivalent REST API is:

GET /v1/{parent=projects/*/policies/*}/tsConditions:search 

TsCondition Messages

Here is the list of TsCondition resource messages:

TsCondition Message

NameTypeDescription
namestring (name of TsCondition)Name of TsCondition When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringDisplay Name
descriptionstringLong description
supporting_docsrepeated string (reference to Document)List of documents useful for troubleshooting and fixing alerts triggered by this condition.
specTsCndSpecSpec defines queries, thresholds and anomaly detector specs.
internalTsCondition.InternalInternal field.
filter_selectorTsCondition.Selectorfilter selector simplifies querying TsCondition resources. For example, it allows to make query like: * List TsConditions WHERE filter_selector.metric.types CONTAINS “device/cpu”
template_sourceTsCondition.TemplateSourcetemplate source for current TsCondition

TsCondition.Internal Message

Internal data.

NameTypeDescription
common_key_ksetbytes
entry_spec_generationint32
alerting_locationPolicySpec.ProcessingLocation

TsCondition.Selector Message

Selector contains detected metric/resource types and common labels used in filters from all queries. Selector facilitates filtering TsCondition resources. It is generated when TsCondition is saved (on the fly).

NameTypeDescription
metric_typesrepeated string
resource_typesrepeated string
common_metric_labelsmap<string, TsCondition.Selector.Strings>
common_resource_labelsmap<string, TsCondition.Selector.Strings>

TsCondition.TemplateSource Message

TemplateSource describes where condition is coming from originally.

NameTypeDescription
templatestring (reference to TsConditionTemplate)Reference to template
updated_fields.google.protobuf.FieldMaskList of modified fields compared to the template. It is a mask of Spec object.

TsCondition.Selector.Strings Message

NameTypeDescription
valuesrepeated string

GetTsConditionRequest Message

A request message of the GetTsCondition method.

NameTypeDescription
namestring (name of TsCondition)Name of ntt.alerting.v1.TsCondition
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetTsConditionsRequest Message

A request message of the BatchGetTsConditions method.

NameTypeDescription
namesrepeated string (name of TsCondition)Names of TsConditions
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetTsConditionsResponse Message

A response message of the BatchGetTsConditions method.

NameTypeDescription
ts_conditionsrepeated TsConditionfound TsConditions
missingrepeated string (name of TsCondition)list of not found TsConditions

ListTsConditionsRequest Message

A request message of the ListTsConditions method.

NameTypeDescription
parentstring (parent name of TsCondition)Parent name of ntt.alerting.v1.TsCondition
page_sizeint32Requested page size. Server may return fewer TsConditions than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of TsCondition)A token identifying a page of results the server should return. Typically, this is the value of ListTsConditionsResponse.next_page_token.
order_bystring (orderBy of TsCondition)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of TsCondition)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListTsConditionsResponse Message

A response message of the ListTsConditions method.

NameTypeDescription
ts_conditionsrepeated TsConditionThe list of TsConditions
prev_page_tokenstring (cursor of TsCondition)A token to retrieve previous page of results. Pass this value in the ListTsConditionsRequest.page_token.
next_page_tokenstring (cursor of TsCondition)A token to retrieve next page of results. Pass this value in the ListTsConditionsRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total TsConditions across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchTsConditionRequest Message

A request message of the WatchTsCondition method.

NameTypeDescription
namestring (name of TsCondition)Name of ntt.alerting.v1.TsCondition
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchTsConditionResponse Message

A response message of the WatchTsCondition method.

NameTypeDescription
changeTsConditionChange

WatchTsConditionsRequest Message

A request message of the WatchTsConditions method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of TsCondition)Parent name of ntt.alerting.v1.TsCondition
page_sizeint32Requested page size. Server may return fewer TsConditions than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of TsCondition)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of TsCondition)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of TsCondition)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to TsCondition that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to TsCondition that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchTsConditionsResponse Message

A response message of the WatchTsConditions method.

NameTypeDescription
ts_condition_changesrepeated TsConditionChangeChanges of TsConditions
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All TsConditions will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchTsConditionsResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (TsConditions will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchTsConditionsResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of TsCondition)New token to retrieve previous page of results.
next_page_tokenstring (cursor of TsCondition)New token to retrieve next page of results.

CreateTsConditionRequest Message

A request message of the CreateTsCondition method.

NameTypeDescription
parentstring (parent name of TsCondition)Parent name of ntt.alerting.v1.TsCondition
ts_conditionTsConditionTsCondition resource body
response_maskCreateTsConditionRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateTsConditionRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateTsConditionRequest Message

A request message of the UpdateTsCondition method.

NameTypeDescription
ts_conditionTsConditionTsCondition resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateTsConditionRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateTsConditionRequest.ResponseMaskreduce message response size.

UpdateTsConditionRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateTsConditionConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateTsConditionRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteTsConditionRequest Message

A request message of the DeleteTsCondition method.

NameTypeDescription
namestring (name of TsCondition)Name of ntt.alerting.v1.TsCondition
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SearchTsConditionsRequest Message

A request message of the SearchTsConditions method.

NameTypeDescription
parentstring (parent name of TsCondition)Parent name of ntt.alerting.v1.TsCondition
page_sizeint32Requested page size. Server may return fewer TsConditions than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of TsCondition)A token identifying a page of results the server should return. Typically, this is the value of SearchTsConditionsResponse.next_page_token.
order_bystring (orderBy of TsCondition)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of TsCondition)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
phrasestringOptional search phrase used to further filter results.

SearchTsConditionsResponse Message

A response message of the SearchTsConditions method.

NameTypeDescription
ts_conditionsrepeated TsConditionThe list of TsConditions
prev_page_tokenstring (cursor of TsCondition)A token to retrieve previous page of results. Pass this value in the SearchTsConditionsRequest.page_token.
next_page_tokenstring (cursor of TsCondition)A token to retrieve next page of results. Pass this value in the SearchTsConditionsRequest.page_token.
current_offsetint32Current offset from the first page (0 if no page tokens were given). Page index can be computed from offset and limit provided in a request
total_results_countint32Number of total TsConditions across all pages.

TsConditionTemplate Resource

TsConditionTemplate provides pre-defined templates for TsCondition resources. They may be public ones (available for all projects to be copied), but also can be private and available in selected projects only. They are always provided within Policy template.

Name patterns:

  • projects/{project}/policyTemplates/{policy_template}/tsConditionTemplates/{ts_condition_template}

Parent resources:

This section covers the methods and messages to interact with TsConditionTemplate resource.

TsConditionTemplate Methods

Here is the list of TsConditionTemplate resource methods:

GetTsConditionTemplate Method

GetTsConditionTemplate

rpc GetTsConditionTemplate(GetTsConditionTemplateRequest) returns (TsConditionTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.get

The equivalent REST API is:

GET /v1/{name=projects/*/policyTemplates/*/tsConditionTemplates/*} 

BatchGetTsConditionTemplates Method

BatchGetTsConditionTemplates

rpc BatchGetTsConditionTemplates(BatchGetTsConditionTemplatesRequest) returns (BatchGetTsConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.batchGet

The equivalent REST API is:

GET /v1/tsConditionTemplates:batchGet 

ListTsConditionTemplates Method

ListTsConditionTemplates

rpc ListTsConditionTemplates(ListTsConditionTemplatesRequest) returns (ListTsConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.list

The equivalent REST API is:

GET /v1/{parent=projects/*/policyTemplates/*}/tsConditionTemplates 

WatchTsConditionTemplate Method

WatchTsConditionTemplate

rpc WatchTsConditionTemplate(WatchTsConditionTemplateRequest) returns (WatchTsConditionTemplateResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policyTemplates/*/tsConditionTemplates/*}:watch 

WatchTsConditionTemplates Method

WatchTsConditionTemplates

rpc WatchTsConditionTemplates(WatchTsConditionTemplatesRequest) returns (WatchTsConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.watch

The equivalent REST API is:

POST /v1/{parent=projects/*/policyTemplates/*}/tsConditionTemplates:watch 

CreateTsConditionTemplate Method

CreateTsConditionTemplate

rpc CreateTsConditionTemplate(CreateTsConditionTemplateRequest) returns (TsConditionTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.create

The equivalent REST API is:

POST /v1/{parent=projects/*/policyTemplates/*}/tsConditionTemplates (BODY: ts_condition_template)

UpdateTsConditionTemplate Method

UpdateTsConditionTemplate

rpc UpdateTsConditionTemplate(UpdateTsConditionTemplateRequest) returns (TsConditionTemplate)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.update

The equivalent REST API is:

PUT /v1/{ts_condition_template.name=projects/*/policyTemplates/*/tsConditionTemplates/*} (BODY: ts_condition_template)

DeleteTsConditionTemplate Method

DeleteTsConditionTemplate

rpc DeleteTsConditionTemplate(DeleteTsConditionTemplateRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policyTemplates/*/tsConditionTemplates/*} 

SearchTsConditionTemplates Method

SearchTsConditionTemplates

rpc SearchTsConditionTemplates(SearchTsConditionTemplatesRequest) returns (SearchTsConditionTemplatesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsConditionTemplates.search

The equivalent REST API is:

GET /v1/{parent=projects/*/policyTemplates/*}/tsConditionTemplates:search 

TsConditionTemplate Messages

Here is the list of TsConditionTemplate resource messages:

TsConditionTemplate Message

NameTypeDescription
namestring (name of TsConditionTemplate)Name of TsConditionTemplate When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [a-z][a-z0-9\-]{0,28}[a-z0-9]
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
display_namestringDisplay Name
descriptionstringLong description
supporting_docsrepeated string (reference to Document)List of supporting documents. Pointed documents must be copied if TsCondition is created in different project.
spec_templateTsCndSpecPre defined template for TsCondition.Spec.

GetTsConditionTemplateRequest Message

A request message of the GetTsConditionTemplate method.

NameTypeDescription
namestring (name of TsConditionTemplate)Name of ntt.alerting.v1.TsConditionTemplate
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetTsConditionTemplatesRequest Message

A request message of the BatchGetTsConditionTemplates method.

NameTypeDescription
namesrepeated string (name of TsConditionTemplate)Names of TsConditionTemplates
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetTsConditionTemplatesResponse Message

A response message of the BatchGetTsConditionTemplates method.

NameTypeDescription
ts_condition_templatesrepeated TsConditionTemplatefound TsConditionTemplates
missingrepeated string (name of TsConditionTemplate)list of not found TsConditionTemplates

ListTsConditionTemplatesRequest Message

A request message of the ListTsConditionTemplates method.

NameTypeDescription
parentstring (parent name of TsConditionTemplate)Parent name of ntt.alerting.v1.TsConditionTemplate
page_sizeint32Requested page size. Server may return fewer TsConditionTemplates than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of TsConditionTemplate)A token identifying a page of results the server should return. Typically, this is the value of ListTsConditionTemplatesResponse.next_page_token.
order_bystring (orderBy of TsConditionTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of TsConditionTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListTsConditionTemplatesResponse Message

A response message of the ListTsConditionTemplates method.

NameTypeDescription
ts_condition_templatesrepeated TsConditionTemplateThe list of TsConditionTemplates
prev_page_tokenstring (cursor of TsConditionTemplate)A token to retrieve previous page of results. Pass this value in the ListTsConditionTemplatesRequest.page_token.
next_page_tokenstring (cursor of TsConditionTemplate)A token to retrieve next page of results. Pass this value in the ListTsConditionTemplatesRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total TsConditionTemplates across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchTsConditionTemplateRequest Message

A request message of the WatchTsConditionTemplate method.

NameTypeDescription
namestring (name of TsConditionTemplate)Name of ntt.alerting.v1.TsConditionTemplate
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchTsConditionTemplateResponse Message

A response message of the WatchTsConditionTemplate method.

NameTypeDescription
changeTsConditionTemplateChange

WatchTsConditionTemplatesRequest Message

A request message of the WatchTsConditionTemplates method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of TsConditionTemplate)Parent name of ntt.alerting.v1.TsConditionTemplate
page_sizeint32Requested page size. Server may return fewer TsConditionTemplates than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of TsConditionTemplate)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of TsConditionTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of TsConditionTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to TsConditionTemplate that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to TsConditionTemplate that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchTsConditionTemplatesResponse Message

A response message of the WatchTsConditionTemplates method.

NameTypeDescription
ts_condition_template_changesrepeated TsConditionTemplateChangeChanges of TsConditionTemplates
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All TsConditionTemplates will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchTsConditionTemplatesResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (TsConditionTemplates will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchTsConditionTemplatesResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of TsConditionTemplate)New token to retrieve previous page of results.
next_page_tokenstring (cursor of TsConditionTemplate)New token to retrieve next page of results.

CreateTsConditionTemplateRequest Message

A request message of the CreateTsConditionTemplate method.

NameTypeDescription
parentstring (parent name of TsConditionTemplate)Parent name of ntt.alerting.v1.TsConditionTemplate
ts_condition_templateTsConditionTemplateTsConditionTemplate resource body
response_maskCreateTsConditionTemplateRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateTsConditionTemplateRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateTsConditionTemplateRequest Message

A request message of the UpdateTsConditionTemplate method.

NameTypeDescription
ts_condition_templateTsConditionTemplateTsConditionTemplate resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateTsConditionTemplateRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateTsConditionTemplateRequest.ResponseMaskreduce message response size.

UpdateTsConditionTemplateRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateTsConditionTemplateConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateTsConditionTemplateRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteTsConditionTemplateRequest Message

A request message of the DeleteTsConditionTemplate method.

NameTypeDescription
namestring (name of TsConditionTemplate)Name of ntt.alerting.v1.TsConditionTemplate
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

SearchTsConditionTemplatesRequest Message

A request message of the SearchTsConditionTemplates method.

NameTypeDescription
parentstring (parent name of TsConditionTemplate)Parent name of ntt.alerting.v1.TsConditionTemplate
page_sizeint32Requested page size. Server may return fewer TsConditionTemplates than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of TsConditionTemplate)A token identifying a page of results the server should return. Typically, this is the value of SearchTsConditionTemplatesResponse.next_page_token.
order_bystring (orderBy of TsConditionTemplate)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of TsConditionTemplate)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
phrasestringOptional search phrase used to further filter results.

SearchTsConditionTemplatesResponse Message

A response message of the SearchTsConditionTemplates method.

NameTypeDescription
ts_condition_templatesrepeated TsConditionTemplateThe list of TsConditionTemplates
prev_page_tokenstring (cursor of TsConditionTemplate)A token to retrieve previous page of results. Pass this value in the SearchTsConditionTemplatesRequest.page_token.
next_page_tokenstring (cursor of TsConditionTemplate)A token to retrieve next page of results. Pass this value in the SearchTsConditionTemplatesRequest.page_token.
current_offsetint32Current offset from the first page (0 if no page tokens were given). Page index can be computed from offset and limit provided in a request
total_results_countint32Number of total TsConditionTemplates across all pages.

TsEntry Resource

TsEntry contains stateful data for each unique Group by fields combination within individual TsCondition resource. Each TsEntry has own set of alerts too. TsEntry contains dynamic thresholds or anomaly detection models.

Name patterns:

  • projects/{project}/policies/{policy}/tsConditions/{ts_condition}/regions/{region}/tsEntries/{ts_entry}

Parent resources:

This section covers the methods and messages to interact with TsEntry resource.

TsEntry Methods

Here is the list of TsEntry resource methods:

GetTsEntry Method

GetTsEntry

rpc GetTsEntry(GetTsEntryRequest) returns (TsEntry)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.get

The equivalent REST API is:

GET /v1/{name=projects/*/policies/*/tsConditions/*/regions/*/tsEntries/*} 

BatchGetTsEntries Method

BatchGetTsEntries

rpc BatchGetTsEntries(BatchGetTsEntriesRequest) returns (BatchGetTsEntriesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.batchGet

The equivalent REST API is:

GET /v1/tsEntries:batchGet 

ListTsEntries Method

ListTsEntries

rpc ListTsEntries(ListTsEntriesRequest) returns (ListTsEntriesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.list

The equivalent REST API is:

GET /v1/{parent=projects/*/policies/*/tsConditions/*/regions/*}/tsEntries 

WatchTsEntry Method

WatchTsEntry

rpc WatchTsEntry(WatchTsEntryRequest) returns (WatchTsEntryResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.watch

The equivalent REST API is:

POST /v1/{name=projects/*/policies/*/tsConditions/*/regions/*/tsEntries/*}:watch 

WatchTsEntries Method

WatchTsEntries

rpc WatchTsEntries(WatchTsEntriesRequest) returns (WatchTsEntriesResponse)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.watch

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*/tsConditions/*/regions/*}/tsEntries:watch 

CreateTsEntry Method

CreateTsEntry

rpc CreateTsEntry(CreateTsEntryRequest) returns (TsEntry)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.create

The equivalent REST API is:

POST /v1/{parent=projects/*/policies/*/tsConditions/*/regions/*}/tsEntries (BODY: ts_entry)

UpdateTsEntry Method

UpdateTsEntry

rpc UpdateTsEntry(UpdateTsEntryRequest) returns (TsEntry)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.update

The equivalent REST API is:

PUT /v1/{ts_entry.name=projects/*/policies/*/tsConditions/*/regions/*/tsEntries/*} (BODY: ts_entry)

DeleteTsEntry Method

DeleteTsEntry

rpc DeleteTsEntry(DeleteTsEntryRequest) returns (Empty)

with the following messages:

Required Permissions:

  • services/alerting.edgelq.com/permissions/tsEntries.delete

The equivalent REST API is:

DELETE /v1/{name=projects/*/policies/*/tsConditions/*/regions/*/tsEntries/*} 

TsEntry Messages

Here is the list of TsEntry resource messages:

TsEntry Message

NameTypeDescription
namestring (name of TsEntry)Name of TsEntry When creating a new instance, this field is optional and if not provided, it will be generated automatically. Last ID segment must conform to the following regex: [\w+/=]{1,256}
metadataMetaMetadata is an object with information like create, update and delete time (for async deleted resources), has user labels/annotations, sharding information, multi-region syncing information and may have non-schema owners (useful for taking ownership of resources belonging to lower level services by higher ones).
infoTsEntry.InfoIdentification information
stateTsEntry.StateState with anomaly detection models and dynamic thresholds.
internalTsEntry.InternalInternal field.

TsEntry.Info Message

Info provides unique description of a resource.

NameTypeDescription
alerting_resourceOwnerReferenceAlerting resource points to the original resource associated with this TsEntry. This meta reference works like dynamic type (any service, any resource). TODO: We could use of “DynamicReference” message type. It can be similar to OwnerReference, except it works more like reference (uses EstablishReferences…). It can support most normal behaviors, like CASCADE DELETE/UNSET.
group_by_keybytesBinary time series key containing labels information.
common_metric_labelsmap<string, string>Common metric labels
common_resource_labelsmap<string, string>Common resource labels.

TsEntry.State Message

State contains all stateful data that is necessary for alert detection: Individualised adaptive thresholds and anomaly detection models.

NameTypeDescription
modelsrepeated TsEntry.State.AnomalyModelDataAnomaly detection models for each analysis window.
thresholdsrepeated TsEntry.State.AdaptiveThresholdInfoAdaptive thresholds (per each query in TsCondition).

TsEntry.Internal Message

Internal data.

NameTypeDescription
alerting_locationPolicySpec.ProcessingLocation
spec_generationint32

TsEntry.State.AnomalyModelData Message

AnomalyModelData contains data for specific analysis window.

NameTypeDescription
analysis_window.google.protobuf.DurationAnalysis window size.
model_databytesModel binary data.
training_mean_errrepeated doubleAverage training errors (one float per each query)
training_max_errrepeated doubleMaximum training errors (one float per each query)
trained_in_epochsint32Number of epochs used to train model
trained_in.google.protobuf.DurationInforms how long it took to train this model.
train_after.google.protobuf.TimestampIndicates if another training should be executed, and when.
training_periodTimeIntervalTraining period that was selected for this model.
sensitivenessrepeated TsEntry.State.AnomalyModelSensitivenessSensitiveness (also called anomaly thresholds) per each query in TsCondition. Alert is raised when anomaly is detected for any of time series data.

TsEntry.State.AnomalyModelSensitiveness Message

AnomalyModelSensitiveness defines when anomaly is considered large enough to warrant new alert creation.

NameTypeDescription
query_namestringName of the matching query in TsCondition
anomaly_thresholddoubleThreshold after which anomaly is considered too big.

TsEntry.State.AdaptiveThresholdInfo Message

AdaptiveThresholdInfo contains dynamic adaptive thresholds.

NameTypeDescription
query_namestringMatching query name in TsCondition
lowerAlertingThresholdLower threshold value. Values below are considered violations.
upperAlertingThresholdUpper threshold value. Values above are considered violations.
next_check.google.protobuf.TimestampContains timestamp when thresholds should be adapted and checked after.

GetTsEntryRequest Message

A request message of the GetTsEntry method.

NameTypeDescription
namestring (name of TsEntry)Name of ntt.alerting.v1.TsEntry
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetTsEntriesRequest Message

A request message of the BatchGetTsEntries method.

NameTypeDescription
namesrepeated string (name of TsEntry)Names of TsEntries
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

BatchGetTsEntriesResponse Message

A response message of the BatchGetTsEntries method.

NameTypeDescription
ts_entriesrepeated TsEntryfound TsEntries
missingrepeated string (name of TsEntry)list of not found TsEntries

ListTsEntriesRequest Message

A request message of the ListTsEntries method.

NameTypeDescription
parentstring (parent name of TsEntry)Parent name of ntt.alerting.v1.TsEntry
page_sizeint32Requested page size. Server may return fewer TsEntries than requested. If unspecified, server will pick an appropriate default.
page_tokenstring (cursor of TsEntry)A token identifying a page of results the server should return. Typically, this is the value of ListTsEntriesResponse.next_page_token.
order_bystring (orderBy of TsEntry)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination list of field path with order directive, either ‘asc’ or ‘desc’. If direction is not provided, ‘asc’ is assumed. e.g. “state.nested_field asc, state.something.else desc, theme”
filterstring (filter of TsEntry)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask
include_paging_infoboolIndicates if list response should contain total count and offset (fields current_offset and total_results_count).

ListTsEntriesResponse Message

A response message of the ListTsEntries method.

NameTypeDescription
ts_entriesrepeated TsEntryThe list of TsEntries
prev_page_tokenstring (cursor of TsEntry)A token to retrieve previous page of results. Pass this value in the ListTsEntriesRequest.page_token.
next_page_tokenstring (cursor of TsEntry)A token to retrieve next page of results. Pass this value in the ListTsEntriesRequest.page_token.
current_offsetint32Current offset from the first page or 0 if no page tokens were given, paging info was not requested or there was an error while trying to get it). Page index can be computed from offset and limit provided in a request.
total_results_countint32Number of total TsEntries across all pages or 0, if there are no items, paging info was not requested or there was an error while trying to get it.

WatchTsEntryRequest Message

A request message of the WatchTsEntry method.

NameTypeDescription
namestring (name of TsEntry)Name of ntt.alerting.v1.TsEntry
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask

WatchTsEntryResponse Message

A response message of the WatchTsEntry method.

NameTypeDescription
changeTsEntryChange

WatchTsEntriesRequest Message

A request message of the WatchTsEntries method.

NameTypeDescription
typeWatchTypeType of a watch. Identifies how server stream data to a client, which fields in a request are allowed and which fields in response are relevant.
parentstring (parent name of TsEntry)Parent name of ntt.alerting.v1.TsEntry
page_sizeint32Requested page size. Server may return fewer TsEntries than requested. If unspecified, server will pick an appropriate default. Can be populated only for stateful watch type.
page_tokenstring (cursor of TsEntry)A token identifying a page of results the server should return. Can be populated only for stateful watch type.
order_bystring (orderBy of TsEntry)Order By - https://cloud.google.com/apis/design/design_patterns#list_pagination Can be populated only for stateful watch type.
resume_tokenstringA token identifying watch resume point from previous session. Can be populated only for stateless watch type.
starting_time.google.protobuf.TimestampPoint in the time from which we want to start getting updates. This field can be populated only for stateless watch type and if resume token is not known yet. If specified, initial snapshot will NOT be provided. It is assumed client can obtain it using separate means. Watch responses will contain resume tokens which should be used to resume broken connection.
filterstring (filter of TsEntry)Filter - filter results by field criteria. Simplified SQL-like syntax with following operators: <=, >=, =, !=, <, >, LIKE, CONTAINS (aliases CONTAIN, HAS, HAVE), IN, IS [NOT] NULL
field_mask.google.protobuf.FieldMaskA list of extra fields to be obtained for each response item on top of fields defined by request field view Changes to TsEntry that don’t affect any of masked fields won’t be sent back.
viewViewView defines list of standard response fields present in response items. Additional fields can be amended by request field field_mask Changes to TsEntry that don’t affect any of masked fields won’t be sent back.
max_chunk_sizeint32Maximum amount of changes in each response message. Query result response is divided on the server side into chunks with size of a specified amount to limit memory footprint of each message. Responses will hold information whether more elements will continue for the actual change. If unspecified, server will pick an appropriate default.

WatchTsEntriesResponse Message

A response message of the WatchTsEntries method.

NameTypeDescription
ts_entry_changesrepeated TsEntryChangeChanges of TsEntries
is_currentboolIf request specified max_chunk_size (or this limit was enforced if stateless watch has been chosen), then responses with “full changeset” will be divided into chunks. Client should keep receiving messages and, once is_current has value true, combine this recent message with all previous ones where is_current is false. If this is the first is_current in a whole watch stream, then it means that client should have, at this moment, contain snapshot of the current situation (or more accurately, snapshot of situation at the moment of request). All TsEntries will be of type Added/Current (depending on watch_type specified in the request). Further responses will be incremental - however messages may still be chunked and is_current logic still applies. is_current is always true for stateful watch if max_chunk_size was left to 0.
page_token_changeWatchTsEntriesResponse.PageTokenChangeWhen present, PageTokens used for page navigation should be updated. Present only if is_current is true (last chunk).
resume_tokenstringToken that can be used if current connection drops and client needs to reconnect. Populated only for stateless watch type. Present only if is_current is true (last chunk).
snapshot_sizeint64Server may occasionally send information how many resources should client have in its state so far (response message without any changes, but with snapshot_size field specified). If client has different value than the one sent by the server, then it should be treated by a client as an error and should reconnect. If value is smaller then 0, then client should ignore this field as unpopulated. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will be never sent together with is_current, is_soft_reset and is_hard_reset flags.
is_soft_resetboolIn case of internal issue server may send response message with this flag. It indicates that client should drop all changes from recent responses where is_current is false only! If last message had is_current set to true, client should do nothing and process normally. Resume token received before is still valid. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_hard_reset or snapshot_size.
is_hard_resetboolIn case of internal issue server may send response message with this flag. After receiving, client should clear whole state (drop all changes received so far) as server will send new snapshot (TsEntries will contains changes of type Current only). Any resume tokens should be discarded as well. This field should be checked only for stateless watch. In stateful those kind of errors are handled by the server side. Will never be sent along with is_current, is_soft_reset or snapshot_size.

WatchTsEntriesResponse.PageTokenChange Message

NameTypeDescription
prev_page_tokenstring (cursor of TsEntry)New token to retrieve previous page of results.
next_page_tokenstring (cursor of TsEntry)New token to retrieve next page of results.

CreateTsEntryRequest Message

A request message of the CreateTsEntry method.

NameTypeDescription
parentstring (parent name of TsEntry)Parent name of ntt.alerting.v1.TsEntry
ts_entryTsEntryTsEntry resource body
response_maskCreateTsEntryRequest.ResponseMaskOptional masking applied to response object to reduce message response size.

CreateTsEntryRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields.

UpdateTsEntryRequest Message

A request message of the UpdateTsEntry method.

NameTypeDescription
ts_entryTsEntryTsEntry resource body
update_mask.google.protobuf.FieldMaskFieldMask applied to request - change will be applied only for fields in the mask
casUpdateTsEntryRequest.CASConditional update applied to request if update should be executed only for specific resource state. If this field is populated, then server will fetch existing resource, compare with the one stored in the cas field (after applying field mask) and proceed with update only and only if they match. Otherwise RPC error Aborted will be returned.
allow_missingboolIf set to true, and the resource is not found, a new resource will be created. In this situation, ‘field_mask’ is ignored. https://google.aip.dev/134#create-or-update
response_maskUpdateTsEntryRequest.ResponseMaskreduce message response size.

UpdateTsEntryRequest.CAS Message

CAS - Compare and Swap. This object is used if user wants to make update conditional based upon previous resource version.

NameTypeDescription
conditional_stateTsEntryConditional desired state of a resource before update.
field_mask.google.protobuf.FieldMaskField paths from conditional state of resource server should check and compare.

UpdateTsEntryRequest.ResponseMask Message

ResponseMask allows client to reduce response message size.

NameTypeDescription
skip_entire_response_bodyboolIf this flag has value true, then response will contain just empty resource without any fields populated. Field body_mask is ignored if set.
updated_fields_onlyboolInclude all fields that were actually updated during processing. Note this may be larger than update mask if some fields were computed additionally. Name is added as well.
body_mask.google.protobuf.FieldMaskIf this field is populated, then resource in response will contain only specific fields. If skip_entire_response_body is true, this field is ignored.

DeleteTsEntryRequest Message

A request message of the DeleteTsEntry method.

NameTypeDescription
namestring (name of TsEntry)Name of ntt.alerting.v1.TsEntry
allow_missingboolIf set to true, and the resource is not found, method will be successful and will not return NotFound error.

Alerting Service Shared Methods and Messages

Alerting Service Shared Methods

Here is the list of Alerting service shared methods:

WatchAlertData Method

WatchAlertData

rpc WatchAlertData(WatchAlertDataRequest) returns (WatchAlertDataResponse)

Alerting Service Shared Messages

Here is the list of Alerting service shared messages:

AlertChange Message

AlertChange is used by Watch notifications Responses to describe change of single Alert One of Added, Modified, Removed

NameTypeDescription
addedAlertChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedAlertChange.ModifiedModified is returned when watched document is modified
currentAlertChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedAlertChange.RemovedRemoved is returned when Alert is deleted or leaves Query view

AlertChange.Added Message

Alert has been added to query view

NameTypeDescription
alertAlert
view_indexint32Integer describing index of added Alert in resulting query view.

AlertChange.Current Message

Alert has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
alertAlert

AlertChange.Modified Message

Alert changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Alert)Name of modified Alert
alertAlertNew version of Alert or masked difference, depending on mask_changes instrumentation of issued [WatchAlertRequest] or [WatchAlertsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Alert. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Alert new index in resulting query view.

AlertChange.Removed Message

Removed is returned when Alert is deleted or leaves Query view

NameTypeDescription
namestring (name of Alert)
view_indexint32Integer specifying removed Alert index. Not populated in stateless watch type.

AlertingThreshold Message

AlertingThreshold defines threshold value for alerting.

NameTypeDescription
valuedoubleValue that must not be crossed.
is_inclusiveboolIf true, then alert is raised when exact specified value is reached. Otherwise, it has to be crossed.

DocumentChange Message

DocumentChange is used by Watch notifications Responses to describe change of single Document One of Added, Modified, Removed

NameTypeDescription
addedDocumentChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedDocumentChange.ModifiedModified is returned when watched document is modified
currentDocumentChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedDocumentChange.RemovedRemoved is returned when Document is deleted or leaves Query view

DocumentChange.Added Message

Document has been added to query view

NameTypeDescription
documentDocument
view_indexint32Integer describing index of added Document in resulting query view.

DocumentChange.Current Message

Document has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
documentDocument

DocumentChange.Modified Message

Document changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Document)Name of modified Document
documentDocumentNew version of Document or masked difference, depending on mask_changes instrumentation of issued [WatchDocumentRequest] or [WatchDocumentsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Document. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Document new index in resulting query view.

DocumentChange.Removed Message

Removed is returned when Document is deleted or leaves Query view

NameTypeDescription
namestring (name of Document)
view_indexint32Integer specifying removed Document index. Not populated in stateless watch type.

LogCndSpec Message

LogCndSpec informs what Logging queries should be monitored for alerting, and what content should be considered as violation.

NameTypeDescription
queryLogCndSpec.QuerySpecifies logging query
group_by_labelsrepeated stringGroup by labels inform how to split monitored Logs stream. Each unique combination of label values is considered separately as own alerting bucket. All labels defined in Policy must be defined here.

LogCndSpec.Query Message

Query specifies what logging query should be monitored.

NameTypeDescription
filterstring (filter of Log)Filter used to continuously observe log query output.
triggerLogCndSpec.Query.TriggerCndTrigger under which Alert is raised
min_duration.google.protobuf.DurationInforms how long alert should be maintained in firing state since last occurrence.

LogCndSpec.Query.CompositeTrigger Message

CompositeTrigger collects multiple triggers together.

NameTypeDescription
triggersrepeated LogCndSpec.Query.TriggerCndList of triggers.
operatorLogCndSpec.Query.CompositeTrigger.OperatorOperator combining triggers

LogCndSpec.Query.LabelTrigger Message

LabelTrigger informs what label Log must have to be considered as a violation.

NameTypeDescription
keystringLabel key
valuesrepeated stringTriggering label values.

LogCndSpec.Query.StringPayloadTrigger Message

StringPayloadTrigger informs what text content of log is triggering an alert.

NameTypeDescription
object_selectorstringOptional selector inside log data field. It should be ignored if log entry is just a string or byte array. It can be used if log is some JSON object, and we search for specific fields.
regexstringRegex that log content must satisfy to trigger an alert

LogCndSpec.Query.TriggerCnd Message

TriggerCnd wraps a trigger deciding when to trigger an alert. It inspects each Log individually.

NameTypeDescription
labelLogCndSpec.Query.LabelTriggerTrigger based on label
string_contentLogCndSpec.Query.StringPayloadTriggerTrigger based on log textual content
compositeLogCndSpec.Query.CompositeTriggerComposite trigger combining multiple smaller ones

LogConditionChange Message

LogConditionChange is used by Watch notifications Responses to describe change of single LogCondition One of Added, Modified, Removed

NameTypeDescription
addedLogConditionChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedLogConditionChange.ModifiedModified is returned when watched document is modified
currentLogConditionChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedLogConditionChange.RemovedRemoved is returned when LogCondition is deleted or leaves Query view

LogConditionChange.Added Message

LogCondition has been added to query view

NameTypeDescription
log_conditionLogCondition
view_indexint32Integer describing index of added LogCondition in resulting query view.

LogConditionChange.Current Message

LogCondition has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
log_conditionLogCondition

LogConditionChange.Modified Message

LogCondition changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of LogCondition)Name of modified LogCondition
log_conditionLogConditionNew version of LogCondition or masked difference, depending on mask_changes instrumentation of issued [WatchLogConditionRequest] or [WatchLogConditionsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified LogCondition. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying LogCondition new index in resulting query view.

LogConditionChange.Removed Message

Removed is returned when LogCondition is deleted or leaves Query view

NameTypeDescription
namestring (name of LogCondition)
view_indexint32Integer specifying removed LogCondition index. Not populated in stateless watch type.

LogConditionTemplateChange Message

LogConditionTemplateChange is used by Watch notifications Responses to describe change of single LogConditionTemplate One of Added, Modified, Removed

NameTypeDescription
addedLogConditionTemplateChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedLogConditionTemplateChange.ModifiedModified is returned when watched document is modified
currentLogConditionTemplateChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedLogConditionTemplateChange.RemovedRemoved is returned when LogConditionTemplate is deleted or leaves Query view

LogConditionTemplateChange.Added Message

LogConditionTemplate has been added to query view

NameTypeDescription
log_condition_templateLogConditionTemplate
view_indexint32Integer describing index of added LogConditionTemplate in resulting query view.

LogConditionTemplateChange.Current Message

LogConditionTemplate has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
log_condition_templateLogConditionTemplate

LogConditionTemplateChange.Modified Message

LogConditionTemplate changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of LogConditionTemplate)Name of modified LogConditionTemplate
log_condition_templateLogConditionTemplateNew version of LogConditionTemplate or masked difference, depending on mask_changes instrumentation of issued [WatchLogConditionTemplateRequest] or [WatchLogConditionTemplatesRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified LogConditionTemplate. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying LogConditionTemplate new index in resulting query view.

LogConditionTemplateChange.Removed Message

Removed is returned when LogConditionTemplate is deleted or leaves Query view

NameTypeDescription
namestring (name of LogConditionTemplate)
view_indexint32Integer specifying removed LogConditionTemplate index. Not populated in stateless watch type.

NotificationChannelChange Message

NotificationChannelChange is used by Watch notifications Responses to describe change of single NotificationChannel One of Added, Modified, Removed

NameTypeDescription
addedNotificationChannelChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedNotificationChannelChange.ModifiedModified is returned when watched document is modified
currentNotificationChannelChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedNotificationChannelChange.RemovedRemoved is returned when NotificationChannel is deleted or leaves Query view

NotificationChannelChange.Added Message

NotificationChannel has been added to query view

NameTypeDescription
notification_channelNotificationChannel
view_indexint32Integer describing index of added NotificationChannel in resulting query view.

NotificationChannelChange.Current Message

NotificationChannel has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
notification_channelNotificationChannel

NotificationChannelChange.Modified Message

NotificationChannel changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of NotificationChannel)Name of modified NotificationChannel
notification_channelNotificationChannelNew version of NotificationChannel or masked difference, depending on mask_changes instrumentation of issued [WatchNotificationChannelRequest] or [WatchNotificationChannelsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified NotificationChannel. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying NotificationChannel new index in resulting query view.

NotificationChannelChange.Removed Message

Removed is returned when NotificationChannel is deleted or leaves Query view

NameTypeDescription
namestring (name of NotificationChannel)
view_indexint32Integer specifying removed NotificationChannel index. Not populated in stateless watch type.

NotificationChannelSpec Message

NotificationChannelSpec informs what kind of channel it is, and how to send there messages.

NameTypeDescription
enabledboolEnabled flag. Whether the NotificationChannel is enabled or not. Disabled channels will not be used for alerting.
typeNotificationChannelSpec.TypeType. Corresponding spec should a oneof field.
enabled_kindsrepeated NotificationChannelSpec.EventKindList of alert state event kinds when we want to send a notification.
emailNotificationChannelSpec.EmailEmail
slackNotificationChannelSpec.SlackSlack
webhookNotificationChannelSpec.WebhookWebhook endpoint
notification_language_codestringDefault language for invitation is english (eng) Configuring unsupported language will fallback to english Currently only sendgrid uses this.
notification_mask.google.protobuf.FieldMaskNotification mask contains list of fields to include in the message. It must match NotificationMsg
max_alert_bodies_in_msgint32If bigger than 0, then number of alert bodies in message will be cut to this value.
put_only_alerts_counter_when_overflowingboolThis field matters if max_alert_bodies_in_msg is bigger than 0. If this field has value true, then notification message will only inform how many alerts additionally were raised on top of provided in the notification. If false, multiple notifications will be generated.

NotificationChannelSpec.Email Message

Email Spec

NameTypeDescription
addressesrepeated stringEmail Addresses

NotificationChannelSpec.PagerDuty Message

PagerDuty Spec

NameTypeDescription
service_keystringPagerDuty Service Key

NotificationChannelSpec.Slack Message

Slack Spec

NameTypeDescription
incoming_webhookstringSlack Incoming Webhook URL

NotificationChannelSpec.Webhook Message

Webhook Spec

NameTypeDescription
urlstringWebhook URL
headersrepeated NotificationChannelSpec.Webhook.HeaderHeaders
max_message_size_mbdoubledefault is 0 means all the alerts in a notification are sent in single request. Breaking into multiple messages may be significantly slower than sending a single message. For example, to use 250KB chunks, set 0.25 MB

NotificationChannelSpec.Webhook.Header Message

Header

NameTypeDescription
keystring
valuestring

NotificationMsg Message

NotificationMsg is a notification message sent to channels, according to NotificationChannel resource.

NameTypeDescription
project_fqnstring (name of Project)
project_display_namestring
organization_fqnstring (name of Organization)
organization_display_namestring
policy_fqnstring (name of Policy)
policy_display_namestring
new_firing_alertsNotificationMsg.AlertsGroup
alerts_escalated_by_ai_to_operatorNotificationMsg.AlertsGroup
alerts_awaiting_for_approval_with_ai_remediationNotificationMsg.AlertsGroup
alerts_flagged_to_ignore_by_aiNotificationMsg.AlertsGroup
alerts_with_condition_marked_for_adjusting_by_aiNotificationMsg.AlertsGroup
alerts_with_ai_remediation_appliedNotificationMsg.AlertsGroup
alerts_with_operator_remediation_appliedNotificationMsg.AlertsGroup
stopped_alertsNotificationMsg.AlertsGroup

NotificationMsg.AlertsGroup Message

NameTypeDescription
by_conditionrepeated NotificationMsg.AlertsGroup.ConditionAlerts

NotificationMsg.AlertsGroup.ConditionAlerts Message

NameTypeDescription
time_series_conditionNotificationMsg.AlertsGroup.ConditionAlerts.TsCndType
log_conditionNotificationMsg.AlertsGroup.ConditionAlerts.LogCndType
alertsrepeated NotificationMsg.AlertsGroup.ConditionAlerts.Alert
more_alerts_countint32

NotificationMsg.AlertsGroup.ConditionAlerts.Alert Message

NameTypeDescription
typeNotificationMsg.AlertsGroup.ConditionAlerts.Alert.Type
fqnstring (name of Alert)
display_namestring
is_firingbool
start_time.google.protobuf.Timestamp
stop_time.google.protobuf.Timestamp
identificationNotificationMsg.AlertsGroup.ConditionAlerts.Alert.Identification
violation_infoNotificationMsg.AlertsGroup.ConditionAlerts.Alert.ViolationInfo
escalation_levelAlert.State.EscalationLevel
ai_handlingNotificationMsg.AlertsGroup.ConditionAlerts.Alert.AiHandling
operator_handlingNotificationMsg.AlertsGroup.ConditionAlerts.Alert.OperatorHandling

NotificationMsg.AlertsGroup.ConditionAlerts.Alert.AiHandling Message

NameTypeDescription
current_stateAlert.State.AiHandlingState
troubleshooting_notesstring
ai_remediationPolicySpec.AIAgentHandling.Remediation
remediation_argstring

NotificationMsg.AlertsGroup.ConditionAlerts.Alert.Identification Message

NameTypeDescription
log_labelsmap<string, string>
metric_labelsmap<string, string>
resource_labelsmap<string, string>

NotificationMsg.AlertsGroup.ConditionAlerts.Alert.OperatorHandling Message

NameTypeDescription
current_stateAlert.State.OperatorHandlingState
notesstring

NotificationMsg.AlertsGroup.ConditionAlerts.Alert.ViolationInfo Message

NameTypeDescription
log_valuestring
time_seriesrepeated NotificationMsg.AlertsGroup.ConditionAlerts.Alert.ViolationInfo.TimeSeries

NotificationMsg.AlertsGroup.ConditionAlerts.Alert.ViolationInfo.TimeSeries Message

NameTypeDescription
querystring
valuesrepeated double
upper_thresholdAlertingThreshold
lower_thresholdAlertingThreshold
raised_after.google.protobuf.Duration

NotificationMsg.AlertsGroup.ConditionAlerts.LogCndType Message

NameTypeDescription
fqnstring (name of LogCondition)
display_namestring
queriesrepeated NotificationMsg.AlertsGroup.ConditionAlerts.LogCndType.Query

NotificationMsg.AlertsGroup.ConditionAlerts.LogCndType.Query Message

NameTypeDescription
descriptionstring
filterstring

NotificationMsg.AlertsGroup.ConditionAlerts.TsCndType Message

NameTypeDescription
fqnstring (name of TsCondition)
display_namestring
queriesrepeated NotificationMsg.AlertsGroup.ConditionAlerts.TsCndType.Query

NotificationMsg.AlertsGroup.ConditionAlerts.TsCndType.Query Message

NameTypeDescription
descriptionstring
filterstring
aggregationAggregation

PolicyChange Message

PolicyChange is used by Watch notifications Responses to describe change of single Policy One of Added, Modified, Removed

NameTypeDescription
addedPolicyChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedPolicyChange.ModifiedModified is returned when watched document is modified
currentPolicyChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedPolicyChange.RemovedRemoved is returned when Policy is deleted or leaves Query view

PolicyChange.Added Message

Policy has been added to query view

NameTypeDescription
policyPolicy
view_indexint32Integer describing index of added Policy in resulting query view.

PolicyChange.Current Message

Policy has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
policyPolicy

PolicyChange.Modified Message

Policy changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of Policy)Name of modified Policy
policyPolicyNew version of Policy or masked difference, depending on mask_changes instrumentation of issued [WatchPolicyRequest] or [WatchPoliciesRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified Policy. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying Policy new index in resulting query view.

PolicyChange.Removed Message

Removed is returned when Policy is deleted or leaves Query view

NameTypeDescription
namestring (name of Policy)
view_indexint32Integer specifying removed Policy index. Not populated in stateless watch type.

PolicySpec Message

PolicySpec defines common specification parts shared by all conditions within:

  • Enabled flag
  • Processing location
  • Standard troubleshooting queries to be executed for triggered alerts.
  • Shared resource type identity
  • Whether and how AI agent should be handling alerts
NameTypeDescription
enabledboolEnabled controls whether conditions within are active or not.
processing_locationPolicySpec.ProcessingLocationDecides whether alerting is executed in backend or at the edge. This field cannot be modified.
resource_identityPolicySpec.ResourceIdentityResource identity shared by all conditions/alerts within policy.
supporting_queriesrepeated PolicySpec.SupportingAlertQueryList of all supporting queries to be executed for alerts within Policy.
ai_agentPolicySpec.AIAgentHandlingDefines AI agent handling for alerts within this policy

PolicySpec.AIAgentHandling Message

AIAgentHandling defines instructions for AI agent how to handle alerts generated within current Policy.

NameTypeDescription
enabledboolWhether AI agent handling is enabled.
enabled_connectivityboolWhether AI agent is allowed to SSH into alerting resource for further investigation outside of defined queries. To have an effect, it is necessary to specify edge_connectivity field.
auto_accept_remediationboolWhether remediation’s proposed by AI agent should be automatically accepted without operator consent (full autonomous mode).
edge_connectivityPolicySpec.AIAgentHandling.EdgeConnectivityDescribes how to connect to alerting resource in a context of Alert.
remediation_optionsrepeated PolicySpec.AIAgentHandling.RemediationSpecifies list of suggested remediations for AI agent to apply

PolicySpec.AIAgentHandling.EdgeConnectivity Message

EdgeConnectivity describes means of accessing alerting resource for troubleshooting purposes.

NameTypeDescription
device_sshPolicySpec.AIAgentHandling.EdgeConnectivity.DeviceSSHDevice SSH connectivity
proxies_sshPolicySpec.AIAgentHandling.EdgeConnectivity.ProxiesSSHProxies SSH connectivity
pod_sshPolicySpec.AIAgentHandling.EdgeConnectivity.PodSSHPod SSH connectivity
allowed_binsrepeated stringOptional list of allowed binaries that AI agent can use. This can be used to restrict potential errors, or indicate what utils are available.

PolicySpec.AIAgentHandling.EdgeConnectivity.DeviceSSH Message

DeviceSSH informs that AI agent can SSH into alerting resource using standard droplet-exposed SSH tunnel. It is necessary to provide LabelInfo with device_id key in resource identity, but its possible to use DeviceSSH connectivity for non-Device alerts too. It is only necessary that alerting resource runs a droplet process.

NameTypeDescription
client_namestringClient name for self-identification. Can be any unique name like “llm-alerting-agent”.

PolicySpec.AIAgentHandling.EdgeConnectivity.PodSSH Message

PodSSH can be used if application is running as a Pod supported by droplet. TODO: Not implemented

NameTypeDescription
client_namestringClient name for self-identification. Can be any unique name like “llm-alerting-agent”.
usernamestringUsername to use.

PolicySpec.AIAgentHandling.EdgeConnectivity.ProxiesSSH Message

ProxiesSSH informs that AI agent can SSH into alerting resource using proxies service, standard SSH connectivity messages. It is assumed that some process on alerting resource is connected to proxies exposing SSH tunnel. Refer to Connect method in Proxies.

NameTypeDescription
service_domainstringService domain to use in Connect request.
provider_name_tmplstringProvider name template to use in Connect request. All substrings <$LABEL_KEY> will be replaced according to the resource_identity.labels field, plus special <project_id> and <region_id>.
client_namestringClient name for self-identification. Can be any unique name like “llm-alerting-agent”.
service_namestringService name to use in Connect request.

PolicySpec.AIAgentHandling.Remediation Message

Remediation indicates option available to AI agent.

NameTypeDescription
fix_in_sshPolicySpec.AIAgentHandling.Remediation.FixInSSHFixInSSH remediation type.
rebootPolicySpec.AIAgentHandling.Remediation.RebootReboot remediation type. It can be specified only if resource identity points to devices.edgelq.com/Device, and if pod_id is specified as one of the available labels.

PolicySpec.AIAgentHandling.Remediation.FixInSSH Message

FixInSSH declares that issue should be fixed using SSH shell. AI Agent should provide a command to execute in shell. This option can be used only if EdgeConnectivity is specified.

NameTypeDescription
nonenonenone

PolicySpec.AIAgentHandling.Remediation.Reboot Message

Reboot is a special type of remediation applicable only and only for pods -> it is necessary to provide LabelInfo with pod_id key. Pod will be restarted to remediate an issue.

NameTypeDescription
nonenonenone

PolicySpec.ResourceIdentity Message

ResourceIdentity informs which MAIN resource type is generating time series/logs on which conditions are built. For core EdgeLQ, ResourceIdentity must point always to devices.edgelq.com/Device resource, even if we are creating policy for applications.edgelq.com/Pod conditions. 3rd party services can pick something else. In EdgeLQ, it will be necessary to create separate Policy objects, if one is for Device conditions, and other for Pod conditions. Both will point to devices.edgelq.com/Device as main resource identity, both will have to specify device_id LabelInfo. Second one will have to specify pod_id LabelInfo.

NameTypeDescription
alerting_resourcestring (reference to Resource)Reference to primary alerting resource kind. For EdgeLQ, it is services/devices.edgelq.com/resources/Device resource. Pods belong to device, so everything is device scoped. 3rd party services can provide different resource type.
labelsrepeated PolicySpec.ResourceIdentity.LabelInfoAll interesting labels that can be found in ALL Log/Ts Conditions group by fields within Policy. It is necessary to provide labels to at least satisfy name pattern of main alerting_resource. It is optional to provide more labels, in order to identify auxiliary resources. By default, there are 2 built-in LabelInfo objects: * key: “project_id”, points to project name segment. It is mapped to project of TimeSeries or Log object * key: “region_id”, points to region name segment. It is mapped to region of TimeSeries or Log object.
name_patternsrepeated stringList of name patterns of main alerting resource kind. Note that all name segments (divided by each even “/” character) must be satisfied within labels.mapped_name_segment fields, with exception of “project” and “region”, which are built-in. TODO: As of now, only one pattern. However, it should be possible to deduce name patterns from meta.goten.com service, so they are not provided here at all. Name pattern must conform to standard goten style name pattern. For example, name pattern of devices.edgelq.com/Device is “projects/{project}/regions/{region}/devices/{device}”.

PolicySpec.ResourceIdentity.LabelInfo Message

LabelInfo binds a label from Log/TimeSeries object into specific name segment of a resource associated with an Alert raised within current Policy. Multiple LabelInfo instances within ResourceIdentity are used to reconstruct full resource names. For example, resource type devices.edgelq.com/Device has a single known name pattern projects/{project}/regions/{region}/devices/{device}. There are 3 name segments: project, region, and device. Segments “project” and “region” are built-in always and dont have to be defined. Policy owner will have to provide single LabelInfo in this case, for device segment only. LabelInfo may be used to point to other auxiliary resources. For example, if Policy focuses on conditions for applications.edgelq.com/Pod resource type, administrator can create Policy with 2 LabelInfo objects: One with device_id as primary key, because it will be Device generating all time series (also for pods), then other LabelInfo must contain object with key equal to pod_id.

NameTypeDescription
keystringLabel key that must be present in TsCondition/LogCondition group by fields list. Refer to labels defined in relevant monitoring.edgelq.com/MonitoredResourceDescriptor, monitoring.edgelq.com/MetricDescriptor, or logging.edgelq.com/LogDescriptor resources for which you want to create conditions. Note that “key” must match exactly one of a labels (byte to byte) specified in interesting descriptors. For example, in MonitoredResourceDescriptor of type devices.edgelq.com/Device you may find label with key “device_id”. This must be specified in LabelInfo.key if you want to create Policy focusing on Device resource.
contextsrepeated PolicySpec.ResourceIdentity.LabelInfo.UsageContextList of all contexts where label with specified key can be found. It may be more than one position. For example device_id label can be found in LogDescriptor or MonitoredResourceDescriptor. In this case, we need to set 2 values in contexts field: RESOURCE_LABEL and LOG_LABEL.
mapped_name_segmentstringName segment value in name pattern. This is always lowerSingularCamelCase resource type name. For example, for LabelInfo with key device_id, if it points to devices.edgelq.com/Device resource type, mapped_name_segment must be equal to “device” value (which is lower camel case).

PolicySpec.SupportingAlertQuery Message

SupportingAlertQuery specifies a common supporting troubleshooting query that can be used to investigate any Alert within current Policy. This is especially important for alerts handling by AI agent. Outputs from these queries can be used by AI agents.

Important: Many query spec string fields have _template suffix. It means that their values may contain variable values that are replaced for each specific Alert instance. Those variables have a format: <$LABEL_KEY>, where $LABEL_KEY must be one of the label keys specified in resource_identity field. For example, if we can have a Policy like this: { “resourceIdentity”: { “alertingResource”: “services/devices.edgelq.com/resources/Device”, “labels”: [ { “key”: “device_id”, “contexts”: [RESOURCE_LABEL, LOG_LABEL], “mappedNameSegment”: “device” } ], “namePatterns”: [“projects/{project}/regions/{region}/devices/{device}”] }, “supportingQueries”: [ { “tsQuery”: { “description”: “…” “filterTemplate”: “metric.type="devices.edgelq.com/Device/connected" AND resource.labels.device_id="<device_id>"” “aggregation”: {…} } } ] } In above example, we define one LabelInfo with device_id field. Therefore, alerting service will find and replace each substring <device_id> with specific value from Alert resource. If we have Alert with label device_id = “test-x”, Alerting service will execute TimeSeries query with filter metric.type="devices.edgelq.com/Device/connected" AND resource.labels.device_id="test-x"" Note that values <project_id> and <region_id> are always built-in, and will expand to project/region indicated by Alert.

NameTypeDescription
ts_queryPolicySpec.SupportingAlertQuery.TsQueryTime Series query
log_queryPolicySpec.SupportingAlertQuery.LogQueryLog query
rest_get_queryPolicySpec.SupportingAlertQuery.RestGetQueryRest Get query
rest_list_queryPolicySpec.SupportingAlertQuery.RestListQueryRest List query

PolicySpec.SupportingAlertQuery.LogQuery Message

LogQuery describes Log query to execute for each specific alert. Time interval will be set around alert time.

NameTypeDescription
descriptionstringQuery description.
filter_templatestringLog filter template. All substrings <$LABEL_KEY> will be replaced according to the resource_identity.labels field.

PolicySpec.SupportingAlertQuery.RestGetQuery Message

RestGetQuery allows to fetch specific resource body to be included in investigation data. It is optimized for fetching resources from EdgeLQ style services. It is not possible as of now to use GRPC API, because alerting resource can be used by 3rd party service on top of EdgeLQ platform.

NameTypeDescription
descriptionstringDescription of resource we are fetching
endpointstringEndpoint (with scheme) from which we want to fetch resource. For example, it can be https://devices.apis.edgelq.com value, if we want to access a resource from devices.edgelq.com service. Endpoint may differ depending on environment (production or staging). TODO: Replace with reference to meta.goten.com/Service
path_templatestringPath template to be appended to access specific resource. EdgeLQ based services use standard paths for Get requests. It is: /$API_VERSION/$RESOURCE_NAME. For example, path_template for devices.edgelq.com/Device resource in version v1, path_template must have a format: “/v1/projects/<project_id>/regions/<region_id>/devices/<device_id>”. All substrings <$LABEL_KEY> will be replaced according to the resource_identity.labels field.
viewstringIt must be NAME, BASIC, DETAIL or FULL - like in each standard Get request in EdgeLQ based platform.
field_maskstringList of additional fields to obtain on top of those defined within view. Fields must be comma separated, and use lower_snake_case notion.

PolicySpec.SupportingAlertQuery.RestListQuery Message

RestListQuery allows to fetch specific list of resource bodies to be included in investigation data. It is optimized for fetching resources from EdgeLQ style services. It is not possible as of now to use GRPC API, because alerting resource can be used by 3rd party service on top of EdgeLQ platform.

NameTypeDescription
descriptionstringDescription of resources we are fetching
endpointstringEndpoint (with scheme) from which we want to fetch resource. For example, it can be https://applications.apis.edgelq.com value, if we want to access a resource from applications.edgelq.com service. Endpoint may differ depending on environment (production or staging). TODO: Replace with reference to meta.goten.com/Service
path_templatestringPath template to be appended to access specific resource. EdgeLQ based services use standard paths for List requests. It is: /$API_VERSION/$RESOURCE_PARENT_NAME/$PLURAL_RESOURCE_TYPE_NAME. For example, to fetch list of pods (applications.edgelq.com service), we would use path_template like this: “/v1/projects/<project_id>/regions/<region_id>/pods”. All substrings <$LABEL_KEY> will be replaced according to the resource_identity.labels field.
viewstringIt must be NAME, BASIC, DETAIL or FULL - like in each standard List request in EdgeLQ based platform.
field_maskstringList of additional fields to obtain on top of those defined within view. Fields must be comma separated, and use lower_snake_case notion.
filter_templatestringOptional filter template to be used to filter collection. For example, if we want to obtain list of pods running on a device, we should populate it with value: “spec.node="projects/<project_id>/regions/<region_id>/devices/<device_id>"”.

PolicySpec.SupportingAlertQuery.TsQuery Message

TsQuery describes TimeSeries query to execute for each specific alert. Time interval will be set around alert time.

NameTypeDescription
descriptionstringQuery description.
filter_templatestringTimeSeries filter template. All substrings <$LABEL_KEY> will be replaced according to the resource_identity.labels field.
aggregationAggregationTimeSeries aggregation object.

PolicyTemplateChange Message

PolicyTemplateChange is used by Watch notifications Responses to describe change of single PolicyTemplate One of Added, Modified, Removed

NameTypeDescription
addedPolicyTemplateChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedPolicyTemplateChange.ModifiedModified is returned when watched document is modified
currentPolicyTemplateChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedPolicyTemplateChange.RemovedRemoved is returned when PolicyTemplate is deleted or leaves Query view

PolicyTemplateChange.Added Message

PolicyTemplate has been added to query view

NameTypeDescription
policy_templatePolicyTemplate
view_indexint32Integer describing index of added PolicyTemplate in resulting query view.

PolicyTemplateChange.Current Message

PolicyTemplate has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
policy_templatePolicyTemplate

PolicyTemplateChange.Modified Message

PolicyTemplate changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of PolicyTemplate)Name of modified PolicyTemplate
policy_templatePolicyTemplateNew version of PolicyTemplate or masked difference, depending on mask_changes instrumentation of issued [WatchPolicyTemplateRequest] or [WatchPolicyTemplatesRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified PolicyTemplate. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying PolicyTemplate new index in resulting query view.

PolicyTemplateChange.Removed Message

Removed is returned when PolicyTemplate is deleted or leaves Query view

NameTypeDescription
namestring (name of PolicyTemplate)
view_indexint32Integer specifying removed PolicyTemplate index. Not populated in stateless watch type.

TsCndSpec Message

TsCndSpec defines time series queries and thresholds/anomaly detectors.

NameTypeDescription
queriesrepeated TsCndSpec.QueryList of observed queries. Each by default can raise alert by threshold. If anomaly detectors are specified, they try to learn all time series together.
query_group_byrepeated stringList of group by labels applied to all queries. Each unique combination of group_by is tracked separately. It has its own adaptive thresholds, its own anomaly detectors. One such representation has a form of resource TsEntry. Group by fields must define all labels defined in Policy.
threshold_alertingTsCndSpec.ThresholdAlertingCfgThreshold alerting configuration
anomaly_alertingrepeated TsCndSpec.AnomalyAlertingCfgAll anomaly detectors. Its possible to define multiple detectors with different analysis window. It is advisable to create one detector catching long window (1 day, step interval 15 minutes), followed by small window (15 minutes, step interval 1 minute). This should catch sudden and small anomalies, along with long term unexpected changes. Maintaining long window (1 day) along with small interval (1 minute) would be too costly. Other option detectors may be: 1 day / 30 minutes + 30 minutes / 1 minute.

TsCndSpec.AnomalyAlertingCfg Message

AnomalyDetector defines AI/ML based anomaly detector. It can catch anomalies that are more sophisticated than max/min thresholds.

NameTypeDescription
analysis_window.google.protobuf.DurationSliding analysis window observed at once by AI model. For larger windows, it is highly advisable for query_ap to be accordingly larger.
step_interval.google.protobuf.DurationDuration of each time step in sliding analysis window. Anomaly detection is run after each step.
train_step_interval.google.protobuf.DurationIt is like step interval, but special used for training only. For example, we may want to run anomaly detection of size 30 minutes each 5 minutes. But in training, to reduce number of batches, we may prefer larger value, like 15 minutes or maybe even 30.
alignment_period.google.protobuf.DurationGranularity of data points within each step.
lstm_autoencoderTsCndSpec.AnomalyAlertingCfg.LstmAutoEncoder
raise_after.google.protobuf.Duration
silence_after.google.protobuf.Duration

TsCndSpec.AnomalyAlertingCfg.LstmAutoEncoder Message

LstmAutoEncoder defines LSTM AutoEncoder model for anomaly detection.

NameTypeDescription
hidden_sizeint32Hidden size. Larger increases model size.
learn_ratedoubleLearn rate used in Adam optimizer. This is suggested value. System may iterate other well known working values for best detection.
max_training_epochsint32Maximum number of epochs after which training must stop.
min_training_epochsint32Minimum number of training epochs model must train.
acceptable_training_errordoubleMinimum acceptable error after training stops. When it is achieved, check samples are used to determine actual error rates. Too large value may cause overfit. This is suggested value. System may find other values giving better results.
training_period.google.protobuf.DurationHow much time must be obtained for training purposes.
check_period_fractiondoubleTraining period, analysis window and training step interval directly influence how many training samples are created. Fraction is then used for detecting practical anomalies and initializing anomaly thresholds.
teacher_force_at_inferenceboolEnables teacher force mode during inference. It greatly reduces false positives, but may silence some actual small anomalies. It is especially important when time series data can change behavior persistently. For example, new workload was added to CPU.

TsCndSpec.Query Message

Query defines a single TimeSeries query and basic alerting thresholds.

NameTypeDescription
namestringQuery description.
filterstring (filter of TimeSerie)Time series query filter
alignerAggregation.AlignerAligner applied on individual TimeSeries.
reducerAggregation.ReducerReducer applied across TimeSeries according to Spec.query_group_by field in the Spec.
max_valuedoubleMaximum value (approximated) that time series values will have for this query. It is a soft value: If higher values are detected, thresholds/anomaly models will adjust to them. If set to 0, it will be auto-detected (heuristic). If time series are negative, max_value should indicate maximum value FROM zero: Therefore, it can be a negative value.

TsCndSpec.ThresholdAlertingCfg Message

ThresholdAlertingCfg describes when alerts of THRESHOLD type must be raised.

NameTypeDescription
operatorTsCndSpec.ThresholdAlertingCfg.OperatorOperator for threshold-type alerts
alignment_period.google.protobuf.DurationAlignment period for data points used to monitor thresholds.
raise_after.google.protobuf.DurationViolation duration after which alert must be raised.
silence_after.google.protobuf.DurationDuration after which Alert stops firing when violations no longer occur. By default, equals to raise_after.
per_query_thresholdsrepeated TsCndSpec.ThresholdAlertingCfg.AlertingThresholdsThresholds per each query (in same order).
adaptive_thresholds_detection_period.google.protobuf.DurationThis field is recommended to be set if adaptive thresholds are used. For each unique group by fields combination, dynamic thresholds will be detected based on historic data of specified length. One week by default.

TsCndSpec.ThresholdAlertingCfg.AlertingThresholds Message

AlertingThresholds represents all thresholds. When they are crossed by time series values, alert will be raised. max_upper and min_lower are active all the time. Adaptive thresholds are active when anomaly detectors are not available (not defined or in training). It is also possible to set min_upper and max_lower thresholds, to avoid adaptive thresholds being to insensitive. Overall, alert is raised when value drops below lower threshold or above upper threshold. Working allowed range is between. Values must always satisfy condition: Upper max > Upper min > Lower max > Lower min

NameTypeDescription
auto_adapt_upperboolWhether upper threshold should be set and adaptive.
auto_adapt_lowerboolWhether lower threshold should be set and adaptive.
max_upperAlertingThresholdMaximum allowed upper threshold. When crossed ABOVE, alert is raised. Can be set to nil, but in that case min_lower is mandatory. Adaptive upper threshold cannot be set above it.
min_lowerAlertingThresholdMinimum allowed lower threshold. When crossed BELOW, alert is raised. Can be set to nil, but in that case max_upper is mandatory. Adaptive lower threshold cannot be set below it.
min_upperAlertingThresholdMinimal allowed adaptive upper threshold. It is applicable only if auto_adapt_upper is true. Adaptive upper threshold cannot be set below it. It must be smaller than max_upper.
max_lowerAlertingThresholdMaximum allowed adaptive lower threshold. It is applicable only if auto_adapt_lower is true. Adaptive lower threshold cannot be set above it. It must be bigger than min_lower.
extra_room_factorfloatExtra room factor for adaptive threshold calculation. This multiplier determines additional buffer space above and below detected min/max values. Formula: buffer = (highest_value - lowest_value) * extra_room_factor. Higher values create more tolerant thresholds, reducing false positives. When both extra_room_factor and extra_room are set, they are combined: total_buffer = (highest_value - lowest_value) * extra_room_factor + extra_room. Default: 0.5
extra_roomfloatAbsolute extra room value for adaptive thresholds. This value is added above the detected maximum and below the detected minimum to create additional buffer space. Unlike extra_room_factor, this is an absolute value rather than a multiplier. Can be used instead of or in addition to extra_room_factor. When both are set, they are combined: total_buffer = (highest_value - lowest_value) * extra_room_factor + extra_room.

TsConditionChange Message

TsConditionChange is used by Watch notifications Responses to describe change of single TsCondition One of Added, Modified, Removed

NameTypeDescription
addedTsConditionChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedTsConditionChange.ModifiedModified is returned when watched document is modified
currentTsConditionChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedTsConditionChange.RemovedRemoved is returned when TsCondition is deleted or leaves Query view

TsConditionChange.Added Message

TsCondition has been added to query view

NameTypeDescription
ts_conditionTsCondition
view_indexint32Integer describing index of added TsCondition in resulting query view.

TsConditionChange.Current Message

TsCondition has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
ts_conditionTsCondition

TsConditionChange.Modified Message

TsCondition changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of TsCondition)Name of modified TsCondition
ts_conditionTsConditionNew version of TsCondition or masked difference, depending on mask_changes instrumentation of issued [WatchTsConditionRequest] or [WatchTsConditionsRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified TsCondition. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying TsCondition new index in resulting query view.

TsConditionChange.Removed Message

Removed is returned when TsCondition is deleted or leaves Query view

NameTypeDescription
namestring (name of TsCondition)
view_indexint32Integer specifying removed TsCondition index. Not populated in stateless watch type.

TsConditionTemplateChange Message

TsConditionTemplateChange is used by Watch notifications Responses to describe change of single TsConditionTemplate One of Added, Modified, Removed

NameTypeDescription
addedTsConditionTemplateChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedTsConditionTemplateChange.ModifiedModified is returned when watched document is modified
currentTsConditionTemplateChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedTsConditionTemplateChange.RemovedRemoved is returned when TsConditionTemplate is deleted or leaves Query view

TsConditionTemplateChange.Added Message

TsConditionTemplate has been added to query view

NameTypeDescription
ts_condition_templateTsConditionTemplate
view_indexint32Integer describing index of added TsConditionTemplate in resulting query view.

TsConditionTemplateChange.Current Message

TsConditionTemplate has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
ts_condition_templateTsConditionTemplate

TsConditionTemplateChange.Modified Message

TsConditionTemplate changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of TsConditionTemplate)Name of modified TsConditionTemplate
ts_condition_templateTsConditionTemplateNew version of TsConditionTemplate or masked difference, depending on mask_changes instrumentation of issued [WatchTsConditionTemplateRequest] or [WatchTsConditionTemplatesRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified TsConditionTemplate. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying TsConditionTemplate new index in resulting query view.

TsConditionTemplateChange.Removed Message

Removed is returned when TsConditionTemplate is deleted or leaves Query view

NameTypeDescription
namestring (name of TsConditionTemplate)
view_indexint32Integer specifying removed TsConditionTemplate index. Not populated in stateless watch type.

TsEntryChange Message

TsEntryChange is used by Watch notifications Responses to describe change of single TsEntry One of Added, Modified, Removed

NameTypeDescription
addedTsEntryChange.AddedAdded is returned when watched document is added, either created or enters Query view
modifiedTsEntryChange.ModifiedModified is returned when watched document is modified
currentTsEntryChange.CurrentCurrent is returned in stateless watch when document enters query view or is modified within.
removedTsEntryChange.RemovedRemoved is returned when TsEntry is deleted or leaves Query view

TsEntryChange.Added Message

TsEntry has been added to query view

NameTypeDescription
ts_entryTsEntry
view_indexint32Integer describing index of added TsEntry in resulting query view.

TsEntryChange.Current Message

TsEntry has been added or modified in a query view. Version used for stateless watching

NameTypeDescription
ts_entryTsEntry

TsEntryChange.Modified Message

TsEntry changed some of it’s fields - contains either full document or masked change

NameTypeDescription
namestring (name of TsEntry)Name of modified TsEntry
ts_entryTsEntryNew version of TsEntry or masked difference, depending on mask_changes instrumentation of issued [WatchTsEntryRequest] or [WatchTsEntriesRequest]
field_mask.google.protobuf.FieldMaskUsed when mask_changes is set, contains field paths of modified properties.
previous_view_indexint32Previous view index specifies previous position of modified TsEntry. When modification doesn’t affect sorted order, value will remain identical to [view_index].
view_indexint32Integer specifying TsEntry new index in resulting query view.

TsEntryChange.Removed Message

Removed is returned when TsEntry is deleted or leaves Query view

NameTypeDescription
namestring (name of TsEntry)
view_indexint32Integer specifying removed TsEntry index. Not populated in stateless watch type.

WatchAlertDataRequest Message

A request message of the WatchAlertData method. This is special combined watch of 5 streams dedicated specifically for edge alerter component. It reduces number of watch streams and therefore connections maintained by server (and slightly agent).

NameTypeDescription
projectstring (name of Project)
alerting_resource_namestring
alerting_resource_kindstring

WatchAlertDataResponse Message

A response message of the WatchAlertData method.

NameTypeDescription
alerts_to_addrepeated Alert
ts_entries_to_addrepeated TsEntry
policies_to_addrepeated Policy
ts_cnds_to_addrepeated TsCondition
log_cnds_to_addrepeated LogCondition
alert_names_to_removerepeated string (name of Alert)
ts_entry_names_to_removerepeated string (name of TsEntry)
policy_names_to_removerepeated string (name of Policy)
ts_cnd_names_to_removerepeated string (name of TsCondition)
log_cnd_names_to_removerepeated string (name of LogCondition)
reset_alertsbool
reset_ts_entriesbool
reset_policiesbool
reset_ts_cndsbool
reset_log_cndsbool

Alerting Service Shared Enumerations

Here is the list of Alerting service shared enumerations:

LogCndSpec.Query.CompositeTrigger.Operator Enumeration

Operator informs if only one trigger must be satisfied to trigger an Alert, or all.

NameDescription
UNDEFINEDUNDEFINED is not allowed
ANDAND tells that all triggers must be on for Alert to be created
OROR tells that Alert should be raised based on any trigger condition.

NotificationChannelSpec.EventKind Enumeration

EventKind specifies interesting alert state change which may trigger a notification generation.

NameDescription
UNDEFINEDUndefined is not allowed
NEW_FIRINGThis kind must be used if we want to generate a notification for a new firing alert.
AI_ESCALATED_TO_OPERATORThis kind must be used if we want to generate a notification for an alert that has been pushed to Operator (escalated by AI Agent).
AI_REMEDIATION_AWAITING_APPROVALThis kind must be used if we want to generate a notification for an alert which received remediation recommendation by AI Agent, and which requires operator approval.
AI_IGNORED_AS_TMPThis kind must be used if we want to generate a notification for an alert which has been considered as a temporary violation by AI Agent.
AI_ADJUSTED_ENTRIESThis kind must be used if we want to generate a notification for an alert which has been considered as a false positive, and for which alerting thresholds should be adjusted.
AI_REMEDIATION_APPLIEDThis kind must be used if we want to generate a notification for an alert for which AI agent applied recommendation.
OP_REMEDIATION_APPLIEDThis kind must be used if we want to generate a notification for an alert for which operator applied recommendation.
STOPPED_FIRINGThis kind must be used if we want to generate a notification for an alert that stopped firing.

NotificationChannelSpec.Type Enumeration

Type of NotificationChannel

NameDescription
TYPE_UNSPECIFIEDType is unknown
EMAILEmail NotificationChannel
SLACKSlack NotificationChannel
WEBHOOKWebhook NotificationChannel

NotificationMsg.AlertsGroup.ConditionAlerts.Alert.Type Enumeration

NameDescription
UNDEFINED
TS_BASED_ANOMALY
TS_BASED_THRESHOLD
LOG_BASED

PolicySpec.ProcessingLocation Enumeration

ProcessingLocation indicates if alerts should be detected on Edge or in backend. Edge may be preferred for various reasons:

  • Alerts can be raised closer to the source.
  • Conditions can use more sophisticated methods, like local small AI anomaly detector models. In backend, performance may not be guaranteed, if there are a lot of pending trainings. Backend is preferred when:
  • We want to alert based on metrics that dont make sense on edge (like connectivity).
  • Alerting resoucrce is not “edge” type. For example, we monitor some network targets monitored by multiple distributed probes.
NameDescription
UNDEFINEDUNDEFINED is invalid
BACKENDAlerts will be detected and generated in the backend.
EDGEAlerts will be detected and generated on the edge.

PolicySpec.ResourceIdentity.LabelInfo.UsageContext Enumeration

UsageContext exact descriptor type where label key can be found.

NameDescription
UNDEFINEDUNDEFINED - not allowed
METRIC_LABELIndicates that label of given key can be found in monitoring.edgelq.com/MetricDescriptor resource.
RESOURCE_LABELIndicates that label of given key can be found in monitoring.edgelq.com/MonitoredResourceDescriptor resource.
LOG_LABELIndicates that label of given key can be found in logging.edgelq.com/LogDescriptor resource.

TsCndSpec.ThresholdAlertingCfg.Operator Enumeration

Operator informs if whether all or one of queries must be crossed for alert to be generated.

NameDescription
UNDEFINEDUNDEFINED is not allowed
ANDAND indicates that all thresholds must be crossed for alert ti be triggered.
OROR indicates that Alert should be raised if any of queries violates threshold.