title: AWS Fargate hostname not doable?
body: <p>I am trying to set up a simple app. It is dragged from <a href="https://budgetapp.docsapp.io/" rel="noreferrer">https://budgetapp.docsapp.io/</a> and meant to be working somewhere in public. My task is to deploy it in most automate way and expose metrics of java machine to the public (remote jConsole).
  Eventually, it should be stood up in around 15 exact copies.</p>
  
  <p>For this task I chose AWS Fargate. It sets up the app beautifully, it gives me back the Metrics on admin port (it is deployed by Dropwizard). What I struggle with is monitoring. It should be real live and showing at least CPU and mem usage. I am able to do it locally on docker, but Fargate is missing one crucial thing. Setting up hostname for deployed task. </p>
  
  <p>Error that I am getting:
  <code>Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: 578463faab0f: 578463faab0f: System error</code>. It is due to missing entry in /etc/hosts file with container's <code>uname -n</code>.
  It seems like I cannot set it up! Is this possible to be done somehow?</p>
  
  <p>I am running my java service like this: 
  <code>java -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Djava.rmi.server.useLocalHostname=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=5000 -Dcom.sun.management.jmxremote.rmi.port=5000 -jar budgetapp.jar server config.yml</code></p>
  
  <p>I am happy to take any advice!</p>