summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnetdata-installer.sh10
-rw-r--r--packaging/docker/Dockerfile2
-rwxr-xr-xpackaging/docker/run.sh4
-rw-r--r--packaging/installer/README.md2
-rwxr-xr-xpackaging/installer/kickstart-static64.sh6
-rwxr-xr-xpackaging/makeself/install-or-update.sh10
-rw-r--r--packaging/makeself/makeself-help-header.txt3
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.