ChrisSamo632 commented on code in PR #6658:
URL: https://github.com/apache/nifi/pull/6658#discussion_r1103566353
##########
nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-client-service/src/main/java/org/apache/nifi/elasticsearch/ElasticSearchClientServiceImpl.java:
##########
@@ -220,16 +285,36 @@ public List<ConfigVerificationResult> verify(final
ConfigurationContext context,
.explanation("Elasticsearch Rest Client not
configured");
warningsResult.outcome(ConfigVerificationResult.Outcome.SKIPPED)
.explanation("Elasticsearch Rest Client not
configured");
+ snifferResult.outcome(ConfigVerificationResult.Outcome.SKIPPED)
+ .explanation("Elasticsearch Rest Client not
configured");
}
results.add(clientSetup);
results.add(connectionResult.build());
results.add(warningsResult.build());
+ results.add(snifferResult.build());
}
return results;
}
+ private void verifySniffer(final ConfigurationContext context, final
RestClient verifyClient, final ConfigVerificationResult.Builder snifferResult) {
+ try (final Sniffer verifySniffer = setupSniffer(context,
verifyClient)) {
+ if (verifySniffer != null && elasticsearchNodesSniffer != null) {
+ final List<Node> nodes = elasticsearchNodesSniffer.sniff();
Review Comment:
Now that we get a definite set of Nodes through the Sniffer during
verification, we could take the opportunity to confirm connectivity - as noted
in the PR conversations, it can be that the Elasticsearch instance
`publish_address` is an "internal" area that can't actually be contacted by NiFi
While we can't change how the Sniffer works here, we can provide helpful
guidance for NiFi users using the verification checks, e.g. "Found 1 node, 0
nodes were contactable, check the Elasticsearch Network Settings". This
wouldn't prevent connectivity issues when using the Sniffer for real (it would
still get the publish_address from Elasticsearch), but should help NiFi users
understand what needs changing in Elasticsearch (or whether the Sniffer is the
right option in their use case)
Maybe also link to the Elasticsearch docs from this Controller's
additionalDetails?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]