code: protected static String replaceStaticString(String key) {
      String replacementString = "";
      try {
        InetAddress addr = InetAddress.getLocalHost();
        String lkey = key.toLowerCase();
        if(lkey.equals("localhost")) {
  
          replacementString = addr.getHostName();
        }
        else if(lkey.equals("ip")) {
            replacementString = addr.getHostAddress();
        }
        else if(lkey.equals("fqdn")) {
  
            replacementString = addr.getCanonicalHostName();
        }
        else {
            throw new RuntimeException("The static escape string '" + key + "'"
                    + " was provided but does not match any of (localhost,IP,FQDN)");
        }
      } catch (UnknownHostException e) {
        throw new RuntimeException("Flume wasn't able to parse the static escape "
                + " sequence '" + key + "' due to UnkownHostException.", e);
      }
      return replacementString;
    }
docs: Not intended as a public API