[monitor] Add json output on errors.
[monitor] Add json output on errors.