Skip to main content

project_alert_management_alert

Gets or lists a project_alert_management_alert resource.

Overview​

Nameproject_alert_management_alert
TypeResource
Idgitlab.projects.project_alert_management_alert

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
idstringID of the alert.
namestringName or title of the object.
created_atstringTimestamp the alert was created.
descriptionstringDescription of the alert.
detailsstringAlert details.
details_urlstringURL of the alert detail page.
ended_atstringTimestamp the alert ended.
event_countintegerNumber of events of the alert.
hostsarray
iidstringInternal ID of the alert.
monitoring_toolstringMonitoring tool the alert came from.
runbookstringRunbook for the alert as defined in alert details.
servicestringService the alert came from.
severitystringSeverity of the alert. (CRITICAL, HIGH, MEDIUM, LOW, INFO, UNKNOWN)
started_atstringTimestamp the alert was raised.
statusstringStatus of the alert. (TRIGGERED, ACKNOWLEDGED, RESOLVED, IGNORED)
titlestringTitle of the alert.
updated_atstringTimestamp the alert was last updated.
web_urlstringURL of the alert.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfull_path, hostassignee_username, domain, iid, search, sortA single Alert Management alert of the project. Generated from the GitLab GraphQL schema field Project.alertManagementAlert (AlertManagementAlert).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
full_pathstringFull path of the project, for example gitlab-org/gitlab
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
assignee_usernamestringUsername of a user assigned to the issue.
domainstringFilter query for given domain.
iidstringIID of the alert. For example, "1".
sortstringSort alerts by the criteria.

SELECT examples​

A single Alert Management alert of the project. Generated from the GitLab GraphQL schema field Project.alertManagementAlert (AlertManagementAlert).

SELECT
id,
name,
created_at,
description,
details,
details_url,
ended_at,
event_count,
hosts,
iid,
monitoring_tool,
runbook,
service,
severity,
started_at,
status,
title,
updated_at,
web_url
FROM gitlab.projects.project_alert_management_alert
WHERE full_path = '{{ full_path }}' -- required
AND host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND assignee_username = '{{ assignee_username }}'
AND domain = '{{ domain }}'
AND iid = '{{ iid }}'
AND search = '{{ search }}'
AND sort = '{{ sort }}'
;