Kaseya Community

Procedure logging

  • Silly question, how can I quickly export the results of a procedure? (as in which machines procedure was SUCCESS or FAILURE)  On the schedule/create section, you have the result SUCCESS, but I can't seem to copy and paste that in any fashion.   Be nice to export this as a comma delimited file, or even just a text file.

  • You can export results from the Logs portion via Info Center; Agent Procedure Logs resulting in success and or failure.

  • , allow me to suggest that simply printing out Success or Failure is of limited value.    The fact that a script (Agent procedure) ran "Success"fully, doesn't mean that it accomplished what you wanted.  My suggested best practice  is to always confirm that it ran correctly by checking for a file, registry key, service or process running.... SOMETHING to make sure you know that what you ran, actually worked.

    When you finish with this check, use the "WriteProcedureLogEntry" command to write a "tag" to the Agent Procedure log.   We use $YourTagNameHere$ as a tag.  By doing that you can go to InfoCenter as has suggested but use the $tag$ as the filter to show what happened.

    Here is a video that I created to show how to create a report using tags:   

  • Following on from the excellent advice above, I'd add that you should have Write Procedure Log Entry steps as mileposts in any procedure with more than an IF or two. I've found that (for instance) assuming a command will result in the output file I told it to create is a good way to baffle myself later on when I can't figure out why a procedure will be SUCCESSful but not do The Thing I Wanted.

    If X, do the command which makes the file. Test for the file. If no file, write procedure log entry saying "hey I expected a file and there isn't one." If file, test the contents, write procedure log entry saying "there's a file and it contains the thing we need," and so on. Also, use comments liberally.

    You may not thank ME later, but you'll thank yourself, and so will your teammates who need to update or reference your procedures down the road.

  • And if you can't find an elegant way of reporting on these you can always run a SQL query in the Ksubscribers database as below

    select * from vscriptlog

    This will return the script name , when run , machine run on , and the scriptdesc which will include the success/fail text