Adding new Hosts or Services found by check


I’m new to Icinga2 and right now i got my test instance running properly, with Icingaweb2.
Also, I already wrote a small check by myself for testing.

But I got a question about creating checks that creates hosts and services.
As I understood I have to create hosts first, or services and then put them together.
What means, I have to put in settings for every service, I want to add to manually.

For instance, in my lab environment I created a small test check. The check is running on a Host with an agent on it. It checks the network for hosts with a specific Port open, gather them and check if there are online or not.

But they are all shown in one service, of the host, where the agent is installed ofc.
I would like to have some kind of automation, so that Icinga creates an own service for each Host found in the Network, or even create a new host.

Is this doable, maybe with some command within my check, or with the director?
Hopefully it is understandable, what i want to do, even it’s just a test scenario.

Thank you!