blro-ep / ITCNE23-SEM-I

TBZ Semsterarbeit Dany / Roger
2 stars 0 forks source link

Automatic setup of the IP address for monitoring #23

Open blro-ep opened 1 year ago

blro-ep commented 1 year ago

The monitoring needs the IP address or DNS of its EC2 instance in the configuration. This should be automated so that the setup does not have to be carried out manually.

Possible approach BashScript

blro-ep commented 1 year ago

This point has been solved with a shell script, which is called when processing user-data. The shell script (ec2-aws-set-pub-ip.sh) determines the internal IP of the instance via "cloud init query". The Prometheus config is then updated using the sed command.