Here is part of manual:
# Specify the URL for posting events to M/Monit. The auth. part of
# the URL, that is, monit:monit, specify a username and password
# registered in M/Monit. If you change the password for the monit
# user in M/Monit it must be changed here as well.
set mmonit http://monit:monit@<M/Monit-host>:8080/collector
set httpd port 2812 and use address <monit-host>
allow localhost
allow <M/Monit-host>
allow username:password