Page 1 sur 1
Adding audit data from an external tool (plugin console)
Posté : 12 mars 2025 - 17:33
par OlivierSchmitt
Hello,
I'd like to know if it's possible to run an external script from the console and then retrieve its output to inject it into the console's audit data from a computer.
For example, I'd like to use a script to retrieve a machine's warranty end date via an external tools menu in a console plugin and inject it into the console's audit data from a computer.
Thanks by advance.
Re: Adding audit data from an external tool (plugin console)
Posté : 12 mars 2025 - 19:53
par vcardon
Hello Olivier, your plan is exactly the functionality that the personalized audit data is intended for, using WAPT to store for example :
- the person the equipment was loaned to and on what date
- the asset tag number if the hostname of the computer is not the asset tag id
I'll let one of the devs on the team tell you whether what you want is already possible.
If the functionnality does not exist yet (we've already thought of this need), then we should find a way soon for the functionnality to exist.
And while we're at it, me bing curious, what is the primary key that you plan to use to match existing records in the WAPT database with the information you wish to import and manage with WAPT?
Re: Adding audit data from an external tool (plugin console)
Posté : 13 mars 2025 - 00:23
par OlivierSchmitt
Unfortunately, I am only a user of the solution. I do not have direct access to the solution's databases, only through the console.
I had simply thought of using a script that would take the machine's serial number from the BIOS as an argument, query the manufacturer via an API to get the warranty status, and then inject it into an audit data entry, similar to WAPT.write_audit_data_if_changed("xxxx", "computer-is-under-warranty", "OK") WAPT.write_audit_data_if_changed("xxxx", "computer-warranty-end-date", date).
Finally, I would have displayed it in a column of the console.
I know that I could easily do this via a WAPT package, but that would mean sending the API key in a package, which I do not want to do.