Adapted example to new get_monitor_message function.