We had been successfully using director to add the servers manually in iCinga. We have a method to add servers using Director Automation as well which will sync data from a file / DB and keep the list upto date. But we are seeing some downside to the method. For example if a hostname has to delete it has to be deleted from the DB / Sheet. Because the sync will bring it back if you just delete from icinga director
We do not want to maintain a CMDB in icinga itself.
So to simplify the onboarding we want to onboard using simple restAPI way.
Step 1: The agent is installed using SALT
Step 2: We see the new hostname in icinga ca list (yes we do not create ticket and sign it. We use another script locally running on icinga master)
Step 3: We lookup the host-details (Operating System and IP address) by looking at the fqdn in icinga ca list
Step 4: We now want to add the host object using simple restAPI
The following information need to be added
- Cluster Zone
- Host Template (based on Step 3 OS Lookup Windows / Linux)
- Display Name : Same as FQDN
- IP Address we have from Step 3 Above
- Inherited Group (May not be required as Host-template already has host-group defined)
- Environment : A custom field created for mentioning Test / Dev / Prod (We have the value in Lookup from Step3 Above)
Can you please share the restAPI query which I can use to create a host object with the above information