/build/static/layout/Breadcrumb_cap_w.png

KACE Product Support Question


Can I upload to the K1000 Console a logfile I create in my script?

06/16/2016 1013 views
I have a bash script I'm running on a Mac, via Scripting / Scripts. This bash script creates a local log file on the Mac (/Library/Logs/Bubba/bub.log). Is there a way to have such a log visible to the K1000 console so that after I run a script, the Run Now Status / Detail / Successful Execution [x] / [computer] View Logs would show me that log? Currently, I can ssh over to the Mac and look at the log, but it'd be great if I could see that log from the K1000 console.

Thanks!
Answer Summary:
1 Comment   [ + ] Show comment

Comments

  • I see no way to reply to nshah's last post, so I'll reply here.

    I'm a scripting newbie - I don't see any reference to Task 1 or Task 2, although I think I've seen such in the online KScript. I'm working with an Online Shell Script, though.

    I had hoped to find some documentation in the Administration Guide, but my searches turn up empty. Do you know of any documentation for the "Upload file" section of the Scripts feature?

Answer Chosen by the Author

1
Have you tried using custom inventory rule to do a text return of that log? Using CIR you should be able to read the contents of the log file in your KBOX Inventory for that MAC 

http://documents.software.dell.com/kace-k1000/6.4/administrator-guide/managing-inventory/writing-custom-inventory-rules/create-custom-inventory-rules#

http://documents.software.dell.com/kace-k1000/6.4/administrator-guide/managing-inventory/writing-custom-inventory-rules#

You could also use the KBOX Scripting engine to just upload the log using the internal wizard and select "upload file" form the drop down and it will pull the file and attache it to the Device > Inventory of the MAC

Answered 06/16/2016 by: nshah
Red Belt

  • Awesome! The last paragraph worked for me.

    (It puts the file in Inventory / Devices / Device Detail: [computer] / Inventory Information / Software / Uploaded Files [x] / [name of script log].)

    I'll also check out the two read-me's you provided, but this solution works well. Thanks!
    • Well, maybe not...

      Does the upload occur before or after the script executes? It's looking like it occurs before, which means if the log file is not there to begin with, the script run fails, and the script doesn't get run, and the log file doesn't get created.

      Thanks!
      • You would have to ensure that the log file is already created in order for the script to upload it.

        You can do them as Task 1 which would be to do your script that created the log

        Task 2 - use the verify that the log file is there and then On Success, Upload it.

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