Can a dynamic query identify a particular service?

I'd like to create a dynamic query in order to identify a certain service and place the servers in a group so that a monitoring template/alert can be created.  This way, if a new server was commissioned with the service running, it would automatically be monitored.  Otherwise there would need be a manual process for new servers to be added into a monitor.  Is this possible at all?