Scripting Report
Hi All,
I need some help with a scripting report. I deployed a .exe file and I need a report that will show me which ones failed and which ones were successfully executed. I know you can look at the run now status but I need a report in excel.
I want these details in a excel spread sheat:
Thx,
3 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
dugullett
11 years ago
Let me know if you need anything added to it. This will show failures.
SELECT DISTINCT M.NAME, IP, USER_LOGGED, KM.REQUEST_TIME FROM MACHINE M LEFT JOIN KBOT_RUN_MACHINE KM ON M.ID=KM.MACHINE_ID LEFT JOIN KBOT_RUN K ON K.ID=KM.KBOT_RUN_ID LEFT JOIN KBOT KB ON KB.ID=K.KBOT_ID WHERE KM.KBOT_LOG_ID IS NULL AND KB.NAME LIKE '%<NAME OF SCRIPT>%' ORDER BY M.NAME
Comments:
-
This is a good start but it does not show which ones failed and which one's were successful - Mariusja 11 years ago
-
It's been my experience that if the KBOT_LOG_ID is NULL then it's failed/running. If it does have a log ID then it was successful. I guess you could add that field, and then sort by the LOG_ID. If it does have a number it was successful. This would be the only way I would know to get both in one report.
SELECT DISTINCT M.NAME, IP, USER_LOGGED, KM.REQUEST_TIME, KM.KBOT_LOG_ID
FROM MACHINE M
LEFT JOIN KBOT_RUN_MACHINE KM ON M.ID=KM.MACHINE_ID
LEFT JOIN KBOT_RUN K ON K.ID=KM.KBOT_RUN_ID
LEFT JOIN KBOT KB ON KB.ID=K.KBOT_ID
WHERE KB.NAME LIKE '%<SCRIPT NAME>%'
ORDER BY KM.KBOT_LOG_ID, M.NAME - dugullett 11 years ago-
Also if it was needed you can add
AND KM.REQUEST_TIME > DATE_SUB(NOW(), INTERVAL 2 DAY)
to get everything recent in case it has ran multiple days. - dugullett 11 years ago
-
This is perfect thanks a lot for the help. Thanks for hte quick response!! - Mariusja 11 years ago
-
Did little changes to the script, where I will show all the script which did run succesfully, including the intervall option:
In the Break on Columns add: Script
This will group by Script Name
Select Distinct
M.NAME, M.IP, M.USER_LOGGED, KM.REQUEST_TIME, KM.KBOT_LOG_ID, KB.NAME AS Script
From
MACHINE M
Left Join KBOT_RUN_MACHINE KM On M.ID = KM.MACHINE_ID
Left Join KBOT_RUN K On K.ID = KM.KBOT_RUN_ID
Left Join KBOT KB On KB.ID = K.KBOT_ID
Where
KM.KBOT_LOG_ID IS NOT NULL
AND KM.REQUEST_TIME > DATE_SUB(NOW(), INTERVAL 30 DAY)
Order By KM.KBOT_LOG_ID, M.NAME - OlivierH 11 years ago
I have tried all the suggestions with in this post however I still unable to get the detailed results of a script 'run now detail' as see above. I need list of all machines from with in each category (push fail, running, failures and successes). HELP!!! - bnerison 10 years ago
Alert not enabled, moving to next phase....
Sending script ReportingScript.sh to client....
Script sent
Executing script....
Error -1 received while executing script
Run As failed: unspecified error=-1
Any Help is greatly appreciated, Thanks! - jwatford 6 years ago