How to use the macOS inventory scripts as a Psuedo Agent | v8+
With Remote Inventory, an endpoint server is connecting to a Linux or Unix computer, copying the inventory script file and then executing the script. With the Pseudo agent, it is the client computer that is initiating the communication. Connecting to the endpoint server, to retrieve the inventory script. Executing the script and then uploading the inventory file to the endpoint server.
For Mac computers, customers can perform Remote Inventory or install the Mac version of the Certero Client agent. Endpoint servers do have an agentless inventory script for mac computers, called csinvm-agentless-x86_64.run. For instances where you wish to call the psuedo agent and upload inventory files, you can follow the below process:
Copy the MAC Pseudo Agent script from below. (Suggested file name csinvm.sh)
Replace <TenantID> with the valid tenant ID for the Certero platform.
Replace <EndpointServer> with the FQDN of the Endpoint Server the Mac computer can access.
Copy the script to the MAC computer
Make the script file executable
chmod +x ./csinvm.shRun the script
./csinvm.shThe inventory script could be scheduled via ‘cron’ or other scheduling tools.
MAC Pseudo Agent Script
Example output
Here is an example output of running the script:
Although the output shows the inventory filenames being as mac-<computer name>-<UUID>-n.tgz, the filenames used in the upload are <tenantid>.tgz. Multiple files called <tenantid>.tgz can be uploaded, one at a time, to the endpoint server but they are saved in the UploadDir folder on the endpoint server as nnnnnnnn.tgz. The exact number of digits (n) will vary as the endpoint server has an inbuilt counter that keeps increasing. You can see the filenames referenced in the CollectionService_YYYYMMDD.log file in the endpoint server logs folder.
E.G.
To review, the inventory filenames created on the mac have one naming standard. They are received on the endpoint server in a different naming standard. But the files contents are the same. The Mac agentless inventory script (csinvm-agentless-x86_64.run) will produced at least two inventory files (but possibly more).
E.G.