I want to use this query
IF EXISTS(SELECT 1 FROM sys.dm_exec_sessions WHERE program_name = 'SQLAgent - Generic Refresher') SELECT 'TRUE' ELSE SELECT 'FALSE'
Within which product? More than likely you'll need to convert the output to a number. In Server & Application Monitor (SAM) , there's a SQL Server User Experience Monitor that can run queries and return results. The results need to be numerical though. Easy fix for your query is that 1 = True and 0 = False.
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK© online community. More than 180,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.