# Timeline graph of server connection count

**URL:** <https://discuss.elastic.co/t/timeline-graph-of-server-connection-count/147741>\
**Category:** Beats\
**Created:** [September 7, 2018, 3:16pm UTC](https://discuss.elastic.co/t/timeline-graph-of-server-connection-count/147741 "2018-09-07T15:16:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MikaelLindstrom](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@MikaelLindstrom](https://discuss.elastic.co/u/MikaelLindstrom)\
**Post date:** [September 7, 2018, 3:16pm UTC](https://discuss.elastic.co/t/timeline-graph-of-server-connection-count/147741/1 "2018-09-07T15:16:23Z")

</div>

Hi,  
we have a server that's listening on a port and servers can connect to that port (i.e. standard stuff...).  
I'd like to graph over time the number of active connections (i.e. netstat -anp | grep | grep -c ESTABLISHED). I thought the socket metricset would work but it only has events for new connections and none for when a connection is closed so there's no way to get the number of active connections. Or am I missing something? Anything that can be done with metricbeat or do I have to resort to filebeat ingesting a log file where I run the netstat command above at a regular interval or turn on logging via iptables?

Regards,  
Mike

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [September 7, 2018, 7:56pm UTC](https://discuss.elastic.co/t/timeline-graph-of-server-connection-count/147741/2 "2018-09-07T19:56:34Z")

</div>

Hi,

This isn't possible with metricbeat today but it should be possible starting with the next release (6.5.0). A community member just added a `socket_summary` metricset to the `system` module. It will add these fields to metricbeat documents: [https://www.elastic.co/guide/en/beats/metricbeat/master/exported-fields-system.html#\_socket\_summary\_fields](https://www.elastic.co/guide/en/beats/metricbeat/master/exported-fields-system.html#_socket_summary_fields).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 5, 2018, 7:56pm UTC](https://discuss.elastic.co/t/timeline-graph-of-server-connection-count/147741/3 "2018-10-05T19:56:52Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
