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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...