Formatting netstat output

We had a need to ingest open sockets into Splunk so we could map our integration points across the enterprise. We came up with what is below. This will show if the host on which it is run is a client or a server of this socket, as well as print the IP address and port number of each side of the connection.

#!/bin/bash
<

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.