Skip to content

Commit

Permalink
add extra heuristic for hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJuge committed Nov 20, 2023
1 parent 2ad487e commit bfe3721
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions specs/agents/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ else
hostname = env.get("HOSTNAME")
if (hostname == null || hostname.length == 0)
hostname = env.get("HOST")
if (hostname == null || hostname.length == 0)
hostname = readfile("/etc/hostname") // or any equivalent *
if hostname != null
hostname = hostname.toLowerCase().trim() // see details below **
Expand Down

0 comments on commit bfe3721

Please sign in to comment.