0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-10 08:07:34 +00:00

rename DO_NOT_TRACK to DISABLE_TELEMETRY ()

This commit is contained in:
Ilya Mashchenko 2022-02-15 17:23:32 +03:00 committed by GitHub
parent e7102bd84f
commit 2ff0c5c3cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 61 additions and 41 deletions

View file

@ -6,7 +6,7 @@ ARG PRE
ENV PRE=${PRE}
ARG RMJSONC
ENV RMJSONC=${RMJSONC}
ENV DO_NOT_TRACK=1
ENV DISABLE_TELEMETRY=1
ENV GITHUB_ACTIONS=true
RUN echo "${PRE}" > /prep-cmd.sh && \

View file

@ -29,7 +29,7 @@ printf >&2 "Entering %s and starting docker run ..." "${distdir}"
pushd "${distdir}" || exit 1
docker run \
-e DO_NOT_TRACK=1 \
-e DISABLE_TELEMETRY=1 \
-v "${PWD}:/netdata" \
-w /netdata \
"ubuntu:latest" \

View file

@ -291,7 +291,7 @@ jobs:
echo "::set-output name=image::$(cut -d ':' -f 3 image-info.txt)"
- name: Install netdata and run the updater on ${{ matrix.distro }}
run: |
docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 --network host -w /netdata sha256:${{ steps.load.outputs.image }} \
docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 --network host -w /netdata sha256:${{ steps.load.outputs.image }} \
/netdata/.github/scripts/run-updater-check.sh
- name: Failure Notification
uses: rtCamp/action-slack-notify@v2

View file

@ -6,7 +6,7 @@ on:
- master
pull_request: null
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
concurrency:
group: checks-${{ github.ref }}
cancel-in-progress: true

View file

@ -9,7 +9,7 @@ on:
- .github/workflows/coverity.yml
- coverity-scan.sh
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
concurrency:
group: coverity-${{ github.ref }}
cancel-in-progress: true

View file

@ -12,7 +12,7 @@ on:
required: true
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
jobs:
dashboard-pr:

View file

@ -12,7 +12,7 @@ on:
default: nightly
required: true
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
concurrency:
group: docker-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

View file

@ -10,7 +10,7 @@ on:
paths:
- '**.md'
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
jobs:
markdown-link-check:
name: Broken Links

View file

@ -5,7 +5,7 @@ on:
schedule:
- cron: '*/10 * * * *'
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
jobs:
labeler:
runs-on: ubuntu-latest

View file

@ -16,7 +16,7 @@ on:
name: Package version
required: false
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
concurrency:
group: packages-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
@ -136,11 +136,11 @@ jobs:
- name: Build Packages
shell: bash
run: |
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 }}
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 }}
- name: Test Packages
shell: bash
run: |
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
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
- name: Save Packages
uses: actions/upload-artifact@v2
with:

View file

@ -14,13 +14,13 @@ on:
- packaging/repoconfig/**
- .github/workflows/repoconfig-packages.yml
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
DOCKER_CLI_EXPERIMENTAL: enabled
strategy:
# 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:
- name: Build Packages
shell: bash
run: |
docker run --security-opt seccomp=unconfined -e DO_NOT_TRACK=1 --platform ${{ matrix.platform }} \
docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 --platform ${{ matrix.platform }} \
-v $PWD:/netdata ${{ matrix.base_image }}:${{ matrix.version }} \
/netdata/packaging/repoconfig/build-${{ matrix.format }}.sh
- name: Upload Packages

View file

@ -4,7 +4,7 @@ name: Review
on:
pull_request: null
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
concurrency:
group: review-${{ github.ref }}
cancel-in-progress: true

View file

@ -15,7 +15,7 @@ on:
- '**.c'
- '**.h'
env:
DO_NOT_TRACK: 1
DISABLE_TELEMETRY: 1
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

View file

@ -18,7 +18,11 @@ ACTION_DATA=$(echo "${ACTION_DATA}" | tr '"' "'")
# -------------------------------------------------------------------------------------------------
# check opt-out
if [ -f "@configdir_POST@/.opt-out-from-anonymous-statistics" ] || [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
if [ -f "@configdir_POST@/.opt-out-from-anonymous-statistics" ] ||
[ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
[ -n "$DISABLE_TELEMETRY" ] ||
[ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
[ -n "$DO_NOT_TRACK" ]; then
exit 0
fi

View file

@ -86,11 +86,11 @@ installation, including manual, offline, and macOS installations. Create the fil
**Pass the option `--disable-telemetry` to any of the installer scripts in the [installation
docs](/packaging/installer/README.md).** You can append this option during the initial installation or a manual
update. You can also export the environment variable `DO_NOT_TRACK` with a non-zero or non-empty value
(e.g: `export DO_NOT_TRACK=1`).
update. You can also export the environment variable `DISABLE_TELEMETRY` with a non-zero or non-empty value
(e.g: `export DISABLE_TELEMETRY=1`).
When using Docker, **set your `DO_NOT_TRACK` environment variable to `1`.** You can set this variable with the following
command: `export DO_NOT_TRACK=1`. When creating a container using Netdata's [Docker
When using Docker, **set your `DISABLE_TELEMETRY` environment variable to `1`.** You can set this variable with the following
command: `export DISABLE_TELEMETRY=1`. When creating a container using Netdata's [Docker
image](/packaging/docker/README.md#create-a-new-netdata-agent-container) for the first time, this variable will disable
the anonymous statistics script inside of the container.

View file

@ -266,7 +266,7 @@ USAGE: ${PROGRAM} [options]
--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.
--disable-telemetry Use this flag to opt-out from our anonymous telemetry program. (DO_NOT_TRACK=1)
--disable-telemetry Use this flag to opt-out from our anonymous telemetry program. (DISABLE_TELEMETRY=1)
--skip-available-ram-check Skip checking the amount of RAM the system has and pretend it has enough to build safely.
Netdata will by default be compiled with gcc optimization -O2
@ -411,6 +411,13 @@ while [ -n "${1}" ]; do
shift 1
done
if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
[ -n "$DISABLE_TELEMETRY" ] ||
[ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
[ -n "$DO_NOT_TRACK" ]; then
NETDATA_DISABLE_TELEMETRY=1
fi
make="make"
# See: https://github.com/netdata/netdata/issues/9163
if [ "$(uname -s)" = "FreeBSD" ]; then
@ -515,8 +522,8 @@ if [ -z "$NETDATA_DISABLE_TELEMETRY" ]; then
${TPUT_YELLOW}${TPUT_BOLD}NOTE${TPUT_RESET}:
Anonymous usage stats will be collected and sent to Netdata.
To opt-out, pass --disable-telemetry option to the installer or export
the environment variable DO_NOT_TRACK to a non-zero or non-empty value
(e.g: export DO_NOT_TRACK=1).
the environment variable DISABLE_TELEMETRY to a non-zero or non-empty value
(e.g: export DISABLE_TELEMETRY=1).
BANNER4
fi
@ -1606,7 +1613,7 @@ remove_old_ebpf() {
mv "${NETDATA_PREFIX}/etc/netdata/ebpf_process.conf" "${NETDATA_PREFIX}/etc/netdata/ebpf.d.conf"
fi
# Added to remove eBPF programs with name pattern: NAME_VERSION.SUBVERSION.PATCH
# Added to remove eBPF programs with name pattern: NAME_VERSION.SUBVERSION.PATCH
if [ -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/pnetdata_ebpf_process.3.10.0.o" ]; then
echo >&2 "Removing old eBPF programs with patch."
rm -f "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/rnetdata_ebpf"*.?.*.*.o
@ -1695,10 +1702,6 @@ install_ebpf
# -----------------------------------------------------------------------------
progress "Telemetry configuration"
if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
NETDATA_DISABLE_TELEMETRY=1
fi
# Opt-out from telemetry program
if [ -n "${NETDATA_DISABLE_TELEMETRY+x}" ]; then
run touch "${NETDATA_USER_CONFIG_DIR}/.opt-out-from-anonymous-statistics"

View file

@ -65,8 +65,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=1
# If DISABLE_TELEMETRY is set, it will disable anonymous stats collection and reporting
#ENV DISABLE_TELEMETRY=1
# Copy files over
RUN mkdir -p /opt/src /var/log/netdata && \

View file

@ -9,7 +9,10 @@
# Author : Austin S. Hemmelgarn <austin@netdata.cloud>
set -e
if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
[ -n "$DISABLE_TELEMETRY" ] ||
[ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
[ -n "$DO_NOT_TRACK" ]; then
touch /etc/netdata/.opt-out-from-anonymous-statistics
fi

View file

@ -29,7 +29,14 @@ NETDATA_ONLY_STATIC=0
NETDATA_REQUIRE_CLOUD=1
RELEASE_CHANNEL="nightly"
NETDATA_DISABLE_TELEMETRY="${DO_NOT_TRACK:-0}"
if [ -n "$DISABLE_TELEMETRY" ]; then
NETDATA_DISABLE_TELEMETRY="${DISABLE_TELEMETRY}"
elif [ -n "$DO_NOT_TRACK" ]; then
NETDATA_DISABLE_TELEMETRY="${DO_NOT_TRACK}"
else
NETDATA_DISABLE_TELEMETRY=0
fi
NETDATA_TARBALL_BASEURL="${NETDATA_TARBALL_BASEURL:-https://storage.googleapis.com/netdata-nightlies}"
NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS:-""}"
TELEMETRY_API_KEY="${NETDATA_POSTHOG_API_KEY:-mqkwGT0JNFqO-zX2t0mW6Tec9yooaVu7xCBlXtHnt5Y}"
@ -83,7 +90,7 @@ Additionally, this script may use the following environment variables:
default we try to use sudo, doas, or pkexec (in that order of preference), but if
you need special options for one of those to work, or have a different tool to do
the same thing on your system, you can specify it here.
DO_NOT_TRACK If set to a value other than 0, behave as if \`--disable-telemetry\` was specified.
DISABLE_TELEMETRY If set to a value other than 0, behave as if \`--disable-telemetry\` was specified.
NETDATA_INSTALLER_OPTIONS: Specifies extra options to pass to the static installer or local build script.
HEREDOC

View file

@ -103,6 +103,6 @@ The `netdata-updater.sh` script will update your Agent.
| `--disable-lto` | Disable Link-Time-Optimization. Default: enabled|
| `--disable-x86-sse` | Disable SSE instructions. By default SSE optimizations are enabled|
| `--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|
|`--disable-telemetry` | Use this flag to opt-out from our anonymous telemetry program. (DO_NOT_TRACK=1)|
|`--disable-telemetry` | Use this flag to opt-out from our anonymous telemetry program. (DISABLE_TELEMETRY=1)|
[![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)](<>)

View file

@ -73,7 +73,7 @@ should not need to use special values for any of these):
- `ROOTCMD`: Used to specify a command to use to run another command with root privileges if needed. By default
we try to use sudo, doas, or pkexec (in that order of preference), but if you need special options for one of
those to work, or have a different tool to do the same thing on your system, you can specify it here.
- `DO_NOT_TRACK`: If set to a value other than 0, behave as if `--disable-telemetry` was specified.
- `DISABLE_TELEMETRY`: If set to a value other than 0, behave as if `--disable-telemetry` was specified.
- `NETDATA_INSTALLER_OPTIONS`: Specifies extra options to pass to the static installer or local build script.
### 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
run the following:
```bash
[ "2ea326514c5166eabf02622e75d10a53" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
[ "b63815109547f15a979752fced6bfc2e" = "$(curl -Ss https://my-netdata.io/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
```
If the script is valid, this command will return `OK, VALID`.

View file

@ -58,7 +58,10 @@ while [ "${1}" ]; do
shift 1
done
if [ ! "${DO_NOT_TRACK:-0}" -eq 0 ] || [ -n "$DO_NOT_TRACK" ]; then
if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] ||
[ -n "$DISABLE_TELEMETRY" ] ||
[ ! "${DO_NOT_TRACK:-0}" -eq 0 ] ||
[ -n "$DO_NOT_TRACK" ]; then
NETDATA_DISABLE_TELEMETRY=1
REINSTALL_OPTIONS="${REINSTALL_OPTIONS} --disable-telemetry"
fi

View file

@ -45,5 +45,5 @@
Anonymous stat collection and reporting to Netdata is enabled
by default. To disable, pass --disable-telemetry option to the installer
or export the environment variable DO_NOT_TRACK to a non-zero or non-empty
value (e.g export DO_NOT_TRACK=1).
or export the environment variable DISABLE_TELEMETRY to a non-zero or non-empty
value (e.g export DISABLE_TELEMETRY=1).