Fetch JSON from New Relic status API, parse component statuses, and log issues.
Requirements:
- Status API access.
- Log ingest permissions.
What this workflow does:
- Fetches JSON data from the New Relic status API
- Extracts and categorizes components by their operational status
- Conditionally logs operational components (if enabled)
- Conditionally logs non-operational components (if enabled)
- Handles HTTP errors and logs error messages
Key actions: 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 }}What's next
- Workflow inputs: Pass dynamic values at runtime
- Data passing: Chain actions together