Issue Summary
SSH session statistics for MaxActiveSessionCount and ActiveSessionCount are read incorrectly by JMX counters.
The default value of plugin.ssh.session.max is 250, which controls the maximum number of concurrent SSH sessions allowed. However JMX counters MaxActiveSessionCount and ActiveSessionCount are reading more than the allowed list.
This is reproducible on Data Center: yes
Steps to Reproduce
- Create SSH sessions in a loop
while true; do nc localhost 7999& ; done
- Read the JMX metrics for MaxActiveSessionCount and ActiveSessionCount counters.
Expected Results
JMX metrics for MaxActiveSessionCount and ActiveSessionCount are read for successfully authenticated SSH sessions but not just the TCP connections
Actual Results
It seems like JMX metrics for MaxActiveSessionCount and ActiveSessionCount are read for all active TCP connections on SSH port (7999) hence the counters are read values higher than what is allowed from plugin.ssh.session.max property.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available