Dynamic Host Configuration With IPv4 address

Hi Guys,
We want to start working with Azure Scaling Sets (Auto increase or decrease of VMs depending on demand), therefore we want also to automatically create new hosts in the monitoring to host these VMs based on PiggyBack data.
But how should I approach this? Because I haven’t found a way to configure IPv4 addresses using Dynamic Host Configuration.

Is this even possible? Or should I look into the configuration trough REST-API?
Other good suggestions are welcome too ^^

Thankyou,

Where would the IP address come from? Is it included in the piggyback data from Azure?

If the hostname can be resolved via DNS there is no need to add an IP address.

Not by the default Azure Agent, but I could provide the needed data as piggyback myself if it’s possible to do dynamic configuration and use IP address to it.
But I can’t seem to find if that’s possible or not.

DNS Resolving would be an good alternative if IPv4 address isn’t an option.

To give an answer for the future people who find this post :slight_smile:

We ended up using the REST-API in our customization script for the entire process.
Since this was the only way to provide the IP address information and gives us the most flexibility.
Also since we’re doing this during provisioning of the machine, we start monitoring the machine directly after it’s been provisioned.

  • Host creation in CMK (providing the information needed) + Baking an Agent (REST-API)
  • Agent Download to the VM (REST-API)
  • Activate Changes, to push created host config to slave (REST-API)
  • Agent Updater Registration (local registration command on the VM)
  • Service Discovery (REST-API)
  • Activate Changes again (REST-API)

Best regards,
Erik

The Cloud Edition has features to do this as well now automatically.
You just need to download the agent via REST-API and install. Then the rest happens itself.
More details in the talk on “New in 2.2: Automation” at the conference.

1 Like