Linux – Possible to not have a monit httpd

linuxmonitmonitoring

Everytime I do

# monit reload
M/Monit enabled but no httpd allowed -- please add 'set httpd' statement
Reinitializing monit daemon

I get the error about I don't have set httpd. This is my /etc/monitrc.

set daemon 60 with start delay 20

set logfile /var/log/monit.log
set pidfile /var/run/monit.pid
set idfile /root/.monit.id
set statefile /tmp/.monit.state

set eventqueue basedir /var/monit slots 100

set mmonit https://xxx:xxx@monit.example.com/collector

include /etc/monit.d/*

Question

I am not interesting in having the httpd on the clients, which monit complains about. Is it possible to get rid of the error message?

Best Answer

You can't explicitly disable the httpd (other than not setting it in your config), because the monit cli depends on it:

Note that if HTTP support is disabled, the Monit CLI interface will have reduced functionality, as most CLI commands (such as "monit status") needs to communicate with the Monit background process via the HTTP interface. We strongly recommend having HTTP support enabled. If security is a concern, bind the HTTP interface to local host only or use Unix Socket so Monit is not accessible from the outside.

Per default it only binds to 127.0.0.1:2812. You can set it to UNIX socket mode, so it has very little impact on your system.