monitoring large setups.
The issue happens on vrops node VMs that are part of large clusters
because these kind of nodes typically have a large amount of tcp/udp
connections. The root cause of the issue is an enormous number of
spaces generated by "ss -antup | grep -E $pattern" command in
get-connection-info.sh. The SDMP plugin considers these spaces while
calculating the chunk size for writing into NDB and writing about 200-400
chunks for the get-connection-info key. Processing of this amount of
data slows down the discovery process on both the adapter and plugin sides
and, as a result, the discovery exceeds the timing limit and fails.
The solution is to remove unnecessary spaces from the end of the
get-connection-info output lines.
pattern=$(echo $space_separated_pids | tr ' ' '|')
# get matching lines
-ss -antup | grep -E $pattern
+ss -antup | grep -E $pattern | sed 's/[ \t]*$//'