/build/static/layout/Breadcrumb_cap_w.png

Scheduled Scripts Report

Hi,

I am really not an expert with SQL Query and I have been searching around the web with no success. Even after contacting Dell support they told me that it was no in their policy to help me with this type of request. I'm looking for a way to be able to run a report that would pull specific script logs from the inventory and report them on a single page. Right now I have to run through all computers in the inventory to check if the script was successfully executed and you can imagine it's real pain in the ass. 

I hope you guys can give me a hand with this,

 

Thank you,

 

Patrick 


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: jverbosk 10 years ago
Red Belt
1

Here's something that should get you pretty much what you need, once you tweak it.

Just change the 'ScriptName1|ScriptName2|ScriptName3|etc' part in the next-to-the-last line to use the names (or the unique parts of the names) of your scripts.  For example, if you had the following scripts:

Temp Folder Cleanup

Wireless Profile Add

Adobe Reader Registry Fix

You could change this part to be something like this:

'cleanup|wireless|fix'

One other note about the text from the logs (Output, Status, Activity) - when I tested, the line breaks weren't being processed when run as a K1000 SQL report.  These characters appear where each line break should be - <BR>

I tried working around this using a REPLACE statment, but it didn't work (probably because these characters don't appear in the output when run in MySQL Workbench - may be a bug in the version I'm using).

Anyways, enough with the details - here's the query you can start with:

select K.NAME as SCRIPT_NAME,

KL.START_TIME as STARTED,

KL.STOP_TIME as FINISHED,

concat((KL.STOP_TIME - KL.START_TIME), ' seconds') as ELAPSED_TIME,

KL.STATUS as STATUS,

O.TEXT as OUTPUT_LOG,

S.TEXT as STATUS_LOG,

A.TEXT as ACTIVITY_LOG

from KBOT K

join KBOT_LOG KL on K.ID = KL.KBOT_ID

join KBOT_LOG_DETAIL O on O.ID = KL.OUTPUT_DETAIL_ID

join KBOT_LOG_DETAIL S on S.ID = KL.STATUS_DETAIL_ID

join KBOT_LOG_DETAIL A on A.ID = KL.ACTIVITY_DETAIL_ID

where K.TYPE = 'policy'

and K.NAME rlike 'ScriptName1|ScriptName2|ScriptName3|etc'

order by KL.START_TIME desc

Hope that helps!

John


Comments:
  • John you are awesome!!! This is exactly what I needed. Thank you very much for your help. - Ray085 10 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ