Hi,
If I understand correctly you want to monitor the state of MSSQL services (e.g. different instances) under Windows?
We use instance discovery for that. Agent List with List name System.Services.
An instance discovery filter script picks up any service that starts with "MSSQL$" in the name (excluding SQLEXPRESS) or is called "MSSQLSERVER" (default instance).
To restart the service if it fails, a threshold is triggered if the service is not running.
That threshold generates an event that in turn executes a Server Action via Event Processing Policies.
That action is a script (inside the NetXMS script library).
The script pulls out the service name from the parameters passed to it and executes a pre-configured action on the agent itself which effectively comes down to running "net start <servicename>".
The restart part can obviously be used for any service, not just MSSQL.
Hope that helps get you started.
Cheers