code: public static String getMachineId() {
  
          if (machineId == null) {
              machineId = System.getProperty(HAWKULAR_AGENT_MACHINE_ID);
              if (machineId != null) {
                  log.infof("Machine ID was explicitly set to [%s]", machineId);
              }
          }
  
          if (machineId == null) {
              File machineIdFile = new File("/etc/machine-id");
              if (machineIdFile.exists() && machineIdFile.canRead()) {
                  try (Reader reader = new InputStreamReader(new FileInputStream(machineIdFile))) {
                      machineId = new BufferedReader(reader).lines().collect(Collectors.joining("\n"));
                  } catch (IOException e) {
                      log.warnf(e, "/etc/machine-id exists and is readable, but exception was raised when reading it");
                      machineId = "";
                  }
              } else {
                  log.warnf("/etc/machine-id does not exist or is unreadable");
                  // for the future, we might want to check additional places and try different things
                  machineId = "";
              }
          }
  
          return (machineId.isEmpty()) ? null : machineId;
      }
docs: Tries to determine the machine ID for the machine where this JVM is located.
  First check if the user explicitly set it. If not try to read it from
  /etc/machine-id
  
  @return machine ID or null if cannot determine