This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do you run a custom sql script in a Foglight Rule?

We want to run the following query in a custom rule:

 

SELECT name, is_disabled, is_policy_checked
FROM sys.sql_logins
WHERE is_policy_checked = 0 AND is_disabled = 0
ORDER BY name;  

We want a alarm to fire if the condition is true on any of the instances in Foglight.

 

What is the best way to run a query within a rule?  Is it possible?

Parents
  • There would be 2 impacts -

    1- is the impact of the SQL/T-SQL in the UDC itself - the workload it places on the DB. You can specify the collection interval for the UDC to control how often it runs, but obviously "select 1" has a lot less impact than "select from and join multiple tables together"

    2- the impact on the FMS (potential topology churn). Depending on what the UDC does, it could create new object(s) on each execution. I try to keep a UDC to returning a single value if at all possible.
Reply
  • There would be 2 impacts -

    1- is the impact of the SQL/T-SQL in the UDC itself - the workload it places on the DB. You can specify the collection interval for the UDC to control how often it runs, but obviously "select 1" has a lot less impact than "select from and join multiple tables together"

    2- the impact on the FMS (potential topology churn). Depending on what the UDC does, it could create new object(s) on each execution. I try to keep a UDC to returning a single value if at all possible.
Children
No Data