Timeline graph of server connection count

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?



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.

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