Skip to content

[improve][broker]PIP-333 Add monitor metrics for the number of connections to client IPs and roles #21934

@yyj8

Description

@yyj8

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Currently, Pulsar does not monitor the number of connections to client IPs and roles. When there are many business teams accessing the cluster, and there are also many topics and production consumers, it is difficult for us to quickly locate which IPs or roles are accessing the cluster abnormally from a global perspective and optimize them. So, we hope to have a monitoring indicator that can statistically analyze the connection information between IP and role dimensions, making it easier to quickly locate problems in the later stage.

Solution

Add new metircs to ServerCnx.java class:

private static final Gauge clientIpAndRoleConnections = Gauge.build()
         .name("pulsar_broker_client_ip_role_connections")
         .labelNames("ip", "role")
         .help("The number of client IP and role connections")
         .register();

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions