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:
Please log in to answer
Posted by:
chucksteel
8 years ago
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
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