Automated collection of SQL Server database connections for monitoring

We have quite a large number of databases and user connections to our SQL Server and we suspect that one application does not close connections properly. We need an automated way to collect the number of connections and the application that is creating these connections.