Best way to Automate add host

Maybe this link could help you.
https://checkmk.com/cms_piggyback.html