Monitoring Splunk

Netstat time of Established connections between LocalAddress/Port and ForeignAddress/Port

robmillers
Engager

Source is the Splunk NIX netstat output which typically includes details:
LocalAddress ForeignAddress Statue
tcp 0 0 10.X.X.X:7443 10.X.X.X:18068 ESTABLISHED
tcp 0 0 10.X.X.1:7443 10.X.X.2:18069 ESTABLISHED
tcp 0 0 10.X.X.1:7443 10.X.X.3:18070 ESTABLISHED
tcp 0 0 10.X.X.1:7443 10.X.X.4:18071 ESTABLISHED

Goal is to measure how long each LocalAddress and ForeignAddress has been in a established state.

So from the first time in the event stream that the two combinations are seen till the last time they are seen.

And output similar to
LocalAddress ForeignAddress Duration
10.X.X.1:7443 10.X.X.4:18068 30 seconds

Tried different ways to correlate the two fields but have not been able to get a duration time between the two combinations.

Any input on getting the results would be appreciated.

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...