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?
In reply to Darren Mallette:
In reply to randy.scott:
In reply to John.Sakalauskas:
with just #Login_Count# I get an error
com.quest.nitro.service.sl.interfaces.scripting.ScriptingException: com.quest.nitro.service.sl.interfaces.scripting.ScriptUndefinedObservationException: undefined observation (present but empty observed data for topology object 832d37ef-6607-48d5-943f-4bcdbcdc694f) in query: Login_Count ----script start------ #Login_Count# ---- script end ------
with #Login_Count# > 0 I get
com.quest.nitro.service.scripting.errors.noisy.OptionalDataMissingScriptServerException: Login_Count (script: 95030b7713a5ad5288cd6278e7283971)
But I have a count as shown below:
Can you check the collection properties and post a screenshot?
From the error message, it looks like it's being stored as an observation, and that "Is Key" was set to true.
It is set to False