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

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

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

문제 신고

조건부 논리

switch 문을 사용하여 이전 단계의 데이터를 기반으로 결정을 내리세요.

switch 문이 가능하게 하는 것:

  • 조건에 따라 의사결정 트리를 생성합니다.
  • 데이터 값에 따라 라우팅 실행을 여러 단계로 나눕니다.
  • 여러 조건을 순차적으로 평가합니다.
  • 조건이 일치하지 않을 때의 기본 동작을 정의합니다.

데이터를 사용한 조건 논리

steps:
- name: checkCPU
type: action
action: newrelic.nerdgraph.execute
version: 1
# ... query configuration
- name: decideAction
type: switch
switch:
- condition: "${{ .steps.checkCPU.outputs.data.actor.account.nrql.results[0].average > 90 }}"
next: resizeInstance
- condition: "${{ .steps.checkCPU.outputs.data.actor.account.nrql.results[0].average > 70 }}"
next: sendWarning
next: normalOperation
- name: resizeInstance
type: action
action: aws.ec2.modifyInstanceAttribute
version: 1
# ... resize configuration
- name: sendWarning
type: action
action: slack.chat.postMessage
version: 1
# ... warning message
- name: normalOperation
type: action
action: newrelic.ingest.sendLogs
version: 1
# ... log normal status

무엇 향후 계획

Copyright © 2026 New Relic Inc.

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