squaredup / Community.DataOnDemand.MP

The Data on Demand Management Pack contains a number of useful System Center Operations Manager (SCOM) agent tasks, including the Netstat task required by Squared Up Visual Application Discovery & Analytics.
GNU General Public License v3.0
4 stars 2 forks source link

Unix Netstat task incorrectly handles IPv6 addresses #18

Closed shadeon closed 7 years ago

shadeon commented 7 years ago

The netstat task is naively converting all ':' characters to ',' in an effort to split the Endpoint address and port number. This means:

  1. IPv6 or IPv4 mapped addresses are no longer valid
  2. The file is no longer a valid CSV, as it includes additional columns

Instead of using gsub() to cheat, the substrings should be extracted correctly using match() and substr().