Either write an extension or use another tool to do the query and send the result to Dynatrace using one of the APIs.