HiI have configured the UDC as per the last mail from Ken Eio. I have attached the screenshot of the UDC.1) I have created UDC as per UDC_Creation screenshot. 2) When the table went under REORG PENDING status this query ran from the foglight and get the output as UDC_Query_output screenshot in which i will get reorg_pending field as "Y" means Yes the mentioned table in schema_table field is in reorg pending state.3) Now I have set the Rules from the Add Rule tab in Rules & Notification.4) Refer Rules_Definition screenshot where I ahve created the rule name.5) Than I have created variable refer Rules_variables screenshot.6) I have given the condition as Critical one in Condition, alarms tab refer Conditions Screenshot. Please let me know whether my condition will throw the critical alram with message and do i will get the mail also for the same? My concern is whenever the table get the output as "Y" than i should get the alarm with DBname Schema name and table name i.e. on which schema.table name need reorg.
I was having the same trouble with a slightly different query. I was trying to query the state of an oracle job and alert on it.
My initial SQL query for the UDC was:
WHEN 'SUCCEEDED' THEN '0'
WHEN 'COMPLETED' THEN '0'
WHEN 'RUNNING' THEN '0'
WHEN 'SCHEDULED' THEN '0'
WHEN 'DISABLED' THEN '0'
WHEN 'BROKEN' THEN '1'
WHEN 'RETY SCHEDULED' THEN '1'
WHEN 'FAILED' THEN '2'
END AS STATUSTEXT
WHERE job_name ='SomeSqlJob'
I was getting exactly the same errors in the Run Condition Query box when checking for the variable as you were.
I changed my SQL query to be more specific about the states assigning more specific values so my next (and successful attempt at this) version was:
WHEN 'SUCCEEDED' THEN '1'
WHEN 'COMPLETED' THEN '2'
WHEN 'RUNNING' THEN '3'
WHEN 'SCHEDULED' THEN '4'
WHEN 'RETY SCHEDULED' THEN '5'
WHEN 'FAILED' THEN '6'
WHEN 'BROKEN' THEN '50'
WHEN 'DISABLED' THEN '99'
I then set up my rule conditions as follows:
Foglight Rule Conditions
if (#statustext# == 6)
if (#statustext# > 6)
if (#statustext# == 5)
condition=false;if (#statustext# < 5)condition=true;return condition;
Initially when my query had only run once the condition query returned correct values like true and false. After the query had run a couple of times i started getting scriptserverexception errors.
Note: When running multiple queries for data you can occiasionally get the following output:
com.quest.nitro.service.scripting.errors.noisy.OptionalDataMissingScriptServerException: statustext (script: 4350a5e56bd21b33d80ccd024813ceb2)
This is also seen in different parts of Foglight on agents where an agent has queried a value and the value hasn't changed and is apparently normal behavior. I do need to check this with Quest however.