Custom metric in SQL Server

This article will help the users who are facing problems from internal, SQL Server, memory issues, or external, Windows OS, memory issues directly.

Please refer this link

http://sqlmonitormetrics.red-gate.com/how-to-write-a-custom-metric/