Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-11036: Add Cluster Summary Metrics to Prometheus endpoint #6834

Closed
wants to merge 1 commit into from

Conversation

mattyb149
Copy link
Contributor

Summary

NIFI-11036

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-11036
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-11036

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 8
    • JDK 11
    • JDK 17

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@MikeThomsen
Copy link
Contributor

@mattyb149 I started NiFi on this branch and didn't see any of the metrics you added exposed on the metrics endpoint. Do these only get generated in clustered mode?

Copy link
Contributor

@taz1988 taz1988 left a comment

Choose a reason for hiding this comment

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

I didn't find any error, if I use https://localhost:8443/nifi-api/flow/metrics/prometheus?includedRegistries=CLUSTER I got the data:

# HELP cluster_is_clustered Whether this NiFi instance is clustered. Values are 0 or 1
# TYPE cluster_is_clustered gauge
cluster_is_clustered{instance="7f34c4ca-b48e-489c-8533-ddd9882c4a43",} 1.0
# HELP cluster_connected_node_count The number of connected nodes in this cluster
# TYPE cluster_connected_node_count gauge
cluster_connected_node_count{instance="7f34c4ca-b48e-489c-8533-ddd9882c4a43",connected_nodes="3 / 3",} 3.0
cluster_connected_node_count{instance="7f34c4ca-b48e-489c-8533-ddd9882c4a43",connected_nodes="2 / 3",} 2.0
# HELP cluster_is_connected_to_cluster Whether this NiFi instance is connected to a cluster. Values are 0 or 1
# TYPE cluster_is_connected_to_cluster gauge
cluster_is_connected_to_cluster{instance="7f34c4ca-b48e-489c-8533-ddd9882c4a43",} 1.0
# HELP cluster_total_node_count The total number of nodes in this cluster
# TYPE cluster_total_node_count gauge
cluster_total_node_count{instance="7f34c4ca-b48e-489c-8533-ddd9882c4a43",} 3.0

👍

@taz1988
Copy link
Contributor

taz1988 commented Jan 17, 2023

+1

@asfgit asfgit closed this in 6adbc1a Jan 17, 2023
@shayki5
Copy link

shayki5 commented Mar 30, 2023

Can you add it to /metrics endpoint? (which available when PrometheusReportingTask is enabled)

@shayki5
Copy link

shayki5 commented Apr 2, 2023

@taz1988 How can you use this endpoint in Prometheus? which authentication you need?

@uxapj
Copy link

uxapj commented Aug 22, 2023

How can I request an improvement on this implementation?
As @shayki5 asked, we would love to see this in the /metrics endpoint that is generated from the PrometheusReportingTask...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants