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
  • Thank you all for the suggestions. After working with support, the UDC collection is working. Now that I have the data I need pulled into Foglight, I need to be able to reference the data within an alarm to determine which group should be notified. The data I am pulling in is in the DBSS_Cust_group_info UDC. The UDC contains the instance name, the group who supports it, and a priority level of the instance. I need to be able to reference this information in an alarm that is a copy of the Job Failures alarm. When the alarm is triggered, I need to use the data to set the support group by pulling the data from the UDC. What is the best way to accomplish this? My overall rule topology is DBSS_Agent_Job_List. How do I reference DBSS_Cust_group UDC to compare the instance for which the alarm is firing to the instance in the UDC to get the group information within the rule? Is it possible to access multiple topologies within a single rule?
Reply
  • Thank you all for the suggestions. After working with support, the UDC collection is working. Now that I have the data I need pulled into Foglight, I need to be able to reference the data within an alarm to determine which group should be notified. The data I am pulling in is in the DBSS_Cust_group_info UDC. The UDC contains the instance name, the group who supports it, and a priority level of the instance. I need to be able to reference this information in an alarm that is a copy of the Job Failures alarm. When the alarm is triggered, I need to use the data to set the support group by pulling the data from the UDC. What is the best way to accomplish this? My overall rule topology is DBSS_Agent_Job_List. How do I reference DBSS_Cust_group UDC to compare the instance for which the alarm is firing to the instance in the UDC to get the group information within the rule? Is it possible to access multiple topologies within a single rule?
Children
No Data