default agentId to hostname if machine detection fails