Added hostname attribute for setting agent hostname