/build/static/layout/Breadcrumb_cap_w.png

K1000, tracking scripting

From this article http://www.itninja.com/blog/view/k1000-reports-tracking-managed-installs i know i can use sql syntax to tracking managed installs. With same method, how to tracking scripting use sql syntax?for example tracking scripts desktop enforce

0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: chucksteel 8 years ago
Red Belt
0
Scripting logs are stored in KBOT_LOG and KBOT_LOG_DETAIL tables. I would start by checking those.


Comments:
  • Thanks for your answer, can you give complete sql syntax for tracking scripts? - yos.j.linggarjati@sat.co.id 8 years ago
    • Are you looking to track success on a given scheduled script or something else? - chucksteel 8 years ago
      • Yes, i want to track success on a given scheduled script with this format. device_name | kbot_id | status | script_name - yos.j.linggarjati@sat.co.id 8 years ago
Posted by: chucksteel 8 years ago
Red Belt
0

Top Answer

I'm not positive what the status numbers are but I am fairly certain that a 1 is success, if not then you will have to adjust the CASE statement accordingly.
SELECT MACHINE.NAME as COMPUTER, KBOT.NAME as SCRIPT, KBOT.ID, 
CASE 
WHEN KBOT_LOG.STATUS = 1 THEN "Success"
WHEN KBOT_LOG.STATUS != 1 THEN "Failure"
END AS STATUS
FROM ORG1.KBOT_LOG
JOIN MACHINE on KBOT_LOG.MACHINE_ID = MACHINE.ID
JOIN KBOT on KBOT_LOG.KBOT_ID = KBOT.ID
JOIN KBOT_CRON_SCHEDULE on KBOT_LOG.KBOT_ID = KBOT_CRON_SCHEDULE.KBOT_ID
JOIN KBOT_LOG_DETAIL on KBOT_LOG_DETAIL.ID = KBOT_LOG.OUTPUT_DETAIL_ID
WHERE KBOT.ID = 91
Set the WHERE KBOT.ID = 91 to the ID of the script you want to track.


Comments:
  • thanks for your help, i have one more question. If you open Scripting Logs there is a Currently Deployed Jobs & Policies, what a sql syntax to show only script in Currently Deployed Jobs & Policies? - yos.j.linggarjati@sat.co.id 8 years ago
    • When I click on Scripting, Search Scripting Logs in the admin interface I do not see an option for "Currently Deployed Jobs & Policies". What version of the K1 are you running? - chucksteel 8 years ago
      • K1000 version 6.4.120756. Here the screenshot https://drive.google.com/open?id=0B8hnWoffFOYtcWIyYjhqV0xJNkU - yos.j.linggarjati@sat.co.id 8 years ago
      • Ah, I was looking under scripting, not in the machine inventory. I think that is stored in the KBOT_LOG_MACHINE table, but I'm not sure. Are you looking for a report of currently deployed scripts for a specific machine? - chucksteel 8 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