Tasos Katsoulas b7ef34c3dd Update bundled static packages (#16177) 1 год назад
..
jobs 162287c26c Disable mongodb exporter builds where broken. (#16033) 1 год назад
README.md e9af618081 Make the title metadata H1 in all markdown files (#14625) 2 лет назад
build-static.sh 609e2c4acc Update to use versioned base images for CI. (#16053) 1 год назад
build-x86_64-static.sh 4a432d99fc fix static build, curl will be staict binary; extra args can be transfer (#11852) 3 лет назад
build.sh ac0fe6cf07 Fix the static build code in light of CVE-2022-24765 (#12683) 2 лет назад
curl.version b7ef34c3dd Update bundled static packages (#16177) 1 год назад
functions.sh 513452aa44 Link statically libnetfilter_acct into our static builds (#14516) 2 лет назад
install-alpine-packages.sh bd5f778838 Add basic runtime checks to static build process. (#13339) 2 лет назад
install-or-update.sh c74bf56ee2 Code reorg and cleanup - enrichment of /api/v2 (#15294) 1 год назад
makeself-header.sh aa1d9f0238 Prevent pager from preventing non-interactive install (#14950) 1 год назад
makeself-help-header.txt 2ff0c5c3cf rename DO_NOT_TRACK to DISABLE_TELEMETRY (#12126) 3 лет назад
makeself-license.txt f269cdb880 Update the bundled version of makeself used to create static builds. (#14822) 1 год назад
makeself.lsm f269cdb880 Update the bundled version of makeself used to create static builds. (#14822) 1 год назад
makeself.sh f269cdb880 Update the bundled version of makeself used to create static builds. (#14822) 1 год назад
openssl.version b7ef34c3dd Update bundled static packages (#16177) 1 год назад
post-installer.sh 4d77f2b325 move makeself (#4688) 6 лет назад
run-all-jobs.sh 5087294d81 Add support for eBPF for Netdata static64 (kickstart-static64.sh) (#9104) 4 лет назад
uname2platform.sh 0542cc3d6b Cache invariant components in static builds to reduce build times. (#12877) 2 лет назад

README.md

Netdata static binary build

We publish pre-built static builds 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.

Building a static binary package

To build the static binary 64-bit distribution package, run:

cd /path/to/netdata.git
./packaging/makeself/build-x86_64-static.sh

The program will:

  1. setup a new docker container with Alpine Linux
  2. install the required alpine packages (the build environment, needed libraries, etc)
  3. download and compile third party apps that are packaged with Netdata (bash, curl, etc)
  4. compile Netdata

Once finished, a file named netdata-vX.X.X-gGITHASH-x86_64-DATE-TIME.run will be created in the current directory. This is the Netdata binary package that can be run to install Netdata on any other computer.

Building binaries with debug info

To build Netdata binaries with debugging / tracing information in them, use:

cd /path/to/netdata.git
./packaging/makeself/build-x86_64-static.sh debug

These binaries are not optimized (they are a bit slower), they have certain features disables (like log flood protection), other features enables (like debug flags) and are not stripped (the binary files are bigger, since they now include source code tracing information).

Debugging Netdata binaries

Once you have installed a binary package with debugging info, you will need to install valgrind and run this command to start Netdata:

PATH="/opt/netdata/bin:${PATH}" valgrind --undef-value-errors=no /opt/netdata/bin/srv/netdata -D

The above command, will run Netdata under valgrind. While Netdata runs under valgrind it will be 10x slower and use a lot more memory.

If Netdata crashes, valgrind will print a stack trace of the issue. Open a github issue to let us know.

To stop Netdata while it runs under valgrind, press Control-C on the console.

If you omit the parameter --undef-value-errors=no to valgrind, you will get hundreds of errors about conditional jumps that depend on uninitialized values. This is normal. Valgrind has heuristics to prevent it from printing such errors for system libraries, but for the static Netdata binary, all the required libraries are built into Netdata. So, valgrind cannot apply its heuristics and prints them.