summaryrefslogtreecommitdiffstats
path: root/packaging/installer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packaging/installer/README.md83
-rw-r--r--packaging/installer/REINSTALL.md13
-rw-r--r--packaging/installer/UNINSTALL.md2
-rw-r--r--packaging/installer/UPDATE.md16
-rwxr-xr-xpackaging/installer/dependencies/alpine.sh29
-rwxr-xr-xpackaging/installer/dependencies/arch.sh31
-rwxr-xr-xpackaging/installer/dependencies/centos.sh7
-rwxr-xr-xpackaging/installer/dependencies/debian.sh8
-rwxr-xr-xpackaging/installer/dependencies/fedora.sh14
-rwxr-xr-xpackaging/installer/dependencies/freebsd.sh19
-rwxr-xr-xpackaging/installer/dependencies/gentoo.sh34
-rwxr-xr-xpackaging/installer/dependencies/ol.sh7
-rwxr-xr-xpackaging/installer/dependencies/opensuse.sh7
-rwxr-xr-xpackaging/installer/dependencies/rockylinux.sh7
-rwxr-xr-xpackaging/installer/dependencies/ubuntu.sh7
-rw-r--r--packaging/installer/functions.sh76
-rwxr-xr-xpackaging/installer/install-required-packages.sh93
-rw-r--r--packaging/installer/installer.nsi128
-rwxr-xr-xpackaging/installer/kickstart.sh294
-rw-r--r--packaging/installer/methods/ansible.md10
-rw-r--r--packaging/installer/methods/aws.md14
-rw-r--r--packaging/installer/methods/azure.md14
-rw-r--r--packaging/installer/methods/freebsd.md10
-rw-r--r--packaging/installer/methods/gcp.md14
-rw-r--r--packaging/installer/methods/kickstart.md18
-rw-r--r--packaging/installer/methods/kubernetes.md10
-rw-r--r--packaging/installer/methods/macos.md24
-rw-r--r--packaging/installer/methods/manual.md18
-rw-r--r--packaging/installer/methods/methods.md12
-rw-r--r--packaging/installer/methods/offline.md2
-rw-r--r--packaging/installer/methods/packages.md23
-rw-r--r--packaging/installer/methods/source.md162
-rw-r--r--packaging/installer/methods/synology.md2
-rw-r--r--packaging/installer/methods/systems.md4
-rwxr-xr-xpackaging/installer/netdata-uninstaller.sh2
-rwxr-xr-xpackaging/installer/netdata-updater.sh124
-rwxr-xr-xpackaging/installer/package-windows.sh43
37 files changed, 787 insertions, 594 deletions
diff --git a/packaging/installer/README.md b/packaging/installer/README.md
index 9260fb6e4..d15925dca 100644
--- a/packaging/installer/README.md
+++ b/packaging/installer/README.md
@@ -1,46 +1,36 @@
-import { OneLineInstallWget, OneLineInstallCurl } from '@site/src/components/OneLineInstall/'
-import { InstallRegexLink, InstallBoxRegexLink } from '@site/src/components/InstallRegexLink/'
-import Tabs from '@theme/Tabs';
-import TabItem from '@theme/TabItem';
-
# Netdata Agent Installation
-Netdata is very flexible and can be used to monitor all kinds of infrastructure. Read more about possible [Deployment guides](https://github.com/netdata/netdata/blob/master/docs/deployment-guides/README.md) to understand what better suites your needs.
+Netdata is very flexible and can be used to monitor all kinds of infrastructure. Read more about possible [Deployment guides](/docs/deployment-guides/README.md) to understand what better suites your needs.
## Install through Netdata Cloud
-Netdata is a free and open-source (FOSS) monitoring agent that collects thousands of hardware and software metrics from any physical or virtual system (we call them _nodes_). These metrics are organized in an easy-to-use and -navigate interface.
-
-Netdata runs permanently on all your physical/virtual servers, containers, cloud deployments, and edge/IoT devices.
-It runs on Linux distributions (Ubuntu, Debian, CentOS, and more), container/microservice platforms (Kubernetes clusters, Docker), and many other operating systems (FreeBSD, macOS), with no `sudo` required.
+The easiest way to install Netdata on your system is via Netdata Cloud, to do so:
-To install Netdata in minutes on your platform:
+1. Sign up to <https://app.netdata.cloud/>.
+2. You will be presented with an empty space, and a prompt to "Connect Nodes" with the install command for each platform.
+3. Select the platform you want to install Netdata to, copy and paste the script into your node's terminal, and run it.
-1. Sign up to <https://app.netdata.cloud/>
-2. You will be presented with an empty space, and a prompt to "Connect Nodes" with the install command for each platform
-3. Select the platform you want to install Netdata to, copy and paste the script into your node's terminal, and run it
+Once Netdata is installed, you can see the node live in your Netdata Space and charts in the [Metrics tab](/docs/dashboards-and-charts/metrics-tab-and-single-node-tabs.md).
-Upon installation completing successfully, you should be able to see the node live in your Netdata Space and live charts in the Overview tab. [Take a look at our Dashboards and Charts](https://github.com/netdata/netdata/blob/master/docs/category-overview-pages/accessing-netdata-dashboards.md) section to read more about Netdata's features.
+Take a look at our [Dashboards and Charts](/docs/dashboards-and-charts/README.md) section to read more about Netdata's features.
-## Maintaining a Netdata Agent installation
+## Post-install
-For actions like starting, stopping, restarting, updating and uninstalling the Netdata Agent take a look at your specific installation platform in the current section of our Documentation.
+### Configuration
-## Configuration
+If you are looking to configure your Netdata Agent installation, refer to the [respective section in our Documentation](/docs/netdata-agent/configuration/README.md).
-If you are looking to configure your Netdata Agent installation, refer to the [respective section in our Documentation](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration.md).
+### Data collection
-## Data collection
+If Netdata didn't autodetect all the hardware, containers, services, or applications running on your node, you should learn more about [how data collectors work](/src/collectors/README.md). If there's a [supported integration](/src/collectors/COLLECTORS.md) for metrics you need, refer to its respective page and read about its requirements to configure your endpoint to publish metrics in the correct format and endpoint.
-If Netdata didn't autodetect all the hardware, containers, services, or applications running on your node, you should learn more about [how data collectors work](https://github.com/netdata/netdata/blob/master/src/collectors/README.md). If there's a [supported collector](https://github.com/netdata/netdata/blob/master/src/collectors/COLLECTORS.md) for metrics you need, [configure the collector](https://github.com/netdata/netdata/blob/master/src/collectors/REFERENCE.md) or read about its requirements to configure your endpoint to publish metrics in the correct format and endpoint.
+### Alerts & notifications
-## Alerts & notifications
+Netdata comes with hundreds of pre-configured alerts, designed by our monitoring gurus in parallel with our open-source community, but you may want to [edit alerts](/src/health/REFERENCE.md) or [enable notifications](/docs/alerts-and-notifications/notifications/README.md) to customize your Netdata experience.
-Netdata comes with hundreds of pre-configured alerts, designed by our monitoring gurus in parallel with our open-source community, but you may want to [edit alerts](https://github.com/netdata/netdata/blob/master/src/health/REFERENCE.md) or [enable notifications](https://github.com/netdata/netdata/blob/master/docs/monitor/enable-notifications.md) to customize your Netdata experience.
+### Make your deployment production ready
-## Make your deployment production ready
-
-Go through our [deployment guides](https://github.com/netdata/netdata/blob/master/docs/deployment-guides/README.md), for suggested configuration changes for production deployments.
+Go through our [deployment guides](/docs/deployment-guides/README.md), for suggested configuration changes for production deployments.
## Advanced installation options and troubleshooting
@@ -48,32 +38,16 @@ Go through our [deployment guides](https://github.com/netdata/netdata/blob/maste
By default, Netdata's installation scripts enable automatic updates for both nightly and stable release channels.
-If you would prefer to update your Netdata agent manually, you can disable automatic updates by using the `--no-updates`
-option when you install or update Netdata using the [automatic one-line installation
-script](#automatic-one-line-installation-script).
+If you preferred to update your Netdata Agent manually, you can disable automatic updates by using the `--no-updates`
+option when you install or update Netdata using the [automatic one-line installation script](/packaging/installer/methods/kickstart.md).
```bash
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --no-updates
```
-With automatic updates disabled, you can choose exactly when and how you [update
-Netdata](https://github.com/netdata/netdata/blob/master/packaging/installer/UPDATE.md).
-
-#### Network usage of Netdata’s automatic updater
-
-The auto-update functionality set up by the installation scripts requires working internet access to function
-correctly. In particular, it currently requires access to GitHub (to check if a newer version of the updater script
-is available or not, as well as potentially fetching build-time dependencies that are bundled as part of the install),
-and Google Cloud Storage (to check for newer versions of Netdata and download the sources if there is a newer version).
-
-Note that the auto-update functionality will check for updates to itself independently of updates to Netdata,
-and will try to use the latest version of the updater script whenever possible. This is intended to reduce the
-amount of effort required by users to get updates working again in the event of a bug in the updater code.
-
-### Nightly vs. stable releases
+With automatic updates disabled, you can choose exactly when and how you [update Netdata](/packaging/installer/UPDATE.md).
-The Netdata team maintains two releases of the Netdata agent: **nightly** and **stable**. By default, Netdata's
-installation scripts will give you **automatic, nightly** updates, as that is our recommended configuration.
+### Nightly vs. Stable Releases
**Nightly**: We create nightly builds every 24 hours. They contain fully-tested code that fixes bugs or security flaws,
or introduces new features to Netdata. Every nightly release is a candidate for then becoming a stable release—when
@@ -94,13 +68,12 @@ the community helps fix any bugs that might have been introduced in previous rel
**Pros of using stable releases:**
-- Protect yourself from the rare instance when major bugs slip through our testing and negatively affect a Netdata
- installation
+- Protect yourself from the rare instance when major bugs slip through our testing and negatively affect a Netdata installation
- Retain more control over the Netdata version you use
### Anonymous statistics
-Starting with v1.30, Netdata collects anonymous usage information by default and sends it to a self-hosted PostHog instance within the Netdata infrastructure. Read about the information collected, and learn how to-opt, on our [anonymous statistics](https://github.com/netdata/netdata/blob/master/docs/anonymous-statistics.md) page.
+Starting with v1.30, Netdata collects anonymous usage information by default and sends it to a self-hosted PostHog instance within the Netdata infrastructure. Read about the information collected, and learn how to-opt, on our [anonymous statistics](/docs/netdata-agent/configuration/anonymous-telemetry-events.md) page.
The usage statistics are _vital_ for us, as we use them to discover bugs and prioritize new features. We thank you for
_actively_ contributing to Netdata's future.
@@ -122,12 +95,12 @@ There are three potential workarounds for this:
affect many projects other than just Netdata, and there are unfortunately a number of other services out there
that do not provide IPv6 connectivity, so taking this route is likely to save you time in the future as well.
2. If you are using a system that we publish native packages for (see our [platform support
- policy](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/versions-and-platforms.md) for more details),
+ policy](/docs/netdata-agent/versions-and-platforms.md) for more details),
you can manually set up our native package repositories as outlined in our [native package install
- documentation](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md). Our official
+ documentation](/packaging/installer/methods/packages.md). Our official
package repositories do provide service over IPv6, so they work without issue on hosts without IPv4 connectivity.
3. If neither of the above options work for you, you can still install using our [offline installation
- instructions](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/offline.md), though
+ instructions](/packaging/installer/methods/offline.md), though
do note that the offline install source must be prepared from a system with IPv4 connectivity.
#### Older distributions (Ubuntu 14.04, Debian 8, CentOS 6) and OpenSSL
@@ -144,8 +117,8 @@ man-in-the-middle attacks.
#### CentOS 6 and CentOS 8
To install the Agent on certain CentOS and RHEL systems, you must enable non-default repositories, such as EPEL or
-PowerTools, to gather hard dependencies. See the [CentOS 6](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#centos--rhel-6x) and
-[CentOS 8](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#centos--rhel-8x) sections for more information.
+PowerTools, to gather hard dependencies. See the [CentOS 6](/packaging/installer/methods/manual.md#centos--rhel-6x) and
+[CentOS 8](/packaging/installer/methods/manual.md#centos--rhel-8x) sections for more information.
#### Access to file is not permitted
@@ -179,4 +152,4 @@ both.
Our current build process has some issues when using certain configurations of the `clang` C compiler on Linux. See [the
section on `nonrepresentable section on output`
-errors](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#nonrepresentable-section-on-output-errors) for a workaround.
+errors](/packaging/installer/methods/manual.md#nonrepresentable-section-on-output-errors) for a workaround.
diff --git a/packaging/installer/REINSTALL.md b/packaging/installer/REINSTALL.md
index 91dd3d5f3..eeb0e2313 100644
--- a/packaging/installer/REINSTALL.md
+++ b/packaging/installer/REINSTALL.md
@@ -8,11 +8,11 @@ Netdata Agent on your node.
### Reinstalling with the same install type
Run the one-line installer script with the `--reinstall` parameter to reinstall the Netdata Agent. This will preserve
-any [user configuration](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) in `netdata.conf` or other files, and will keep the same install
+any [user configuration](/docs/netdata-agent/configuration/README.md) in `netdata.conf` or other files, and will keep the same install
type that was used for the original install.
If you used any [optional
-parameters](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial
+parameters](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial
installation, you need to pass them to the script again during reinstallation. If you cannot remember which options you
used, read the contents of the `.environment` file and look for a `REINSTALL_OPTIONS` line. This line contains a list of
optional parameters.
@@ -29,7 +29,7 @@ getting a badly broken installation working again. Unlike the regular `--reinsta
different install type than the original install used.
If you used any [optional
-parameters](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial
+parameters](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial
installation, you need to pass them to the script again during reinstallation. If you cannot remember which options you
used, read the contents of the `.environment` file and look for a `REINSTALL_OPTIONS` line. This line contains a list of
optional parameters.
@@ -59,8 +59,7 @@ When copying these directories back after the reinstall, you may need to update
## Troubleshooting
If you still experience problems with your Netdata Agent installation after following one of these processes, the next
-best route is to [uninstall](https://github.com/netdata/netdata/blob/master/packaging/installer/UNINSTALL.md) and then try a fresh installation using the [one-line
-installer](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md).
+best route is to [uninstall](/packaging/installer/UNINSTALL.md) and then try a fresh installation using the [one-line
+installer](/packaging/installer/methods/kickstart.md).
-You can also post to our [community forums](https://community.netdata.cloud/c/support/13) or create a new [bug
-report](https://github.com/netdata/netdata/issues/new?assignees=&labels=bug%2Cneeds+triage&template=BUG_REPORT.yml).
+You can also post to our [community forums](https://community.netdata.cloud) or create a new [bug report](https://github.com/netdata/netdata/issues/new?assignees=&labels=bug%2Cneeds+triage&template=BUG_REPORT.yml).
diff --git a/packaging/installer/UNINSTALL.md b/packaging/installer/UNINSTALL.md
index dc1dec0c2..c7de90d95 100644
--- a/packaging/installer/UNINSTALL.md
+++ b/packaging/installer/UNINSTALL.md
@@ -3,7 +3,7 @@
> ### Note
>
> If you're having trouble updating Netdata, moving from one installation method to another, or generally having
-> issues with your Netdata Agent installation, consider our [reinstalling Netdata](https://github.com/netdata/netdata/blob/master/packaging/installer/REINSTALL.md) instead of removing the Netdata Agent entirely.
+> issues with your Netdata Agent installation, consider our [reinstalling Netdata](/packaging/installer/REINSTALL.md) instead of removing the Netdata Agent entirely.
The recommended method to uninstall Netdata on a system is to use our kickstart installer script with the `--uninstall` option like so:
diff --git a/packaging/installer/UPDATE.md b/packaging/installer/UPDATE.md
index 50d8c8270..94faa881b 100644
--- a/packaging/installer/UPDATE.md
+++ b/packaging/installer/UPDATE.md
@@ -5,7 +5,7 @@ you installed. If you opted out of automatic updates, you need to update your Ne
or stable version. You can also [enable or disable automatic updates on an existing install](#control-automatic-updates).
> 💡 Looking to reinstall the Netdata Agent to enable a feature, update an Agent that cannot update automatically, or
-> troubleshoot an error during the installation process? See our [reinstallation doc](https://github.com/netdata/netdata/blob/master/packaging/installer/REINSTALL.md)
+> troubleshoot an error during the installation process? See our [reinstallation doc](/packaging/installer/REINSTALL.md)
> for reinstallation steps.
Before you update the Netdata Agent, check to see if your Netdata Agent is already up-to-date by clicking on the update
@@ -91,13 +91,13 @@ On such installs, you can update Netdata using your distribution package manager
The update process outlined above suffers from the same issues that installing on hosts without IPv4
connectivity does, and requires similar workarounds. For more details check [the explanation in our install
-documentation](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#installs-on-hosts-without-ipv4-connectivity).
+documentation](/packaging/installer/README.md#installs-on-hosts-without-ipv4-connectivity).
### If the kickstart script does not work
If the above command fails, you can [reinstall
-Netdata](https://github.com/netdata/netdata/blob/master/packaging/installer/REINSTALL.md#one-line-installer-script-kickstartsh) to get the latest version. This
-also preserves your [configuration](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md) in `netdata.conf` or other files just like updating
+Netdata](/packaging/installer/REINSTALL.md#one-line-installer-script-kickstartsh) to get the latest version. This
+also preserves your [configuration](/docs/netdata-agent/configuration/README.md) in `netdata.conf` or other files just like updating
normally would, though you will need to specify any installation options you used originally again.
## Docker
@@ -121,7 +121,7 @@ docker rm netdata
```
You can now re-create your Netdata container using the `docker` command or a `docker-compose.yml` file. See our [Docker
-installation instructions](https://github.com/netdata/netdata/blob/master/packaging/docker/README.md#create-a-new-netdata-agent-container) for details.
+installation instructions](/packaging/docker/README.md#create-a-new-netdata-agent-container) for details.
## macOS
@@ -132,7 +132,7 @@ brew upgrade netdata
```
Homebrew downloads the latest Netdata via the
-[formulae](https://github.com/Homebrew/homebrew-core/blob/master/Formula/netdata.rb), ensures all dependencies are met,
+[formulae](https://github.com/Homebrew/homebrew-core/blob/master/Formula/n/netdata.rb), ensures all dependencies are met,
and updates Netdata via reinstallation.
If you instead installed Netdata using our one-line installation script, you can use our [regular update
@@ -140,7 +140,7 @@ instructions](#updates-for-most-systems) to update Netdata.
## Manual installation from Git
-If you installed [Netdata manually from Git](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md), you can run that installer again
+If you installed [Netdata manually from Git](/packaging/installer/methods/manual.md), you can run that installer again
to update your agent. First, run our automatic requirements installer, which works on many Linux distributions, to
ensure your system has the dependencies necessary for new features.
@@ -196,7 +196,7 @@ located in the same directory as the main `netdata.conf` file. This file uses PO
variables that are used by the updater.
This configuration file can be edited [using our `edit-config`
-script](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md).
+script](/docs/netdata-agent/configuration/README.md).
The following configuration options are currently supported:
diff --git a/packaging/installer/dependencies/alpine.sh b/packaging/installer/dependencies/alpine.sh
index ee0504b34..77a6fc828 100755
--- a/packaging/installer/dependencies/alpine.sh
+++ b/packaging/installer/dependencies/alpine.sh
@@ -9,32 +9,27 @@ DONT_WAIT=0
package_tree="
alpine-sdk
- git
- gcc
- g++
- automake
- autoconf
cmake
- make
- libatomic
- libtool
- pkgconfig
- tar
+ coreutils
curl
+ elfutils-dev
+ g++
+ gcc
+ git
gzip
+ json-c-dev
+ libatomic
+ libmnl-dev
libuv-dev
lz4-dev
+ make
openssl-dev
- elfutils-dev
+ pkgconfig
python3
- zlib-dev
+ tar
util-linux-dev
- libmnl-dev
- json-c-dev
- musl-fts-dev
- bison
- flex
yaml-dev
+ zlib-dev
"
usage() {
diff --git a/packaging/installer/dependencies/arch.sh b/packaging/installer/dependencies/arch.sh
index 30be834be..7b0c9c54f 100755
--- a/packaging/installer/dependencies/arch.sh
+++ b/packaging/installer/dependencies/arch.sh
@@ -8,32 +8,25 @@ NON_INTERACTIVE=0
DONT_WAIT=0
declare -a package_tree=(
- gcc
- make
- autoconf
- autoconf-archive
- autogen
- automake
- libtool
+ binutils
cmake
- zlib
- util-linux
- libmnl
+ curl
+ gcc
+ git
+ gzip
json-c
- libyaml
+ libelf
+ libmnl
libuv
+ libyaml
lz4
+ make
openssl
- libelf
- git
pkgconfig
- tar
- curl
- gzip
python3
- binutils
- bison
- flex
+ tar
+ util-linux
+ zlib
)
usage() {
diff --git a/packaging/installer/dependencies/centos.sh b/packaging/installer/dependencies/centos.sh
index 532a0a71e..b647b2304 100755
--- a/packaging/installer/dependencies/centos.sh
+++ b/packaging/installer/dependencies/centos.sh
@@ -5,15 +5,9 @@
set -e
declare -a package_tree=(
- autoconf
- autoconf-archive
- automake
- bison
cmake
- cmake3
curl
elfutils-libelf-devel
- flex
findutils
gcc
gcc-c++
@@ -22,7 +16,6 @@ declare -a package_tree=(
json-c-devel
libatomic
libmnl-devel
- libtool
libuuid-devel
libuv-devel
libyaml-devel
diff --git a/packaging/installer/dependencies/debian.sh b/packaging/installer/dependencies/debian.sh
index 692a71191..099963afe 100755
--- a/packaging/installer/dependencies/debian.sh
+++ b/packaging/installer/dependencies/debian.sh
@@ -8,14 +8,8 @@ NON_INTERACTIVE=0
DONT_WAIT=0
package_tree="
- autoconf
- autoconf-archive
- autogen
- automake
- bison
cmake
curl
- flex
g++
gcc
git
@@ -27,12 +21,10 @@ package_tree="
libmnl-dev
libssl-dev
libsystemd-dev
- libtool
libuv1-dev
libyaml-dev
make
pkg-config
- python
python3
tar
uuid-dev
diff --git a/packaging/installer/dependencies/fedora.sh b/packaging/installer/dependencies/fedora.sh
index fc30b6113..151746377 100755
--- a/packaging/installer/dependencies/fedora.sh
+++ b/packaging/installer/dependencies/fedora.sh
@@ -17,23 +17,11 @@ os_version() {
fi
}
-if [[ $(os_version) -gt 24 ]]; then
- ulogd_pkg=
-else
- ulogd_pkg=ulogd
-fi
-
declare -a package_tree=(
- autoconf
- autoconf-archive
- autogen
- automake
- bison
cmake
curl
elfutils-libelf-devel
findutils
- flex
gcc
gcc-c++
git
@@ -41,7 +29,6 @@ declare -a package_tree=(
json-c-devel
libatomic
libmnl-devel
- libtool
libuuid-devel
libuv-devel
libyaml-devel
@@ -53,7 +40,6 @@ declare -a package_tree=(
systemd-devel
tar
zlib-devel
- "${ulogd_pkg}"
)
usage() {
diff --git a/packaging/installer/dependencies/freebsd.sh b/packaging/installer/dependencies/freebsd.sh
index eadbcfa98..91fd2959c 100755
--- a/packaging/installer/dependencies/freebsd.sh
+++ b/packaging/installer/dependencies/freebsd.sh
@@ -8,26 +8,19 @@ NON_INTERACTIVE=0
DONT_WAIT=0
package_tree="
- git
- autoconf
- autoconf-archive
- autogen
- automake
- libtool
- pkgconf
cmake
curl
- gzip
- lzlib
e2fsprogs-libuuid
+ git
+ gzip
json-c
- libyaml
- libuv
liblz4
+ libuv
+ libyaml
+ lzlib
openssl
+ pkgconf
python3
- bison
- flex
"
prompt() {
diff --git a/packaging/installer/dependencies/gentoo.sh b/packaging/installer/dependencies/gentoo.sh
index 9cf7f281a..58e805a2d 100755
--- a/packaging/installer/dependencies/gentoo.sh
+++ b/packaging/installer/dependencies/gentoo.sh
@@ -8,32 +8,26 @@ NON_INTERACTIVE=0
DONT_WAIT=0
package_tree="
+ app-alternatives/gzip
+ app-alternatives/tar
+ app-arch/lz4
+ dev-lang/python
+ dev-libs/json-c
+ dev-libs/libuv
+ dev-libs/libyaml
+ dev-libs/openssl
+ dev-util/cmake
dev-vcs/git
+ net-libs/libmnl
+ net-misc/curl
sys-apps/findutils
+ sys-apps/util-linux
sys-devel/gcc
sys-devel/make
- sys-devel/autoconf
- sys-devel/autoconf-archive
- sys-devel/autogen
- sys-devel/automake
- virtual/pkgconfig
- dev-util/cmake
- app-arch/tar
- net-misc/curl
- app-arch/gzip
- sys-apps/util-linux
- net-libs/libmnl
- dev-libs/json-c
- dev-libs/libyaml
- dev-libs/libuv
- app-arch/lz4
- dev-libs/openssl
virtual/libelf
- dev-lang/python
- dev-libs/libuv
- sys-devel/bison
- sys-devel/flex
+ virtual/pkgconfig
"
+
usage() {
cat << EOF
OPTIONS:
diff --git a/packaging/installer/dependencies/ol.sh b/packaging/installer/dependencies/ol.sh
index 2dc10cee5..fca904a9b 100755
--- a/packaging/installer/dependencies/ol.sh
+++ b/packaging/installer/dependencies/ol.sh
@@ -8,15 +8,9 @@ NON_INTERACTIVE=0
DONT_WAIT=0
declare -a package_tree=(
- autoconf
- autoconf-archive
- autogen
- automake
- bison
cmake
curl
elfutils-libelf-devel
- flex
gcc
gcc-c++
git
@@ -24,7 +18,6 @@ declare -a package_tree=(
json-c-devel
libatomic
libmnl-devel
- libtool
libuuid-devel
libuv-devel
libyaml-devel
diff --git a/packaging/installer/dependencies/opensuse.sh b/packaging/installer/dependencies/opensuse.sh
index ecf1268fc..4fba64095 100755
--- a/packaging/installer/dependencies/opensuse.sh
+++ b/packaging/installer/dependencies/opensuse.sh
@@ -10,14 +10,8 @@ NON_INTERACTIVE=0
DONT_WAIT=0
declare -a package_tree=(
- autoconf
- autoconf-archive
- autogen
- automake
- bison
cmake
curl
- flex
gcc
gcc-c++
git
@@ -28,7 +22,6 @@ declare -a package_tree=(
liblz4-devel
libmnl-devel
libopenssl-devel
- libtool
libuuid-devel
libuv-devel
libyaml-devel
diff --git a/packaging/installer/dependencies/rockylinux.sh b/packaging/installer/dependencies/rockylinux.sh
index cc8d45204..921fd29bf 100755
--- a/packaging/installer/dependencies/rockylinux.sh
+++ b/packaging/installer/dependencies/rockylinux.sh
@@ -8,16 +8,10 @@ NON_INTERACTIVE=0
DONT_WAIT=0
declare -a package_tree=(
- autoconf
- autoconf-archive
- autogen
- automake
- bison
cmake
curl
elfutils-libelf-devel
findutils
- flex
gcc
gcc-c++
git
@@ -25,7 +19,6 @@ declare -a package_tree=(
json-c-devel
libatomic
libmnl-devel
- libtool
libuuid-devel
libuv-devel
libyaml-devel
diff --git a/packaging/installer/dependencies/ubuntu.sh b/packaging/installer/dependencies/ubuntu.sh
index e223ca384..c6e5a0b36 100755
--- a/packaging/installer/dependencies/ubuntu.sh
+++ b/packaging/installer/dependencies/ubuntu.sh
@@ -8,14 +8,8 @@ NON_INTERACTIVE=0
DONT_WAIT=0
package_tree="
- autoconf
- autoconf-archive
- autogen
- automake
- bison
cmake
curl
- flex
g++
gcc
git
@@ -27,7 +21,6 @@ package_tree="
libmnl-dev
libssl-dev
libsystemd-dev
- libtool
libuv1-dev
libyaml-dev
make
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh
index 9060930ce..c339ac87c 100644
--- a/packaging/installer/functions.sh
+++ b/packaging/installer/functions.sh
@@ -103,13 +103,33 @@ check_for_curl() {
get() {
url="${1}"
+ checked=0
+ succeeded=0
check_for_curl
if [ -n "${curl}" ]; then
- "${curl}" -q -o - -sSL --connect-timeout 10 --retry 3 "${url}"
- elif command -v wget > /dev/null 2>&1; then
- wget -T 15 -O - "${url}"
+ checked=1
+
+ if "${curl}" -q -o - -sSL --connect-timeout 10 --retry 3 "${url}"; then
+ succeeded=1
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 0 ]; then
+ if command -v wget > /dev/null 2>&1; then
+ checked=1
+
+ if wget -T 15 -O - "${url}"; then
+ succeeded=1
+ fi
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 1 ]; then
+ return 0
+ elif [ "${checked}" -eq 1 ]; then
+ return 1
else
fatal "I need curl or wget to proceed, but neither is available on this system." "L0002"
fi
@@ -124,9 +144,29 @@ download_file() {
check_for_curl
if [ -n "${curl}" ]; then
- run "${curl}" -q -sSL --connect-timeout 10 --retry 3 --output "${dest}" "${url}"
- elif command -v wget > /dev/null 2>&1; then
- run wget -T 15 -O "${dest}" "${url}"
+ checked=1
+
+ if run "${curl}" -q -sSL --connect-timeout 10 --retry 3 --output "${dest}" "${url}"; then
+ succeeded=1
+ else
+ rm -f "${dest}"
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 0 ]; then
+ if command -v wget > /dev/null 2>&1; then
+ checked=1
+
+ if run wget -T 15 -O "${dest}" "${url}"; then
+ succeeded=1
+ fi
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 1 ]; then
+ return 0
+ elif [ "${checked}" -eq 1 ]; then
+ return 1
else
echo >&2
echo >&2 "Downloading ${name} from '${url}' failed because of missing mandatory packages."
@@ -300,8 +340,6 @@ prepare_cmake_options() {
enable_feature PLUGIN_LOCAL_LISTENERS "${IS_LINUX}"
enable_feature PLUGIN_NETWORK_VIEWER "${IS_LINUX}"
enable_feature PLUGIN_EBPF "${ENABLE_EBPF:-0}"
- enable_feature PLUGIN_LOGS_MANAGEMENT "${ENABLE_LOGS_MANAGEMENT:-0}"
- enable_feature LOGS_MANAGEMENT_TESTS "${ENABLE_LOGS_MANAGEMENT_TESTS:-0}"
enable_feature ACLK "${ENABLE_CLOUD:-1}"
enable_feature CLOUD "${ENABLE_CLOUD:-1}"
@@ -870,6 +908,28 @@ install_netdata_logrotate() {
}
# -----------------------------------------------------------------------------
+# install netdata journald configuration
+
+install_netdata_journald_conf() {
+ src="${NETDATA_PREFIX}/usr/lib/netdata/system/systemd/journald@netdata.conf"
+
+ [ ! -d /usr/lib/systemd/ ] && return 0
+ [ "${UID}" -ne 0 ] && return 1
+
+ if [ ! -d /usr/lib/systemd/journald@netdata.conf.d/ ]; then
+ run mkdir /usr/lib/systemd/journald@netdata.conf.d/
+ fi
+
+ run cp "${src}" /usr/lib/systemd/journald@netdata.conf.d/netdata.conf
+
+ if [ -f /usr/lib/systemd/journald@netdata.conf.d/netdata.conf ]; then
+ run chmod 644 /usr/lib/systemd/journald@netdata.conf.d/netdata.conf
+ fi
+
+ return 0
+}
+
+# -----------------------------------------------------------------------------
# create netdata.conf
create_netdata_conf() {
diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh
index 179cbd5e9..e97902026 100755
--- a/packaging/installer/install-required-packages.sh
+++ b/packaging/installer/install-required-packages.sh
@@ -471,7 +471,7 @@ detect_package_manager_from_distribution() {
package_installer="install_brew"
tree="macos"
if [ "${IGNORE_INSTALLED}" -eq 0 ] && [ -z "${brew}" ]; then
- echo >&2 "command 'brew' is required to install packages on a '${distribution} ${version}' system."
+ echo >&2 "command 'brew' is required to install packages on a '${distribution} ${version}' system. Get instructions at https://brew.sh/"
exit 1
fi
;;
@@ -623,77 +623,21 @@ declare -A pkg_find=(
declare -A pkg_distro_sdk=(
['alpine']="alpine-sdk"
+ ['centos']="kernel-headers"
['default']="NOTREQUIRED"
)
-declare -A pkg_autoconf=(
- ['gentoo']="sys-devel/autoconf"
- ['clearlinux']="c-basic"
- ['default']="autoconf"
-)
-
-# required to compile netdata with --enable-sse
-# https://github.com/firehol/netdata/pull/450
-declare -A pkg_autoconf_archive=(
- ['gentoo']="sys-devel/autoconf-archive"
- ['clearlinux']="c-basic"
- ['alpine']="WARNING|"
- ['default']="autoconf-archive"
-
- # exceptions
- ['centos-6']="WARNING|"
- ['rhel-6']="WARNING|"
- ['rhel-7']="WARNING|"
-)
-
-declare -A pkg_autogen=(
- ['gentoo']="sys-devel/autogen"
- ['clearlinux']="c-basic"
- ['alpine']="WARNING|"
- ['default']="autogen"
-
- # exceptions
- ['centos-6']="WARNING|"
- ['rhel-6']="WARNING|"
- ['centos-9']="NOTREQUIRED|"
- ['rhel-9']="NOTREQUIRED|"
-)
-
-declare -A pkg_automake=(
- ['gentoo']="sys-devel/automake"
- ['clearlinux']="c-basic"
- ['default']="automake"
+declare -A pkg_coreutils=(
+ ['alpine']="coreutils"
+ ['default']="NOTREQUIRED"
)
-# Required to build libwebsockets and libmosquitto on some systems.
declare -A pkg_cmake=(
['gentoo']="dev-util/cmake"
['clearlinux']="c-basic"
['default']="cmake"
)
-# bison and flex are required by Fluent-Bit
-declare -A pkg_bison=(
- ['default']="bison"
-)
-
-declare -A pkg_flex=(
- ['default']="flex"
-)
-
-# fts-dev is required by Fluent-Bit on Alpine
-declare -A pkg_fts_dev=(
- ['default']="NOTREQUIRED"
- ['alpine']="musl-fts-dev"
- ['alpine-3.16.9']="fts-dev"
-)
-
-# cmake3 is required by Fluent-Bit on CentOS 7
-declare -A pkg_cmake3=(
- ['default']="NOTREQUIRED"
- ['centos-7']="cmake3"
-)
-
declare -A pkg_json_c_dev=(
['alpine']="json-c-dev"
['arch']="json-c"
@@ -747,6 +691,11 @@ declare -A pkg_libsystemd_dev=(
['default']="systemd-devel"
)
+declare -A pkg_pcre2=(
+ ['macos']="pcre2"
+ ['default']="NOTREQUIRED"
+)
+
declare -A pkg_bridge_utils=(
['gentoo']="net-misc/bridge-utils"
['clearlinux']="network-basic"
@@ -761,13 +710,13 @@ declare -A pkg_curl=(
)
declare -A pkg_gzip=(
- ['gentoo']="app-arch/gzip"
+ ['gentoo']="app-alternatives/gzip"
['macos']="NOTREQUIRED"
['default']="gzip"
)
declare -A pkg_tar=(
- ['gentoo']="app-arch/tar"
+ ['gentoo']="app-alternatives/tar"
['clearlinux']="os-core-update"
['macos']="NOTREQUIRED"
['freebsd']="NOTREQUIRED"
@@ -1228,6 +1177,7 @@ packages() {
# basic build environment
suitable_package distro-sdk
+ suitable_package coreutils
suitable_package libatomic
require_cmd git || suitable_package git
@@ -1237,14 +1187,9 @@ packages() {
require_cmd gcc-multilib || suitable_package gcc
require_cmd g++ || require_cmd clang++ || suitable_package gxx
- require_cmd make || suitable_package make
- require_cmd autoconf || suitable_package autoconf
- suitable_package autoconf-archive
- require_cmd autogen || suitable_package autogen
- require_cmd automake || suitable_package automake
require_cmd pkg-config || suitable_package pkg-config
require_cmd cmake || suitable_package cmake
- require_cmd cmake3 || suitable_package cmake3
+ require_cmd make || suitable_package make
# -------------------------------------------------------------------------
# debugging tools for development
@@ -1267,8 +1212,6 @@ packages() {
require_cmd tar || suitable_package tar
require_cmd curl || suitable_package curl
require_cmd gzip || suitable_package gzip
- require_cmd bison || suitable_package bison
- require_cmd flex || suitable_package flex
fi
# -------------------------------------------------------------------------
@@ -1300,9 +1243,9 @@ packages() {
suitable_package libuuid-dev
suitable_package libmnl-dev
suitable_package json-c-dev
- suitable_package fts-dev
suitable_package libyaml-dev
suitable_package libsystemd-dev
+ suitable_package pcre2
fi
# -------------------------------------------------------------------------
@@ -1335,9 +1278,6 @@ packages() {
if [ "${PACKAGES_NETDATA_PYTHON}" -ne 0 ]; then
require_cmd python || suitable_package python
-
- # suitable_package python-requests
- # suitable_package python-pip
fi
# -------------------------------------------------------------------------
@@ -1345,9 +1285,6 @@ packages() {
if [ "${PACKAGES_NETDATA_PYTHON3}" -ne 0 ]; then
require_cmd python3 || suitable_package python3
-
- # suitable_package python3-requests
- # suitable_package python3-pip
fi
# -------------------------------------------------------------------------
diff --git a/packaging/installer/installer.nsi b/packaging/installer/installer.nsi
new file mode 100644
index 000000000..c14ccb599
--- /dev/null
+++ b/packaging/installer/installer.nsi
@@ -0,0 +1,128 @@
+!include "MUI2.nsh"
+!include "nsDialogs.nsh"
+!include "FileFunc.nsh"
+
+Name "Netdata"
+Outfile "netdata-installer.exe"
+InstallDir "$PROGRAMFILES\Netdata"
+RequestExecutionLevel admin
+
+!define MUI_ICON "NetdataWhite.ico"
+!define MUI_UNICON "NetdataWhite.ico"
+
+!define ND_UININSTALL_REG "Software\Microsoft\Windows\CurrentVersion\Uninstall\Netdata"
+
+!define MUI_ABORTWARNING
+!define MUI_UNABORTWARNING
+
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "C:\msys64\gpl-3.0.txt"
+!insertmacro MUI_PAGE_DIRECTORY
+!insertmacro MUI_PAGE_INSTFILES
+!insertmacro MUI_PAGE_FINISH
+
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!insertmacro MUI_UNPAGE_FINISH
+
+!insertmacro MUI_LANGUAGE "English"
+
+Function .onInit
+ nsExec::ExecToLog '$SYSDIR\sc.exe stop Netdata'
+ pop $0
+ ${If} $0 == 0
+ nsExec::ExecToLog '$SYSDIR\sc.exe delete Netdata'
+ pop $0
+ ${EndIf}
+FunctionEnd
+
+Function NetdataUninstallRegistry
+ ClearErrors
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "DisplayName" "Netdata - Real-time system monitoring."
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "DisplayIcon" "$INSTDIR\Uninstall.exe,0"
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "UninstallString" "$INSTDIR\Uninstall.exe"
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "RegOwner" "Netdata Inc."
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "RegCompany" "Netdata Inc."
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "Publisher" "Netdata Inc."
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "HelpLink" "https://learn.netdata.cloud/"
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "URLInfoAbout" "https://www.netdata.cloud/"
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "DisplayVersion" "${CURRVERSION}"
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "VersionMajor" "${MAJORVERSION}"
+ WriteRegStr HKLM "${ND_UININSTALL_REG}" \
+ "VersionMinor" "${MINORVERSION}"
+
+ IfErrors 0 +2
+ MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to create an entry in the Control Panel!" IDOK end
+
+ ClearErrors
+ ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
+ IntFmt $0 "0x%08X" $0
+ WriteRegDWORD HKLM "${ND_UININSTALL_REG}" "EstimatedSize" "$0"
+
+ IfErrors 0 +2
+ MessageBox MB_ICONEXCLAMATION|MB_OK "Cannot estimate the installation size." IDOK end
+ end:
+FunctionEnd
+
+Section "Install Netdata"
+ SetOutPath $INSTDIR
+ SetCompress off
+
+ File /r "C:\msys64\opt\netdata\*.*"
+
+ ClearErrors
+ nsExec::ExecToLog '$SYSDIR\sc.exe create Netdata binPath= "$INSTDIR\usr\bin\netdata.exe" start= delayed-auto'
+ pop $0
+ ${If} $0 != 0
+ DetailPrint "Warning: Failed to create Netdata service."
+ ${EndIf}
+
+ ClearErrors
+ nsExec::ExecToLog '$SYSDIR\sc.exe description Netdata "Real-time system monitoring service"'
+ pop $0
+ ${If} $0 != 0
+ DetailPrint "Warning: Failed to add Netdata service description."
+ ${EndIf}
+
+ ClearErrors
+ nsExec::ExecToLog '$SYSDIR\sc.exe start Netdata'
+ pop $0
+ ${If} $0 != 0
+ DetailPrint "Warning: Failed to start Netdata service."
+ ${EndIf}
+
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+ Call NetdataUninstallRegistry
+SectionEnd
+
+Section "Uninstall"
+ ClearErrors
+ nsExec::ExecToLog '$SYSDIR\sc.exe stop Netdata'
+ pop $0
+ ${If} $0 != 0
+ DetailPrint "Warning: Failed to stop Netdata service."
+ ${EndIf}
+
+ ClearErrors
+ nsExec::ExecToLog '$SYSDIR\sc.exe delete Netdata'
+ pop $0
+ ${If} $0 != 0
+ DetailPrint "Warning: Failed to delete Netdata service."
+ ${EndIf}
+
+ RMDir /r "$INSTDIR"
+
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Netdata"
+SectionEnd
+
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index 6d9f4ea0e..72b82be26 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
-# Next unused error code: F0517
+# Next unused error code: F051B
# ======================================================================
# Constants
@@ -21,8 +21,8 @@ KICKSTART_SOURCE="$(
)"
DEFAULT_PLUGIN_PACKAGES=""
PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
-REPOCONFIG_DEB_VERSION="2-2"
-REPOCONFIG_RPM_VERSION="2-2"
+REPOCONFIG_DEB_VERSION="3-2"
+REPOCONFIG_RPM_VERSION="3-2"
START_TIME="$(date +%s)"
STATIC_INSTALL_ARCHES="x86_64 armv7l armv6l aarch64 ppc64le"
@@ -196,6 +196,7 @@ USAGE: kickstart.sh [options]
--no-cleanup Don't do any cleanup steps. This is intended to help with debugging the installer.
--local-build-options Specify additional options to pass to the installer code when building locally. Only valid if --build-only is also specified.
--static-install-options Specify additional options to pass to the static installer code. Only valid if --static-only is also specified.
+ --offline-architecture Limit an offline install source being prepared with --prepare-offline-install-source to only include the specified static build architecture.
The following options are mutually exclusive and specifiy special operations other than trying to install Netdata normally or update an existing install:
@@ -311,23 +312,31 @@ telemetry_event() {
EOF
)"
+ succeeded=0
+
if [ -n "${CURL}" ]; then
- "${CURL}" --silent -o /dev/null -X POST --max-time 2 --header "Content-Type: application/json" -d "${REQ_BODY}" "${TELEMETRY_URL}" > /dev/null
- elif command -v wget > /dev/null 2>&1; then
- if wget --help 2>&1 | grep BusyBox > /dev/null 2>&1; then
- # BusyBox-compatible version of wget, there is no --no-check-certificate option
- wget -q -O - \
- -T 1 \
- --header 'Content-Type: application/json' \
- --post-data "${REQ_BODY}" \
- "${TELEMETRY_URL}" > /dev/null
- else
- wget -q -O - --no-check-certificate \
- --method POST \
- --timeout=1 \
- --header 'Content-Type: application/json' \
- --body-data "${REQ_BODY}" \
- "${TELEMETRY_URL}" > /dev/null
+ if "${CURL}" --silent -o /dev/null -X POST --max-time 2 --header "Content-Type: application/json" -d "${REQ_BODY}" "${TELEMETRY_URL}" > /dev/null; then
+ succeeded=1
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 0 ]; then
+ if command -v wget > /dev/null 2>&1; then
+ if wget --help 2>&1 | grep BusyBox > /dev/null 2>&1; then
+ # BusyBox-compatible version of wget, there is no --no-check-certificate option
+ wget -q -O - \
+ -T 1 \
+ --header 'Content-Type: application/json' \
+ --post-data "${REQ_BODY}" \
+ "${TELEMETRY_URL}" > /dev/null
+ else
+ wget -q -O - --no-check-certificate \
+ --method POST \
+ --timeout=1 \
+ --header 'Content-Type: application/json' \
+ --body-data "${REQ_BODY}" \
+ "${TELEMETRY_URL}" > /dev/null
+ fi
fi
fi
}
@@ -368,6 +377,17 @@ trap 'trap_handler 15 0' TERM
# ======================================================================
# Utility functions
+canonical_path() {
+ OLDPWD="$(pwd)"
+ cd "$(dirname "${1}")" || exit 1
+ case "$(basename "${1}")" in
+ ..) dirname "$(pwd -P)" ;;
+ .) pwd -P ;;
+ *) echo "$(pwd -P)/$(basename "${1}")" ;;
+ esac
+ cd "${OLDPWD}" || exit 1
+}
+
setup_terminal() {
TPUT_RESET=""
TPUT_WHITE=""
@@ -435,7 +455,7 @@ deferred_warnings() {
fatal() {
deferred_warnings
- printf >&2 "%s\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD} ABORTED ${TPUT_RESET} ${1}"
+ printf >&2 "%b\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD} ABORTED ${TPUT_RESET} ${1}"
printf >&2 "%s\n" "For community support, you can connect with us on:"
support_list
telemetry_event "INSTALL_FAILED" "${1}" "${2}"
@@ -534,11 +554,15 @@ run_script() {
# shellcheck disable=SC2086
run ${ROOTCMD} "${@}"
+ ret="$?"
+
if [ -r "${NETDATA_SCRIPT_STATUS_PATH}" ]; then
# shellcheck disable=SC1090
. "${NETDATA_SCRIPT_STATUS_PATH}"
rm -f "${NETDATA_SCRIPT_STATUS_PATH}"
fi
+
+ return "${ret}"
}
warning() {
@@ -592,15 +616,38 @@ set_tmpdir() {
check_for_remote_file() {
url="${1}"
+ succeeded=0
+ checked=0
if echo "${url}" | grep -Eq "^file:///"; then
[ -e "${url#file://}" ] || return 1
+ return 0
elif [ -n "${NETDATA_ASSUME_REMOTE_FILES_ARE_PRESENT}" ]; then
return 0
- elif [ -n "${CURL}" ]; then
- "${CURL}" --output /dev/null --silent --head --fail "${url}" || return 1
- elif command -v wget > /dev/null 2>&1; then
- wget -S --spider "${url}" 2>&1 | grep -q 'HTTP/1.1 200 OK' || return 1
+ fi
+
+ if [ -n "${CURL}" ]; then
+ checked=1
+
+ if "${CURL}" --output /dev/null --silent --head --fail "${url}"; then
+ succeeded=1
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 0 ]; then
+ if command -v wget > /dev/null 2>&1; then
+ checked=1
+
+ if wget -S --spider "${url}" 2>&1 | grep -q 'HTTP/1.1 200 OK'; then
+ succeeded=1
+ fi
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 1 ]; then
+ return 0
+ elif [ "${checked}" -eq 1 ]; then
+ return 1
else
fatal "${ERROR_F0003}" F0003
fi
@@ -609,13 +656,39 @@ check_for_remote_file() {
download() {
url="${1}"
dest="${2}"
+ succeeded=0
+ checked=0
if echo "${url}" | grep -Eq "^file:///"; then
run cp "${url#file://}" "${dest}" || return 1
- elif [ -n "${CURL}" ]; then
- run "${CURL}" --fail -q -sSL --connect-timeout 10 --retry 3 --output "${dest}" "${url}" || return 1
- elif command -v wget > /dev/null 2>&1; then
- run wget -T 15 -O "${dest}" "${url}" || return 1
+ return 0
+ fi
+
+
+ if [ -n "${CURL}" ]; then
+ checked=1
+
+ if run "${CURL}" --fail -q -sSL --connect-timeout 10 --retry 3 --output "${dest}" "${url}"; then
+ succeeded=1
+ else
+ rm -f "${dest}"
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 0 ]; then
+ if command -v wget > /dev/null 2>&1; then
+ checked=1
+
+ if run wget -T 15 -O "${dest}" "${url}"; then
+ succeeded=1
+ fi
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 1 ]; then
+ return 0
+ elif [ "${checked}" -eq 1 ]; then
+ return 1
else
fatal "${ERROR_F0003}" F0003
fi
@@ -639,19 +712,37 @@ get_actual_version() {
get_redirect() {
url="${1}"
+ succeeded=0
+ checked=0
if [ -n "${CURL}" ]; then
- run sh -c "${CURL} ${url} -s -L -I -o /dev/null -w '%{url_effective}' | grep -Eo '[^/]+$'" || return 1
- elif command -v wget > /dev/null 2>&1; then
- run sh -c "wget -S -O /dev/null ${url} 2>&1 | grep -m 1 Location | grep -Eo '[^/]+$'" || return 1
+ checked=1
+
+ if run sh -c "${CURL} ${url} -s -L -I -o /dev/null -w '%{url_effective}' | grep -Eo '[^/]+$'"; then
+ succeeded=1
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 0 ]; then
+ if command -v wget > /dev/null 2>&1; then
+ checked=1
+
+ if run sh -c "wget -S -O /dev/null ${url} 2>&1 | grep -m 1 Location | grep -Eo '[^/]+$'"; then
+ succeeded=1
+ fi
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 1 ]; then
+ return 0
+ elif [ "${checked}" -eq 1 ]; then
+ return 1
else
fatal "${ERROR_F0003}" F0003
fi
}
safe_sha256sum() {
- # Within the context of the installer, we only use -c option that is common between the two commands
- # We will have to reconsider if we start using non-common options
if command -v shasum > /dev/null 2>&1; then
shasum -a 256 "$@"
elif command -v sha256sum > /dev/null 2>&1; then
@@ -661,6 +752,17 @@ safe_sha256sum() {
fi
}
+report_bad_sha256sum() {
+ file="${1}"
+ sums="${2}"
+
+ actual="$(safe_sha256sum "${file}" | awk '{ print $1 }')"
+ expected="$(grep "${file}" "${sums}" | awk '{ print $1 }')"
+
+ printf "Expected: %s\n" "${expected}"
+ printf "Actual: %s\n" "${actual}"
+}
+
get_system_info() {
SYSARCH="$(uname -m)"
@@ -802,6 +904,10 @@ update() {
opts="--interactive"
fi
+ if [ -n "${NETDATA_OFFLINE_INSTALL_SOURCE}" ]; then
+ export NETDATA_OFFLINE_INSTALL_SOURCE="${NETDATA_OFFLINE_INSTALL_SOURCE}"
+ fi
+
if run_script "${updater}" ${opts} --not-running-from-cron; then
progress "Updated existing install at ${ndprefix}"
return 0
@@ -870,32 +976,48 @@ detect_existing_install() {
set_tmpdir
progress "Checking for existing installations of Netdata..."
+ EXISTING_INSTALL_IS_NATIVE="0"
- if pkg_installed netdata; then
- ndprefix="/"
- EXISTING_INSTALL_IS_NATIVE="1"
+ if [ -n "${INSTALL_PREFIX}" ]; then
+ searchpath="/opt/netdata/bin:${INSTALL_PREFIX}/bin:${INSTALL_PREFIX}/sbin:${INSTALL_PREFIX}/usr/bin:${INSTALL_PREFIX}/usr/sbin:${PATH}"
+ searchpath="${INSTALL_PREFIX}/netdata/bin:${INSTALL_PREFIX}/netdata/sbin:${INSTALL_PREFIX}/netdata/usr/bin:${INSTALL_PREFIX}/netdata/usr/sbin:${searchpath}"
else
- EXISTING_INSTALL_IS_NATIVE="0"
- if [ -n "${INSTALL_PREFIX}" ]; then
- searchpath="${INSTALL_PREFIX}/bin:${INSTALL_PREFIX}/sbin:${INSTALL_PREFIX}/usr/bin:${INSTALL_PREFIX}/usr/sbin:${PATH}"
- searchpath="${INSTALL_PREFIX}/netdata/bin:${INSTALL_PREFIX}/netdata/sbin:${INSTALL_PREFIX}/netdata/usr/bin:${INSTALL_PREFIX}/netdata/usr/sbin:${searchpath}"
- else
- searchpath="${PATH}"
- fi
+ searchpath="/opt/netdata/bin:${PATH}"
+ fi
- ndpath="$(PATH="${searchpath}" command -v netdata 2>/dev/null)"
+ while [ -n "${searchpath}" ]; do
+ _ndpath="$(PATH="${searchpath}" command -v netdata 2>/dev/null)"
- if [ -z "$ndpath" ] && [ -x /opt/netdata/bin/netdata ]; then
- ndpath="/opt/netdata/bin/netdata"
+ if [ -n "${_ndpath}" ]; then
+ _ndpath="$(canonical_path "${_ndpath}")"
fi
- if [ -n "${ndpath}" ]; then
- case "${ndpath}" in
- */usr/bin/netdata|*/usr/sbin/netdata) ndprefix="$(dirname "$(dirname "$(dirname "${ndpath}")")")" ;;
- *) ndprefix="$(dirname "$(dirname "${ndpath}")")" ;;
- esac
+ if [ -z "${ndpath}" ] && [ -n "${_ndpath}" ]; then
+ ndpath="${_ndpath}"
+ elif [ -n "${_ndpath}" ] && [ "${ndpath}" != "${_ndpath}" ]; then
+ fatal "Multiple installs of Netdata agent detected (located at '${ndpath}' and '${_ndpath}'). Such a setup is not generally supported. If you are certain you want to operate on one of them despite this, use the '--install-prefix' option to specifiy the install you want to operate on." F0517
fi
+ if [ -n "${INSTALL_PREFIX}" ] && [ -n "${ndpath}" ]; then
+ break
+ elif [ -z "${_ndpath}" ]; then
+ break
+ elif echo "${searchpath}" | grep -v ':'; then
+ searchpath=""
+ else
+ searchpath="$(echo "${searchpath}" | cut -f 2- -d ':')"
+ fi
+ done
+
+ if pkg_installed netdata; then
+ ndprefix="/"
+ EXISTING_INSTALL_IS_NATIVE="1"
+ elif [ -n "${ndpath}" ]; then
+ case "${ndpath}" in
+ */usr/bin/netdata|*/usr/sbin/netdata) ndprefix="$(dirname "$(dirname "$(dirname "${ndpath}")")")" ;;
+ *) ndprefix="$(dirname "$(dirname "${ndpath}")")" ;;
+ esac
+
if echo "${ndprefix}" | grep -Eq '^/usr$'; then
ndprefix="$(dirname "${ndprefix}")"
fi
@@ -1260,7 +1382,7 @@ set_auto_updates() {
if [ "${DRY_RUN}" -eq 1 ]; then
progress "Would have attempted to enable automatic updates."
# This first case is for catching using a new kickstart script with an old build. It can be safely removed after v1.34.0 is released.
- elif ! run_as_root grep -q '\-\-enable-auto-updates' "${updater}"; then
+ elif ! run_as_root grep -q '\--enable-auto-updates' "${updater}"; then
echo
elif ! run_as_root "${updater}" --enable-auto-updates "${NETDATA_AUTO_UPDATE_TYPE}"; then
warning "Failed to enable auto updates. Netdata will still work, but you will need to update manually."
@@ -1683,11 +1805,11 @@ try_static_install() {
return 2
fi
- if ! download "${NETDATA_STATIC_ARCHIVE_URL}" "${tmpdir}/${netdata_agent}"; then
+ if ! download "${NETDATA_STATIC_ARCHIVE_URL}" "./${netdata_agent}"; then
fatal "Unable to download static build archive for ${SYSARCH}. ${BADNET_MSG}." F0208
fi
- if ! download "${NETDATA_STATIC_ARCHIVE_CHECKSUM_URL}" "${tmpdir}/sha256sum.txt"; then
+ if ! download "${NETDATA_STATIC_ARCHIVE_CHECKSUM_URL}" "./sha256sum.txt"; then
fatal "Unable to fetch checksums to verify static build archive. ${BADNET_MSG}." F0206
fi
@@ -1695,8 +1817,9 @@ try_static_install() {
progress "Would validate SHA256 checksum of downloaded static build archive."
else
if [ -z "${INSTALL_VERSION}" ]; then
- if ! grep "${netdata_agent}" "${tmpdir}/sha256sum.txt" | safe_sha256sum -c - > /dev/null 2>&1; then
- fatal "Static binary checksum validation failed. ${BADCACHE_MSG}." F0207
+ if ! grep "${netdata_agent}" ./sha256sum.txt | safe_sha256sum -c - > /dev/null 2>&1; then
+ bad_sums_report="$(report_bad_sha256sum "${netdata_agent}" "./sha256sum.txt")"
+ fatal "Static binary checksum validation failed.\n${bad_sums_report}\n${BADCACHE_MSG}." F0207
fi
fi
fi
@@ -1705,9 +1828,15 @@ try_static_install() {
opts="${opts} --accept"
fi
+ env_cmd="env NETDATA_CERT_TEST_URL=${NETDATA_CLAIM_URL} NETDATA_CERT_MODE=check"
+
+ if [ -n "${NETDATA_OFFLINE_INSTALL_SOURCE}" ]; then
+ env_cmd="env NETDATA_CERT_TEST_URL=${NETDATA_CLAIM_URL} NETDATA_CERT_MODE=auto"
+ fi
+
progress "Installing netdata"
# shellcheck disable=SC2086
- if ! run_as_root sh "${tmpdir}/${netdata_agent}" ${opts} -- ${NETDATA_INSTALLER_OPTIONS}; then
+ if ! run_as_root ${env_cmd} /bin/sh "./${netdata_agent}" ${opts} -- ${NETDATA_INSTALLER_OPTIONS}; then
warning "Failed to install static build of Netdata on ${SYSARCH}."
run rm -rf /opt/netdata
return 2
@@ -1819,6 +1948,7 @@ build_and_install() {
run_script ./netdata-installer.sh ${opts}
case $? in
+ 0) ;;
1)
if [ -n "${EXIT_REASON}" ]; then
fatal "netdata-installer.sh failed to run: ${EXIT_REASON}" "${EXIT_CODE}"
@@ -1827,6 +1957,7 @@ build_and_install() {
fi
;;
2) fatal "Insufficient RAM to install netdata." F0008 ;;
+ *) fatal "netdata-installer.sh failed to run: Encountered an unhandled error in the installer code." F051A ;;
esac
}
@@ -1846,14 +1977,14 @@ try_build_install() {
set_source_archive_urls "${SELECTED_RELEASE_CHANNEL}"
if [ -n "${INSTALL_VERSION}" ]; then
- if ! download "${NETDATA_SOURCE_ARCHIVE_URL}" "${tmpdir}/netdata-v${INSTALL_VERSION}.tar.gz"; then
+ if ! download "${NETDATA_SOURCE_ARCHIVE_URL}" "./netdata-v${INSTALL_VERSION}.tar.gz"; then
fatal "Failed to download source tarball for local build. ${BADNET_MSG}." F000B
fi
- elif ! download "${NETDATA_SOURCE_ARCHIVE_URL}" "${tmpdir}/netdata-latest.tar.gz"; then
+ elif ! download "${NETDATA_SOURCE_ARCHIVE_URL}" "./netdata-latest.tar.gz"; then
fatal "Failed to download source tarball for local build. ${BADNET_MSG}." F000B
fi
- if ! download "${NETDATA_SOURCE_ARCHIVE_CHECKSUM_URL}" "${tmpdir}/sha256sum.txt"; then
+ if ! download "${NETDATA_SOURCE_ARCHIVE_CHECKSUM_URL}" "./sha256sum.txt"; then
fatal "Failed to download checksums for source tarball verification. ${BADNET_MSG}." F000C
fi
@@ -1862,18 +1993,19 @@ try_build_install() {
else
if [ -z "${INSTALL_VERSION}" ]; then
# shellcheck disable=SC2086
- if ! grep netdata-latest.tar.gz "${tmpdir}/sha256sum.txt" | safe_sha256sum -c - > /dev/null 2>&1; then
- fatal "Tarball checksum validation failed. ${BADCACHE_MSG}." F0005
+ if ! grep netdata-latest.tar.gz "./sha256sum.txt" | safe_sha256sum -c - > /dev/null 2>&1; then
+ bad_sums_report="$(report_bad_sha256sum netdata-latest.tar.gz "./sha256sum.txt")"
+ fatal "Tarball checksum validation failed.\n${bad_sums_report}\n${BADCACHE_MSG}." F0005
fi
fi
fi
if [ -n "${INSTALL_VERSION}" ]; then
- run tar -xf "${tmpdir}/netdata-v${INSTALL_VERSION}.tar.gz" -C "${tmpdir}"
- rm -rf "${tmpdir}/netdata-v${INSTALL_VERSION}.tar.gz" > /dev/null 2>&1
+ run tar -xf "./netdata-v${INSTALL_VERSION}.tar.gz" -C "${tmpdir}"
+ rm -rf "./netdata-v${INSTALL_VERSION}.tar.gz" > /dev/null 2>&1
else
- run tar -xf "${tmpdir}/netdata-latest.tar.gz" -C "${tmpdir}"
- rm -rf "${tmpdir}/netdata-latest.tar.gz" > /dev/null 2>&1
+ run tar -xf "./netdata-latest.tar.gz" -C "${tmpdir}"
+ rm -rf "./netdata-latest.tar.gz" > /dev/null 2>&1
fi
if [ "${DRY_RUN}" -ne 1 ]; then
@@ -1915,10 +2047,10 @@ prepare_offline_install_source() {
fi
if check_for_remote_file "${NETDATA_STATIC_ARCHIVE_URL}"; then
- for arch in ${STATIC_INSTALL_ARCHES}; do
+ for arch in $(echo "${NETDATA_OFFLINE_ARCHES:-${STATIC_INSTALL_ARCHES}}" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}'); do
set_static_archive_urls "${SELECTED_RELEASE_CHANNEL}" "${arch}"
- if check_for_remote_file "${NETDATA_STATIC_ARCH_URL}"; then
+ if check_for_remote_file "${NETDATA_STATIC_ARCHIVE_URL}"; then
progress "Fetching ${NETDATA_STATIC_ARCHIVE_URL}"
if ! download "${NETDATA_STATIC_ARCHIVE_URL}" "netdata-${arch}-latest.gz.run"; then
warning "Failed to download static installer archive for ${arch}. ${BADNET_MSG}."
@@ -1956,8 +2088,16 @@ prepare_offline_install_source() {
if [ "${DRY_RUN}" -ne 1 ]; then
progress "Verifying checksums."
- if ! grep -e "$(find . -name '*.gz.run')" sha256sums.txt | safe_sha256sum -c -; then
- fatal "Checksums for offline install files are incorrect. ${BADCACHE_MSG}." F0507
+
+ failed_files=""
+ for file in $(find . -name '*.gz.run'); do
+ if ! grep -e "${file}" sha256sums.txt | safe_sha256sum -c -; then
+ failed_files="${failed_files}\n${file}\n$(report_bad_sha256sums "${file}" sha256sums.txt)"
+ fi
+ done
+
+ if [ -n "${failed_files}" ]; then
+ fatal "Checksums for offline install files are incorrect.\n${failed_files}\n${BADCACHE_MSG}." F0507
fi
else
progress "Would verify SHA256 checksums of downloaded installation files."
@@ -2134,6 +2274,10 @@ validate_args() {
case "${NETDATA_FORCE_METHOD}" in
native|build) fatal "Offline installs are only supported for static builds currently." F0502 ;;
esac
+
+ if [ ! -d "${NETDATA_OFFLINE_INSTALL_SOURCE}" ]; then
+ fatal "Offline install source must be a directory." F0519
+ fi
fi
if [ -n "${LOCAL_BUILD_OPTIONS}" ]; then
@@ -2343,9 +2487,19 @@ parse_args() {
fatal "A target directory must be specified with the --prepare-offline-install-source option." F0500
fi
;;
+ "--offline-architecture")
+ if echo "${STATIC_INSTALL_ARCHES}" | grep -qw "${2}"; then
+ NETDATA_OFFLINE_ARCHES="${NETDATA_OFFLINE_ARCHES} ${2}"
+ else
+ fatal "${2} is not a recognized static build architecture (supported architectures are ${STATIC_INSTALL_ARCHES})" F0518
+ fi
+ shift 1
+ ;;
"--offline-install-source")
if [ -d "${2}" ]; then
NETDATA_OFFLINE_INSTALL_SOURCE="${2}"
+ # shellcheck disable=SC2164
+ NETDATA_TARBALL_BASEURL="file://$(cd "${2}"; pwd)"
shift 1
else
fatal "A source directory must be specified with the --offline-install-source option." F0501
diff --git a/packaging/installer/methods/ansible.md b/packaging/installer/methods/ansible.md
index 85c982fa1..0aadeff91 100644
--- a/packaging/installer/methods/ansible.md
+++ b/packaging/installer/methods/ansible.md
@@ -10,7 +10,7 @@ learn_rel_path: "Installation/Install on specific environments"
# Deploy Netdata with Ansible
-Netdata's [one-line kickstart](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#install-on-linux-with-one-line-installer) is zero-configuration, highly adaptable, and compatible with tons
+Netdata's [one-line kickstart](/packaging/installer/README.md#install-on-linux-with-one-line-installer) is zero-configuration, highly adaptable, and compatible with tons
of different operating systems and Linux distributions. You can use it on bare metal, VMs, containers, and everything
in-between.
@@ -103,9 +103,9 @@ two different SSH keys supplied by AWS.
### Edit the `vars/main.yml` file
-In order to connect your node(s) to your Space in Netdata Cloud, and see all their metrics in real-time in [composite
-charts](https://github.com/netdata/netdata/blob/master/docs/visualize/overview-infrastructure.md) or perform [Metric
-Correlations](https://github.com/netdata/netdata/blob/master/docs/cloud/insights/metric-correlations.md), you need to set the `claim_token`
+In order to connect your node(s) to your Space in Netdata Cloud, and see all their metrics in real-time in composite
+charts or perform [Metric
+Correlations](/docs/metric-correlations.md), you need to set the `claim_token`
and `claim_room` variables.
To find your `claim_token` and `claim_room`, go to Netdata Cloud, then click on your Space's name in the top navigation,
@@ -130,7 +130,7 @@ hostname of the node, the playbook disables that local dashboard by setting `web
security boost by not allowing any unwanted access to the local dashboard.
You can read more about this decision, or other ways you might lock down the local dashboard, in our [node security
-doc](https://github.com/netdata/netdata/blob/master/docs/security-and-privacy-design/README.md).
+doc](/docs/security-and-privacy-design/README.md).
> Curious about why Netdata's dashboard is open by default? Read our [blog
> post](https://www.netdata.cloud/blog/netdata-agent-dashboard/) on that zero-configuration design decision.
diff --git a/packaging/installer/methods/aws.md b/packaging/installer/methods/aws.md
index bd3b091a8..8648a8f0b 100644
--- a/packaging/installer/methods/aws.md
+++ b/packaging/installer/methods/aws.md
@@ -11,12 +11,12 @@ learn_rel_path: "Installation/Install on specific environments"
Netdata is fully compatible with Amazon Web Services (AWS).
You can install Netdata on cloud instances to monitor the apps/services running there, or use
-multiple instances in a [parent-child streaming](https://github.com/netdata/netdata/blob/master/src/streaming/README.md) configuration.
+multiple instances in a [parent-child streaming](/src/streaming/README.md) configuration.
## Recommended installation method
The best installation method depends on the instance's operating system, distribution, and version. For Linux instances,
-we recommend the [`kickstart.sh` automatic installation script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md).
+we recommend the [`kickstart.sh` automatic installation script](/packaging/installer/methods/kickstart.md).
If you have issues with Netdata after installation, look to the sections below to find the issue you're experiencing,
followed by the solution for your provider.
@@ -41,11 +41,11 @@ command from a remote system, and it fails, it's likely that a firewall is block
Another option is to put Netdata behind web server, which will proxy requests through standard HTTP/HTTPS ports
(80/443), which are likely already open on your instance. We have a number of guides available:
-- [Apache](https://github.com/netdata/netdata/blob/master/docs/Running-behind-apache.md)
-- [Nginx](https://github.com/netdata/netdata/blob/master/docs/Running-behind-nginx.md)
-- [Caddy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-caddy.md)
-- [HAProxy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-haproxy.md)
-- [lighttpd](https://github.com/netdata/netdata/blob/master/docs/Running-behind-lighttpd.md)
+- [Apache](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-apache.md)
+- [Nginx](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-nginx.md)
+- [Caddy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-caddy.md)
+- [HAProxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-haproxy.md)
+- [lighttpd](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-lighttpd.md)
Sign in to the [AWS console](https://console.aws.amazon.com/) and navigate to the EC2 dashboard. Click on the **Security
Groups** link in the navigation, beneath the **Network & Security** heading. Find the Security Group your instance
diff --git a/packaging/installer/methods/azure.md b/packaging/installer/methods/azure.md
index 0d8e1ed14..94590eecb 100644
--- a/packaging/installer/methods/azure.md
+++ b/packaging/installer/methods/azure.md
@@ -11,12 +11,12 @@ learn_rel_path: "Installation/Install on specific environments"
Netdata is fully compatible with Azure.
You can install Netdata on cloud instances to monitor the apps/services running there, or use
-multiple instances in a [parent-child streaming](https://github.com/netdata/netdata/blob/master/src/streaming/README.md) configuration.
+multiple instances in a [parent-child streaming](/src/streaming/README.md) configuration.
## Recommended installation method
The best installation method depends on the instance's operating system, distribution, and version. For Linux instances,
-we recommend the [`kickstart.sh` automatic installation script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md).
+we recommend the [`kickstart.sh` automatic installation script](/packaging/installer/methods/kickstart.md).
If you have issues with Netdata after installation, look to the sections below to find the issue you're experiencing,
followed by the solution for your provider.
@@ -41,11 +41,11 @@ command from a remote system, and it fails, it's likely that a firewall is block
Another option is to put Netdata behind web server, which will proxy requests through standard HTTP/HTTPS ports
(80/443), which are likely already open on your instance. We have a number of guides available:
-- [Apache](https://github.com/netdata/netdata/blob/master/docs/Running-behind-apache.md)
-- [Nginx](https://github.com/netdata/netdata/blob/master/docs/Running-behind-nginx.md)
-- [Caddy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-caddy.md)
-- [HAProxy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-haproxy.md)
-- [lighttpd](https://github.com/netdata/netdata/blob/master/docs/Running-behind-lighttpd.md)
+- [Apache](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-apache.md)
+- [Nginx](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-nginx.md)
+- [Caddy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-caddy.md)
+- [HAProxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-haproxy.md)
+- [lighttpd](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-lighttpd.md)
Sign in to the [Azure portal](https://portal.azure.com) and open the virtual machine running Netdata. Click on the
**Networking** link beneath the **Settings** header, then click on the **Add inbound security rule** button.
diff --git a/packaging/installer/methods/freebsd.md b/packaging/installer/methods/freebsd.md
index b34a3b879..3a33d2e90 100644
--- a/packaging/installer/methods/freebsd.md
+++ b/packaging/installer/methods/freebsd.md
@@ -28,7 +28,7 @@ Please respond in the affirmative for any relevant prompts during the installati
## Install Netdata
-The simplest method is to use the single line [kickstart script](https://learn.netdata.cloud/docs/agent/packaging/installer/methods/kickstart)
+The simplest method is to use the single line [kickstart script](/packaging/installer/methods/kickstart.md)
If you have a Netdata cloud account then clicking on the **Connect Nodes** button will generate the kickstart command you should use. Use the command from the "Linux" tab, it should look something like this:
@@ -39,8 +39,6 @@ Please respond in the affirmative for any relevant prompts during the installati
Once the installation is completed, you should be able to start monitoring the FreeBSD server using Netdata.
-![image](https://user-images.githubusercontent.com/24860547/202489210-3c5a3346-8f53-4b7b-9832-f9383b34d864.png)
-
Netdata can also be installed via [FreeBSD ports](https://www.freshports.org/net-mgmt/netdata).
## Manual installation
@@ -86,11 +84,9 @@ cd /opt/netdata/usr/libexec/netdata/ && ./netdata-updater.sh
You can now access the Netdata dashboard by navigating to `http://NODE:19999`, replacing `NODE` with the IP address or hostname of your system.
-![image](https://user-images.githubusercontent.com/2662304/48304090-fd384080-e51b-11e8-80ae-eecb03118dda.png)
-
Starting with v1.30, Netdata collects anonymous usage information by default and sends it to a self hosted PostHog instance within the Netdata infrastructure. To read
more about the information collected and how to opt-out, check the [anonymous statistics
-page](https://github.com/netdata/netdata/blob/master/docs/anonymous-statistics.md).
+page](/docs/netdata-agent/configuration/anonymous-telemetry-events.md).
## Updating the Agent on FreeBSD
If you have not passed the `--auto-update` or `-u` parameter for the installer to enable automatic updating, repeat the last step to update Netdata whenever a new version becomes available.
@@ -134,7 +130,7 @@ The following options are mutually exclusive and specifiy special operations oth
- `--uninstall`: Uninstall an existing installation of Netdata. Fails if there is no existing install.
- `--claim-only`: If there is an existing install, only try to claim it without attempting to update it. If there is no existing install, install and claim Netdata normally.
- `--repositories-only`: Only install repository configuration packages instead of doing a full install of Netdata. Automatically sets --native-only.
-- `--prepare-offline-install-source`: Instead of insallling the agent, prepare a directory that can be used to install on another system without needing to download anything. See our [offline installation documentation](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/offline.md) for more info.
+- `--prepare-offline-install-source`: Instead of insallling the agent, prepare a directory that can be used to install on another system without needing to download anything. See our [offline installation documentation](/packaging/installer/methods/offline.md) for more info.
Additionally, the following environment variables may be used to further customize how the script runs (most users
should not need to use special values for any of these):
diff --git a/packaging/installer/methods/gcp.md b/packaging/installer/methods/gcp.md
index 873afbcdb..5003decb4 100644
--- a/packaging/installer/methods/gcp.md
+++ b/packaging/installer/methods/gcp.md
@@ -12,12 +12,12 @@ learn_rel_path: "Installation/Install on specific environments"
Netdata is fully compatible with the Google Cloud Platform (GCP).
You can install Netdata on cloud instances to monitor the apps/services running there, or use
-multiple instances in a [parent-child streaming](https://github.com/netdata/netdata/blob/master/src/streaming/README.md) configuration.
+multiple instances in a [parent-child streaming](/src/streaming/README.md) configuration.
## Recommended installation method
The best installation method depends on the instance's operating system, distribution, and version. For Linux instances,
-we recommend the [`kickstart.sh` automatic installation script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md).
+we recommend the [`kickstart.sh` automatic installation script](/packaging/installer/methods/kickstart.md).
If you have issues with Netdata after installation, look to the sections below to find the issue you're experiencing,
followed by the solution for your provider.
@@ -42,11 +42,11 @@ command from a remote system, and it fails, it's likely that a firewall is block
Another option is to put Netdata behind web server, which will proxy requests through standard HTTP/HTTPS ports
(80/443), which are likely already open on your instance. We have a number of guides available:
-- [Apache](https://github.com/netdata/netdata/blob/master/docs/Running-behind-apache.md)
-- [Nginx](https://github.com/netdata/netdata/blob/master/docs/Running-behind-nginx.md)
-- [Caddy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-caddy.md)
-- [HAProxy](https://github.com/netdata/netdata/blob/master/docs/Running-behind-haproxy.md)
-- [lighttpd](https://github.com/netdata/netdata/blob/master/docs/Running-behind-lighttpd.md)
+- [Apache](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-apache.md)
+- [Nginx](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-nginx.md)
+- [Caddy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-caddy.md)
+- [HAProxy](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-haproxy.md)
+- [lighttpd](/docs/netdata-agent/configuration/running-the-netdata-agent-behind-a-reverse-proxy/Running-behind-lighttpd.md)
To add a firewall rule, go to the [Firewall rules page](https://console.cloud.google.com/networking/firewalls/list) and
diff --git a/packaging/installer/methods/kickstart.md b/packaging/installer/methods/kickstart.md
index 043b3ecc4..a525cc70d 100644
--- a/packaging/installer/methods/kickstart.md
+++ b/packaging/installer/methods/kickstart.md
@@ -15,7 +15,7 @@ This script works on all Linux distributions and macOS environments, by detectin
> :bulb: Tip
>
-> If you are unsure whether you want nightly or stable releases, read the [related section](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#nightly-vs-stable-releases) of our Documentation, detailing the pros and cons of each release type.
+> If you are unsure whether you want nightly or stable releases, read the [related section](/packaging/installer/README.md#nightly-vs-stable-releases) of our Documentation, detailing the pros and cons of each release type.
To install Netdata, run the following as your normal user:
@@ -35,7 +35,7 @@ To install Netdata, run the following as your normal user:
> :bookmark_tabs: Note
>
> If you plan to also connect the node to Netdata Cloud, make sure to replace `YOUR_CLAIM_TOKEN` with the claim token of your space,
-> and `YOUR_ROOM_ID` with the ID of the room you are willing to connect the node to.
+> and `YOUR_ROOM_ID` with the ID of the Room you are willing to connect the node to.
## Verify script integrity
@@ -70,7 +70,7 @@ You will most often need to _restart_ the Agent to load new or edited configurat
> **Note**
> Stopping or restarting the Netdata Agent will cause gaps in stored metrics until the `netdata` process initiates collectors and the database engine.
>
-> You do not need to restart the Netdata Agent between changes to health configuration files, see the relevant section on [reloading health configuration](https://github.com/netdata/netdata/blob/master/src/health/REFERENCE.md#reload-health-configuration).
+> You do not need to restart the Netdata Agent between changes to health configuration files, see the relevant section on [reloading health configuration](/src/health/REFERENCE.md#reload-health-configuration).
### Using `systemctl` or `service`
@@ -98,7 +98,7 @@ If you start the daemon this way, close it with `sudo killall netdata`.
### Shutdown using `netdatacli`
-The Netdata Agent also comes with a [CLI tool](https://github.com/netdata/netdata/blob/master/src/cli/README.md) capable of performing shutdowns. Start the Agent back up using your preferred method listed above.
+The Netdata Agent also comes with a [CLI tool](/src/cli/README.md) capable of performing shutdowns. Start the Agent back up using your preferred method listed above.
```bash
sudo netdatacli shutdown-agent
@@ -240,9 +240,9 @@ By default, the kickstart script will provide a Netdata agent installation that
- `--claim-url`
Specify a URL to use when connecting to the cloud. Defaults to `https://app.netdata.cloud`. Use this option to change the Netdata Cloud URL to point to your Netdata Cloud installation.
- `--claim-rooms`
- Specify a comma-separated list of tokens for each War Room this node should appear in.
+ Specify a comma-separated list of tokens for each Room this node should appear in.
- `--claim-proxy`
- Specify a proxy to use when connecting to the cloud in the form of `http://[user:pass@]host:ip` for an HTTP(S) proxy. See [connecting through a proxy](https://github.com/netdata/netdata/blob/master/src/claim/README.md#connect-through-a-proxy) for details.
+ Specify a proxy to use when connecting to the cloud in the form of `http://[user:pass@]host:ip` for an HTTP(S) proxy. See [connecting through a proxy](/src/claim/README.md#connect-through-a-proxy) for details.
- `--claim-only`
If there is an existing install, only try to claim it without attempting to update it. If there is no existing install, install and claim Netdata normally.
- `--require-cloud`
@@ -285,7 +285,7 @@ The following options are mutually exclusive and specify special operations othe
- `--repositories-only`
Only install repository configuration packages instead of doing a full install of Netdata. Automatically sets --native-only.
- `--prepare-offline-install-source`
- Instead of insallling the agent, prepare a directory that can be used to install on another system without needing to download anything. See our [offline installation documentation](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/offline.md) for more info.
+ Instead of insallling the agent, prepare a directory that can be used to install on another system without needing to download anything. See our [offline installation documentation](/packaging/installer/methods/offline.md) for more info.
### environment variables
@@ -302,7 +302,7 @@ should not need to use special values for any of these):
## Native packages
-We publish [official DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md) for a number of common Linux distributions as part of our releases and nightly
+We publish [official DEB/RPM packages](/packaging/installer/methods/packages.md) for a number of common Linux distributions as part of our releases and nightly
builds. These packages are available for 64-bit x86 systems. Depending on the distribution and release they may
also be available for 32-bit x86, ARMv7, and AArch64 systems. If a native package is available, it will be used as the
default installation method. This allows you to handle Netdata updates as part of your usual system update procedure.
@@ -312,7 +312,7 @@ you can do so by adding `--native-only` to the options you pass to the installer
## Static builds
-We publish pre-built [static builds](https://github.com/netdata/netdata/blob/master/packaging/makeself/README.md) of Netdata for Linux systems. Currently, these are published for 64-bit x86, ARMv7,
+We publish pre-built [static builds](/packaging/makeself/README.md) of Netdata for Linux systems. Currently, these are published for 64-bit x86, ARMv7,
AArch64, and POWER8+ hardware. These static builds are able to operate in a mostly self-contained manner and only
require a POSIX compliant shell and a supported init system. These static builds install under `/opt/netdata`. If
you are on a platform which we provide static builds for but do not provide native packages for, a static build
diff --git a/packaging/installer/methods/kubernetes.md b/packaging/installer/methods/kubernetes.md
index 17cb9f5e1..6a0dee98a 100644
--- a/packaging/installer/methods/kubernetes.md
+++ b/packaging/installer/methods/kubernetes.md
@@ -3,14 +3,14 @@ import TabItem from '@theme/TabItem';
# Install Netdata on Kubernetes
-This document details how to install Netdata on an existing Kubernetes (k8s) cluster, and connect it to Netdata Cloud. Read our [Kubernetes visualizations](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md) documentation, to see what you will get.
+This document details how to install Netdata on an existing Kubernetes (k8s) cluster, and connect it to Netdata Cloud. Read our [Kubernetes visualizations](/docs/dashboards-and-charts/kubernetes-tab.md) documentation, to see what you will get.
The [Netdata Helm chart](https://github.com/netdata/helmchart/blob/master/charts/netdata/README.md) installs one `parent` pod for storing metrics and managing alert notifications, plus an additional
`child` pod for every node in the cluster, responsible for collecting metrics from the node, Kubernetes control planes,
pods/containers, and [supported application-specific
metrics](https://github.com/netdata/helmchart#service-discovery-and-supported-services).
-### Prerequisites
+## Prerequisites
To deploy Kubernetes monitoring with Netdata, you need:
@@ -97,7 +97,7 @@ On an existing installation, in order to connect it to Netdata Cloud you will ne
> :bookmark_tabs: Note
>
> Make sure to replace `YOUR_CLAIM_TOKEN` with the claim token of your space,
- > and `YOUR_ROOM_ID` with the ID of the room you are willing to connect to.
+ > and `YOUR_ROOM_ID` with the ID of the Room you are willing to connect to.
These settings connect your `parent`/`child` nodes to Netdata Cloud and store more metrics in the nodes' time-series databases.
@@ -191,10 +191,10 @@ helm upgrade netdata netdata/netdata
## What's next?
-[Start Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md) in Netdata Cloud, which comes with meaningful visualizations out of the box.
+[Start Kubernetes monitoring](/docs/dashboards-and-charts/kubernetes-tab.md) in Netdata Cloud, which comes with meaningful visualizations out of the box.
### Related reference documentation
-- [Netdata Cloud · Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md)
+- [Netdata Cloud · Kubernetes monitoring](/docs/dashboards-and-charts/kubernetes-tab.md)
- [Netdata Helm chart](https://github.com/netdata/helmchart)
- [Netdata service discovery](https://github.com/netdata/agent-service-discovery/)
diff --git a/packaging/installer/methods/macos.md b/packaging/installer/methods/macos.md
index 07ba9f989..31aaebf98 100644
--- a/packaging/installer/methods/macos.md
+++ b/packaging/installer/methods/macos.md
@@ -9,8 +9,8 @@ learn_rel_path: "Installation/Install on specific environments"
# Install Netdata on macOS
Netdata works on macOS, albeit with some limitations.
-The number of charts displaying system metrics is limited, but you can use any of Netdata's [external plugins](https://github.com/netdata/netdata/blob/master/src/collectors/plugins.d/README.md) to monitor any services you might have installed on your macOS system.
-You could also use a macOS system as the parent node in a [streaming configuration](https://github.com/netdata/netdata/blob/master/src/streaming/README.md).
+The number of charts displaying system metrics is limited, but you can use any of Netdata's [external plugins](/src/collectors/plugins.d/README.md) to monitor any services you might have installed on your macOS system.
+You could also use a macOS system as the parent node in a [streaming configuration](/src/streaming/README.md).
You can install Netdata in one of the three following ways:
@@ -21,12 +21,12 @@ You can install Netdata in one of the three following ways:
Each of these installation option requires [Homebrew](https://brew.sh/) for handling dependencies.
> The Netdata Homebrew package is community-created and -maintained.
-> Community-maintained packages _may_ receive support from Netdata, but are only a best-effort affair. Learn more about [Netdata's platform support policy](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/versions-and-platforms.md).
+> Community-maintained packages _may_ receive support from Netdata, but are only a best-effort affair. Learn more about [Netdata's platform support policy](/docs/netdata-agent/versions-and-platforms.md).
## Install Netdata with our automatic one-line installation script
**Local Netdata Agent installation**
-To install Netdata using our automatic [kickstart](https://github.com/netdata/netdata/blob/master/packaging/installer/README.md#automatic-one-line-installation-script) open a new terminal and run:
+To install Netdata using our automatic [kickstart](/packaging/installer/README.md#automatic-one-line-installation-script) open a new terminal and run:
```bash
curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh
@@ -35,16 +35,16 @@ The Netdata Agent is installed under `/usr/local/netdata`. Dependencies are hand
**Automatically connect to Netdata Cloud during installation**
-The `kickstart.sh` script accepts additional parameters to automatically [connect](https://github.com/netdata/netdata/blob/master/src/claim/README.md) your node to Netdata
+The `kickstart.sh` script accepts additional parameters to automatically [connect](/src/claim/README.md) your node to Netdata
Cloud immediately after installation. Find the `token` and `rooms` strings by [signing in to Netdata
Cloud](https://app.netdata.cloud/sign-in?cloudRoute=/spaces), then clicking on **Connect Nodes** in the [Spaces management
-area](https://github.com/netdata/netdata/blob/master/docs/cloud/manage/organize-your-infrastrucutre-invite-your-team.md#netdata-cloud-spaces).
+area](/docs/netdata-cloud/organize-your-infrastructure-invite-your-team.md#netdata-cloud-spaces).
- `--claim-token`: Specify a unique claiming token associated with your Space in Netdata Cloud to be used to connect to the node
after the install.
-- `--claim-rooms`: Specify a comma-separated list of tokens for each War Room this node should appear in.
+- `--claim-rooms`: Specify a comma-separated list of tokens for each Room this node should appear in.
- `--claim-proxy`: Specify a proxy to use when connecting to the cloud in the form of `http://[user:pass@]host:ip` for an HTTP(S) proxy.
- See [connecting through a proxy](https://github.com/netdata/netdata/blob/master/src/claim/README.md#connect-through-a-proxy) for details.
+ See [connecting through a proxy](/src/claim/README.md#connect-through-a-proxy) for details.
- `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://app.netdata.cloud`.
For example:
@@ -53,7 +53,7 @@ curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /t
```
The Netdata Agent is installed under `/usr/local/netdata` on your machine. Your machine will also show up as a node in your Netdata Cloud.
-If you experience issues while claiming your node, follow the steps in our [Troubleshooting](https://github.com/netdata/netdata/blob/master/src/claim/README.md#troubleshooting) documentation.
+If you experience issues while claiming your node, follow the steps in our [Troubleshooting](/src/claim/README.md#troubleshooting) documentation.
## Install Netdata via Homebrew
### For macOS Intel
@@ -79,10 +79,6 @@ Homebrew will place your Netdata configuration directory at `/opt/homebrew/etc/n
Use the `edit-config` script and the files in this directory to configure Netdata. For reference, you can find stock configuration files at `/opt/homebrew/Cellar/netdata/{NETDATA_VERSION}/lib/netdata/conf.d/`.
-
-
-Skip on ahead to the [What's next?](#whats-next) section to find links to helpful post-installation guides.
-
## Install Netdata from source
We don't recommend installing Netdata from source on macOS, as it can be difficult to configure and install dependencies manually.
@@ -94,7 +90,7 @@ We don't recommend installing Netdata from source on macOS, as it can be difficu
```
2. Click **Install** on the Software Update popup window that appears.
-3. Use the same terminal session to install some of Netdata's prerequisites using Homebrew. If you don't want to use [Netdata Cloud](https://github.com/netdata/netdata/blob/master/docs/netdata-cloud/README.md), you can omit `cmake`.
+3. Use the same terminal session to install some of Netdata's prerequisites using Homebrew. If you don't want to use [Netdata Cloud](/docs/netdata-cloud/README.md), you can omit `cmake`.
```bash
brew install ossp-uuid autoconf automake pkg-config libuv lz4 json-c openssl libtool cmake
diff --git a/packaging/installer/methods/manual.md b/packaging/installer/methods/manual.md
index dd4e5a0a0..31bc392e5 100644
--- a/packaging/installer/methods/manual.md
+++ b/packaging/installer/methods/manual.md
@@ -23,7 +23,7 @@ To install the latest git version of Netdata, please follow these 2 steps:
## Prepare your system
Before you begin, make sure that your repo and the repo's submodules are clean from any previous builds and up to date.
-Otherwise, [perform a cleanup](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#perform-a-cleanup-in-your-netdata-repo)
+Otherwise, [perform a cleanup](/packaging/installer/methods/manual.md#perform-a-cleanup-in-your-netdata-repo)
Use our automatic requirements installer (_no need to be `root`_), which attempts to find the packages that
should be installed on your system to build and run Netdata. It supports a large variety of major Linux distributions
@@ -40,7 +40,7 @@ and other operating systems and is regularly tested. You can find this tool [her
- Please note that for RHEL/CentOS you need
[EPEL](http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/).
In addition, RHEL/CentOS version 6 also need
- [OKay](https://okay.com.mx/blog-news/rpm-repositories-for-centos-6-and-7.html) for package libuv version 1.
+ [OKay](https://okay.com.mx) for package libuv version 1.
- CentOS 8 / RHEL 8 requires a bit of extra work. See the dedicated section below.
- **SUSE** Linux and its derivatives (including **openSUSE**)
@@ -140,7 +140,7 @@ required if manually installing packages.
CentOS 6.x:
- Enable the EPEL repo
-- Enable the additional repo from [okay.network](https://okay.network/blog-news/rpm-repositories-for-centos-6-and-7.html)
+- Enable the additional repo from [okay.network](https://okay.network)
And install the minimum required dependencies.
@@ -154,7 +154,7 @@ CentOS 8.x:
- Enable the PowerTools repo
- Enable the EPEL repo
-- Enable the Extra repo from [OKAY](https://okay.network/blog-news/rpm-repositories-for-centos-6-and-7.html)
+- Enable the Extra repo from [OKAY](https://okay.network)
And install the minimum required dependencies:
@@ -205,22 +205,22 @@ cd netdata
- `--dont-start-it`: Prevent the installer from starting Netdata automatically.
- `--stable-channel`: Automatically update only on the release of new major versions.
- `--nightly-channel`: Automatically update on every new nightly build.
-- `--disable-telemetry`: Opt-out of [anonymous statistics](https://github.com/netdata/netdata/blob/master/docs/anonymous-statistics.md) we use to make
+- `--disable-telemetry`: Opt-out of [anonymous statistics](/docs/netdata-agent/configuration/anonymous-telemetry-events.md) we use to make
Netdata better.
- `--no-updates`: Prevent automatic updates of any kind.
- `--reinstall`: If an existing install is detected, reinstall instead of trying to update it. Note that this
cannot be used to change installation types.
-- `--local-files`: Used for [offline installations](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/offline.md). Pass four file paths: the Netdata
+- `--local-files`: Used for [offline installations](/packaging/installer/methods/offline.md). Pass four file paths: the Netdata
tarball, the checksum file, the go.d plugin tarball, and the go.d plugin config tarball, to force kickstart run the
process using those files. This option conflicts with the `--stable-channel` option. If you set this _and_
`--stable-channel`, Netdata will use the local files.
### Connect node to Netdata Cloud during installation
-Unlike the [`kickstart.sh`](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md), the `netdata-installer.sh` script does
-not allow you to automatically [connect](https://github.com/netdata/netdata/blob/master/src/claim/README.md) your node to Netdata Cloud immediately after installation.
+Unlike the [`kickstart.sh`](/packaging/installer/methods/kickstart.md), the `netdata-installer.sh` script does
+not allow you to automatically [connect](/src/claim/README.md) your node to Netdata Cloud immediately after installation.
-See the [connect to cloud](https://github.com/netdata/netdata/blob/master/src/claim/README.md) doc for details on connecting a node with a manual installation of Netdata.
+See the [connect to cloud](/src/claim/README.md) doc for details on connecting a node with a manual installation of Netdata.
### 'nonrepresentable section on output' errors
diff --git a/packaging/installer/methods/methods.md b/packaging/installer/methods/methods.md
index f9ca2253e..bc6e879a8 100644
--- a/packaging/installer/methods/methods.md
+++ b/packaging/installer/methods/methods.md
@@ -12,15 +12,15 @@ sidebar_position: 30
Netdata can be installed:
-- [As a DEB/RPM package](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md)
-- [As a static binary](https://github.com/netdata/netdata/blob/master/packaging/makeself/README.md)
-- [From a git checkout](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md)
-- [As a docker container](https://github.com/netdata/netdata/blob/master/packaging/docker/README.md)
+- [As a DEB/RPM package](/packaging/installer/methods/packages.md)
+- [As a static binary](/packaging/makeself/README.md)
+- [From a git checkout](/packaging/installer/methods/manual.md)
+- [As a docker container](/packaging/docker/README.md)
-The [one line installer kickstart.sh](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md)
+The [one line installer kickstart.sh](/packaging/installer/methods/kickstart.md)
picks the most appropriate method out of the first three for any system
and is the recommended installation method, if you don't use containers.
`kickstart.sh` can also be used for
-[offline installation](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/offline.md),
+[offline installation](/packaging/installer/methods/offline.md),
suitable for air-gapped systems.
diff --git a/packaging/installer/methods/offline.md b/packaging/installer/methods/offline.md
index fd69f74c7..83155848f 100644
--- a/packaging/installer/methods/offline.md
+++ b/packaging/installer/methods/offline.md
@@ -54,6 +54,6 @@ target system. This can be done in any manner you like, as long as filenames are
After copying the files, simply run the `install.sh` script located in the
offline install source directory. It accepts all the [same options as the kickstart
-script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) for further
+script](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) for further
customization of the installation, though it will default to not enabling automatic updates (as they are not
supported on offline installs).
diff --git a/packaging/installer/methods/packages.md b/packaging/installer/methods/packages.md
index bd0072d21..90556c1ab 100644
--- a/packaging/installer/methods/packages.md
+++ b/packaging/installer/methods/packages.md
@@ -8,20 +8,18 @@ learn_rel_path: "Installation/Installation methods"
sidebar_position: 20
-->
-# Install Netdata using native DEB/RPM packages.
+# Install Netdata using native DEB/RPM packages
For most common Linux distributions that use either DEB or RPM packages, Netdata provides pre-built native packages
for current releases in-line with
-our [official platform support policy](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/versions-and-platforms.md).
+our [official platform support policy](/docs/netdata-agent/versions-and-platforms.md).
These packages will be used by default when attempting to install on a supported platform using our
-[kickstart.sh installer script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md).
+[kickstart.sh installer script](/packaging/installer/methods/kickstart.md).
When using the kickstart script, you can force usage of native DEB or RPM packages by passing the option
`--native-only` when invoking the script. This will cause it to only attempt to use native packages for the install,
and fail if it cannot do so.
-
-
> ### Note
>
> In July 2022, we switched hosting of our native packages from Package Cloud to self-hosted repositories.
@@ -31,10 +29,9 @@ and fail if it cannot do so.
> When selecting a repository configuration package, note that the version 2 packages provide configuration for
> our self-hosted repositories, and then version 1 packages provide configuration for Package Cloud.
+## Manual setup of RPM packages
-## Manual setup of RPM packages.
-
-Netdata’s official RPM repositories are hosted at https://repo.netdata.cloud/repos. We provide four groups of
+Netdata’s official RPM repositories are hosted at <https://repo.netdata.cloud/repos>. We provide four groups of
repositories at that top level:
- `stable`: Contains packages for stable releases of the Netdata Agent.
@@ -55,14 +52,14 @@ Under each of those directories is a directory for each supported release of tha
directory for each supported CPU architecture which contains the actual repository.
For example, for stable release packages for RHEL 9 on 64-bit x86, the full URL for the repository would be
-https://repo.netdata.cloud/repos/stable/el/9/x86_64/
+<https://repo.netdata.cloud/repos/stable/el/9/x86_64/>
Our RPM packages and repository metadata are signed using a GPG key with a user name of ‘Netdatabot’. The
current key fingerprint is `6588FDD7B14721FE7C3115E6F9177B5265F56346`. The associated public key can be fetched from
`https://repo.netdata.cloud/netdatabot.gpg.key`.
If you are explicitly configuring a system to use our repositories, the recommended setup is to download the
-appropriate repository configuration package from https://repo.netdata.cloud/repos/repoconfig and install it
+appropriate repository configuration package from <https://repo.netdata.cloud/repos/repoconfig> and install it
directly on the target system using the system package manager. This will ensure any packages needed to use the
repository are also installed, and will help enable a seamless transition if we ever need to change our infrastructure.
@@ -73,9 +70,9 @@ repository are also installed, and will help enable a seamless transition if we
> repository _should_ be pulled in automatically by our repository config packages, but if it is not you may need
> to manually install `epel-release` to be able to successfully install the Netdata packages.
-## Manual setup of DEB packages.
+## Manual setup of DEB packages
-Netdata’s official DEB repositories are hosted at https://repo.netdata.cloud/repos. We provide four groups of
+Netdata’s official DEB repositories are hosted at <https://repo.netdata.cloud/repos>. We provide four groups of
repositories at that top level:
- `stable`: Contains packages for stable releases of the Netdata Agent.
@@ -105,7 +102,7 @@ current key fingerprint is `6588FDD7B14721FE7C3115E6F9177B5265F56346`. The assoc
`https://repo.netdata.cloud/netdatabot.gpg.key`.
If you are explicitly configuring a system to use our repositories, the recommended setup is to download the
-appropriate repository configuration package from https://repo.netdata.cloud/repos/repoconfig and install it
+appropriate repository configuration package from <https://repo.netdata.cloud/repos/repoconfig> and install it
directly on the target system using the system package manager. This will ensure any packages needed to use the
repository are also installed, and will help enable a seamless transition if we ever need to change our infrastructure.
diff --git a/packaging/installer/methods/source.md b/packaging/installer/methods/source.md
index b70e39850..c6ff6e6fe 100644
--- a/packaging/installer/methods/source.md
+++ b/packaging/installer/methods/source.md
@@ -13,7 +13,7 @@ sidebar_position: 100
These instructions are for advanced users and distribution package
maintainers. Unless this describes you, you almost certainly want
to follow [our guide for manually installing Netdata from a git
-checkout](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md) instead.
+checkout](/packaging/installer/methods/manual.md) instead.
## Required dependencies
@@ -23,11 +23,15 @@ to build and run successfully:
- libuuid
- libuv version 1.0 or newer
- zlib
-- GNU autoconf
-- GNU automake
+- CMake 3.13 or newer
- GCC or Xcode (Clang is known to have issues in certain configurations, see [Using Clang](#using-clang))
-- A version of `make` compatible with GNU automake
-- Git (we use git in the build system to generate version info, don't need a full install, just a working `git show` command)
+- Ninja or Make (Ninja is preferred as it results in significantly faster builds)
+- Git (we use git in the build system to generate version info, you don't need a full install, just a working `git show` command)
+
+The following additional dependencies are also needed, but will be prepared automatically by CMake if they are not available on the build system.
+
+- libyaml
+- JSON-C
Additionally, the following build time features require additional dependencies:
@@ -38,66 +42,36 @@ Additionally, the following build time features require additional dependencies:
- OpenSSL 1.0 or newer (LibreSSL _amy_ work, but is largely untested).
- Netdata Cloud support:
- A working internet connection
- - A recent version of CMake
- OpenSSL 1.0.2 or newer _or_ LibreSSL 3.0.0 or newer.
- - JSON-C (may be provided by the user as shown below, or by the system)
- - protobuf (Google Protocol Buffers) and protoc compiler
+ - protobuf (Google Protocol Buffers) and protoc compiler. If protobuf is not available on the system,
+ CMake can be instructed to fetch and build a usable version for Netdata.
+- Netdata Go collectors:
+ - Go 1.21 or newer
## Preparing the source tree
-Certain features in Netdata require custom versions of specific libraries,
-which the build system will link statically into Netdata. These
-libraries and their header files must be copied into specific locations
-in the source tree to be used.
-
-Before you begin, make sure that your repo and the repo's submodules are clean from any previous builds and up to date.
-Otherwise, [perform a cleanup](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/manual.md#perform-a-cleanup-in-your-netdata-repo)
+Netdata uses Git submodules for some of it’s components, which must be fetched prior to building Netdata. If you
+are using a source tarball published by the Netdata project, then these are included. If you are using a checkout
+of the Git repository, you may need to explicitly fetch and update the submodules using `git submodule update
+--init --recursive`.
### Netdata cloud
-#### JSON-C
-
-Netdata requires the use of JSON-C for JSON parsing when using Netdata
-Cloud. Netdata is able to use a system-provided copy of JSON-C, but
-some systems may not provide it. If your system does not provide JSON-C,
-you can do the following to prepare a copy for the build system:
-
-1. Verify the tag that Netdata expects to be used by checking the contents
- of `packaging/jsonc.version` in your Netdata sources.
-2. Obtain the sources for that version by either:
- - Navigating to https://github.com/json-c/json-c and downloading
- and unpacking the source code archive for that release.
- - Cloning the repository with `git` and checking out the required tag.
-3. Prepare the JSON-C sources by running `cmake -DBUILD_SHARED_LIBS=OFF .`
- in the JSON-C source directory.
-4. Build JSON-C by running `make` in the JSON-C source directory.
-5. In the Netdata source directory, create a directory called
- `externaldeps/jsonc`.
-6. Copy `libjson-c.a` from the JSON-C source directory to
- `externaldeps/jsonc/libjson-c.a` in the Netdata source tree.
-7. Copy all of the header files (`*.h`) from the JSON-C source directory
- to `externaldeps/jsonc/json-c` in the Netdata source tree.
-
## Building Netdata
Once the source tree has been prepared, Netdata is ready to be configured
-and built. Netdata currently uses GNU autotools as it's primary build
-system. To build Netdata this way:
+and built. Netdata uses CMake for configuration, and strongly prefers
+the use of an external build directory. To configure and build Netdata:
-1. Run `autoreconf -ivf` in the Netdata source tree.
-2. Run `./configure` in the Netdata source tree.
-3. Run `make` in the Netdata source tree.
+1. Run `cmake -S . -B build -G Ninja` in the source tree. `build` can be replaced with whatever path you want for the build directory. If you wish to use Make instead of Ninja for the build, remove the `-G Ninja` from the command.
+2. Run `cmake --build build`, where `build` is the build directory. CMake’s `--parallel` option can be used to control the number of build jobs that are used.
+3. Run `cmake --install build`, where `build` is the build directory.
### Configure options
-Netdata provides a number of build time configure options. This section
-lists some of the ones you are most likely to need:
-
-- `--prefix`: Specify the prefix under which Netdata will be installed.
-- `--with-webdir`: Specify a path relative to the prefix in which to
- install the web UI files.
-- `--disable-cloud`: Disables all Netdata Cloud functionality for
- this build.
+Netdata’s CMake build infrastructure intentionally does very little auto-detection, and requires most components
+to be explicitly enabled or disabled. A full list of available configuration options for a given version of Netdata,
+with help descriptions, can be seen by running `cmake -LH` in the source tree.
### Using Clang
@@ -123,92 +97,6 @@ A full featured install of Netdata requires some additional components
which must be built and installed separately from the main Netdata
agent. All of these should be handled _after_ installing Netdata itself.
-### React dashboard
-
-The above build steps include a deprecated web UI for Netdata that lacks
-support for Netdata Cloud. To get a fully featured dashboard, you must
-install our new React dashboard.
-
-#### Installing the pre-built React dashboard
-
-We provide pre-built archives of the React dashboard for each release
-(these are also used during our normal install process). To use one
-of these:
-
-1. Verify the release version that Netdata expects to be used by checking
- the contents of `packaging/dashboard.version` in your Netdata sources.
-2. Go to https://github.com/netdata/dashboard/releases and download the
- `dashboard.tar.gz` file for the required release.
-3. Unpack the downloaded archive to a temporary directory.
-4. Copy the contents of the `build` directory from the extracted
- archive to `/usr/share/netdata/web` or the equivalent location for
- your build of Netdata. This _will_ overwrite some files in the target
- location.
-
-#### Building the React dashboard locally
-
-Alternatively, you may wish to build the React dashboard locally. Doing
-so requires a recent version of Node.JS with a working install of
-NPM. Once you have the required tools, do the following:
-
-1. Verify the release version that Netdata expects to be used by checking
- the contents of `packaging/dashboard.version` in your Netdata sources.
-2. Obtain the sources for that version by either:
- - Navigating to https://github.com/netdata/dashboard and downloading
- and unpacking the source code archive for that release.
- - Cloning the repository with `git` and checking out the required tag.
-3. Run `npm install` in the dashboard source tree.
-4. Run `npm run build` in the dashboard source tree.
-5. Copy the contents of the `build` directory just like step 4 of
- installing the pre-built React dashboard.
-
-### Go collectors
-
-A number of the collectors for Netdata are written in Go instead of C,
-and are developed in a separate repository from the mian Netdata code.
-An installation without these collectors is still usable, but will be
-unable to collect metrics for a number of network services the system
-may be providing. You can either install a pre-built copy of these
-collectors, or build them locally.
-
-#### Installing the pre-built Go collectors
-
-We provide pre-built binaries of the Go collectors for all the platforms
-we officially support. To use one of these:
-
-1. Verify the release version that Netdata expects to be used by checking
- the contents of `packaging/go.d.version` in your Netdata sources.
-2. Go to https://github.com/netdata/go.d.plugin/releases, select the
- required release, and download the `go.d.plugin-*.tar.gz` file
- for your system type and CPu architecture and the `config.tar.gz`
- configuration file archive.
-3. Extract the `go.d.plugin-*.tar.gz` archive into a temporary
- location, and then copy the single file in the archive to
- `/usr/libexec/netdata/plugins.d` or the equivalent location for your
- build of Netdata and rename it to `go.d.plugin`.
-4. Extract the `config.tar.gz` archive to a temporarylocation and then
- copy the contents of the archive to `/etc/netdata` or the equivalent
- location for your build of Netdata.
-
-#### Building the Go collectors locally
-
-Alternatively, you may wish to build the Go collectors locally
-yourself. Doing so requires a working installation of Golang 1.13 or
-newer. Once you have the required tools, do the following:
-
-1. Verify the release version that Netdata expects to be used by checking
- the contents of `packaging/go.d.version` in your Netdata sources.
-2. Obtain the sources for that version by either:
- - Navigating to https://github.com/netdata/go.d.plugin and downloading
- and unpacking the source code archive for that release.
- - Cloning the repository with `git` and checking out the required tag.
-3. Run `make` in the go.d.plugin source tree.
-4. Copy `bin/godplugin` to `/usr/libexec/netdata/plugins.d` or th
- equivalent location for your build of Netdata and rename it to
- `go.d.plugin`.
-5. Copy the contents of the `config` directory to `/etc/netdata` or the
- equivalent location for your build of Netdata.
-
### eBPF collector
On Linux systems, Netdata has support for using the kernel's eBPF
diff --git a/packaging/installer/methods/synology.md b/packaging/installer/methods/synology.md
index 10ead7215..742b3abb0 100644
--- a/packaging/installer/methods/synology.md
+++ b/packaging/installer/methods/synology.md
@@ -18,7 +18,7 @@ learn_rel_path: "Installation/Install on specific environments"
The good news is that our
-[one-line installation script](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md)
+[one-line installation script](/packaging/installer/methods/kickstart.md)
works fine if your NAS is one that uses the amd64 architecture. It
will install the content into `/opt/netdata`, making future removal safe and simple.
diff --git a/packaging/installer/methods/systems.md b/packaging/installer/methods/systems.md
index acefdeb0a..8715a57af 100644
--- a/packaging/installer/methods/systems.md
+++ b/packaging/installer/methods/systems.md
@@ -11,8 +11,8 @@ learn_rel_path: "Installation/Install on specific environments"
This category contains specific instructions for some popular environments.
If you have a standard environment that is not yet listed here, just use the
-[one line installer kickstart.sh](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/kickstart.md)
+[one line installer kickstart.sh](/packaging/installer/methods/kickstart.md)
If your environment is somewhat old or unusual, check our
-[platform support policy](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/versions-and-platforms.md).
+[platform support policy](/docs/netdata-agent/versions-and-platforms.md).
diff --git a/packaging/installer/netdata-uninstaller.sh b/packaging/installer/netdata-uninstaller.sh
index 1627ca6b5..c69bbd56e 100755
--- a/packaging/installer/netdata-uninstaller.sh
+++ b/packaging/installer/netdata-uninstaller.sh
@@ -729,6 +729,7 @@ fi
#### REMOVE NETDATA FILES
rm_file /etc/logrotate.d/netdata
+rm_file /usr/lib/systemd/journald@netdata.conf.d/netdata.conf
rm_file /etc/systemd/system/netdata.service
rm_file /lib/systemd/system/netdata.service
rm_file /usr/lib/systemd/system/netdata.service
@@ -764,6 +765,7 @@ else
rm_dir "${NETDATA_PREFIX}/var/cache/netdata"
rm_dir "${NETDATA_PREFIX}/var/log/netdata"
rm_dir "${NETDATA_PREFIX}/etc/netdata"
+ rm_dir /usr/lib/systemd/journald@netdata.conf.d/
fi
if [ -n "${tmpdir}" ]; then
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh
index 220de6e4c..fc8b39cdd 100755
--- a/packaging/installer/netdata-updater.sh
+++ b/packaging/installer/netdata-updater.sh
@@ -149,6 +149,43 @@ issystemd() {
return 1
}
+# shellcheck disable=SC2009
+running_under_anacron() {
+ pid="${1:-$$}"
+ iter="${2:-0}"
+
+ [ "${iter}" -gt 50 ] && return 1
+
+ if [ "$(uname -s)" = "Linux" ] && [ -r "/proc/${pid}/stat" ]; then
+ ppid="$(cut -f 4 -d ' ' "/proc/${pid}/stat")"
+ if [ -n "${ppid}" ]; then
+ # The below case accounts for the hidepid mount option for procfs, as well as setups with LSM
+ [ ! -r "/proc/${ppid}/comm" ] && return 1
+
+ [ "${ppid}" -eq "${pid}" ] && return 1
+
+ grep -q anacron "/proc/${ppid}/comm" && return 0
+
+ running_under_anacron "${ppid}" "$((iter + 1))"
+
+ return "$?"
+ fi
+ else
+ ppid="$(ps -o pid= -o ppid= 2>/dev/null | grep -e "^ *${pid}" | xargs | cut -f 2 -d ' ')"
+ if [ -n "${ppid}" ]; then
+ [ "${ppid}" -eq "${pid}" ] && return 1
+
+ ps -o pid= -o command= 2>/dev/null | grep -e "^ *${ppid}" | grep -q anacron && return 0
+
+ running_under_anacron "${ppid}" "$((iter + 1))"
+
+ return "$?"
+ fi
+ fi
+
+ return 1
+}
+
_get_intervaldir() {
if [ -d /etc/cron.daily ]; then
echo /etc/cron.daily
@@ -396,15 +433,42 @@ check_for_curl() {
_safe_download() {
url="${1}"
dest="${2}"
+ succeeded=0
+ checked=0
+
+ if echo "${url}" | grep -Eq "^file:///"; then
+ run cp "${url#file://}" "${dest}" || return 1
+ return 0
+ fi
check_for_curl
if [ -n "${curl}" ]; then
- "${curl}" -fsSL --connect-timeout 10 --retry 3 "${url}" > "${dest}"
- return $?
- elif command -v wget > /dev/null 2>&1; then
- wget -T 15 -O - "${url}" > "${dest}"
- return $?
+ checked=1
+
+ if "${curl}" -fsSL --connect-timeout 10 --retry 3 "${url}" > "${dest}"; then
+ succeeded=1
+ else
+ rm -f "${dest}"
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 0 ]; then
+ if command -v wget > /dev/null 2>&1; then
+ checked=1
+
+ if wget -T 15 -O - "${url}" > "${dest}"; then
+ succeeded=1
+ else
+ rm -f "${dest}"
+ fi
+ fi
+ fi
+
+ if [ "${succeeded}" -eq 1 ]; then
+ return 0
+ elif [ "${checked}" -eq 1 ]; then
+ return 1
else
return 255
fi
@@ -432,13 +496,21 @@ get_netdata_latest_tag() {
check_for_curl
if [ -n "${curl}" ]; then
- tag=$("${curl}" "${url}" -s -L -I -o /dev/null -w '%{url_effective}' | grep -Eom 1 '[^/]*/?$')
- elif command -v wget >/dev/null 2>&1; then
- tag=$(wget -S -O /dev/null "${url}" 2>&1 | grep -m 1 Location | grep -Eo '[^/]*/?$')
- else
+ tag=$("${curl}" "${url}" -s -L -I -o /dev/null -w '%{url_effective}')
+ fi
+
+ if [ -z "${tag}" ]; then
+ if command -v wget >/dev/null 2>&1; then
+ tag=$(wget -S -O /dev/null "${url}" 2>&1 | grep Location)
+ fi
+ fi
+
+ if [ -z "${tag}" ]; then
fatal "I need curl or wget to proceed, but neither of them are available on this system." U0006
fi
+ tag="$(echo "${tag}" | grep -Eom 1 '[^/]*/?$')"
+
# Fallback case for simpler local testing.
if echo "${tag}" | grep -Eq 'latest/?$'; then
if _safe_download "${url}/latest-version.txt" ./ndupdate-version.txt; then
@@ -461,7 +533,17 @@ newer_commit_date() {
info "Checking if a newer version of the updater script is available."
commit_check_url="https://api.github.com/repos/netdata/netdata/commits?path=packaging%2Finstaller%2Fnetdata-updater.sh&page=1&per_page=1"
- python_version_check="from __future__ import print_function;import sys,json;data = json.load(sys.stdin);print(data[0]['commit']['committer']['date'] if isinstance(data, list) else '')"
+ python_version_check="
+from __future__ import print_function
+import sys, json
+
+try:
+ data = json.load(sys.stdin)
+except:
+ print('')
+else:
+ print(data[0]['commit']['committer']['date'] if isinstance(data, list) and data else '')
+"
if command -v jq > /dev/null 2>&1; then
commit_date="$(_safe_download "${commit_check_url}" /dev/stdout | jq '.[0].commit.committer.date' 2>/dev/null | tr -d '"')"
@@ -630,7 +712,11 @@ set_tarball_urls() {
fi
fi
- if [ "$1" = "stable" ]; then
+ if [ -n "${NETDATA_OFFLINE_INSTALL_SOURCE}" ]; then
+ path="$(cd "${NETDATA_OFFLINE_INSTALL_SOURCE}" || exit 1; pwd)"
+ export NETDATA_TARBALL_URL="file://${path}/${filename}"
+ export NETDATA_TARBALL_CHECKSUM_URL="file://${path}/sha256sums.txt"
+ elif [ "$1" = "stable" ]; then
latest="$(get_netdata_latest_tag "${NETDATA_STABLE_BASE_URL}")"
export NETDATA_TARBALL_URL="${NETDATA_STABLE_BASE_URL}/download/$latest/${filename}"
export NETDATA_TARBALL_CHECKSUM_URL="${NETDATA_STABLE_BASE_URL}/download/$latest/sha256sums.txt"
@@ -1014,6 +1100,10 @@ while [ -n "${1}" ]; do
--force-update) NETDATA_FORCE_UPDATE=1 ;;
--non-interactive) INTERACTIVE=0 ;;
--interactive) INTERACTIVE=1 ;;
+ --offline-install-source)
+ NETDATA_OFFLINE_INSTALL_SOURCE="${2}"
+ shift 1
+ ;;
--tmpdir-path)
NETDATA_TMPDIR_PATH="${2}"
shift 1
@@ -1032,6 +1122,18 @@ while [ -n "${1}" ]; do
shift 1
done
+if [ -n "${NETDATA_OFFLINE_INSTALL_SOURCE}" ]; then
+ NETDATA_NO_UPDATER_SELF_UPDATE=1
+ NETDATA_UPDATER_JITTER=0
+ NETDATA_FORCE_UPDATE=1
+fi
+
+# If we seem to be running under anacron, act as if we’re not running from cron.
+# This is mostly to disable jitter, which should not be needed when run from anacron.
+if running_under_anacron; then
+ NETDATA_NOT_RUNNING_FROM_CRON="${NETDATA_NOT_RUNNING_FROM_CRON:-1}"
+fi
+
# Random sleep to alleviate stampede effect of Agents upgrading
# and disconnecting/reconnecting at the same time (or near to).
# But only we're not a controlling terminal (tty)
diff --git a/packaging/installer/package-windows.sh b/packaging/installer/package-windows.sh
new file mode 100755
index 000000000..7b1c57e46
--- /dev/null
+++ b/packaging/installer/package-windows.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+repo_root="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")"
+
+if [ -n "${BUILD_DIR}" ]; then
+ build="${BUILD_DIR}"
+elif [ -n "${OSTYPE}" ]; then
+ if [ -n "${MSYSTEM}" ]; then
+ build="${repo_root}/build-${OSTYPE}-${MSYSTEM}"
+ else
+ build="${repo_root}/build-${OSTYPE}"
+ fi
+elif [ "$USER" = "vk" ]; then
+ build="${repo_root}/build"
+else
+ build="${repo_root}/build"
+fi
+
+set -exu -o pipefail
+
+${GITHUB_ACTIONS+echo "::group::Installing"}
+cmake --install "${build}"
+${GITHUB_ACTIONS+echo "::endgroup::"}
+
+if [ ! -f "/msys2-installer.exe" ]; then
+ ${GITHUB_ACTIONS+echo "::group::Fetching MSYS2 installer"}
+ "${repo_root}/packaging/windows/fetch-msys2-installer.py" /msys2-installer.exe
+ ${GITHUB_ACTIONS+echo "::endgroup::"}
+fi
+
+${GITHUB_ACTIONS+echo "::group::Packaging"}
+NDVERSION=$"$(grep 'CMAKE_PROJECT_VERSION:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
+NDMAJORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MAJOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
+NDMINORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MINOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)"
+
+if [ -f "/gpl-3.0.txt" ]; then
+ ${GITHUB_ACTIONS+echo "::group::Fetching GPL3 License"}
+ curl -o /gpl-3.0.txt "https://www.gnu.org/licenses/gpl-3.0.txt"
+ ${GITHUB_ACTIONS+echo "::endgroup::"}
+fi
+
+/mingw64/bin/makensis.exe -DCURRVERSION="${NDVERSION}" -DMAJORVERSION="${NDMAJORVERSION}" -DMINORVERSION="${NDMINORVERSION}" "${repo_root}/packaging/windows/installer.nsi"
+${GITHUB_ACTIONS+echo "::endgroup::"}