How to disable xpack.monitoring?

Hi, I have enabled xpack.monitoring with "elasticsearch.yml" file:

... ... ...
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true
    type: http
    host: [""]
      username: monitor
      password: monitor@secret
... ... ...

For some reason, I had to restart my cluster and the user "monitor" is gone. But that's not my problem here (I know the reason). Since the user "monitor" does not exist anymore, I'm having the following log continuously:

WARN ][c.f.s.a.BackendRegistry  ] Authentication finally failed for monitor


  • How to fix this error log? I want to remove this exporter from the list.
  • Since "xpack.monitoring.enabled" cannot be set to "false" dynamically over "/_cluster/setting" API, how to disable "xpack.monitoring"?