add optional hostname and pid components