1.
You can do this with a MPxSelectionContext or a MPxContext.
There is a limitation on this, you won't be notified when the mouse hovers over the viewport, only on press, release, and drag.
Another limitation is that you need to enter that context, which means that you need to exit whichever context you were in, like move, select, rotate... This can be worked around if your context also implements the move tool and the selection tool, which are usually the normal contexts in which Maya is in. This is a bit difficult to implement, but very rewarding.
2.
Another way to do it is by positioning your code in a layer between of the OS and Maya, in the case of Windows you would install a Mouse Hook, in order to intercept mouse messages sent to from the OS to Maya. This is very flexible, but you need to check without the Maya API if you are above a viewport (classname ModelView) so this is really a hack and not the preferred way to work with Maya. But it is possible to get to the point to cast a ray into the scene from where the cursor hovers, I used it to implement smooth scrolling with the middle mouse button in layouts which allow scrolling, and also to check if I was hovering above certain objects in the scene, but this last function I moved into a context because this method had problems working together with the "artUserPaintCtx" (many redraws, very slow). So check before releasing that you are not messing up things like that because if s.o. uses such a context and it does not behave correctly with your hack, then you've got a big problem and need to start all over.
What do you want to do with that monitoring?
Daniel