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,

2 Comments   [ + ] Show Comments

Comments

  • Hello,

    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!!!
  • Still looking for help on this!
Please log in to comment

Answers

0

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
Answered 03/27/2013 by: dugullett
Red Belt

  • This is a good start but it does not show which ones failed and which one's were successful
    • 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
      • 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.
  • This is perfect thanks a lot for the help. Thanks for hte quick response!!
    • 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
Please log in to comment
Answer this question or Comment on this question for clarity