@cryptotaxi247 / netdata-1 / commits / 2ff0c5c3c

rename DO_NOT_TRACK to DISABLE_TELEMETRY (#12126)

Ilya Mashchenko committed Feb 15, 2022 at 17:23 UTC 2ff0c5c3cf96a80eaed28c955edb00dc6a249dd8
23 files changed +61 -41
.github/dockerfiles/Dockerfile.build_test
+1 -1
@@ -6,7 +6,7 @@ ARG PRE
6 ENV PRE=${PRE}
7 ARG RMJSONC
8 ENV RMJSONC=${RMJSONC}
9 -ENV DO_NOT_TRACK=1
9 +ENV DISABLE_TELEMETRY=1
10 ENV GITHUB_ACTIONS=true
11
12 RUN echo "${PRE}" > /prep-cmd.sh && \
.github/scripts/run_install_with_dist_file.sh
+1 -1
@@ -29,7 +29,7 @@ printf >&2 "Entering %s and starting docker run ..." "${distdir}"
29
30 pushd "${distdir}" || exit 1
31 docker run \
32 - -e DO_NOT_TRACK=1 \
32 + -e DISABLE_TELEMETRY=1 \
33 -v "${PWD}:/netdata" \
34 -w /netdata \
35 "ubuntu:latest" \
.github/workflows/build.yml
+1 -1
@@ -291,7 +291,7 @@ jobs:
291 echo "::set-output name=image::$(cut -d ':' -f 3 image-info.txt)"
292 - name: Install netdata and run the updater on ${{ matrix.distro }}
293 run: |
294 - docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 --network host -w /netdata sha256:${{ steps.load.outputs.image }} \
294 + docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 --network host -w /netdata sha256:${{ steps.load.outputs.image }} \
295 /netdata/.github/scripts/run-updater-check.sh
296 - name: Failure Notification
297 uses: rtCamp/action-slack-notify@v2
.github/workflows/checks.yml
+1 -1
@@ -6,7 +6,7 @@ on:
6 - master
7 pull_request: null
8 env:
9 - DO_NOT_TRACK: 1
9 + DISABLE_TELEMETRY: 1
10 concurrency:
11 group: checks-${{ github.ref }}
12 cancel-in-progress: true
.github/workflows/coverity.yml
+1 -1
@@ -9,7 +9,7 @@ on:
9 - .github/workflows/coverity.yml
10 - coverity-scan.sh
11 env:
12 - DO_NOT_TRACK: 1
12 + DISABLE_TELEMETRY: 1
13 concurrency:
14 group: coverity-${{ github.ref }}
15 cancel-in-progress: true
.github/workflows/dashboard-pr.yml
+1 -1
@@ -12,7 +12,7 @@ on:
12 required: true
13
14 env:
15 - DO_NOT_TRACK: 1
15 + DISABLE_TELEMETRY: 1
16
17 jobs:
18 dashboard-pr:
.github/workflows/docker.yml
+1 -1
@@ -12,7 +12,7 @@ on:
12 default: nightly
13 required: true
14 env:
15 - DO_NOT_TRACK: 1
15 + DISABLE_TELEMETRY: 1
16 concurrency:
17 group: docker-${{ github.ref }}-${{ github.event_name }}
18 cancel-in-progress: true
.github/workflows/docs.yml
+1 -1
@@ -10,7 +10,7 @@ on:
10 paths:
11 - '**.md'
12 env:
13 - DO_NOT_TRACK: 1
13 + DISABLE_TELEMETRY: 1
14 jobs:
15 markdown-link-check:
16 name: Broken Links
.github/workflows/labeler.yml
+1 -1
@@ -5,7 +5,7 @@ on:
5 schedule:
6 - cron: '*/10 * * * *'
7 env:
8 - DO_NOT_TRACK: 1
8 + DISABLE_TELEMETRY: 1
9 jobs:
10 labeler:
11 runs-on: ubuntu-latest
.github/workflows/packaging.yml
+3 -3
@@ -16,7 +16,7 @@ on:
16 name: Package version
17 required: false
18 env:
19 - DO_NOT_TRACK: 1
19 + DISABLE_TELEMETRY: 1
20 concurrency:
21 group: packages-${{ github.ref }}-${{ github.event_name }}
22 cancel-in-progress: true
@@ -136,11 +136,11 @@ jobs:
136 - name: Build Packages
137 shell: bash
138 run: |
139 - docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 -e VERSION=${{ env.pkg_version }} --platform=${{ matrix.platform }} -v $PWD:/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}
139 + docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 -e VERSION=${{ env.pkg_version }} --platform=${{ matrix.platform }} -v $PWD:/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}
140 - name: Test Packages
141 shell: bash
142 run: |
143 - docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 -e DISTRO=${{ matrix.distro }} -e VERSION=${{ env.pkg_version }} -e DISTRO_VERSION=${{ env.version }} --platform=${{ matrix.platform }} -v $PWD:/netdata ${{ matrix.base_image }}:${{ env.version }} /netdata/.github/scripts/pkg-test.sh
143 + docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 -e DISTRO=${{ matrix.distro }} -e VERSION=${{ env.pkg_version }} -e DISTRO_VERSION=${{ env.version }} --platform=${{ matrix.platform }} -v $PWD:/netdata ${{ matrix.base_image }}:${{ env.version }} /netdata/.github/scripts/pkg-test.sh
144 - name: Save Packages
145 uses: actions/upload-artifact@v2
146 with:
.github/workflows/repoconfig-packages.yml
+3 -3
@@ -14,13 +14,13 @@ on:
14 - packaging/repoconfig/**
15 - .github/workflows/repoconfig-packages.yml
16 env:
17 - DO_NOT_TRACK: 1
17 + DISABLE_TELEMETRY: 1
18 jobs:
19 build:
20 name: Build
21 runs-on: ubuntu-latest
22 env:
23 - DO_NOT_TRACK: 1
23 + DISABLE_TELEMETRY: 1
24 DOCKER_CLI_EXPERIMENTAL: enabled
25 strategy:
26 # This needs to be kept in sync with the matrix in packaging.yml, but should only include the AMD64 lines.
@@ -57,7 +57,7 @@ jobs:
57 - name: Build Packages
58 shell: bash
59 run: |
60 - docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 --platform ${{ matrix.platform }} \
60 + docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 --platform ${{ matrix.platform }} \
61 -v $PWD:/netdata ${{ matrix.base_image }}:${{ matrix.version }} \
62 /netdata/packaging/repoconfig/build-${{ matrix.format }}.sh
63 - name: Upload Packages
.github/workflows/review.yml
+1 -1
@@ -4,7 +4,7 @@ name: Review
4 on:
5 pull_request: null
6 env:
7 - DO_NOT_TRACK: 1
7 + DISABLE_TELEMETRY: 1
8 concurrency:
9 group: review-${{ github.ref }}
10 cancel-in-progress: true
.github/workflows/tests.yml
+1 -1
@@ -15,7 +15,7 @@ on:
15 - '**.c'
16 - '**.h'
17 env:
18 - DO_NOT_TRACK: 1
18 + DISABLE_TELEMETRY: 1
19 concurrency:
20 group: tests-${{ github.ref }}
21 cancel-in-progress: true
daemon/anonymous-statistics.sh.in
+5 -1
@@ -18,7 +18,11 @@ ACTION_DATA=$(echo "${ACTION_DATA}" | tr '"' "'")
18 # -------------------------------------------------------------------------------------------------
19 # check opt-out
20
21 -if [ -f "@configdir_POST@/.opt-out-from-anonymous-statistics" ] || [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
21 +if [ -f "@configdir_POST@/.opt-out-from-anonymous-statistics" ] ||
22 + [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
23 + [ -n "$DISABLE_TELEMETRY" ] ||
24 + [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
25 + [ -n "$DO_NOT_TRACK" ]; then
26 exit 0
27 fi
28
docs/anonymous-statistics.md
+4 -4
@@ -86,11 +86,11 @@ installation, including manual, offline, and macOS installations. Create the fil
86
87 **Pass the option `--disable-telemetry` to any of the installer scripts in the [installation
88 docs](/packaging/installer/README.md).** You can append this option during the initial installation or a manual
89 -update. You can also export the environment variable `DO_NOT_TRACK` with a non-zero or non-empty value
90 -(e.g: `export DO_NOT_TRACK=1`).
89 +update. You can also export the environment variable `DISABLE_TELEMETRY` with a non-zero or non-empty value
90 +(e.g: `export DISABLE_TELEMETRY=1`).
91
92 -When using Docker, **set your `DO_NOT_TRACK` environment variable to `1`.** You can set this variable with the following
93 -command: `export DO_NOT_TRACK=1`. When creating a container using Netdata's [Docker
92 +When using Docker, **set your `DISABLE_TELEMETRY` environment variable to `1`.** You can set this variable with the following
93 +command: `export DISABLE_TELEMETRY=1`. When creating a container using Netdata's [Docker
94 image](/packaging/docker/README.md#create-a-new-netdata-agent-container) for the first time, this variable will disable
95 the anonymous statistics script inside of the container.
96
netdata-installer.sh
+11 -8
@@ -266,7 +266,7 @@ USAGE: ${PROGRAM} [options]
266 --zlib-is-really-here or
267 --libs-are-really-here If you get errors about missing zlib or libuuid but you know it is available, you might
268 have a broken pkg-config. Use this option to proceed without checking pkg-config.
269 - --disable-telemetry Use this flag to opt-out from our anonymous telemetry program. (DO_NOT_TRACK=1)
269 + --disable-telemetry Use this flag to opt-out from our anonymous telemetry program. (DISABLE_TELEMETRY=1)
270 --skip-available-ram-check Skip checking the amount of RAM the system has and pretend it has enough to build safely.
271
272 Netdata will by default be compiled with gcc optimization -O2
@@ -411,6 +411,13 @@ while [ -n "${1}" ]; do
411 shift 1
412 done
413
414 +if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
415 + [ -n "$DISABLE_TELEMETRY" ] ||
416 + [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
417 + [ -n "$DO_NOT_TRACK" ]; then
418 + NETDATA_DISABLE_TELEMETRY=1
419 +fi
420 +
421 make="make"
422 # See: https://github.com/netdata/netdata/issues/9163
423 if [ "$(uname -s)" = "FreeBSD" ]; then
@@ -515,8 +522,8 @@ if [ -z "$NETDATA_DISABLE_TELEMETRY" ]; then
522 ${TPUT_YELLOW}${TPUT_BOLD}NOTE${TPUT_RESET}:
523 Anonymous usage stats will be collected and sent to Netdata.
524 To opt-out, pass --disable-telemetry option to the installer or export
518 - the environment variable DO_NOT_TRACK to a non-zero or non-empty value
519 - (e.g: export DO_NOT_TRACK=1).
525 + the environment variable DISABLE_TELEMETRY to a non-zero or non-empty value
526 + (e.g: export DISABLE_TELEMETRY=1).
527
528 BANNER4
529 fi
@@ -1606,7 +1613,7 @@ remove_old_ebpf() {
1613 mv "${NETDATA_PREFIX}/etc/netdata/ebpf_process.conf" "${NETDATA_PREFIX}/etc/netdata/ebpf.d.conf"
1614 fi
1615
1609 - # Added to remove eBPF programs with name pattern: NAME_VERSION.SUBVERSION.PATCH
1616 + # Added to remove eBPF programs with name pattern: NAME_VERSION.SUBVERSION.PATCH
1617 if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/pnetdata_ebpf_process.3.10.0.o" ]; then
1618 echo >&2 "Removing old eBPF programs with patch."
1619 rm -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/rnetdata_ebpf"*.?.*.*.o
@@ -1695,10 +1702,6 @@ install_ebpf
1702 # -----------------------------------------------------------------------------
1703 progress "Telemetry configuration"
1704
1698 -if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
1699 - NETDATA_DISABLE_TELEMETRY=1
1700 -fi
1701 -
1705 # Opt-out from telemetry program
1706 if [ -n "${NETDATA_DISABLE_TELEMETRY+x}" ]; then
1707 run touch "${NETDATA_USER_CONFIG_DIR}/.opt-out-from-anonymous-statistics"
packaging/docker/Dockerfile
+2 -2
@@ -65,8 +65,8 @@ ARG NETDATA_UID=201
65 ARG NETDATA_GID=201
66 ENV DOCKER_GRP netdata
67 ENV DOCKER_USR netdata
68 -# If DO_NOT_TRACK is set, it will disable anonymous stats collection and reporting
69 -#ENV DO_NOT_TRACK=1
68 +# If DISABLE_TELEMETRY is set, it will disable anonymous stats collection and reporting
69 +#ENV DISABLE_TELEMETRY=1
70
71 # Copy files over
72 RUN mkdir -p /opt/src /var/log/netdata && \
packaging/docker/run.sh
+4 -1
@@ -9,7 +9,10 @@
9 # Author : Austin S. Hemmelgarn <austin@netdata.cloud>
10 set -e
11
12 -if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
12 +if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
13 + [ -n "$DISABLE_TELEMETRY" ] ||
14 + [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
15 + [ -n "$DO_NOT_TRACK" ]; then
16 touch /etc/netdata/.opt-out-from-anonymous-statistics
17 fi
18
packaging/installer/kickstart.sh
+9 -2
@@ -29,7 +29,14 @@ NETDATA_ONLY_STATIC=0
29 NETDATA_REQUIRE_CLOUD=1
30 RELEASE_CHANNEL="nightly"
31
32 -NETDATA_DISABLE_TELEMETRY="${DO_NOT_TRACK:-0}"
32 +if [ -n "$DISABLE_TELEMETRY" ]; then
33 + NETDATA_DISABLE_TELEMETRY="${DISABLE_TELEMETRY}"
34 +elif [ -n "$DO_NOT_TRACK" ]; then
35 + NETDATA_DISABLE_TELEMETRY="${DO_NOT_TRACK}"
36 +else
37 + NETDATA_DISABLE_TELEMETRY=0
38 +fi
39 +
40 NETDATA_TARBALL_BASEURL="${NETDATA_TARBALL_BASEURL:-https://storage.googleapis.com/netdata-nightlies}"
41 NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS:-""}"
42 TELEMETRY_API_KEY="${NETDATA_POSTHOG_API_KEY:-mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y}"
@@ -83,7 +90,7 @@ Additionally, this script may use the following environment variables:
90 default we try to use sudo, doas, or pkexec (in that order of preference), but if
91 you need special options for one of those to work, or have a different tool to do
92 the same thing on your system, you can specify it here.
86 - DO_NOT_TRACK If set to a value other than 0, behave as if \`--disable-telemetry\` was specified.
93 + DISABLE_TELEMETRY If set to a value other than 0, behave as if \`--disable-telemetry\` was specified.
94 NETDATA_INSTALLER_OPTIONS: Specifies extra options to pass to the static installer or local build script.
95
96 HEREDOC
packaging/installer/methods/freebsd.md
+1 -1
@@ -103,6 +103,6 @@ The `netdata-updater.sh` script will update your Agent.
103 | `--disable-lto` | Disable Link-Time-Optimization. Default: enabled|
104 | `--disable-x86-sse` | Disable SSE instructions. By default SSE optimizations are enabled|
105 | `--zlib-is-really-here` or `--libs-are-really-here` | If you get errors about missing zlib or libuuid but you know it is available, you might have a broken pkg-config. Use this option to proceed without checking pkg-config|
106 -|`--disable-telemetry` | Use this flag to opt-out from our anonymous telemetry program. (DO_NOT_TRACK=1)|
106 +|`--disable-telemetry` | Use this flag to opt-out from our anonymous telemetry program. (DISABLE_TELEMETRY=1)|
107
108 [![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fpackaging%2Finstaller%2Fmethods%2Ffreebsd&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)
packaging/installer/methods/kickstart.md
+2 -2
@@ -73,7 +73,7 @@ should not need to use special values for any of these):
73 - `ROOTCMD`: Used to specify a command to use to run another command with root privileges if needed. By default
74 we try to use sudo, doas, or pkexec (in that order of preference), but if you need special options for one of
75 those to work, or have a different tool to do the same thing on your system, you can specify it here.
76 -- `DO_NOT_TRACK`: If set to a value other than 0, behave as if `--disable-telemetry` was specified.
76 +- `DISABLE_TELEMETRY`: If set to a value other than 0, behave as if `--disable-telemetry` was specified.
77 - `NETDATA_INSTALLER_OPTIONS`: Specifies extra options to pass to the static installer or local build script.
78
79 ### Connect node to Netdata Cloud during installation
@@ -136,7 +136,7 @@ To use `md5sum` to verify the integrity of the `kickstart.sh` script you will do
136 run the following:
137
138 ```bash
139 -[ "2ea326514c5166eabf02622e75d10a53" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
139 +[ "b63815109547f15a979752fced6bfc2e" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
140 ```
141
142 If the script is valid, this command will return `OK, VALID`.
packaging/makeself/install-or-update.sh
+4 -1
@@ -58,7 +58,10 @@ while [ "${1}" ]; do
58 shift 1
59 done
60
61 -if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
61 +if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
62 + [ -n "$DISABLE_TELEMETRY" ] ||
63 + [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
64 + [ -n "$DO_NOT_TRACK" ]; then
65 NETDATA_DISABLE_TELEMETRY=1
66 REINSTALL_OPTIONS="${REINSTALL_OPTIONS} --disable-telemetry"
67 fi
packaging/makeself/makeself-help-header.txt
+2 -2
@@ -45,5 +45,5 @@
45
46 Anonymous stat collection and reporting to Netdata is enabled
47 by default. To disable, pass --disable-telemetry option to the installer
48 - or export the environment variable DO_NOT_TRACK to a non-zero or non-empty
49 - value (e.g export DO_NOT_TRACK=1).
48 + or export the environment variable DISABLE_TELEMETRY to a non-zero or non-empty
49 + value (e.g export DISABLE_TELEMETRY=1).