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

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

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

문제 신고

JSON 파싱

뉴렐릭 상태 API 에서 JSON을 가져오고, 구성 요소 상태를 구문 분석하고, 로그인 문제를 처리합니다.

요구 사항:

  • API 접근 상태.
  • 로그 수집 권한.

이 흐름이 하는 일은:

  • 뉴렐릭 상태 API에서 JSON 데이터를 가져옵니다.
  • 구성 요소를 작동 상태에 따라 추출하고 분류합니다.
  • 조건부로 운영 구성 요소를 테스트합니다(활성화된 경우)
  • 비작동 구성 요소를 조건부로 로그합니다(활성화된 경우)
  • HTTP 오류를 처리하고 로그인을 했습니다.

주요 작업: http.get, newrelic.ingest.sendLogs

name: parse_status_api
steps:
- name: fetchStatus
type: action
action: http.get
version: 1
inputs:
url: 'https://status.newrelic.com/api/v2/summary.json'
selectors:
- name: operational
expression: '.components[] | select(.status == "operational") | .name'
- name: degraded
expression: '.components[] | select(.status != "operational") | .name'
- name: logNonOperational
type: action
action: newrelic.ingest.sendLogs
version: 1
inputs:
logs:
- message: 'Services with issues: ${{ .steps.fetchStatus.outputs.degraded | tostring }}'
attributes:
operationalServices: ${{ .steps.fetchStatus.outputs.operational }}

무엇 향후 계획

Copyright © 2026 New Relic Inc.

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