K1000 custom inventory field for uploaded files
I have a script that outputs a file and this file gets uploaded to the K1000 via the "Upload a file" task. How can I generate a report via a CIF on that file's contents? I saw Chuck Steel's answer here (http://www.itninja.com/question/report-based-on-uploaded-files-by-devices) but I can't find any way to get the path to that file.
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
chucksteel
7 years ago
The info for files uploaded via script is stored in the KBOT_UPLOAD table. The path shown there leads to the file, but it isn't accessible for reporting. There also really isn't a relationship between those files and custom inventory rules, however. To get the contents of the file into a CIR you need to setup a CIR that reads it using ShellCommandTextReturn, the command needs to output the file on the machine and the contents will then be stored in the database. The location of the file is wherever your script stores it on the computer, you can't use the version that was uploaded to the K1.