Linux Auto-discovery sample script
The attached sample script(written in python) would run on a *nix based system, gather basic system information and upload the results to device42 appliance.
If run as non-root, it needs sudo permissions to run dmidecode.
Lines 27 to 31 would need to be altered before running this.
It can be run from the shell as: python script-name.py or you can make it an executable and run it.
Feel free to modify to match your environment and let us know if you have issues/questions.
You can deploy this on multiple machines and schedule it to post data to device42 appliance regularly and keep your inventory information up-to-date.
If you would prefer something that runs centrally and gather information you can modify this script for that, or you can use auto-discovery client.
Direct link to the script: https://github.com/device42/Device42-AutoDiscovery-Scripts/blob/master/src/d42_api_linux_upload_sample_script.py
Please sign in to leave a comment.