diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-09 08:36:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-11-09 08:37:11 +0000 |
commit | 910c794ec6d0a364b4aabccf22b715cb45780e83 (patch) | |
tree | 561a9ef6b6a4668102674e1a52b3e7563c57ac61 /packaging/installer | |
parent | Releasing debian version 1.47.5-1. (diff) | |
download | netdata-910c794ec6d0a364b4aabccf22b715cb45780e83.tar.xz netdata-910c794ec6d0a364b4aabccf22b715cb45780e83.zip |
Merging upstream version 2.0.0 (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/installer')
26 files changed, 517 insertions, 1185 deletions
diff --git a/packaging/installer/README.md b/packaging/installer/README.md index d15925dc..1c43cdf8 100644 --- a/packaging/installer/README.md +++ b/packaging/installer/README.md @@ -6,150 +6,15 @@ Netdata is very flexible and can be used to monitor all kinds of infrastructure. The easiest way to install Netdata on your system is via Netdata Cloud, to do so: -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 in to <https://app.netdata.cloud/>. +2. Select a [Space](/docs/netdata-cloud/organize-your-infrastructure-invite-your-team.md#netdata-cloud-spaces), and click the "Connect Nodes" prompt, which will show the install command for your platform of choice. +3. 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). -Take a look at our [Dashboards and Charts](/docs/dashboards-and-charts/README.md) section to read more about Netdata's features. +## Anonymous statistics -## Post-install - -### 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). - -### 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. - -### 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. - -### Make your deployment production ready - -Go through our [deployment guides](/docs/deployment-guides/README.md), for suggested configuration changes for production deployments. - -## Advanced installation options and troubleshooting - -### Automatic updates - -By default, Netdata's installation scripts enable automatic updates for both nightly and stable release channels. - -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](/packaging/installer/UPDATE.md). - -### 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 -we're ready, we simply change the release tags on GitHub. That means nightly releases are stable and proven to function -correctly in the vast majority of Netdata use cases. That's why nightly is the _best choice for most Netdata users_. - -**Stable**: We create stable releases whenever we believe the code has reached a major milestone. Most often, stable -releases correlate with the introduction of new, significant features. Stable releases might be a better choice for -those who run Netdata in _mission-critical production systems_, as updates will come more infrequently, and only after -the community helps fix any bugs that might have been introduced in previous releases. - -**Pros of using nightly releases:** - -- Get the latest features and bug fixes as soon as they're available -- Receive security-related fixes immediately -- Use stable, fully-tested code that's always improving -- Leverage the same Netdata experience our community is using - -**Pros of using stable releases:** - -- 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](/docs/netdata-agent/configuration/anonymous-telemetry-events.md) page. +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 on our [anonymous statistics](/docs/netdata-agent/configuration/anonymous-telemetry-events.md) documentation 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. - -### Troubleshooting and known issues - -We are tracking a few issues related to installation and packaging. - -#### Installs on hosts without IPv4 connectivity - -Our regular installation process requires access to a number of GitHub services that do not have IPv6 connectivity. As -such, using the kickstart install script on such hosts generally does not work, and will typically fail with an -error from cURL or wget about connection timeouts. You can check if your system is affected by this by attempting -to connect to (or ping) `https://api.github.com/`. Failing to connect indicates that you are affected by this issue. - -There are three potential workarounds for this: - -1. You can configure your system with a proper IPv6 transition mechanism, such as NAT64. GitHub’s anachronisms - 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](/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](/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](/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 - -If you're running an older Linux distribution or one that has reached EOL, such as Ubuntu 14.04 LTS, Debian 8, or CentOS -6, your Agent may not be able to securely connect to Netdata Cloud due to an outdated version of OpenSSL. These old -versions of OpenSSL cannot perform [hostname validation](https://wiki.openssl.org/index.php/Hostname_validation), which -helps securely encrypt SSL connections. - -If you choose to continue using the outdated version of OpenSSL, your node will still connect to Netdata Cloud, albeit -with hostname verification disabled. Without verification, your Netdata Cloud connection could be vulnerable to -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](/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 - -If you see an error similar to `Access to file is not permitted: /usr/share/netdata/web/index.html` when you try to -visit the Agent dashboard at `http://NODE:19999`, you need to update Netdata's permissions to match those of your -system. - -Run `ls -la /usr/share/netdata/web/index.html` to find the file's permissions. You may need to change this path based on -the error you're seeing in your browser. In the below example, the file is owned by the user `root` and the group -`root`. - -```bash -ls -la /usr/share/netdata/web/index.html --rw-r--r--. 1 root root 89377 May 5 06:30 /usr/share/netdata/web/index.html -``` - -These files need to have the same user and group used to install your netdata. Suppose you installed netdata with user -`netdata` and group `netdata`, in this scenario you will need to run the following command to fix the error: - -```bash -# chown -R netdata:netdata /usr/share/netdata/web -``` - -#### Multiple versions of OpenSSL - -We've received reports from the community about issues with running the `kickstart.sh` script on systems that have both -a distribution-installed version of OpenSSL and a manually-installed local version. The Agent's installer cannot handle -both. - -#### Clang compiler on Linux - -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](/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 deleted file mode 100644 index eeb0e231..00000000 --- a/packaging/installer/REINSTALL.md +++ /dev/null @@ -1,65 +0,0 @@ -# Reinstall Netdata - -In certain situations, such as needing to enable a feature or troubleshoot an issue, you may need to reinstall the -Netdata Agent on your node. - -## One-line installer script (`kickstart.sh`) - -### 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](/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](/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. - -```bash -wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --reinstall -``` - -### Performing a clean reinstall - -Run the one-line installer script with the `--reinstall-clean` parameter to perform a clean reinstall of the -Netdata Agent. This will wipe all existing configuration and historical data, but can be useful sometimes for -getting a badly broken installation working again. Unlike the regular `--reinstall` parameter, this may use a -different install type than the original install used. - -If you used any [optional -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. - -```bash -wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --reinstall-clean -``` - -### Changing the install type of an existing installation - -The clean reinstall procedure outlined above can also be used to manually change the install type for an existing -installation. Without any extra parameters, it will automatically pick the preferred installation type for your -system, even if that has changed since the original install. If you want to force use of a specific install type, -you can use the `--native-only`, `--static-only`, or `--build-only` parameter to control which install type gets -used, just like with a new install. - -When using the `--reinstall-clean` option to change the install type, you will need to manually preserve any -configuration or historical data you want to keep. The following directories may need to be preserved: - -- `/etc/netdata` (`/opt/netdata/etc/netdata` for static installs): For agent configuration. -- `/var/lib/netdata` (`/opt/netdata/var/lib/netdata` for static installs): For claiming configuration. -- `/var/cache/netdata` (`/opt/netdata/var/cache/netdata` for static installs): For historical data. - -When copying these directories back after the reinstall, you may need to update file ownership by running `chown --R netdata:netdata` on them. - -## Troubleshooting - -If you still experience problems with your Netdata Agent installation after following one of these processes, the next -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) 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 c7de90d9..87fe9395 100644 --- a/packaging/installer/UNINSTALL.md +++ b/packaging/installer/UNINSTALL.md @@ -1,77 +1,76 @@ # Uninstall Netdata -> ### 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](/packaging/installer/REINSTALL.md) instead of removing the Netdata Agent entirely. +## UNIX -The recommended method to uninstall Netdata on a system is to use our kickstart installer script with the `--uninstall` option like so: +> **Note** +> +> This method assumes you installed Netdata using the `kickstart.sh` or `netdata-installer.sh` script. +> If you used a different method, it might not work and could complicate the removal process. -```sh +Similarly with our documentation on updating Netdata, you need to [determine your installation type](/packaging/installer/UPDATE.md). + +**If your installation type indicates a native package, then proceed to uninstall Netdata using your package manager.** + +The recommended way to uninstall Netdata is to use the same script you used for installation. Just add the `--uninstall` flag: + +```bash wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --uninstall ``` -Or (if you have curl but not wget): +<details> +<summary>if you have curl but not wget</summary> ```sh curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --uninstall ``` -This will work in most cases without you needing to do anything more other than accepting removal of configuration -and data files. +</details> -If you used a non-standard installation prefix, you may need to specify that prefix using the `--old-install-prefix` -option when uninstalling this way. -## Unofficial installs +**What to Expect**: -If you used a third-party package to install Netdata, then the above method will usually not work, and you will -need to use whatever mechanism you used to originally install Netdata to uninstall it. +In most cases, these commands will guide you through the uninstallation process and remove configuration and data files automatically. -## Uninstalling manually +**Non-Standard Installations**: -Most official installs of Netdata include an uninstaller script that can be manually invoked instead of using the -kickstart script (internally, the kickstart script also uses this uninstaller script, it just handles the process -outlined below for you). +If you installed Netdata with a custom prefix (different directory location), you may need to specify the original prefix during uninstallation with the `--old-install-prefix` option. -This uninstaller script is self-contained other than requiring a `.environment` file that was generated during -installation. In most cases, this will be found in `/etc/netdata/.environment`, though if you used a non-standard -installation prefix it will usually be located in a similar place under that prefix. +### Uninstalling manually -A workflow for uninstallation looks like this: +Most official installations of Netdata include an uninstaller script that can be manually invoked instead of using the kickstart script (internally, the kickstart script also uses this uninstaller script, it just handles the process outlined below for you). -1. Find your `.environment` file, which is usually `/etc/netdata/.environment` in a default installation. -2. If you cannot find that file and would like to uninstall Netdata, then create a new file with the following content: +This uninstaller script is self-contained, other than requiring a `.environment` file that was generated during installation. In most cases, this will be found in `/etc/netdata/.environment`, though if you used a custom installation prefix it be located under that directory. -```sh -NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install-prefix` flag. Otherwise it should be empty -NETDATA_ADDED_TO_GROUPS="<additional groups>" # Additional groups for a user running the Netdata process -``` +1. Find your `.environment` file +2. If you can’t find that file and would like to uninstall Netdata, then create a new file with the following content: + + ```sh + NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install-prefix` flag. Otherwise it should be empty + NETDATA_ADDED_TO_GROUPS="<additional groups>" # Additional groups for a user running the Netdata process + ``` -3. Run `netdata-uninstaller.sh` as follows +3. Run `netdata-uninstaller.sh` as follows - 3.1 **Interactive mode (Default)** + - **Interactive mode (Default)** - The default mode in the uninstaller script is **interactive**. This means that the script provides you - the option to reply with "yes" (`y`/`Y`) or "no" (`n`/`N`) to control the removal of each Netdata asset in - the filesystem. + The default mode in the uninstaller script is **interactive**. This means that the script provides you the option to reply with "yes" (`y`/`Y`) or "no" (`n`/`N`) to control the removal of each Netdata asset in the filesystem. - ```sh - ${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --env <environment_file> - ``` + ```sh + ${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --env <environment_file> + ``` - 3.2 **Non-interactive mode** + - **Non-interactive mode** - If you are sure and you know what you are doing, you can speed up the removal of the Netdata assets from the - filesystem without any questions by using the force option (`-f`/`--force`). This option will remove all the - Netdata assets in a **non-interactive** mode. + If you’re sure, and you know what you’re doing, you can speed up the removal of the Netdata assets from the filesystem without any questions by using the force option (`-f`/`--force`). This option will remove all the + Netdata assets in a **non-interactive** mode. - ```sh - ${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --force --env <environment_file> - ``` + ```sh + ${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --force --env <environment_file> + ``` -Note: Existing installations may still need to download the file if it's not present. To execute uninstall in that case, -run the following commands: +> **Note** +> +> Existing installations may still need to download the file if it's not present. To execute the uninstaller in that case, run the following commands: ```sh wget https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/netdata-uninstaller.sh @@ -79,7 +78,9 @@ chmod +x ./netdata-uninstaller.sh ./netdata-uninstaller.sh --yes --env <environment_file> ``` -The default `environment_file` is `/etc/netdata/.environment`. +## Windows + +Currently, the Windows version of Netdata is in beta. To uninstall Netdata on Windows: -> Note: This uninstallation method assumes previous installation with `netdata-installer.sh` or the kickstart script. -> Using it when Netdata was installed in some other way will usually not work correctly, and may make it harder to uninstall Netdata. +1. Locate the `Uninstall.exe` file in your Netdata installation directory. +2. Double-click the `Uninstall.exe` file and follow the on-screen instructions. diff --git a/packaging/installer/UPDATE.md b/packaging/installer/UPDATE.md index 94faa881..d77e9c62 100644 --- a/packaging/installer/UPDATE.md +++ b/packaging/installer/UPDATE.md @@ -1,31 +1,15 @@ # Update Netdata -By default, the Netdata Agent automatically updates with the latest nightly or stable version depending on which -you installed. If you opted out of automatic updates, you need to update your Netdata Agent to the latest nightly -or stable version. You can also [enable or disable automatic updates on an existing install](#control-automatic-updates). +The update process can differ based on the install type: -> 💡 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](/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 -icon in the local Agent dashboard's top navigation. This modal informs you whether your Agent needs an update or not. - -The exact update method to use depends on the install type: - -- Installs with an install type of 'custom' usually indicate installing a third-party package through the system - package manager. To update these installs, you should update the package just like you would any other package - on your system. -- Installs with an install type starting with `binpkg` or ending with `build` or `static` can be updated using - our [regular update method](#updates-for-most-systems). -- Installs with an install type of 'oci' were created from our official Docker images, and should be updated - using our [Docker](#docker) update procedure. -- macOS users should check [our update instructions for macOS](#macos). -- Manually built installs should check [our update instructions for manual builds](#manual-installation-from-git). +- Install types starting with `binpkg` or ending with `build` or `static` can be updated using our [kickstart script update method](#unix). +- Installs with an install type of `custom` usually indicate installing a third-party package through the system package manager. To update these installs, you should update the package just like you would any other package on your system. +- macOS users should check [our update instructions for macOS](#macos). +- Manually built installs should check [our update instructions for manual builds](#manual-installation-from-git). ## Determine which installation method you used -Starting with netdata v1.33.0, you can use Netdata itself to determine the installation type by running: +You can run the following to determine your installation type: ```bash netdata -W buildinfo | grep -E 'Installation Type|Install type:' @@ -46,82 +30,38 @@ The following table contains all possible installation types: | custom | Anything not covered by the other identifiers, including manual builds, manually running netdata-installer.sh, and third-party packages (community). | | Unknown | Same as custom. | - -If you are using an older version of Netdata, or the above command produces no output, you can run our one-line -installation script in dry-run mode to attempt to determine what method to use to update by running the following -command: +If you're using an older Netdata version or the above command doesn't output anything, try our one-line installation script in dry-run mode. Run the following command to determine the appropriate update method: ```bash wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --dry-run ``` -Note that if you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option -specifying that prefix to make sure it finds the existing install. +> **Note** +> +> if you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option specifying that prefix to make sure it finds the existing install. -If you see a line starting with `--- Would attempt to update existing installation by running the updater script -located at:`, then our [regular update method](#updates-for-most-systems) will work for you. +If you see a line starting with `--- Would attempt to update existing installation by running the updater script located at:`, then our [kickstart script update method](#unix) will work for you. -Otherwise, it should either indicate that the installation type is not supported (which probably means you either -have a `custom` install or built Netdata manually) or indicate that it would create a new install (which means that -you either used a non-standard install path, or that you don’t actually have Netdata installed). +Otherwise, it should either indicate that the installation type is not supported (which probably means you either have a `custom` install or built Netdata manually) or indicate that it would create a new install (which means that you either used a non-standard install path, or that you don’t actually have Netdata installed). -## Updates for most systems +## UNIX -In most cases, you can update netdata using our one-line installation script. This script will automatically -run the update script that was installed as part of the initial install (even if you disabled automatic updates) -and preserve the existing install options you specified. +In most cases, you can update Netdata using our one-line kickstart script. This script will automatically +run the update script installed as part of the initial install and preserve the existing install options you specified. -If you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option specifying -that prefix to this command to make sure it finds Netdata. +If you installed Netdata using an installation prefix, you will need to add an `--install-prefix` option specifying that prefix to this command to make sure it finds Netdata. ```bash wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh ``` -### Issues with older binpkg installs - -The above command is known not to work with binpkg type installs for stable releases with a version number of -v1.33.1 or earlier, and nightly builds with a version number of v1.33.1-93 or earlier. If you have such a system, -the above command will report that it found an existing install, and then issue a warning about not being able to -find the updater script. - -On such installs, you can update Netdata using your distribution package manager. - -### Updates on hosts without IPv4 connectivity - -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](/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](/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. +## Windows -## Docker - -Docker-based installations do not update automatically. To update an Netdata Agent running in a Docker container, you -must pull the [latest image from Docker Hub](https://hub.docker.com/r/netdata/netdata), stop and remove the container, -and re-create it using the latest image. - -First, pull the latest version of the image. - -```bash -docker pull netdata/netdata:latest -``` - -Next, to stop and remove any containers using the `netdata/netdata` image. Replace `netdata` if you changed it from the -default. - -```bash -docker stop netdata -docker rm netdata -``` +To update a Windows Netdata installation, download the executable and proceed to reinstall the Agent. This will update the installation. -You can now re-create your Netdata container using the `docker` command or a `docker-compose.yml` file. See our [Docker -installation instructions](/packaging/docker/README.md#create-a-new-netdata-agent-container) for details. +> **Note** +> +> The Windows Agent is currently under beta and only available for Nightly releases, and the installer can be found in our [nightlies repo](https://github.com/netdata/netdata-nightlies). A stable version will be released soon. ## macOS @@ -131,25 +71,17 @@ If you installed Netdata on your macOS system using Homebrew, you can explicitly brew upgrade netdata ``` -Homebrew downloads the latest Netdata via the -[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 -instructions](#updates-for-most-systems) to update Netdata. +Homebrew downloads the latest Netdata via the [formula](https://github.com/Homebrew/homebrew-core/blob/master/Formula/n/netdata.rb), ensures all dependencies are met, and updates Netdata via reinstallation. ## Manual installation from Git -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. +If you installed [Netdata manually from Git](/packaging/installer/methods/manual.md) run our automatic requirements installer, which works on many Linux distributions, to ensure your system has the dependencies necessary for new features. ```bash bash <(curl -sSL https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh) ``` -Navigate to the directory where you first cloned the Netdata repository, pull the latest source code, and run -`netdata-install.sh` again. This process compiles Netdata with the latest source code and updates it via reinstallation. +Navigate to the directory where you first cloned the Netdata repository, pull the latest source code, and run `netdata-install.sh` again. This process compiles Netdata with the latest source code and updates it via reinstallation. ```bash cd /path/to/netdata/git @@ -157,55 +89,20 @@ git pull origin master sudo ./netdata-installer.sh ``` -> ⚠️ If you installed Netdata with any optional parameters, such as `--no-updates` to disable automatic updates, and -> want to retain those settings, you need to set them again during this process. - -## Control automatic updates - -Starting with Netdata v1.34.0, you can easily enable or disable automatic updates on an existing installation -using the updater script. - -For most installs on Linux, you can enable auto-updates with: - -```bash -/usr/libexec/netdata/netdata-updater.sh --enable-auto-updates -``` - -and disable them with: - -```bash -/usr/libexec/netdata/netdata-updater.sh --disable-auto-updates -``` - -For static installs, instead use: +> **Note** +> +> If you installed Netdata with any optional parameters, such as `--install-prefix` to install under a specific directory, you need to set them again during this process. -```bash -/opt/netdata/usr/libexec/netdata/netdata-updater.sh --enable-auto-updates -``` - -and: - -```bash -/opt/netdata/usr/libexec/netdata/netdata-updater.sh --disable-auto-updates -``` +## Additional info -## Control runtime behavior of the updater script. +### Control runtime behavior of the updater script -Starting with v1.40.0, the `netdata-updater.sh` script supports a config file called `netdata-updater.conf`, -located in the same directory as the main `netdata.conf` file. This file uses POSIX shell script syntax to define -variables that are used by the updater. +Starting with v1.40.0, the `netdata-updater.sh` script supports a config file called `netdata-updater.conf`, located in the same directory as the main `netdata.conf` file. This file uses POSIX shell script syntax to define variables that are used by the updater. -This configuration file can be edited [using our `edit-config` -script](/docs/netdata-agent/configuration/README.md). +This configuration file can be edited using our [`edit-config` script](/docs/netdata-agent/configuration/README.md). The following configuration options are currently supported: -- `NETDATA_UPDATER_JITTER`: Sets an upper limit in seconds on the random delay in the updater script when running - as a scheduled task. This random delay helps avoid issues resulting from too many nodes trying to reconnect to - the Cloud at the same time. The default value is 3600, which corresponds to one hour. Most users should not ever - need to change this. -- `NETDATA_MAJOR_VERSION_UPDATES`: If set to a value other than 0, then new major versions will be installed - without user confirmation. Must be set to a non-zero value for automated updates to install new major versions. -- `NETDATA_NO_SYSTEMD_JOURNAL`: If set to a value other than 0, skip attempting to install the - `netdata-plugin-systemd-journal` package on supported systems on update. This optional package will be installed - by default on supported systems by the updater if this option is not set. Only affects systems using native packages. +- `NETDATA_UPDATER_JITTER`: Sets an upper limit in seconds on the random delay in the updater script when running as a scheduled task. This random delay helps avoid issues resulting from too many nodes trying to reconnect to the Cloud at the same time. The default value is 3600, which corresponds to one hour. Most users shouldn’t ever need to change this. +- `NETDATA_MAJOR_VERSION_UPDATES`: If set to a value other than 0, then new major versions will be installed without user confirmation. Must be set to a non-zero value for automated updates to install new major versions. +- `NETDATA_NO_SYSTEMD_JOURNAL`: If set to a value other than 0, skip attempting to install the `netdata-plugin-systemd-journal` package on supported systems on update. The updater will install this optional package by default on supported systems if this option is not set. It only affects systems using native packages. diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh index c339ac87..23328a7a 100644 --- a/packaging/installer/functions.sh +++ b/packaging/installer/functions.sh @@ -303,6 +303,18 @@ prepare_cmake_options() { enable_feature PLUGIN_GO 0 fi + if [ "${ENABLE_PYTHON:-1}" -eq 1 ]; then + enable_feature PLUGIN_PYTHON 1 + else + enable_feature PLUGIN_PYTHON 0 + fi + + if [ "${ENABLE_CHARTS:-1}" -eq 1 ]; then + enable_feature PLUGIN_CHARTS 1 + else + enable_feature PLUGIN_CHARTS 0 + fi + if [ "${USE_SYSTEM_PROTOBUF:-0}" -eq 1 ]; then enable_feature BUNDLED_PROTOBUF 0 else @@ -341,8 +353,6 @@ prepare_cmake_options() { enable_feature PLUGIN_NETWORK_VIEWER "${IS_LINUX}" enable_feature PLUGIN_EBPF "${ENABLE_EBPF:-0}" - enable_feature ACLK "${ENABLE_CLOUD:-1}" - enable_feature CLOUD "${ENABLE_CLOUD:-1}" enable_feature BUNDLED_JSONC "${NETDATA_BUILD_JSON_C:-0}" enable_feature DBENGINE "${ENABLE_DBENGINE:-1}" enable_feature H2O "${ENABLE_H2O:-1}" diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh index e9790202..f6d6a3e2 100755 --- a/packaging/installer/install-required-packages.sh +++ b/packaging/installer/install-required-packages.sh @@ -411,25 +411,35 @@ detect_package_manager_from_distribution() { centos* | clearos* | rocky* | almalinux*) package_installer="" tree="centos" - [[ -n "${yum}" ]] && package_installer="install_yum" [[ -n "${dnf}" ]] && package_installer="install_dnf" + [[ -n "${yum}" ]] && package_installer="install_yum" if [[ "${IGNORE_INSTALLED}" -eq 0 ]] && [[ -z "${package_installer}" ]]; then echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system." exit 1 fi ;; - fedora* | redhat* | red\ hat* | rhel*) + redhat* | red\ hat* | rhel*) package_installer= tree="rhel" - [[ -n "${yum}" ]] && package_installer="install_yum" [[ -n "${dnf}" ]] && package_installer="install_dnf" + [[ -n "${yum}" ]] && package_installer="install_yum" + if [[ "${IGNORE_INSTALLED}" -eq 0 ]] && [[ -z "${package_installer}" ]]; then + echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system." + exit 1 + fi + ;; + + fedora*) + package_installer="install_dnf" + tree="rhel" if [[ "${IGNORE_INSTALLED}" -eq 0 ]] && [[ -z "${package_installer}" ]]; then echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system." exit 1 fi ;; + ol*) package_installer= tree="ol" @@ -825,6 +835,18 @@ declare -A pkg_libuuid_dev=( ['default']="" ) +declare -A pkg_libcurl_dev=( + ['alpine']="curl-dev" + ['arch']="curl" + ['clearlinux']="devpkg-curl" + ['debian']="libcurl4-openssl-dev" + ['gentoo']="net-misc/curl" + ['ubuntu']="libcurl4-openssl-dev" + ['macos']="curl" + ['freebsd']="curl" + ['default']="libcurl-devel" +) + declare -A pkg_libmnl_dev=( ['alpine']="libmnl-dev" ['arch']="libmnl" @@ -1246,6 +1268,7 @@ packages() { suitable_package libyaml-dev suitable_package libsystemd-dev suitable_package pcre2 + suitable_package libcurl-dev fi # ------------------------------------------------------------------------- @@ -1531,7 +1554,7 @@ install_yum() { validate_install_dnf() { echo >&2 " > Checking if package '${*}' is installed..." - dnf list installed "${*}" > /dev/null 2>&1 || echo "${*}" + dnf list --installed "${*}" > /dev/null 2>&1 || echo "${*}" } install_dnf() { diff --git a/packaging/installer/installer.nsi b/packaging/installer/installer.nsi deleted file mode 100644 index c14ccb59..00000000 --- a/packaging/installer/installer.nsi +++ /dev/null @@ -1,128 +0,0 @@ -!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 72b82be2..6b967678 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -53,11 +53,9 @@ INSTALL_PREFIX="" NETDATA_AUTO_UPDATES="default" NETDATA_CLAIM_URL="https://app.netdata.cloud" NETDATA_COMMAND="default" -NETDATA_DISABLE_CLOUD=0 NETDATA_INSTALLER_OPTIONS="" NETDATA_FORCE_METHOD="" NETDATA_OFFLINE_INSTALL_SOURCE="" -NETDATA_REQUIRE_CLOUD=1 NETDATA_WARNINGS="" RELEASE_CHANNEL="default" @@ -149,8 +147,6 @@ main() { if [ -n "${NETDATA_CLAIM_TOKEN}" ]; then claim - elif [ "${NETDATA_DISABLE_CLOUD}" -eq 1 ]; then - soft_disable_cloud fi set_auto_updates @@ -185,8 +181,6 @@ USAGE: kickstart.sh [options] --native-only Only install if native binary packages are available. --static-only Only install if a static build is available. --build-only Only install using a local build. - --disable-cloud Disable support for Netdata Cloud (default: detect) - --require-cloud Only install if Netdata Cloud can be enabled. Overrides --disable-cloud. --install-prefix <path> Specify an installation prefix for local builds (default: autodetect based on system type). --old-install-prefix <path> Specify an old local builds installation prefix for uninstall/reinstall (if it's not default). --install-version <version> Specify the version of Netdata to install. @@ -1183,41 +1177,6 @@ handle_existing_install() { esac } -soft_disable_cloud() { - set_tmpdir - - cloud_prefix="${INSTALL_PREFIX}/var/lib/netdata/cloud.d" - - run_as_root mkdir -p "${cloud_prefix}" - - cat > "${tmpdir}/cloud.conf" << EOF -[global] - enabled = no -EOF - - run_as_root cp "${tmpdir}/cloud.conf" "${cloud_prefix}/cloud.conf" - - if [ -z "${NETDATA_NO_START}" ]; then - case "${SYSTYPE}" in - Darwin) run_as_root launchctl kickstart -k com.github.netdata ;; - FreeBSD) run_as_root service netdata restart ;; - Linux) - initpath="$(run_as_root readlink /proc/1/exe)" - - if command -v service > /dev/null 2>&1; then - run_as_root service netdata restart - elif command -v rc-service > /dev/null 2>&1; then - run_as_root rc-service netdata restart - elif [ "$(basename "${initpath}" 2> /dev/null)" = "systemd" ]; then - run_as_root systemctl restart netdata - elif [ -f /etc/init.d/netdata ]; then - run_as_root /etc/init.d/netdata restart - fi - ;; - esac - fi -} - confirm_install_prefix() { if [ -n "${INSTALL_PREFIX}" ] && [ "${NETDATA_FORCE_METHOD}" != 'build' ]; then fatal "The --install-prefix option is only supported together with the --build-only option." F0204 @@ -1246,10 +1205,9 @@ check_claim_opts() { # shellcheck disable=SC2235,SC2030 if [ -z "${NETDATA_CLAIM_TOKEN}" ] && [ -n "${NETDATA_CLAIM_ROOMS}" ]; then fatal "Invalid claiming options, claim rooms may only be specified when a token is specified." F0204 - elif [ -z "${NETDATA_CLAIM_TOKEN}" ] && [ -n "${NETDATA_CLAIM_EXTRA}" ]; then + elif [ -z "${NETDATA_CLAIM_TOKEN}" ] && [ -n "${NETDATA_CLAIM_EXTRA}${NETDATA_CLAIM_PROXY}${NETDATA_CLAIM_NORELOAD}${NETDATA_CLAIM_INSECURE}" ]; then + # The above condition checks if _any_ claiming options other than the rooms have been set when the token is unset. fatal "Invalid claiming options, a claiming token must be specified." F0204 - elif [ "${NETDATA_DISABLE_CLOUD}" -eq 1 ] && [ -n "${NETDATA_CLAIM_TOKEN}" ]; then - fatal "Cloud explicitly disabled, but automatic claiming requested. Either enable Netdata Cloud, or remove the --claim-* options." F0204 fi } @@ -1277,6 +1235,93 @@ is_netdata_running() { fi } +write_claim_config() { + if [ -z "${INSTALL_PREFIX}" ] || [ "${INSTALL_PREFIX}" = "/" ]; then + config_path="/etc/netdata" + netdatacli="$(command -v netdatacli)" + elif [ "${INSTALL_PREFIX}" = "/opt/netdata" ]; then + config_path="/opt/netdata/etc/netdata" + netdatacli="/opt/netdata/bin/netdatacli" + elif [ ! -d "${INSTALL_PREFIX}/netdata" ]; then + config_path="${INSTALL_PREFIX}/etc/netdata" + netdatacli="${INSTALL_PREFIX}/usr/sbin/netdatacli" + else + config_path="${INSTALL_PREFIX}/netdata/etc/netdata" + netdatacli="${INSTALL_PREFIX}/netdata/usr/sbin/netdatacli" + fi + + claim_config="${config_path}/claim.conf" + + if [ "${DRY_RUN}" -eq 1 ]; then + progress "Would attempt to write claiming configuration to ${claim_config}" + return 0 + fi + + progress "Writing claiming configuration to ${claim_config}" + + config="[global]" + config="${config}\n url = ${NETDATA_CLAIM_URL}" + config="${config}\n token = ${NETDATA_CLAIM_TOKEN}" + if [ -n "${NETDATA_CLAIM_ROOMS}" ]; then + config="${config}\n rooms = ${NETDATA_CLAIM_ROOMS}" + fi + if [ -n "${NETDATA_CLAIM_PROXY}" ]; then + config="${config}\n proxy = ${NETDATA_CLAIM_PROXY}" + fi + if [ -n "${NETDATA_CLAIM_INSECURE}" ]; then + config="${config}\n insecure = ${NETDATA_CLAIM_INSECURE}" + fi + + run_as_root touch "${claim_config}.tmp" || return 1 + run_as_root chmod 0640 "${claim_config}.tmp" || return 1 + run_as_root chown ":${NETDATA_CLAIM_GROUP:-netdata}" "${claim_config}.tmp" || return 1 + run_as_root sh -c "printf '${config}\\n' > \"${claim_config}.tmp\"" || return 1 + run_as_root mv -f "${claim_config}.tmp" "${claim_config}" || return 1 + + if [ -z "${NETDATA_CLAIM_NORELOAD}" ]; then + run_as_root "${netdatacli}" reload-claiming-state || return 1 + fi +} + +run_claim_script() { + if [ -n "${NETDATA_CLAIM_NORELOAD}" ]; then + NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -daemon-not-running" + fi + + if [ -n "${NETDATA_CLAIM_INSECURE}" ]; then + NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -insecure" + fi + + if [ -n "${NETDATA_CLAIM_PROXY}" ]; then + if [ "${NETDATA_CLAIM_PROXY}" = "none" ]; then + NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -noproxy" + else + NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -proxy=${NETDATA_CLAIM_PROXY}" + fi + fi + + # shellcheck disable=SC2086 + run_as_root "${NETDATA_CLAIM_PATH}" -token="${NETDATA_CLAIM_TOKEN}" -rooms="${NETDATA_CLAIM_ROOMS}" -url="${NETDATA_CLAIM_URL}" ${NETDATA_CLAIM_EXTRA} + case $? in + 0) progress "Successfully claimed node" ;; + 1) warning "Unable to claim node due to invalid claiming options. If you are seeing this message, you’ve probably found a bug and should open a bug report at ${AGENT_BUG_REPORT_URL}" ;; + 2) warning "Unable to claim node due to issues creating the claiming directory or preparing the local claiming key. Make sure you have a working openssl command and that ${INSTALL_PREFIX}/var/lib/netdata/cloud.d exists, then try again." ;; + 3) warning "Unable to claim node due to missing dependencies. Usually this means that the Netdata Agent was built without support for Netdata Cloud. If you built the agent from source, please install all needed dependencies for Cloud support. If you used the regular installation script and see this error, please file a bug report at ${AGENT_BUG_REPORT_URL}." ;; + 4) warning "Failed to claim node due to inability to connect to ${NETDATA_CLAIM_URL}. Usually this either means that the specified claiming URL is wrong, or that you are having networking problems." ;; + 5) progress "Successfully claimed node, but was not able to notify the Netdata Agent. You will need to restart the Netdata service on this node before it will show up in the Cloud." ;; + 8) warning "Failed to claim node due to an invalid agent ID. You can usually resolve this by removing ${INSTALL_PREFIX}/var/lib/netdata/registry/netdata.public.unique.id and restarting the agent. Then try to claim it again using the same options." ;; + 9) warning "Failed to claim node due to an invalid node name. This probably means you tried to specify a custom name for this node (for example, using the --claim-hostname option), but the hostname itself was either empty or consisted solely of whitespace. You can resolve this by specifying a valid host name and trying again." ;; + 10) warning "Failed to claim node due to an invalid room ID. This issue is most likely caused by a typo. Please check if the room(s) you are trying to add appear on the list of rooms provided to the --claim-rooms option ('${NETDATA_CLAIM_ROOMS}'). Then verify if the rooms are visible in Netdata Cloud and try again." ;; + 11) warning "Failed to claim node due to an issue with the generated RSA key pair. You can usually resolve this by removing all files in ${INSTALL_PREFIX}/var/lib/netdata/cloud.d and then trying again." ;; + 12) warning "Failed to claim node due to an invalid or expired claiming token. Please check that the token specified with the --claim-token option ('${NETDATA_CLAIM_TOKEN}') matches what you see in the Cloud and try again." ;; + 13) warning "Failed to claim node because the Cloud thinks it is already claimed. If this node was created by cloning a VM or as a container from a template, please remove the file ${INSTALL_PREFIX}/var/lib/netdata/registry/netdata.public.unique.id and restart the agent. Then try to claim it again with the same options. Otherwise, if you are certain this node has never been claimed before, you can use the --claim-id option to specify a new node ID to use for claiming, for example by using the uuidgen command like so: --claim-id \"\$(uuidgen)\"" ;; + 14) warning "Failed to claim node because the node is already in the process of being claimed. You should not need to do anything to resolve this, the node should show up properly in the Cloud soon. If it does not, please report a bug at ${AGENT_BUG_REPORT_URL}." ;; + 15|16|17) warning "Failed to claim node due to an internal server error in the Cloud. Please retry claiming this node later, and if you still see this message file a bug report at ${CLOUD_BUG_REPORT_URL}." ;; + 18) warning "Unable to claim node because this Netdata installation does not have a unique ID yet. Make sure the agent is running and started up correctly, and then try again." ;; + *) warning "Failed to claim node for an unknown reason. This usually means either networking problems or a bug. Please retry claiming later, and if you still see this message file a bug report at ${AGENT_BUG_REPORT_URL}" ;; + esac +} + claim() { if [ "${DRY_RUN}" -eq 1 ]; then progress "Would attempt to claim agent to ${NETDATA_CLAIM_URL}" @@ -1300,17 +1345,18 @@ claim() { NETDATA_CLAIM_PATH="${INSTALL_PREFIX}/netdata/usr/sbin/netdata-claim.sh" fi + method="script" err_msg= err_code= if [ -z "${NETDATA_CLAIM_PATH}" ]; then - err_msg="Unable to claim node: could not find usable claiming script. Reinstalling Netdata may resolve this." - err_code=F050B + method="config" elif [ ! -e "${NETDATA_CLAIM_PATH}" ]; then - err_msg="Unable to claim node: ${NETDATA_CLAIM_PATH} does not exist." - err_code=F0512 + method="config" elif [ ! -f "${NETDATA_CLAIM_PATH}" ]; then err_msg="Unable to claim node: ${NETDATA_CLAIM_PATH} is not a file." err_code=F0513 + elif grep -q '%%NEW_CLAIMING_METHOD%%' "${NETDATA_CLAIM_PATH}"; then + method="config" elif [ ! -x "${NETDATA_CLAIM_PATH}" ]; then err_msg="Unable to claim node: claiming script at ${NETDATA_CLAIM_PATH} is not executable. Reinstalling Netdata may resolve this." err_code=F0514 @@ -1326,34 +1372,16 @@ claim() { fi if ! is_netdata_running; then - NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -daemon-not-running" + NETDATA_CLAIM_NORELOAD=1 fi - # shellcheck disable=SC2086 - run_as_root "${NETDATA_CLAIM_PATH}" -token="${NETDATA_CLAIM_TOKEN}" -rooms="${NETDATA_CLAIM_ROOMS}" -url="${NETDATA_CLAIM_URL}" ${NETDATA_CLAIM_EXTRA} - case $? in - 0) - progress "Successfully claimed node" - return 0 - ;; - 1) warning "Unable to claim node due to invalid claiming options. If you are seeing this message, you’ve probably found a bug and should open a bug report at ${AGENT_BUG_REPORT_URL}" ;; - 2) warning "Unable to claim node due to issues creating the claiming directory or preparing the local claiming key. Make sure you have a working openssl command and that ${INSTALL_PREFIX}/var/lib/netdata/cloud.d exists, then try again." ;; - 3) warning "Unable to claim node due to missing dependencies. Usually this means that the Netdata Agent was built without support for Netdata Cloud. If you built the agent from source, please install all needed dependencies for Cloud support. If you used the regular installation script and see this error, please file a bug report at ${AGENT_BUG_REPORT_URL}." ;; - 4) warning "Failed to claim node due to inability to connect to ${NETDATA_CLAIM_URL}. Usually this either means that the specified claiming URL is wrong, or that you are having networking problems." ;; - 5) - progress "Successfully claimed node, but was not able to notify the Netdata Agent. You will need to restart the Netdata service on this node before it will show up in the Cloud." - return 0 + case ${method} in + script) run_claim_script ;; + config) + if ! write_claim_config; then + warning "Failed to write claiming configuration. This usually means you do not have permissions to access the configuration directory." + fi ;; - 8) warning "Failed to claim node due to an invalid agent ID. You can usually resolve this by removing ${INSTALL_PREFIX}/var/lib/netdata/registry/netdata.public.unique.id and restarting the agent. Then try to claim it again using the same options." ;; - 9) warning "Failed to claim node due to an invalid node name. This probably means you tried to specify a custom name for this node (for example, using the --claim-hostname option), but the hostname itself was either empty or consisted solely of whitespace. You can resolve this by specifying a valid host name and trying again." ;; - 10) warning "Failed to claim node due to an invalid room ID. This issue is most likely caused by a typo. Please check if the room(s) you are trying to add appear on the list of rooms provided to the --claim-rooms option ('${NETDATA_CLAIM_ROOMS}'). Then verify if the rooms are visible in Netdata Cloud and try again." ;; - 11) warning "Failed to claim node due to an issue with the generated RSA key pair. You can usually resolve this by removing all files in ${INSTALL_PREFIX}/var/lib/netdata/cloud.d and then trying again." ;; - 12) warning "Failed to claim node due to an invalid or expired claiming token. Please check that the token specified with the --claim-token option ('${NETDATA_CLAIM_TOKEN}') matches what you see in the Cloud and try again." ;; - 13) warning "Failed to claim node because the Cloud thinks it is already claimed. If this node was created by cloning a VM or as a container from a template, please remove the file ${INSTALL_PREFIX}/var/lib/netdata/registry/netdata.public.unique.id and restart the agent. Then try to claim it again with the same options. Otherwise, if you are certain this node has never been claimed before, you can use the --claim-id option to specify a new node ID to use for claiming, for example by using the uuidgen command like so: --claim-id \"\$(uuidgen)\"" ;; - 14) warning "Failed to claim node because the node is already in the process of being claimed. You should not need to do anything to resolve this, the node should show up properly in the Cloud soon. If it does not, please report a bug at ${AGENT_BUG_REPORT_URL}." ;; - 15|16|17) warning "Failed to claim node due to an internal server error in the Cloud. Please retry claiming this node later, and if you still see this message file a bug report at ${CLOUD_BUG_REPORT_URL}." ;; - 18) warning "Unable to claim node because this Netdata installation does not have a unique ID yet. Make sure the agent is running and started up correctly, and then try again." ;; - *) warning "Failed to claim node for an unknown reason. This usually means either networking problems or a bug. Please retry claiming later, and if you still see this message file a bug report at ${AGENT_BUG_REPORT_URL}" ;; esac if [ "${ACTION}" = "claim" ]; then @@ -1938,12 +1966,6 @@ build_and_install() { opts="${opts} --stable-channel" fi - if [ "${NETDATA_REQUIRE_CLOUD}" -eq 1 ]; then - opts="${opts} --require-cloud" - elif [ "${NETDATA_DISABLE_CLOUD}" -eq 1 ]; then - opts="${opts} --disable-cloud" - fi - # shellcheck disable=SC2086 run_script ./netdata-installer.sh ${opts} @@ -2392,12 +2414,10 @@ parse_args() { esac ;; "--disable-cloud") - NETDATA_DISABLE_CLOUD=1 - NETDATA_REQUIRE_CLOUD=0 + warning "Cloud cannot be disabled" ;; "--require-cloud") - NETDATA_DISABLE_CLOUD=0 - NETDATA_REQUIRE_CLOUD=1 + warning "Cloud is always required" ;; "--dont-start-it") NETDATA_NO_START=1 @@ -2447,26 +2467,21 @@ parse_args() { "--native-only") NETDATA_FORCE_METHOD="native" ;; "--static-only") NETDATA_FORCE_METHOD="static" ;; "--build-only") NETDATA_FORCE_METHOD="build" ;; - "--claim-token") - NETDATA_CLAIM_TOKEN="${2}" - shift 1 - ;; - "--claim-rooms") - NETDATA_CLAIM_ROOMS="${2}" - shift 1 - ;; - "--claim-url") - NETDATA_CLAIM_URL="${2}" - shift 1 - ;; "--claim-"*) optname="$(echo "${1}" | cut -d '-' -f 4-)" case "${optname}" in - id|proxy|user|hostname) + token) NETDATA_CLAIM_TOKEN="${2}"; shift 1 ;; + rooms) NETDATA_CLAIM_ROOMS="${2}"; shift 1 ;; + url) NETDATA_CLAIM_URL="${2}"; shift 1 ;; + proxy) NETDATA_CLAIM_PROXY="${2}"; shift 1 ;; + noproxy) NETDATA_CLAIM_PROXY="none" ;; + insecure) NETDATA_CLAIM_INSECURE=yes ;; + noreload) NETDATA_CLAIM_NORELOAD=1 ;; + id|user|hostname) NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -${optname}=${2}" shift 1 ;; - verbose|insecure|noproxy|noreload|daemon-not-running) NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -${optname}" ;; + verbose|daemon-not-running) NETDATA_CLAIM_EXTRA="${NETDATA_CLAIM_EXTRA} -${optname}" ;; *) warning "Ignoring unrecognized claiming option ${optname}" ;; esac ;; diff --git a/packaging/installer/methods/ansible.md b/packaging/installer/methods/ansible.md index 0aadeff9..82e4095f 100644 --- a/packaging/installer/methods/ansible.md +++ b/packaging/installer/methods/ansible.md @@ -1,16 +1,6 @@ -<!-- -title: "Deploy Netdata with Ansible" -description: "Deploy an infrastructure monitoring solution in minutes with the Netdata Agent and Ansible. Use and customize a simple playbook for monitoring as code." -image: /img/seo/guides/deploy/ansible.png -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/ansible.md -sidebar_label: "Ansible" -learn_status: "Published" -learn_rel_path: "Installation/Install on specific environments" ---> - # Deploy Netdata with Ansible -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 +Netdata's [one-line kickstart](/packaging/installer/README.md) 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. @@ -22,7 +12,7 @@ code? Enter [Ansible](https://ansible.com), a popular system provisioning, configuration management, and infrastructure as code (IaC) tool. Ansible uses **playbooks** to glue many standardized operations together with a simple syntax, then run those operations over standard and secure SSH connections. There's no agent to install on the remote system, so all you -have to worry about is your application and your monitoring software. +have to worry about is your application and your monitoring software. Ansible has some competition from the likes of [Puppet](https://puppet.com/) or [Chef](https://www.chef.io/), but the most valuable feature about Ansible is **idempotent**. From the [Ansible @@ -42,9 +32,9 @@ minutes. ## Prerequisites -- A Netdata Cloud account. [Sign in and create one](https://app.netdata.cloud) if you don't have one already. -- An administration system with [Ansible](https://www.ansible.com/) installed. -- One or more nodes that your administration system can access via [SSH public +- A Netdata Cloud account. [Sign in and create one](https://app.netdata.cloud) if you don't have one already. +- An administration system with [Ansible](https://www.ansible.com/) installed. +- One or more nodes that your administration system can access via [SSH public keys](https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key) (preferably password-less). ## Download and configure the playbook @@ -71,9 +61,9 @@ cd ansible-quickstart The `hosts` file contains a list of IP addresses or hostnames that Ansible will try to run the playbook against. The `hosts` file that comes with the repository contains two example IP addresses, which you should replace according to the -IP address/hostname of your nodes. +IP address/hostname of your nodes. -```conf +```text 203.0.113.0 hostname=node-01 203.0.113.1 hostname=node-02 ``` @@ -86,7 +76,7 @@ omit the `hostname=` string entirely to use the system's default hostname. If you SSH into your nodes as a user other than `root`, you need to configure `hosts` according to those user names. Use the `ansible_user` variable to set the login user. For example: -```conf +```text 203.0.113.0 hostname=ansible-01 ansible_user=example ``` @@ -96,7 +86,7 @@ If you use an SSH key other than `~/.ssh/id_rsa` for logging into your nodes, yo the `hosts` file with the `ansible_ssh_private_key_file` variable. For example, to log into a Lightsail instance using two different SSH keys supplied by AWS. -```conf +```text 203.0.113.0 hostname=ansible-01 ansible_ssh_private_key_file=~/.ssh/LightsailDefaultKey-us-west-2.pem 203.0.113.1 hostname=ansible-02 ansible_ssh_private_key_file=~/.ssh/LightsailDefaultKey-us-east-1.pem ``` @@ -110,7 +100,7 @@ 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, then click on **Manage your Space**. Click on the **Nodes** tab in the panel that appears, which displays a script with -`token` and `room` strings. +`token` and `room` strings. ![Animated GIF of finding the claiming script and the token and room strings](https://user-images.githubusercontent.com/1153921/98740235-f4c3ac00-2367-11eb-8ffd-e9ab0f04c463.gif) @@ -123,7 +113,7 @@ claim_rooms: XXXXX ``` Change the `dbengine_multihost_disk_space` if you want to change the metrics retention policy by allocating more or less -disk space for storing metrics. The default is 2048 Mib, or 2 GiB. +disk space for storing metrics. The default is 2048 Mib, or 2 GiB. Because we're connecting this node to Netdata Cloud, and will view its dashboards there instead of via the IP address or hostname of the node, the playbook disables that local dashboard by setting `web_mode` to `none`. This gives a small diff --git a/packaging/installer/methods/aws.md b/packaging/installer/methods/aws.md index 8648a8f0..b6818709 100644 --- a/packaging/installer/methods/aws.md +++ b/packaging/installer/methods/aws.md @@ -1,12 +1,3 @@ -<!-- -title: "Install Netdata on AWS" -description: "The Netdata Agent runs on all popular cloud providers, but often requires additional steps and configuration for full functionality." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/aws.md -sidebar_label: "AWS" -learn_status: "Published" -learn_rel_path: "Installation/Install on specific environments" ---> - # Install Netdata on AWS Netdata is fully compatible with Amazon Web Services (AWS). @@ -41,11 +32,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](/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) +- [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 @@ -54,7 +45,7 @@ inbound rules**. Add a new rule with the following options: -```conf +```text Type: Custom TCP Protocol: TCP Port Range: 19999 diff --git a/packaging/installer/methods/azure.md b/packaging/installer/methods/azure.md index 94590eec..baccacd9 100644 --- a/packaging/installer/methods/azure.md +++ b/packaging/installer/methods/azure.md @@ -1,15 +1,6 @@ -<!-- -title: "Install Netdata on Azure" -description: "The Netdata Agent runs on all popular cloud providers, but often requires additional steps and configuration for full functionality." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/azure.md -sidebar_label: "Azure" -learn_status: "Published" -learn_rel_path: "Installation/Install on specific environments" ---> - # Install Netdata on Azure -Netdata is fully compatible with Azure. +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](/src/streaming/README.md) configuration. @@ -41,18 +32,18 @@ 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](/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) +- [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. Add a new rule with the following options: -```conf +```text Source: Any Source port ranges: 19999 Destination: Any @@ -64,5 +55,3 @@ Name: Netdata ``` Click **Add** to apply your new inbound security rule. - - diff --git a/packaging/installer/methods/freebsd.md b/packaging/installer/methods/freebsd.md index 3a33d2e9..05137598 100644 --- a/packaging/installer/methods/freebsd.md +++ b/packaging/installer/methods/freebsd.md @@ -1,12 +1,3 @@ -<!-- -title: "Install Netdata on FreeBSD" -description: "Install Netdata on FreeBSD to monitor the health and performance of bare metal or VMs with thousands of real-time, per-second metrics." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/freebsd.md -sidebar_label: "FreeBSD" -learn_status: "Published" -learn_rel_path: "Installation/Install on specific environments" ---> - # Install Netdata on FreeBSD > 💡 This document is maintained by Netdata's community, and may not be completely up-to-date. Please double-check the @@ -24,7 +15,7 @@ This step needs root privileges. pkg install bash e2fsprogs-libuuid git curl autoconf automake pkgconf pidof liblz4 libuv json-c cmake gmake ``` -Please respond in the affirmative for any relevant prompts during the installation process. +Please respond in the affirmative for any relevant prompts during the installation process. ## Install Netdata @@ -35,9 +26,10 @@ If you have a Netdata cloud account then clicking on the **Connect Nodes** butto ```sh wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --claim-token <CLAIM_TOKEN> --claim-url https://app.netdata.cloud ``` -Please respond in the affirmative for any relevant prompts during the installation process. -Once the installation is completed, you should be able to start monitoring the FreeBSD server using Netdata. +Please respond in the affirmative for any relevant prompts during the installation process. + +Once the installation is completed, you should be able to start monitoring the FreeBSD server using Netdata. Netdata can also be installed via [FreeBSD ports](https://www.freshports.org/net-mgmt/netdata). @@ -67,7 +59,7 @@ gunzip netdata*.tar.gz && tar xf netdata*.tar && rm -rf netdata*.tar Install Netdata in `/opt/netdata`. If you want to enable automatic updates, add `--auto-update` or `-u` to install `netdata-updater` in `cron` (**need root permission**): ```sh -cd netdata-v* && ./netdata-installer.sh --install-prefix /opt && cp /opt/netdata/usr/sbin/netdata-claim.sh /usr/sbin/ +cd netdata-v* && ./netdata-installer.sh --install-prefix /opt ``` You also need to enable the `netdata` service in `/etc/rc.conf`: @@ -89,7 +81,8 @@ more about the information collected and how to opt-out, check the [anonymous st 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. + +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. The `netdata-updater.sh` script will update your Agent. ## Optional parameters to alter your installation @@ -102,9 +95,9 @@ The `kickstart.sh` script accepts a number of optional parameters to control how - `--dry-run`: Show what the installer would do, but don’t actually do any of it. - `--dont-start-it`: Don’t auto-start the daemon after installing. This parameter is not guaranteed to work. - `--release-channel`: Specify a particular release channel to install from. Currently supported release channels are: - - `nightly`: Installs a nightly build (this is currently the default). - - `stable`: Installs a stable release. - - `default`: Explicitly request whatever the current default is. + - `nightly`: Installs a nightly build (this is currently the default). + - `stable`: Installs a stable release. + - `default`: Explicitly request whatever the current default is. - `--nightly-channel`: Synonym for `--release-channel nightly`. - `--stable-channel`: Synonym for `--release-channel stable`. - `--auto-update`: Enable automatic updates (this is the default). @@ -113,24 +106,21 @@ The `kickstart.sh` script accepts a number of optional parameters to control how - `--native-only`: Only install if native binary packages are available. - `--static-only`: Only install if a static build is available. - `--build-only`: Only install using a local build. -- `--disable-cloud`: For local builds, don’t build any of the cloud code at all. For native packages and static builds, - use runtime configuration to disable cloud support. -- `--require-cloud`: Only install if Netdata Cloud can be enabled. Overrides `--disable-cloud`. - `--install-prefix`: Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system). - `--install-version`: Specify the version of Netdata to install. - `--old-install-prefix`: Specify the custom local build's installation prefix that should be removed. - `--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. -The following options are mutually exclusive and specifiy special operations other than trying to install Netdata normally or update an existing install: +The following options are mutually exclusive and specify special operations other than trying to install Netdata normally or update an existing install: - `--reinstall`: If there is an existing install, reinstall it instead of trying to update it. If there is not an existing install, install netdata normally. -- `--reinstall-even-if-unsafe`: If there is an existing install, reinstall it instead of trying to update it, even if doing so is known to potentially break things (for example, if we cannot detect what tyep of installation it is). If there is not an existing install, install Netdata normally. +- `--reinstall-even-if-unsafe`: If there is an existing install, reinstall it instead of trying to update it, even if doing so is known to potentially break things (for example, if we cannot detect what type of installation it is). If there is not an existing install, install Netdata normally. - `--reinstall-clean`: If there is an existing install, uninstall it before trying to install Netdata. Fails if there is no existing install. - `--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](/packaging/installer/methods/offline.md) for more info. +- `--prepare-offline-install-source`: Instead of installing 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 5003decb..59e29369 100644 --- a/packaging/installer/methods/gcp.md +++ b/packaging/installer/methods/gcp.md @@ -1,13 +1,3 @@ -<!-- -title: "Install Netdata on GCP" -description: "The Netdata Agent runs on all popular cloud providers, but often requires additional steps and configuration for full functionality." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/gcp.md -sidebar_label: "GCP" -learn_status: "Published" -learn_topic_type: "Tasks" -learn_rel_path: "Installation/Install on specific environments" ---> - # Install Netdata on GCP Netdata is fully compatible with the Google Cloud Platform (GCP). @@ -42,12 +32,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](/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) - +- [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 click **Create firewall rule**. @@ -55,7 +44,7 @@ click **Create firewall rule**. The following configuration has previously worked for Netdata running on GCP instances ([see #7786](https://github.com/netdata/netdata/issues/7786)): -```conf +```text Name: <name> Type: Ingress Targets: <name-tag> @@ -67,4 +56,3 @@ Priority: 1000 Read GCP's [firewall documentation](https://cloud.google.com/vpc/docs/using-firewalls) for specific instructions on how to create a new firewall rule. - diff --git a/packaging/installer/methods/kickstart.md b/packaging/installer/methods/kickstart.md index a525cc70..ed5a4ae4 100644 --- a/packaging/installer/methods/kickstart.md +++ b/packaging/installer/methods/kickstart.md @@ -5,17 +5,29 @@ import TabItem from '@theme/TabItem'; # Install Netdata with kickstart.sh -![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-3600&label=last+hour&units=kickstart%20downloads&value_color=orange&precision=0) ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-86400&label=today&units=kickstart%20downloads&precision=0) +![last hour badge](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-3600&label=last+hour&units=kickstart%20downloads&precision=0) ![today badge](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.requests_by_url_pattern&options=unaligned&dimensions=kickstart&group=sum&after=-86400&label=today&units=kickstart%20downloads&precision=0) -`kickstart.sh` is the recommended way of installing Netdata. +**`kickstart.sh` is the recommended way of installing Netdata.** This script works on all Linux distributions and macOS environments, by detecting the optimal method of installing Netdata directly to the operating system. +## What does `kickstart.sh` do? + +The `kickstart.sh` script does the following after being downloaded and run using `sh`: + +- Determines what platform you’re running on. +- Checks for an existing installation, and if found updates that instead of creating a new installation. +- Attempts to install Netdata using our [official native binary packages](/packaging/installer/methods/packages.md). +- If there are no official native binary packages for your system (or installing that way failed), tries to install using a [static build of Netdata](/packaging/makeself/README.md) if one is available. +- If no static build is available, installs required dependencies and then attempts to install by building Netdata locally (by downloading the sources and building them directly). +- Installs `netdata-updater.sh` to `cron.daily`, so your Netdata installation will be updated with new nightly versions, unless you override that with an [optional parameter](#optional-parameters-to-alter-your-installation). +- Prints a message whether installation succeeded or failed for QA purposes. + ## Installation -> :bulb: Tip +> **Tip** > -> 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. +> If you are unsure whether you want nightly or stable releases, read the [related section](/docs/netdata-agent/versions-and-platforms.md) of our Documentation, detailing the pros and cons of each release type. To install Netdata, run the following as your normal user: @@ -32,146 +44,10 @@ To install Netdata, run the following as your normal user: </TabItem> </Tabs> -> :bookmark_tabs: Note +> **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. - -## Verify script integrity - -To use `md5sum` to verify the integrity of the `kickstart.sh` script you will download using the one-line command above, -run the following: - -```bash -[ "@KICKSTART_CHECKSUM@" = "$(curl -Ss https://get.netdata.cloud/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" -``` - -If the script is valid, this command will return `OK, VALID`. - -## What does `kickstart.sh` do? - -The `kickstart.sh` script does the following after being downloaded and run using `sh`: - -- Determines what platform you are running on. -- Checks for an existing installation, and if found updates that instead of creating a new install. -- Attempts to install Netdata using our [official native binary packages](#native-packages). -- If there are no official native binary packages for your system (or installing that way failed), tries to install - using a [static build of Netdata](#static-builds) if one is available. -- If no static build is available, installs required dependencies and then attempts to install by - [building Netdata locally](#local-builds) (by downloading the sources and building them directly). -- Installs `netdata-updater.sh` to `cron.daily`, so your Netdata installation will be updated with new nightly - versions, unless you override that with an [optional parameter](#optional-parameters-to-alter-your-installation). -- Prints a message whether installation succeeded or failed for QA purposes. - -## Start stop or restart the Netdata Agent - -You will most often need to _restart_ the Agent to load new or edited configuration files. - -> **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](/src/health/REFERENCE.md#reload-health-configuration). - -### Using `systemctl` or `service` - -This is the recommended way to start, stop, or restart the Netdata daemon. - -- To **start** Netdata, run `sudo systemctl start netdata`. -- To **stop** Netdata, run `sudo systemctl stop netdata`. -- To **restart** Netdata, run `sudo systemctl restart netdata`. - -If the above commands fail, or you know that you're using a non-systemd system, try using the `service` command: - -- Starting: `sudo service netdata start`. -- Stopping: `sudo service netdata stop`. -- Restarting: `sudo service netdata restart`. - -### Using the `netdata` command - -Use the `netdata` command, typically located at `/usr/sbin/netdata`, to start the Netdata daemon: - -```bash -sudo netdata -``` - -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](/src/cli/README.md) capable of performing shutdowns. Start the Agent back up using your preferred method listed above. - -```bash -sudo netdatacli shutdown-agent -``` - -## Starting Netdata at boot - -In the `system` directory you can find scripts and configurations for the -various distros. - -### systemd - -The installer already installs `netdata.service` if it detects a systemd system. - -To install `netdata.service` by hand, run: - -```sh -# stop Netdata -killall netdata - -# copy netdata.service to systemd -cp system/netdata.service /etc/systemd/system/ - -# let systemd know there is a new service -systemctl daemon-reload - -# enable Netdata at boot -systemctl enable netdata - -# start Netdata -systemctl start netdata -``` - -### init.d - -In the system directory you can find `netdata-lsb`. Copy it to the proper place according to your distribution's documentation. For Ubuntu, this can be done via running the following commands as root. - -```sh -# copy the Netdata startup file to /etc/init.d -cp system/netdata-lsb /etc/init.d/netdata - -# make sure it is executable -chmod +x /etc/init.d/netdata - -# enable it -update-rc.d netdata defaults -``` - -### openrc / Gentoo Linux - -In the `system` directory you can find `netdata-openrc`. Copy it to the proper -place according to your distribution documentation. - -### CentOS / Red Hat Enterprise Linux - -For older versions of RHEL/CentOS that don't have systemd, an init script is included in the system directory. This can be installed by running the following commands as root. - -```sh -# copy the Netdata startup file to /etc/init.d -cp system/netdata-init-d /etc/init.d/netdata - -# make sure it is executable -chmod +x /etc/init.d/netdata - -# enable it -chkconfig --add netdata -``` - -_There have been some recent work on the init script, see the following PR <https://github.com/netdata/netdata/pull/403>_ - -### Other operating systems - -You can start Netdata by running it from `/etc/rc.local` or your system's equivalent. +> and `YOUR_ROOM_ID` with the ID of the Room you’re willing to connect the node to. ## Optional parameters to alter your installation @@ -180,9 +56,9 @@ The `kickstart.sh` script accepts a number of optional parameters to control how ### destination directory - `--install-prefix` - Specify an installation prefix for local builds (by default, we use a sane prefix based on the type of system). + Specify a custom installation directory for local builds. If not provided, a default directory will be used based on your system. - `--old-install-prefix` - Specify the custom local build's installation prefix that should be removed. + Specify the previous custom installation directory to be removed during the update process. ### interactivity @@ -211,7 +87,7 @@ By default, the script installs the nightly channel of Netdata, providing you wi ### install type -By default the script will prefer native builds when they are available, and then static builds. It will fallback to build from source when all others are not available. +By default, the script will prefer native builds when they’re available, and then static builds. It will fallback to build from source when all others aren’t available. - `--native-only` Only install if native binary packages are available. It fails otherwise. @@ -224,7 +100,7 @@ By default the script will prefer native builds when they are available, and the ### automatic updates -By default the script installs a cron job to automatically update Netdata to the latest version of the release channel used. +By default, the script installs a cron job to automatically update Netdata to the latest version of the release channel used. - `--auto-update` Enable automatic updates (this is the default). @@ -233,22 +109,18 @@ By default the script installs a cron job to automatically update Netdata to the ### Netdata Cloud related options -By default, the kickstart script will provide a Netdata agent installation that can potentially communicate with Netdata Cloud, if of course the Netdata agent is further configured to do so. +By default, the kickstart script will provide a Netdata agent installation that can potentially communicate with Netdata Cloud if the Netdata agent is further configured to do so. - `--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. This will enable, connect and claim the Netdata agent, to Netdata Cloud. + Specify a unique claiming token associated with your Space in Netdata Cloud to be used to connect to the node after the installation. This will connect and claim the Netdata Agent to Netdata Cloud. - `--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 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](/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#automatically-via-a-provisioning-system-or-the-command-line) 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` - Only install if Netdata Cloud can be enabled. -- `--disable-cloud` - For local builds, don’t build any of the Netdata Cloud code at all. For native packages and static builds, use runtime configuration to disable Netdata Cloud support. + If there is an existing installation, only try to claim it without attempting to update it. If there is no existing installation, install and claim Netdata normally. ### anonymous telemetry @@ -260,11 +132,11 @@ By default, the agent is sending anonymous telemetry data to help us take identi ### reinstalling - `--reinstall` - If there is an existing install, reinstall it instead of trying to update it. If there is not an existing install, install netdata normally. + If there is an existing installation, reinstall it instead of trying to update it. If there is not an existing installation, install netdata normally. - `--reinstall-even-if-unsafe` - If there is an existing install, reinstall it instead of trying to update it, even if doing so is known to potentially break things (for example, if we cannot detect what type of installation it is). If there is not an existing install, install Netdata normally. + If there is an existing installation, reinstall it instead of trying to update it, even if doing so is known to potentially break things (for example, if we can’t detect what type of installation it is). If there is not an existing install, install Netdata normally. - `--reinstall-clean` - If there is an existing install, uninstall it before trying to install Netdata. Fails if there is no existing install. + If there is an existing installation, uninstall it before trying to install Netdata. Fails if there is no existing installation. ### uninstall @@ -274,7 +146,7 @@ By default, the agent is sending anonymous telemetry data to help us take identi ### other options - `--dry-run` - Show what the installer would do, but don’t actually do any of it. + Simulates the installation process without making any changes to your system. This allows you to review the steps and potential impacts before proceeding with the actual installation. - `--dont-start-it` Don’t auto-start the daemon after installing. This parameter is not guaranteed to work. - `--distro-override` @@ -285,48 +157,28 @@ 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](/packaging/installer/methods/offline.md) for more info. + Instead of installing 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 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): +shouldn’t need to use special values for any of these): - `TMPDIR`: Used to specify where to put temporary files. On most systems, the default we select automatically should be fine. The user running the script needs to both be able to write files to the temporary directory, and run files from that location. -- `ROOTCMD`: Used to specify a command to use to run another command with root privileges if needed. By default - we try to use sudo, doas, or pkexec (in that order of preference), but if you need special options for one of +- `ROOTCMD`: Used to specify a command to use to run another command with root privileges if needed. By default, + we try to use sudo, doas, or pkexec (in that order of preference). However, if you need special options for one of those to work, or have a different tool to do the same thing on your system, you can specify it here. - `DISABLE_TELEMETRY`: If set to a value other than 0, behave as if `--disable-telemetry` was specified. -## Native packages - -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. - -If you want to enforce the usage of native packages and have the installer return a failure if they are not available, -you can do so by adding `--native-only` to the options you pass to the installer. - -## Static builds - -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 -will be used by default for installation. - -If you want to enforce the usage of a static build and have the installer return a failure if one is not available, -you can do so by adding `--static-only` to the options you pass to the installer. +## Verify script integrity -## Local builds +To use `md5sum` to verify the integrity of the `kickstart.sh` script you will download using the one-line command above, +run the following: -For systems which do not have available native packages or static builds, we support building Netdata locally on -the system it will be installed on. When using this approach, the installer will attempt to install any required -dependencies for building Netdata, though this may not always work correctly. +```bash +[ "@KICKSTART_CHECKSUM@" = "$(curl -Ss https://get.netdata.cloud/kickstart.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID" +``` -If you want to enforce the usage of a local build (perhaps because you require a custom installation prefix, -which is not supported with native packages or static builds), you can do so by adding `--build-only` to the -options you pass to the installer. +If the script is valid, this command will return `OK, VALID`. diff --git a/packaging/installer/methods/kubernetes.md b/packaging/installer/methods/kubernetes.md index 6a0dee98..3740dcf0 100644 --- a/packaging/installer/methods/kubernetes.md +++ b/packaging/installer/methods/kubernetes.md @@ -35,21 +35,21 @@ The installation process securely connects your Kubernetes cluster to stream met 1. Add the Netdata Helm chart repository by running: - ```bash - helm repo add netdata https://netdata.github.io/helmchart/ - ``` + ```bash + helm repo add netdata https://netdata.github.io/helmchart/ + ``` 2. To install Netdata using the `helm install` command, run: - ```bash - helm install netdata netdata/netdata - ``` + ```bash + helm install netdata netdata/netdata + ``` - > ### Note - > - > If you plan to connect the node to Netdata Cloud, you can find the command with the right parameters by clicking the "Add Nodes" button in your Space's Nodes tab. + > **Note** + > + > If you plan to connect the node to Netdata Cloud, you can find the command with the right parameters by clicking the "Add Nodes" button in your Space's Nodes tab. - For more installation options, please read our [Netdata Helm chart for Kubernetes](https://github.com/netdata/helmchart/blob/master/charts/netdata/README.md) reference. + For more installation options, please read our [Netdata Helm chart for Kubernetes](https://github.com/netdata/helmchart/blob/master/charts/netdata/README.md) reference. #### Expected Result @@ -66,50 +66,50 @@ On an existing installation, in order to connect it to Netdata Cloud you will ne 1. You can start with creating a file called `override.yml` - ```bash - touch override.yml - ``` - + ```bash + touch override.yml + ``` + 2. Paste the following into your `override.yml` file. - ```yaml - parent: - claiming: - enabled: true - token: YOUR_CLAIM_TOKEN - rooms: YOUR_ROOM_ID_A,YOUR_ROOM_ID_B - - child: - claiming: - enabled: true - token: YOUR_CLAIM_TOKEN - rooms: YOUR_ROOM_ID_A,YOUR_ROOM_ID_B - configs: - netdata: - data: | - [global] - memory mode = ram - history = 3600 - [health] - enabled = no - ``` - - > :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. - - These settings connect your `parent`/`child` nodes to Netdata Cloud and store more metrics in the nodes' time-series databases. - - > :bookmark_tabs: Info - > - > These override settings, along with the Helm chart's defaults, will retain an hour's worth of metrics (`history = 3600`, or `3600 seconds`) on each child node. Based on your metrics retention needs, and the resources available on your cluster, you may want to increase the `history` setting. + ```yaml + parent: + claiming: + enabled: true + token: YOUR_CLAIM_TOKEN + rooms: YOUR_ROOM_ID_A,YOUR_ROOM_ID_B + + child: + claiming: + enabled: true + token: YOUR_CLAIM_TOKEN + rooms: YOUR_ROOM_ID_A,YOUR_ROOM_ID_B + configs: + netdata: + data: | + [db] + db = ram + retention = 3600 + [health] + enabled = no + ``` + + > **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. + + These settings connect your `parent`/`child` nodes to Netdata Cloud and store more metrics in the nodes' time-series databases. + + > **Info** + > + > These override settings, along with the Helm chart's defaults, will retain an hour's worth of metrics (`retention = 3600`, or `3600 seconds`) on each child node. Based on your metrics retention needs, and the resources available on your cluster, you may want to increase the `history` setting. 3. To apply these new settings, run: - ```bash - helm upgrade -f override.yml netdata netdata/netdata - ``` + ```bash + helm upgrade -f override.yml netdata netdata/netdata + ``` #### Expected Result @@ -188,13 +188,3 @@ To update Netdata's Helm chart to the latest version, run `helm repo update`, th helm repo update helm upgrade netdata netdata/netdata ``` - -## What's next? - -[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](/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 31aaebf9..0843753b 100644 --- a/packaging/installer/methods/macos.md +++ b/packaging/installer/methods/macos.md @@ -1,39 +1,33 @@ -<!-- -title: "Install Netdata on macOS" -custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/macos.md" -sidebar_label: "macOS" -learn_status: "Published" -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](/src/collectors/plugins.d/README.md) to monitor any services you might have installed on your macOS system. +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](/src/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: +You can install Netdata in one of the three following ways: -- **[Install Netdata with the our automatic one-line installation script (recommended)](#install-netdata-with-our-automatic-one-line-installation-script)**, +- **[Install Netdata with the our automatic one-line installation script (recommended)](#install-netdata-with-our-automatic-one-line-installation-script)**, - [Install Netdata via Homebrew](#install-netdata-via-homebrew) - [Install Netdata from source](#install-netdata-from-source) -Each of these installation option requires [Homebrew](https://brew.sh/) for handling dependencies. +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](/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](/packaging/installer/README.md#automatic-one-line-installation-script) open a new terminal and run: +### Local Netdata Agent installation + +To install Netdata using our automatic [kickstart](/packaging/installer/methods/kickstart.md) open a new terminal and run: ```bash curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh ``` + The Netdata Agent is installed under `/usr/local/netdata`. Dependencies are handled via Homebrew. -**Automatically connect to Netdata Cloud during installation** +### Automatically connect to Netdata Cloud during installation 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 @@ -44,38 +38,42 @@ area](/docs/netdata-cloud/organize-your-infrastructure-invite-your-team.md#netda after the install. - `--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](/src/claim/README.md#connect-through-a-proxy) for details. + See [connecting through a proxy](/src/claim/README.md#automatically-via-a-provisioning-system-or-the-command-line) for details. - `--claim-url`: Specify a URL to use when connecting to the cloud. Defaults to `https://app.netdata.cloud`. -For example: +For example: + ```bash curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --install-prefix /usr/local/ --claim-token TOKEN --claim-rooms ROOM1,ROOM2 --claim-url https://app.netdata.cloud ``` + 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](/src/claim/README.md#troubleshooting) documentation. +If you experience issues while claiming your node, follow the steps in our [Troubleshoot](/src/claim/README.md#troubleshoot) documentation. + ## Install Netdata via Homebrew ### For macOS Intel -To install Netdata and all its dependencies, run Homebrew using the following command: +To install Netdata and all its dependencies, run Homebrew using the following command: ```sh brew install netdata ``` -Homebrew will place your Netdata configuration directory at `/usr/local/etc/netdata/`. + +Homebrew will place your Netdata configuration directory at `/usr/local/etc/netdata/`. Use the `edit-config` script and the files in this directory to configure Netdata. For reference, you can find stock configuration files at `/usr/local/Cellar/netdata/{NETDATA_VERSION}/lib/netdata/conf.d/`. ### For Apple Silicon -To install Netdata and all its dependencies, run Homebrew using the following command: +To install Netdata and all its dependencies, run Homebrew using the following command: ```sh brew install netdata ``` -Homebrew will place your Netdata configuration directory at `/opt/homebrew/etc/netdata/`. +Homebrew will place your Netdata configuration directory at `/opt/homebrew/etc/netdata/`. 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/`. @@ -89,13 +87,13 @@ We don't recommend installing Netdata from source on macOS, as it can be difficu xcode-select --install ``` -2. Click **Install** on the Software Update popup window that appears. +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](/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 ``` - + 4. Download Netdata from our GitHub repository: ```bash @@ -109,6 +107,6 @@ We don't recommend installing Netdata from source on macOS, as it can be difficu sudo ./netdata-installer.sh --install-prefix /usr/local ``` -> Your Netdata configuration directory will be at `/usr/local/netdata/`. +> Your Netdata configuration directory will be at `/usr/local/netdata/`. > Your stock configuration directory will be at `/usr/local/lib/netdata/conf.d/`. > The installer will also install a startup plist to start Netdata when your macOS system boots. diff --git a/packaging/installer/methods/manual.md b/packaging/installer/methods/manual.md index 31bc392e..0b7bdb27 100644 --- a/packaging/installer/methods/manual.md +++ b/packaging/installer/methods/manual.md @@ -1,22 +1,12 @@ -<!-- -title: "Install Netdata on Linux from a Git checkout" -description: "Use the Netdata Agent source code from GitHub, plus helper scripts to set up your system, to install Netdata without packages or binaries." -custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/manual.md" -sidebar_label: "From a Git checkout" -learn_status: "Published" -learn_rel_path: "Installation/Installation methods" -sidebar_position: 30 ---> - # Install Netdata on Linux from a Git checkout To install the latest git version of Netdata, please follow these 2 steps: -1. [Prepare your system](#prepare-your-system) +1. [Prepare your system](#prepare-your-system) Install the required packages on your system. -2. [Install Netdata](#install-netdata) +2. [Install Netdata](#install-netdata) Download and install Netdata. You can also update it the same way. @@ -29,23 +19,23 @@ Use our automatic requirements installer (_no need to be `root`_), which attempt should be installed on your system to build and run Netdata. It supports a large variety of major Linux distributions and other operating systems and is regularly tested. You can find this tool [here](https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh) or run it directly with `bash <(curl -sSL https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh)`. Otherwise read on for how to get requires packages manually: -- **Alpine** Linux and its derivatives - - You have to install `bash` yourself, before using the installer. +- **Alpine** Linux and its derivatives + - You have to install `bash` yourself, before using the installer. -- **Gentoo** Linux and its derivatives +- **Gentoo** Linux and its derivatives -- **Debian** Linux and its derivatives (including **Ubuntu**, **Mint**) +- **Debian** Linux and its derivatives (including **Ubuntu**, **Mint**) -- **Red Hat Enterprise Linux** and its derivatives (including **Fedora**, **CentOS**, **Amazon Machine Image**) - - Please note that for RHEL/CentOS you need +- **Red Hat Enterprise Linux** and its derivatives (including **Fedora**, **CentOS**, **Amazon Machine Image**) + - 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) for package libuv version 1. - - CentOS 8 / RHEL 8 requires a bit of extra work. See the dedicated section below. + - CentOS 8 / RHEL 8 requires a bit of extra work. See the dedicated section below. -- **SUSE** Linux and its derivatives (including **openSUSE**) +- **SUSE** Linux and its derivatives (including **openSUSE**) -- **SLE12** Must have your system registered with SUSE Customer Center or have the DVD. See +- **SLE12** Must have your system registered with SUSE Customer Center or have the DVD. See [#1162](https://github.com/netdata/netdata/issues/1162) Install the packages for having a **basic Netdata installation** (system monitoring and many applications, without `mysql` / `mariadb`, `named`, hardware sensors and `SNMP`): @@ -85,51 +75,51 @@ zypper install zlib-devel libuuid-devel libuv-devel liblz4-devel libopenssl-deve Once Netdata is compiled, to run it the following packages are required (already installed using the above commands): -| package | description| -|:-----:|-----------| -| `libuuid` | part of `util-linux` for GUIDs management| -| `zlib` | gzip compression for the internal Netdata web server| -| `libuv` | Multi-platform support library with a focus on asynchronous I/O, version 1 or greater| +| package | description | +|:---------:|---------------------------------------------------------------------------------------| +| `libuuid` | part of `util-linux` for GUIDs management | +| `zlib` | gzip compression for the internal Netdata web server | +| `libuv` | Multi-platform support library with a focus on asynchronous I/O, version 1 or greater | -*Netdata will fail to start without the above.* +_Netdata will fail to start without the above._ Netdata plugins and various aspects of Netdata can be enabled or benefit when these are installed (they are optional): -| package |description| -|:-----:|-----------| -| `bash`|for shell plugins and **alert notifications**| -| `curl`|for shell plugins and **alert notifications**| -| `iproute` or `iproute2`|for monitoring **Linux traffic QoS**<br/>use `iproute2` if `iproute` reports as not available or obsolete| -| `python`|for most of the external plugins| -| `python-yaml`|used for monitoring **beanstalkd**| -| `python-beanstalkc`|used for monitoring **beanstalkd**| -| `python-mysqldb`<br/>or<br/>`python-pymysql`|used for monitoring **mysql** or **mariadb** databases<br/>`python-mysqldb` is a lot faster and thus preferred| -| `nodejs`|used for `node.js` plugins for monitoring **named** and **SNMP** devices| -| `lm-sensors`|for monitoring **hardware sensors**| -| `libelf`|for monitoring kernel-level metrics using eBPF| -| `libmnl`|for collecting netfilter metrics| -| `netcat`|for shell plugins to collect metrics from remote systems| - -*Netdata will greatly benefit if you have the above packages installed, but it will still work without them.* +| package | description | +|:--------------------------------------------:|----------------------------------------------------------------------------------------------------------------| +| `bash` | for shell plugins and **alert notifications** | +| `curl` | for shell plugins and **alert notifications** | +| `iproute` or `iproute2` | for monitoring **Linux traffic QoS**<br/>use `iproute2` if `iproute` reports as not available or obsolete | +| `python` | for most of the external plugins | +| `python-yaml` | used for monitoring **beanstalkd** | +| `python-beanstalkc` | used for monitoring **beanstalkd** | +| `python-mysqldb`<br/>or<br/>`python-pymysql` | used for monitoring **mysql** or **mariadb** databases<br/>`python-mysqldb` is a lot faster and thus preferred | +| `nodejs` | used for `node.js` plugins for monitoring **named** and **SNMP** devices | +| `lm-sensors` | for monitoring **hardware sensors** | +| `libelf` | for monitoring kernel-level metrics using eBPF | +| `libmnl` | for collecting netfilter metrics | +| `netcat` | for shell plugins to collect metrics from remote systems | + +_Netdata will greatly benefit if you have the above packages installed, but it will still work without them._ Netdata DB engine can be enabled when these are installed (they are optional): -| package | description| -|:-----:|-----------| -| `liblz4` | Extremely fast compression algorithm, version r129 or greater| -| `openssl`| Cryptography and SSL/TLS toolkit| +| package | description | +|:---------:|---------------------------------------------------------------| +| `liblz4` | Extremely fast compression algorithm, version r129 or greater | +| `openssl` | Cryptography and SSL/TLS toolkit | -*Netdata will greatly benefit if you have the above packages installed, but it will still work without them.* +_Netdata will greatly benefit if you have the above packages installed, but it will still work without them._ Netdata Cloud support may require the following packages to be installed: -| package | description | -|:---------:|--------------------------------------------------------------------------------------------------------------------------------------| -| `cmake` | Needed at build time if you aren't using your distribution's version of libwebsockets or are building on a platform other than Linux | -| `openssl` | Needed to secure communications with the Netdata Cloud | -| `protobuf`| Used for the new Cloud<->Agent binary protocol | +| package | description | +|:----------:|--------------------------------------------------------------------------------------------------------------------------------------| +| `cmake` | Needed at build time if you aren't using your distribution's version of libwebsockets or are building on a platform other than Linux | +| `openssl` | Needed to secure communications with the Netdata Cloud | +| `protobuf` | Used for the new Cloud<->Agent binary protocol | -*Netdata will greatly benefit if you have the above packages installed, but it will still work without them.* +_Netdata will greatly benefit if you have the above packages installed, but it will still work without them._ ### CentOS / RHEL 6.x @@ -189,28 +179,28 @@ cd netdata ./netdata-installer.sh ``` -- If you don't want to run it straight-away, add `--dont-start-it` option. +- If you don't want to run it straight-away, add `--dont-start-it` option. -- You can also append `--stable-channel` to fetch and install only the official releases from GitHub, instead of the nightly builds. +- You can also append `--stable-channel` to fetch and install only the official releases from GitHub, instead of the nightly builds. -- If you don't want to install it on the default directories, you can run the installer like this: `./netdata-installer.sh --install-prefix /opt`. This one will install Netdata in `/opt/netdata`. +- If you don't want to install it on the default directories, you can run the installer like this: `./netdata-installer.sh --install-prefix /opt`. This one will install Netdata in `/opt/netdata`. -- If your server does not have access to the internet and you have manually put the installation directory on your server, you will need to pass the option `--disable-go` to the installer. The option will prevent the installer from attempting to download and install `go.d.plugin`. +- If your server does not have access to the internet and you have manually put the installation directory on your server, you will need to pass the option `--disable-go` to the installer. The option will prevent the installer from attempting to download and install `go.d.plugin`. ## Optional parameters to alter your installation `netdata-installer.sh` accepts a few parameters to customize your installation: -- `--dont-wait`: Enable automated installs by not prompting for permission to install any required packages. -- `--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](/docs/netdata-agent/configuration/anonymous-telemetry-events.md) we use to make +- `--dont-wait`: Enable automated installs by not prompting for permission to install any required packages. +- `--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](/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 +- `--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](/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. @@ -226,23 +216,19 @@ See the [connect to cloud](/src/claim/README.md) doc for details on connecting a Our current build process unfortunately has some issues when using certain configurations of the `clang` C compiler on Linux. -If the installation fails with errors like `/bin/ld: externaldeps/libwebsockets/libwebsockets.a(context.c.o): relocation R_X86_64_32 against '.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC`, and you are trying to build with `clang` on Linux, you will need to build Netdata using GCC to get a fully functional install. +If the installation fails with errors like `/bin/ld: externaldeps/libwebsockets/libwebsockets.a(context.c.o): relocation R_X86_64_32 against '.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC`, and you are trying to build with `clang` on Linux, you will need to build Netdata using GCC to get a fully functional install. In most cases, you can do this by running `CC=gcc ./netdata-installer.sh`. - ### Perform a cleanup in your netdata repo The Netdata repo consist of the main git tree and it's submodules. Either working on a fork or on the main repo you need to make sure that there are no "leftover" artifacts from previous builds and that your submodules are up to date to the **corresponding checkouts**. -> #### Important: Make sure that you have commited any work in progress, before you proceed the with the clean up instruction below - +> #### Important: Make sure that you have committed any work in progress, before you proceed the with the clean up instruction below ```sh git clean -dfx && git submodule foreach 'git clean -dfx' && git submodule update --recursive --init ``` - -> Note: In previous builds, you may have created artifacts belonging to an another user (e.g root), so you may need to run -> each of the _git clean_ commands as sudoer. +> Note: In previous builds, you may have created artifacts belonging to an another user (e.g root), so you may need to run each of the _git clean_ commands as a sudoer. diff --git a/packaging/installer/methods/methods.md b/packaging/installer/methods/methods.md index bc6e879a..701f3b93 100644 --- a/packaging/installer/methods/methods.md +++ b/packaging/installer/methods/methods.md @@ -1,13 +1,3 @@ -<!-- -title: "Installation methods" -description: "Netdata can be installed as a DEB/RPM package, a static binary, a docker container or from source" -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/methods.md -sidebar_label: "Installation methods" -learn_status: "Published" -learn_rel_path: "Installation/Installation methods" -sidebar_position: 30 ---> - # Installation methods Netdata can be installed: @@ -21,6 +11,4 @@ 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](/packaging/installer/methods/offline.md), -suitable for air-gapped systems. +`kickstart.sh` can also be used for [offline installation](/packaging/installer/methods/offline.md), suitable for air-gapped systems. diff --git a/packaging/installer/methods/no_ipv4.md b/packaging/installer/methods/no_ipv4.md new file mode 100644 index 00000000..c22b6408 --- /dev/null +++ b/packaging/installer/methods/no_ipv4.md @@ -0,0 +1,13 @@ +# Installing on hosts without IPv4 connectivity + +Our regular installation process requires access to a number of GitHub services that do not have IPv6 connectivity. + +As such, using the kickstart install script on such hosts generally does not work, and will typically fail with an error from cURL or wget about connection timeouts. + +You can check if your system is affected by this by attempting to connect to (or ping) `https://api.github.com/`. Failing to connect indicates that this issue affects you. + +There are three potential workarounds for this: + +1. You can configure your system with a proper IPv6 transition mechanism, such as NAT64. GitHub’s anachronisms affect many projects other than just Netdata. 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](/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](/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](/packaging/installer/methods/offline.md), though do note that the offline install source must be prepared from a system with IPv4 connectivity. diff --git a/packaging/installer/methods/offline.md b/packaging/installer/methods/offline.md index 83155848..3a64135d 100644 --- a/packaging/installer/methods/offline.md +++ b/packaging/installer/methods/offline.md @@ -1,13 +1,3 @@ -<!-- -title: "Install Netdata on offline systems" -description: "Install the Netdata Agent on offline/air gapped systems to benefit from real-time, per-second monitoring without connecting to the internet." -custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/offline.md" -sidebar_label: "Offline systems" -learn_status: "Published" -learn_rel_path: "Installation/Installation methods" -sidebar_position: 50 ---> - # Install Netdata on offline systems Our kickstart install script provides support for installing the Netdata Agent on air-gapped systems which do not have a @@ -53,7 +43,6 @@ Once you have prepared the offline install source, you need to copy the offline target system. This can be done in any manner you like, as long as filenames are not changed. 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](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) for further +offline install source directory. It accepts all the [same options as the kickstart 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 90556c1a..eff33118 100644 --- a/packaging/installer/methods/packages.md +++ b/packaging/installer/methods/packages.md @@ -1,13 +1,3 @@ -<!-- -title: "Install Netdata using native DEB/RPM packages." -description: "Instructions for how to install Netdata using native DEB or RPM packages." -custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/packages.md" -sidebar_label: "Native DEB/RPM packages" -learn_status: "Published" -learn_rel_path: "Installation/Installation methods" -sidebar_position: 20 ---> - # 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 @@ -20,7 +10,7 @@ When using the kickstart script, you can force usage of native DEB or RPM packag `--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 +> **Note** > > In July 2022, we switched hosting of our native packages from Package Cloud to self-hosted repositories. > We still maintain the Package cloud repositories, but they are not guaranteed to work and may be removed @@ -63,9 +53,9 @@ appropriate repository configuration package from <https://repo.netdata.cloud/re 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. -> ### Note +> **Note** > -> On RHEL and other systems that use the `el` repostiroies, some of the dependencies for Netdata can only be found +> On RHEL and other systems that use the `el` repositories, some of the dependencies for Netdata can only be found > in the EPEL repository, which is not enabled or installed by default on most of these systems. This additional > 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. @@ -91,7 +81,7 @@ These repositories are set up as what Debian calls ‘flat repositories’, and As a result of this structure, the required APT sources entry for stable packages for Debian 11 (Bullseye) is: -``` +```text deb http://repo.netdata.cloud/repos/stable/debian/ bullseye/ ``` @@ -134,7 +124,7 @@ but we do have some tips for anyone looking to do so: - A full mirror of all of our repositories currently requires up to 100 GB of storage space, though the exact amount of space needed fluctuates over time. Because of this, users seeking to mirror our repositories are encouraged to mirror only those repositories they actually need instead of mirroring everything. -- If syncing daily (or less frequently), some time between 05:00 and 08:00 UTC each day is usually the saftest +- If syncing daily (or less frequently), some time between 05:00 and 08:00 UTC each day is usually the safest time to do so, as publishing nightly packages will almost always be done by this point, and publishing of stable releases typically happens after that time window. - If you intend to use our existing GPG signatures on the repository metadata and packages, you probably also want diff --git a/packaging/installer/methods/pfsense.md b/packaging/installer/methods/pfsense.md index 965fba8d..2cc1842b 100644 --- a/packaging/installer/methods/pfsense.md +++ b/packaging/installer/methods/pfsense.md @@ -1,15 +1,8 @@ -<!-- -title: "Install Netdata on pfSense" -description: "Install Netdata on pfSense to monitor the health and performance of firewalls with thousands of real-time, per-second metrics." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/pfsense.md -sidebar_label: "pfSense" -learn_status: "Published" -learn_rel_path: "Installation/Install on specific environments" ---> - # Install Netdata on pfSense CE -> 💡 This document is maintained by Netdata's community, and may not be completely up-to-date. Please double-check the +> **Info** +> +> This document is maintained by Netdata's community, and may not be completely up-to-date. Please double-check the > details of the installation process, such as version numbers for downloadable packages, before proceeding. > > You can help improve this document by [submitting a @@ -46,10 +39,10 @@ pkg install py39-yaml > ⚠️ If any of the above commands return a `Not Found` error, you need to manually search for the latest package in the > [FreeBSD repository](https://www.freebsd.org/ports/) or by running `pkg search`. Search for the package's name, such as `py37-cffi`, find the > latest version number, and update the command accordingly. - +> > ⚠️ On pfSense 2.4.5, Python version 3.7 may be installed by the system, in which case you should should not install > Python from the FreeBSD repository as instructed above. - +> > ⚠️ If you are using the `apcupsd` collector, you need to make sure that apcupsd is up before starting Netdata. > Otherwise a infinitely running `cat` process triggered by the default activated apcupsd charts plugin will eat up CPU > and RAM (`/tmp/.netdata-charts.d-*/run-*`). This also applies to `OPNsense`. @@ -75,7 +68,7 @@ Visit the Netdata dashboard to confirm it's working: `http://<pfsenseIP>:19999` To start Netdata automatically every boot, add `service netdata onestart` as a Shellcmd entry within the pfSense web interface under **Services/Shellcmd**. You'll need to install the Shellcmd package beforehand under **System/Package Manager/Available Packages**. The Shellcmd Type should be set to `Shellcmd`. -![](https://i.imgur.com/wcKiPe1.png) Alternatively more information can be found in +![interface](https://i.imgur.com/wcKiPe1.png) Alternatively more information can be found in <https://doc.pfsense.org/index.php/Installing_FreeBSD_Packages>, for achieving the same via the command line and scripts. @@ -83,5 +76,3 @@ If you experience an issue with `/usr/bin/install` being absent in pfSense 2.3 o workaround from <https://redmine.pfsense.org/issues/6643> **Note:** In pfSense, the Netdata configuration files are located under `/usr/local/etc/netdata`. - - diff --git a/packaging/installer/methods/source.md b/packaging/installer/methods/source.md index c6ff6e6f..f09db53d 100644 --- a/packaging/installer/methods/source.md +++ b/packaging/installer/methods/source.md @@ -1,13 +1,3 @@ -<!-- -title: "Manually build Netdata from source" -description: "Package maintainers and power users may be interested in manually building Netdata from source without using any of our installation scripts." -custom_edit_url: "https://github.com/netdata/netdata/edit/master/packaging/installer/methods/source.md" -sidebar_label: "Manually build Netdata from source" -learn_status: "Published" -learn_rel_path: "Installation/Package maintainers" -sidebar_position: 100 ---> - # Manually build Netdata from source These instructions are for advanced users and distribution package @@ -20,33 +10,33 @@ checkout](/packaging/installer/methods/manual.md) instead. At a bare minimum, Netdata requires the following libraries and tools to build and run successfully: -- libuuid -- libuv version 1.0 or newer -- zlib -- CMake 3.13 or newer -- GCC or Xcode (Clang is known to have issues in certain configurations, see [Using Clang](#using-clang)) -- 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) +- libuuid +- libuv version 1.0 or newer +- zlib +- CMake 3.13 or newer +- GCC or Xcode (Clang is known to have issues in certain configurations, see [Using Clang](#using-clang)) +- 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 +- libyaml +- JSON-C Additionally, the following build time features require additional dependencies: -- TLS support for the web GUI: - - OpenSSL 1.0.2 or newer _or_ LibreSSL 3.0.0 or newer. -- dbengine metric storage: - - liblz4 r129 or newer - - OpenSSL 1.0 or newer (LibreSSL _amy_ work, but is largely untested). -- Netdata Cloud support: - - A working internet connection - - OpenSSL 1.0.2 or newer _or_ LibreSSL 3.0.0 or newer. - - protobuf (Google Protocol Buffers) and protoc compiler. If protobuf is not available on the system, +- TLS support for the web GUI: + - OpenSSL 1.0.2 or newer _or_ LibreSSL 3.0.0 or newer. +- dbengine metric storage: + - liblz4 r129 or newer + - OpenSSL 1.0 or newer (LibreSSL _amy_ work, but is largely untested). +- Netdata Cloud support: + - A working internet connection + - OpenSSL 1.0.2 or newer _or_ LibreSSL 3.0.0 or newer. + - 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 +- Netdata Go collectors: + - Go 1.21 or newer ## Preparing the source tree @@ -111,12 +101,12 @@ a pre-built copy of the required code, or build it locally. We provide pre-built copies of the eBPF code for 64-bit x86 systems using glibc or musl. To use one of these: -1. Verify the release version that Netdata expects to be used by checking +1. Verify the release version that Netdata expects to be used by checking the contents of `packaging/ebpf.version` in your Netdata sources. -2. Go to https://github.com/netdata/kernel-collector/releases, select the +2. Go to <https://github.com/netdata/kernel-collector/releases>, select the required release, and download the `netdata-kernel-collector-*.tar.xz` file for the libc variant your system uses (either rmusl or glibc). -3. Extract the contents of the archive to a temporary location, and then +3. Extract the contents of the archive to a temporary location, and then copy all of the `.o` and `.so.*` files and the contents of the `library/` directory to `/usr/libexec/netdata/plugins.d` or the equivalent location for your build of Netdata. @@ -128,5 +118,3 @@ instructions, please consult [the README file for our kernel-collector repository](https://github.com/netdata/kernel-collector/#readme), which outlines both the required dependencies, as well as multiple options for building the code. - - diff --git a/packaging/installer/methods/synology.md b/packaging/installer/methods/synology.md index 742b3abb..10c13fe8 100644 --- a/packaging/installer/methods/synology.md +++ b/packaging/installer/methods/synology.md @@ -1,24 +1,14 @@ -<!-- -title: "Install Netdata on Synology" -description: "The Netdata Agent can be installed on AMD64-compatible NAS systems using the 64-bit pre-compiled static binary." -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/synology.md -sidebar_label: "Synology" -learn_status: "Published" -learn_rel_path: "Installation/Install on specific environments" ---> - # Install Netdata on Synology > 💡 This document is maintained by Netdata's community, and may not be completely up-to-date. Please double-check the > details of the installation process, before proceeding. > -> You can help improve this document by -> [submitting a PR](https://github.com/netdata/netdata/edit/master/packaging/installer/methods/synology.md) +> You can help improve this document by +> [submitting a PR](https://github.com/netdata/netdata/edit/master/packaging/installer/methods/synology.md) > with your recommended improvements or changes. Thank you! - -The good news is that our -[one-line installation script](/packaging/installer/methods/kickstart.md) +The good news is that our +[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. @@ -49,15 +39,13 @@ installations run it as the `netdata` user, you might wish to do the same. This Additionally, as of 2018/06/24, the Netdata installer doesn't recognize DSM as an operating system, so no init script is installed. You'll have to do this manually: -1. Add [this file](https://gist.github.com/oskapt/055d474d7bfef32c49469c1b53e8225f) as `/etc/rc.netdata`. Make it +1. Add [this file](https://gist.github.com/oskapt/055d474d7bfef32c49469c1b53e8225f) as `/etc/rc.netdata`. Make it executable with `chmod 0755 /etc/rc.netdata`. -2. Add or edit `/etc/rc.local` and add a line calling `/etc/rc.netdata` to have it start on boot: +2. Add or edit `/etc/rc.local` and add a line calling `/etc/rc.netdata` to have it start on boot: -```conf -# Netdata startup -[ -x /etc/rc.netdata ] && /etc/rc.netdata start -``` + ```text + # Netdata startup + [ -x /etc/rc.netdata ] && /etc/rc.netdata start + ``` 3. Make sure `/etc/rc.local` is executable: `chmod 0755 /etc/rc.local`. - - diff --git a/packaging/installer/methods/systems.md b/packaging/installer/methods/systems.md index 8715a57a..0f4c104a 100644 --- a/packaging/installer/methods/systems.md +++ b/packaging/installer/methods/systems.md @@ -1,12 +1,3 @@ -<!-- -title: "Install on specific environments" -description: "Netdata can be installed as a DEB/RPM package, a static binary, a docker container or from source" -custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/systems.md -sidebar_label: "Install on specific environments" -learn_status: "Published" -learn_rel_path: "Installation/Install on specific environments" ---> - # Install on specific environments This category contains specific instructions for some popular environments. diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index 5ebb6baa..51b5b14a 100755 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -590,7 +590,9 @@ self_update() { export ENVIRONMENT_FILE="${ENVIRONMENT_FILE}" force_update="" [ "$NETDATA_FORCE_UPDATE" = "1" ] && force_update="--force-update" - exec ./netdata-updater.sh --not-running-from-cron --no-updater-self-update "$force_update" --tmpdir-path "$(pwd)" + interactive="" + [ "$INTERACTIVE" = "0" ] && interactive="--non-interactive" + exec ./netdata-updater.sh --not-running-from-cron --no-updater-self-update "$force_update" "$interactive" --tmpdir-path "$(pwd)" else error "Failed to download newest version of updater script, continuing with current version." fi |