Updated MonitorController to return a JSON formatted response.