Hi Guys,
I am a bit new to icinga advanced topics. I have setup a test icinga env. I was able to successfully create hosts via the director API. Is there a way to create hosts via the icinga API itself not using the director API ?
Hi Guys,
I am a bit new to icinga advanced topics. I have setup a test icinga env. I was able to successfully create hosts via the director API. Is there a way to create hosts via the icinga API itself not using the director API ?
Yes!
https://icinga.com/docs/icinga-2/latest/doc/12-icinga2-api/#creating-config-objects
Be aware that those objects will not show up in the Director and they are gone in case you delete the /var/lib/icinga2/api
directory.
these objects also create deployment failures in case created one more time in director
Thanks @log1c & @moreamazingnick . It worked. I was able to create & delete the hosts via the icinga api. The hosts are created in dir - /var/lib/icinga2/api/packages/_api/some_random_chars/conf.d/hosts. Is there a way to change this default dir where my hosts will be placed when i create it via the icinga API ?