Mattermost-server: Opt out of analytics

Created on 26 Sep 2018  路  5Comments  路  Source: mattermost/mattermost-server

I'm seeing hundreds of requests being made to api.segment.io from Mattermost on a new installation over the course of a day. It would be great to either:

  1. Provide admins the ability to opt out of all server-side tracking and analytics
  2. Be very clear and transparent by informing admins during installation that analytics data is automatically collected and there is no way to opt out

I understand that there are some easy workarounds:

  1. Fork the project and remove all analytics and tracking logic
  2. Route api.segment.io to an invalid host via DNS

But it would be ideal if this can be controlled natively as part of application logic during setup. (Apologies if this is already possible; I couldn't find any such option in the settings interface or in the config file.)

Most helpful comment

@sneak changing the environment variables indeed seems to solve the issue, thanks! Specifically, in /lib/systemd/system/mattermost.service, add:

Environment=MM_LOGSETTINGS_ENABLEDIAGNOSTICS=false
Environment=MM_SERVICESETTINGS_ENABLESECURITYFIXALERT=false

It then seems that mattermost no longer queries segment.io.

All 5 comments

This seems to be what I was looking for, thanks!

Turns out, as far as I can tell, the environment variables to change this setting (documented nowhere) is MM_LOGSETTINGS_ENABLEDIAGNOSTICS = "false" as well as MM_SERVICESETTINGS_ENABLESECURITYFIXALERT = "false". I haven't tested it.

You can also do the following in a Dockerfile:

FROM mattermost/mattermost-team-edition:latest
RUN sed -i 's#api.segment.io#xx.example.com#gI' /mattermost/bin/mattermost
RUN sed -i 's#securityupdatecheck.mattermost.com#xxxxxxxxxxxxxxxxxxxxxx.example.com#gI' /mattermost/bin/mattermost

That should give you a clean image that doesn't phone home.

@sneak changing the environment variables indeed seems to solve the issue, thanks! Specifically, in /lib/systemd/system/mattermost.service, add:

Environment=MM_LOGSETTINGS_ENABLEDIAGNOSTICS=false
Environment=MM_SERVICESETTINGS_ENABLESECURITYFIXALERT=false

It then seems that mattermost no longer queries segment.io.

Really shameful and unethical that this happens without notifying the user, and that turning it off is not documented clearly anywhere.

Was this page helpful?
0 / 5 - 0 ratings