Fix agent metric names and fix the logger name for the auto restart