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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...