diff options
author | Mansour Behabadi <57921115+ncmans@users.noreply.github.com> | 2019-12-20 07:06:37 +1100 |
---|---|---|
committer | Austin S. Hemmelgarn <austin@netdata.cloud> | 2019-12-19 15:06:37 -0500 |
commit | 4edc7e907e3285aa9801e8caf651450e4fd8d2be (patch) | |
tree | 04d9265c637c1edd2f45166b100ef845f00d6a5d | |
parent | a73d3b3ed2f8d8c03d69f385bee37d46c144d4f4 (diff) |
Add anon tracking notice for installers (#7437)
* Show notice of anonymous data collection
* Add DO_NOT_TRACK env var to docker run script
* Add disable-telemetry option to kickstart-static64
* Check if DO_NOT_TRACK is set
-rwxr-xr-x | netdata-installer.sh | 10 | ||||
-rw-r--r-- | packaging/docker/Dockerfile | 2 | ||||
-rwxr-xr-x | packaging/docker/run.sh | 4 | ||||
-rw-r--r-- | packaging/installer/README.md | 2 | ||||
-rwxr-xr-x | packaging/installer/kickstart-static64.sh | 6 | ||||
-rwxr-xr-x | packaging/makeself/install-or-update.sh | 10 | ||||
-rw-r--r-- | packaging/makeself/makeself-help-header.txt | 3 |
7 files changed, 35 insertions, 2 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index e6affc36e5..4e4f21cc6a 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -289,6 +289,16 @@ cat <<BANNER3 BANNER3 +if [ -z "$NETDATA_DISABLE_TELEMETRY" ]; then + cat <<BANNER4 + + ${TPUT_YELLOW}${TPUT_BOLD}NOTE${TPUT_RESET}: + Anonymous usage stats will be collected and sent to Google Analytics. + To opt-out, pass --disable-telemetry option to the installer. + +BANNER4 +fi + have_autotools= if [ "$(type autoreconf 2>/dev/null)" ]; then autoconf_maj_min() { diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index f9f3e73095..ee3f73117d 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -60,6 +60,8 @@ ARG NETDATA_UID=201 ARG NETDATA_GID=201 ENV DOCKER_GRP netdata ENV DOCKER_USR netdata +# If DO_NOT_TRACK is set, it will disable anonymous stats collection and reporting +#ENV DO_NOT_TRACK RUN \ # provide judy installation to base image apk add make alpine-sdk shadow && \ diff --git a/packaging/docker/run.sh b/packaging/docker/run.sh index e2fedd0eac..de317927b8 100755 --- a/packaging/docker/run.sh +++ b/packaging/docker/run.sh @@ -7,6 +7,10 @@ # Author : Pavlos Emm. Katsoulakis <paul@netdata.cloud> set -e +if [ -n "${DO_NOT_TRACK+x}" ]; then + touch /etc/netdata/.opt-out-from-anonymous-statistics +fi + echo "Netdata entrypoint script starting" if [ ${RESCRAMBLE+x} ]; then echo "Reinstalling all packages to get the latest Polymorphic Linux scramble" diff --git a/packaging/installer/README.md b/packaging/installer/README.md index 30498d650b..ffde6fc6b3 100644 --- a/packaging/installer/README.md +++ b/packaging/installer/README.md @@ -106,7 +106,7 @@ This script installs Netdata at `/opt/netdata`. Verify the integrity of the script with this: ```bash -[ "8ad43ff960bf6f2487233682909f7a87" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" +[ "23e0f38dfb9d517be16393c3ed1f88bd" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" ``` *It should print `OK, VALID` if the script is the one we ship.* diff --git a/packaging/installer/kickstart-static64.sh b/packaging/installer/kickstart-static64.sh index 72cd00b879..1111e0e24f 100755 --- a/packaging/installer/kickstart-static64.sh +++ b/packaging/installer/kickstart-static64.sh @@ -8,7 +8,8 @@ # --non-interactive do not wait for input # --dont-start-it do not start netdata after install # --stable-channel Use the stable release channel, rather than the nightly to fetch sources -# --local-files Use a manually provided tarball for the installation +# --disable-telemetry Opt-out of anonymous telemetry program +# --local-files Use a manually provided tarball for the installation # # --------------------------------------------------------------------------------------------------------------------- # library functions copied from packaging/installer/functions.sh @@ -200,6 +201,9 @@ while [ -n "${1}" ]; do RELEASE_CHANNEL="stable" NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS:+${NETDATA_INSTALLER_OPTIONS} }${1}" shift 1 + elif [ "${1}" = "--disable-telemetry" ]; then + NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS:+${NETDATA_INSTALLER_OPTIONS} }${1}" + shift 1 elif [ "${1}" = "--local-files" ]; then shift 1 if [ -z "${1}" ]; then diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh index 7733d007ae..afbe83530e 100755 --- a/packaging/makeself/install-or-update.sh +++ b/packaging/makeself/install-or-update.sh @@ -32,6 +32,7 @@ while [ "${1}" ]; do "--dont-start-it") STARTIT=0;; "--auto-update"|"-u") AUTOUPDATE=1;; "--stable-channel") RELEASE_CHANNEL="stable";; + "--disable-telemetry") DISABLE_TELEMETRY=1;; *) echo >&2 "Unknown option '${1}'. Ignoring it.";; esac shift 1 @@ -134,6 +135,15 @@ progress "Install logrotate configuration for netdata" install_netdata_logrotate || run_failed "Cannot install logrotate file for netdata." +# ----------------------------------------------------------------------------- +progress "Telemetry configuration" + +# Opt-out from telemetry program +if [ -n "${NETDATA_DISABLE_TELEMETRY+x}" ]; then + run touch "${NETDATA_USER_CONFIG_DIR}/.opt-out-from-anonymous-statistics" +else + printf "You can opt out from anonymous statistics via the --disable-telemetry option, or by creating an empty file ${NETDATA_USER_CONFIG_DIR}/.opt-out-from-anonymous-statistics \n\n" +fi # ----------------------------------------------------------------------------- progress "Install netdata at system init" diff --git a/packaging/makeself/makeself-help-header.txt b/packaging/makeself/makeself-help-header.txt index bf482c465e..d561f818f9 100644 --- a/packaging/makeself/makeself-help-header.txt +++ b/packaging/makeself/makeself-help-header.txt @@ -42,3 +42,6 @@ netdata re-distributes a lot of open source software components. Check its full license at: https://github.com/netdata/netdata/blob/master/LICENSE.md + + Anonymous stat collection and reporting to Google Analytics is enabled + by default. To disable, pass --disable-telemetry option to the installer. |