I need suggestion to provide the host IP and port to sensu-go at runtime. Currently, we are using static inventory for our VMs which are created in google cloud which causes issues when those instances get deleted and new gets created.
So, I'm looking for a solution to provide the dynamic inventory to sensu-go. However, I could not find a way to query the google cloud in sensu-go and get the host IP(s) by providing tag and project name.
I'm looking for a suggestion to get the host IPs for a given tag from google cloud without using sensu-go client in each host.
Thanks very much in advance.
To get a list of IP's used by instances tagged with, say, 'sensu' you can use gcloud commands.
To get internal IP:
For external IP: