AxonOps Kafka Connections Dashboard Metrics Mapping
Overview
Section titled “Overview”The Kafka Connections Dashboard provides comprehensive monitoring of client connections to Kafka brokers. It tracks connection counts, creation/close rates, client versions, and acceptor performance to help identify connection issues and optimize network resource usage.
Metrics Mapping
Section titled “Metrics Mapping”| Dashboard Metric | Description | Attributes |
|---|---|---|
| Connection Metrics | ||
kaf_socket_server_metrics_ (function=‘connection_count’) | Current number of active connections | listener={listener}, networkProcessor={id} |
kaf_socket_server_metrics_ (function=‘connection_creation_rate’) | Rate of new connections created per second | listener={listener} |
kaf_socket_server_metrics_ (function=‘connection_close_rate’) | Rate of connections closed per second | listener={listener} |
kaf_socket_server_metrics_ (function=‘connections’) | Connections by client software version | listener={listener}, clientSoftwareName={name}, clientSoftwareVersion={version} |
| Acceptor Metrics | ||
kaf_Acceptor_AcceptorBlockedPercent | Percentage of time acceptor thread is blocked | listener={listener} |
Query Examples
Section titled “Query Examples”Connection Count
Section titled “Connection Count”// Total connections per brokersum(kaf_socket_server_metrics_{function='connection_count',rack=~'$rack',host_id=~'$host_id'}) by (host_id)
// Total connections per listenersum(kaf_socket_server_metrics_{function='connection_count',rack=~'$rack',host_id=~'$host_id'}) by (listener)Connection Creation Rate
Section titled “Connection Creation Rate”// Connection creation rate per brokersum(kaf_socket_server_metrics_{function='connection_creation_rate',rack=~'$rack',host_id=~'$host_id'}) by (host_id)
// Connection creation rate per listenersum(kaf_socket_server_metrics_{function='connection_creation_rate',rack=~'$rack',host_id=~'$host_id'}) by (listener)Connection Close Rate
Section titled “Connection Close Rate”// Connection close rate per brokersum(kaf_socket_server_metrics_{function='connection_close_rate',rack=~'$rack',host_id=~'$host_id'}) by (host_id)
// Connection close rate per listenersum(kaf_socket_server_metrics_{function='connection_close_rate',rack=~'$rack',host_id=~'$host_id'}) by (listener)Client Version Distribution
Section titled “Client Version Distribution”// Connections grouped by client software and versionsum(kaf_socket_server_metrics_{function='connections',rack=~'$rack',host_id=~'$host_id'}) by (clientSoftwareVersion, clientSoftwareName)Acceptor Performance
Section titled “Acceptor Performance”// Acceptor blocked percentagekaf_Acceptor_AcceptorBlockedPercent{function='MeanRate',rack=~'$rack',host_id=~'$host_id'}Panel Organization
Section titled “Panel Organization”Overview Section
- Empty row for spacing/organization
Connections
- Connections count per broker
- Connections count per listener
- Connections creation rate per broker
- Connections creation rate per listener
- Connections close rate per broker
- Connections close rate per listener
- Connections per client version
- Acceptor Blocked Percentage
Filters
Section titled “Filters”-
rack: Filter by rack location
-
host_id: Filter by specific host/broker
Best Practices
Section titled “Best Practices”Connection Monitoring
- Monitor total connection count against broker limits
- Track connection creation/close rates for unusual patterns
- High connection churn may indicate client issues
Listener Analysis
- Monitor connections per listener (PLAINTEXT, SSL, SASL)
- Different listeners may have different performance characteristics
- Ensure balanced connection distribution across listeners
Client Version Tracking
- Track client software versions for compatibility
- Identify outdated clients that need upgrading
- Monitor for unauthorized or unexpected client versions
Acceptor Performance
- High acceptor blocked percentage indicates connection bottlenecks
- May need to tune acceptor thread configuration
- Consider increasing network threads if consistently blocked
Connection Limits
- Set appropriate connection limits per broker
- Monitor approaching connection limit thresholds
- Plan capacity based on connection growth trends
Security Considerations
- Monitor for connection spikes (potential DoS)
- Track connections from unexpected sources
- Ensure proper authentication/authorization on all listeners
Performance Tuning
- Adjust
max.connections.per.ipfor client fairness - Tune
num.network.threadsbased on connection load - Monitor connection creation rate during peak times