0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-07 06:45:39 +00:00
netdata_netdata/packaging/makeself
Costa Tsaousis c74bf56ee2
Code reorg and cleanup - enrichment of /api/v2 ()
* claim script now accepts the same params as the kickstart

* rewrote buildinfo to unify all methods

* added cloud unavailable in cloud status

* added all exporters

* renamed httpd to h2o

* rename ENABLE_COMPRESSION to ENABLE_LZ4

* rename global variable

* rename ENABLE_HTTPS to ENABLE_OPENSSL

* fix coverity-scan for openssl

* add lz4 to coverity-scan

* added all plugins and most of the features

* added all plugins and most of the features

* generalize bitmap code so that we can have any size of bitmaps

* cleanup

* fix compilation without protobuf

* fix compilation with others allocators

* fix bitmap

* comprehensive bitmaps unit test

* bitmap as macros

* added developer mode

* added system info to build info

* cloud available/unavailable

* added /api/v2/info

* added units and ni to transitions

* when showing instances and transitions, show only the instances that have transitions

* cleanup

* add missing quotes

* add anchor to transitions

* added more to build info

* calculate retention per tier and expose it to /api/v2/info

* added currently collected metrics

* do not show space and retention when no numbers are available

* fix impossible overflow

* Add function for transitions and execute callback

* In case of error, reset and try next dictionary entry

* Fix error message

* simpler logic to maintain retention per tier

* /api/v2/alert_transitions

* Handle case of recipient null
Convert after and before to usec

* Add classification, type and component

* working /api/v2/alert_transitions

* Fix query to properly handle context and alert name

* cleanup

* Add search with transition

* accept transition in /api/v2/alert_transitions

* totaly dynamic facets

* fixed debug info

* restructured facets

* cleanup; removal of options=transitions

* updated alert entries flags

* method to exec

* Return also exec run timestamp
Temp table cleanup only when we don't execute with a transition

* cleanup obsolete anchor parameter

* Add sql_get_alert_configuration function

* added options=config to alert_transitions

* added /api/v2/alert_config

* preliminary work for /api/v2/claim

* initialize variables; do not expose expected retention if no disk space info is available; do not report aclk as initializing when not claimed

* fix claim session key filename

* put a newline into the session key file

* more progress on claiming

* final /api/v2/claim endpoint

* after claiming, refresh our state at the output

* Fix query to fetch config

* Remove debug log

* add configuration objects

* add configuration objects - fixed

* respect the NETDATA_DISABLE_CLOUD env variable

* NETDATA_DISABLE_CLOUD env variable sets the default, but the config sets the final value

* use a new claimed_id on every claiming

* regenerate random key on claiming and wait for online status

* ignore write() return value when writing a newline

* dont show cloud status disabled when claimed_id is missing

* added ctx to alert instances

* cleanup config and transitions from /api/v2/alerts

* fix unused variable

* in /api/v2/alert_config show 1 config without an array

* show alert values conditionally, by appending options=values

* When storing host info if the key value is empty, store unknown

* added options=summary to control when the alerts summary is shown

* increased http_api_v2 to version 5

* claming random key file is now not world readable

* added local-listeners binary that detects all the listening ports, their IPs and their command lines

---------

Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com>
2023-07-06 01:49:32 +03:00
..
jobs Add hardening options to CFLAGS by default if they are available. () 2023-06-28 07:55:45 -04:00
build-static.sh Add basic runtime checks to static build process. () 2022-07-14 07:26:11 -04:00
build-x86_64-static.sh fix static build, curl will be staict binary; extra args can be transfer () 2021-12-07 09:59:22 -05:00
build.sh Fix the static build code in light of CVE-2022-24765 () 2022-04-13 13:27:29 -04:00
functions.sh Link statically libnetfilter_acct into our static builds () 2023-03-01 15:03:51 +02:00
install-alpine-packages.sh Add basic runtime checks to static build process. () 2022-07-14 07:26:11 -04:00
install-or-update.sh Code reorg and cleanup - enrichment of /api/v2 () 2023-07-06 01:49:32 +03:00
makeself-header.sh Prevent pager from preventing non-interactive install () 2023-04-25 07:50:19 -04:00
makeself-help-header.txt rename DO_NOT_TRACK to DISABLE_TELEMETRY () 2022-02-15 17:23:32 +03:00
makeself-license.txt Update the bundled version of makeself used to create static builds. () 2023-04-12 06:58:36 -04:00
makeself.lsm Update the bundled version of makeself used to create static builds. () 2023-04-12 06:58:36 -04:00
makeself.sh Update the bundled version of makeself used to create static builds. () 2023-04-12 06:58:36 -04:00
openssl.version Update static build packages () 2023-02-08 15:48:43 +02:00
post-installer.sh move makeself () 2019-01-02 10:12:24 +01:00
README.md Make the title metadata H1 in all markdown files () 2023-02-28 06:52:53 -08:00
run-all-jobs.sh Add support for eBPF for Netdata static64 (kickstart-static64.sh) () 2020-05-29 12:27:22 +10:00
uname2platform.sh Cache invariant components in static builds to reduce build times. () 2022-05-27 07:03:12 -04:00

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.