Hello,

We currently have a few scripts that run on a schedule. Is there a way I can run a report to check the Scripting Logs for all machines to see if they were successfull or not? Right now the only way for me to check if the script ran is to individually go to the inventory for each machine and check the "Scripting Logs" under the Logs category to see if the scripts ran on a machine. I can't seem to find any option in the reporting to run such report, perhaps I am missing something simple. Any suggestions are welcome.

Thank you,

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

See if something like this will work for you. Let me know if you need it modified.

http://www.itninja.com/question/scripting-report

Answered 04/29/2013 by: dugullett
Red Belt

  • This seems to work, but only if the script is run now. Anything that is on a schedule does not seem to be displayed.
    • Hmmm.... just noticed that. Try this. I'm not sure what all info you need. I don't have a ton of scheduled scripts to test this off of. One thing I did notice is that when you do pull up the scripting logs if the script was successful it had a status of "2". Looks like if it was not it has a "3" it was not. So if you were wanting to limit the results you could add KL.STATUS = '2'.

      SELECT DISTINCT M.NAME, K.NAME, KL.START_TIME, KL.STOP_TIME, KL.STATUS
      FROM MACHINE M
      LEFT JOIN KBOT_LOG KL ON M.ID= KL.MACHINE_ID
      LEFT JOIN KBOT K ON K.ID =KL.KBOT_ID
      WHERE K.NAME LIKE 'FORCE CHECK-IN NEW%'
      AND K.ENABLED ='1'
      ORDER BY M.NAME
  • That seemed to work well. Although, from a few tests, it would look like a status of 1 would be successful. Thanks for the help, much appreciated.
Please log in to comment
Answer this question or Comment on this question for clarity
Admin Script Editor
Admin Script Editor is an integrated scripting environment available free here at ITNinja

Share