Skip to content

Add NiFi Agent Integration PoC (AI-6667)#23001

Draft
philjlee wants to merge 3 commits intomasterfrom
philip.lee/AI-6667-nifi-poc
Draft

Add NiFi Agent Integration PoC (AI-6667)#23001
philjlee wants to merge 3 commits intomasterfrom
philip.lee/AI-6667-nifi-poc

Conversation

@philjlee
Copy link

Summary

  • Docker-based proof of concept for the NiFi Agent Integration RFC (AI-6667)
  • Runs NiFi 2.8.0 in Docker with single-user auth, creates test flows via REST API, and queries all 7 monitoring endpoints the integration will use
  • Validates that the NiFi REST API provides all metrics needed: JVM/GC stats, flow status, recursive process group status (processors + connections in one call), cluster summary, bulletins (errors/warnings)
  • Saved pretty-printed API responses in nifi/poc/responses/ for reference during implementation

Test plan

  • Run cd nifi/poc && ./scripts/run-poc.sh — starts NiFi in Docker, creates test flows, collects all API responses
  • Verify all 7 endpoints return HTTP 200 with valid data
  • Verify bulletins appear from the error-path flow (PutFile to /nonexistent)
  • Tear down with cd nifi/poc && docker compose down -v

Docker-based proof of concept demonstrating that the NiFi REST API
provides all metrics needed for a Datadog Agent integration. Runs
NiFi 2.8.0 in Docker with single-user auth, creates test flows
via REST API, and queries all monitoring endpoints.

Endpoints validated: /flow/about, /system-diagnostics, /flow/status,
/flow/process-groups/root/status?recursive=true, /flow/cluster/summary,
/flow/bulletin-board, /system-diagnostics/jmx-metrics.
@github-actions
Copy link
Contributor

⚠️ Recommendation: Add qa/skip-qa label

This PR does not modify any files shipped with the agent.

To help streamline the release process, please consider adding the qa/skip-qa label if these changes do not require QA testing.

@philjlee philjlee marked this pull request as draft March 20, 2026 18:02
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cfe5083a3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +16 to +19
if [ -z "$TOKEN" ] || [ "$TOKEN" = "null" ]; then
echo "ERROR: Failed to obtain auth token"
exit 1
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Validate token response status before continuing setup

This authentication check only rejects empty/null bodies, but NiFi can return a non-empty error payload on failed login (for example, wrong credentials or auth not fully initialized), which will be treated as a valid bearer token. In that case the script proceeds, downstream jq -r '.id' calls resolve to null, and the run can appear successful while no processors were actually created. The setup flow should fail fast by checking the HTTP status from /access/token (and ideally validating IDs after create calls).

Useful? React with 👍 / 👎.

Handle curl connection failures in collect() by defaulting http_code
to "000" on error, preventing temp file orphans under set -e.
Add JMX metrics endpoint to README table with note about empty results.
- Check HTTP status code (201) on token requests instead of just
  checking for empty/null body, catching HTML error responses
- Add require_id() validation after every processor/connection
  creation to fail fast with clear errors
- Re-collected API responses from fresh Docker run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant