• /
  • EnglishEspañolFrançais日本語한국어Português
  • 로그인지금 시작하기

사용자의 편의를 위해 제공되는 기계 번역입니다.

영문본과 번역본이 일치하지 않는 경우 영문본이 우선합니다. 보다 자세한 내용은 이 페이지를 방문하시기 바랍니다.

문제 신고

기준 NRQL 조건 생성

|View as Markdown (English)

작업 식별자는 newrelic.alerts.createBaselineNrqlCondition입니다.

공지 정책 아래에 새로운 기준 NRQL 공지 조건을 생성합니다. 기준 조건은 과거 동작을 기반으로 신호의 예상 범위를 동적으로 예측하며, 실시간 신호가 구성된 임계값 이상으로 예측된 기준에서 벗어날 때 위반을 엽니다.

terms 또는 expiration (openViolationOnExpiration: true 포함) 중 적어도 하나를 제공해야 합니다. 둘 다 생략하면 NerdGraph 유효성 검사에 실패합니다.

다음 표는 이 작업에 사용할 수 있는 모든 입력 필드를 설명합니다.

입력

유형

설명

예시

회계처리

Int

필수 항목입니다.

조건을 생성할 뉴렐릭 계정입니다.

123456

policyId

문자열

필수 항목입니다.

이 조건을 연결할 공지 정책의 ID입니다.

"2000002"

이름

문자열

필수 항목입니다.

조건의 이름입니다.

"Anomalous throughput"

nrqlQuery

문자열

필수 항목입니다.

평가할 NRQL 쿼리입니다.

"SELECT count(*) FROM Transaction WHERE appName = 'MyApp'"

활성화

부울

필수 항목입니다.

조건의 활성화 여부입니다.

true

baselineDirection

문자열

필수 항목입니다.

위반을 트리거하는 편차의 방향입니다.

UPPER_ONLY

,

LOWER_ONLY

또는

UPPER_AND_LOWER

중 하나입니다.

"UPPER_ONLY"

용어

목록

조건부 필수입니다.

기준으로부터의 백분율 편차로 표시되는 조건의 임계값입니다.

expiration

이(가)

openViolationOnExpiration: true

와(과) 함께 제공되지 않는 한 필수입니다. 각 항목:

priority

(

CRITICAL

또는

WARNING

),

operator

(

ABOVE

만 해당 — 방향은

baselineDirection

에 의해 제어됩니다),

threshold

(플롯, 백분율 편차),

thresholdDuration

(초),

thresholdOccurrences

(

ALL

또는

AT_LEAST_ONCE

).

[{"priority": "CRITICAL", "operator": "ABOVE", "threshold": 20, "thresholdDuration": 300, "thresholdOccurrences": "ALL"}]

nrqlDataAccountId

Int

선택 사항.

accountId

과(와) 다른 경우 NRQL 쿼리를 실행할 계정입니다.

123456

시그널 계절성

문자열

선택 사항.

기준의 예측 모델에 적용된 계절적 패턴입니다.

NEW_RELIC_CALCULATION

(기본값),

HOURLY

,

DAILY

,

WEEKLY

또는

NONE

중 하나입니다.

"NEW_RELIC_CALCULATION"

description

문자열

선택 사항.

조건에 대한 자유 텍스트 설명입니다.

"Alerts when throughput deviates from its baseline."

runbookUrl

문자열

선택 사항.

조건에서 연결할 런북의 URL입니다.

"https://runbooks.example.com/anomalous-throughput"

titleTemplate

문자열

선택 사항.

위반 제목에 대한 핸들바 스타일 템플릿입니다.

"{{ conditionName }} on {{ entity.name }}"

violationTimeLimitSeconds

Int

선택 사항.

이 초 수 이후에 열려 있는 위반을 강제로 닫습니다.

86400

신호

지도

선택 사항.

고급 신호 및 스트리밍 설정. 필드 설명은

createStaticNrqlCondition

을(를) 참조하십시오.

{"aggregationWindow": 60, "aggregationMethod": "EVENT_FLOW", "aggregationDelay": 120}

만료

지도

선택 사항.

신호 손실 설정입니다. 필드 설명은

createStaticNrqlCondition

을(를) 참조하십시오.

{"closeViolationsOnExpiration": true, "expirationDuration": 300, "openViolationOnExpiration": false}

selectors

목록

선택 사항.

응답에서 값을 추출하기 위한 JQ 선택자입니다.

selectors:
- name: conditionId
expression: ".data.alertsNrqlConditionBaselineCreate.id"

다음 표는 이 작업에서 반환된 모든 출력 필드를 설명합니다.

산출

유형

설명

success

부울

true

단계가 오류 없이 실행되었을 때.

errorMessage

문자열

NerdGraph 오류를 포함한 실패 시 오류 메시지입니다. 성공 시

null

입니다.

data

지도

NerdGraph 응답. data에서 id, name, enabled, policyId, entityGuid, type 또는 baselineDirection을(를) 추출하려면 selectors을(를) 사용하십시오.

{
"data": {
"alertsNrqlConditionBaselineCreate": {
"id": "7654322",
"name": "Anomalous throughput",
"enabled": true,
"policyId": "2000002",
"entityGuid": "MTE5MzMzNDd8TlIxfE5SUV9DT05EQVRJT058NzY1NDMyMg",
"type": "BASELINE",
"baselineDirection": "UPPER_ONLY"
}
}
}

다음 예제는 처리량이 예상 범위를 상회할 때 알림을 보내는 기준 NRQL 조건을 생성합니다.

워크플로 예

name: create_baseline_nrql_condition
description: Create a baseline NRQL alert condition
steps:
- name: createBaselineCondition
type: action
action: newrelic.alerts.createBaselineNrqlCondition
version: 1
inputs:
accountId: ${{ .workflowInputs.accountId }}
policyId: ${{ .workflowInputs.policyId }}
name: "Anomalous throughput"
nrqlQuery: "SELECT count(*) FROM Transaction WHERE appName = 'MyApp'"
enabled: true
baselineDirection: "UPPER_ONLY"
terms:
- priority: "WARNING"
operator: "ABOVE"
threshold: 20
thresholdDuration: 600
thresholdOccurrences: "ALL"
selectors:
- name: conditionId
expression: ".data.alertsNrqlConditionBaselineCreate.id"
next: end
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.