0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-15 10:04:15 +00:00
Commit graph

110 commits

Author SHA1 Message Date
Tasos Katsoulas
23118ba3a6
Bump openssl version of static builds to 1.1.1v ()
Update openssl.version
2023-08-14 08:44:43 -04:00
Ilya Mashchenko
8d5e5399de
fix claiming via UI for static build () 2023-08-09 13:45:07 +03:00
Tasos Katsoulas
2d4e91ab50
Build optimizations ()
Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
2023-07-18 15:05:49 +03:00
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
Austin S. Hemmelgarn
bb2135702b
Add hardening options to CFLAGS by default if they are available. ()
* Enable SSP if available.

* Add control flow protection options.

* Add -D_FORTIFY_SOURCE option if supported.

* Add stack-clash-protection option if supported.

* Further build flags cleanup.
2023-06-28 07:55:45 -04:00
Austin S. Hemmelgarn
8b384e402b
Fix handling of plugin ownership in static builds. ()
* Fix handling of plugin ownership in static builds.

* Address review feedback.

* Update packaging/makeself/install-or-update.sh

---------

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2023-06-22 07:26:14 -04:00
thiagoftsm
588096c6b6
Debugfs collector ()
Co-authored-by: Fotis Voutsas <fotis@netdata.cloud>
Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Co-authored-by: ilyam8 <ilya@netdata.cloud>
2023-05-15 19:06:26 +03:00
Austin S. Hemmelgarn
bf51557f9a
Fix handling of permissions in static installs. () 2023-05-11 11:22:57 -04:00
Austin S. Hemmelgarn
beb1aa64a7
Remove old logic for handling of legacy stock config files. () 2023-05-11 08:20:43 -04:00
Austin S. Hemmelgarn
01cf311c50
Fix typo in file capabilities settings in static installer. () 2023-05-07 10:51:34 -04:00
Austin S. Hemmelgarn
3f9449bb26
Set file capabilities correctly on static installs. ()
Instead of just making all the files SUID 0, set capabilities when we
know which ones are needed and `setcap` is installed.

If setcap is not available, we still fall back properly to SUID on
plugins that truly need it.
2023-05-05 12:48:42 -04:00
Aaron Queen
aa1d9f0238
Prevent pager from preventing non-interactive install ()
* prevent pager from preventing non-interactive install

* Update makeself-header.sh
2023-04-25 07:50:19 -04:00
Austin S. Hemmelgarn
f269cdb880
Update the bundled version of makeself used to create static builds. ()
* Update bundled makeself to v2.5.0.

It includes numerous fixes that should resolve a number of the problems
we’ve seen crop up recently with our static build installation process.

* Update static archive metadata.

* Add the makeself scripts to the shellcheck CI exclude list.

They have numerous warnings, but we intentionally want to stay as close
as possible to being in-sync with the upstream copies, so just ignore
them with shellcheck in CI.

* Silence shellcheck warnings.

* Ensure required directories actually exist in static archive.
2023-04-12 06:58:36 -04:00
Austin S. Hemmelgarn
c5cad4ecad
Fix handling of logrotate on static installs. ()
* Fix handling of logrotate on static installs.

* Correctly fix handling of logrotate config in static builds.
2023-03-23 09:45:59 -04:00
Tasos Katsoulas
513452aa44
Link statically libnetfilter_acct into our static builds ()
Bundle the nfacct dependencies libnetfilter_acct as static lib from source archives and libmnl as static lib from the alpines' packages (regular package manager) into our Netdata static binaries

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
2023-03-01 15:03:51 +02:00
Fotis Voutsas
e9af618081
Make the title metadata H1 in all markdown files ()
* make the title metadta the H1

* Update collectors/python.d.plugin/zscores/README.md

* Update libnetdata/ebpf/README.md

* Update ml/README.md

* Update libnetdata/string/README.md

---------

Co-authored-by: Chris Akritidis <43294513+cakrit@users.noreply.github.com>
2023-02-28 06:52:53 -08:00
Austin S. Hemmelgarn
8b93deb7b0
Reorganize system directory to better reflect what files are actually used for. ()
* Move systemd-specific system files to their own directory.

* Move non-systemd init scripts to individual subdirectories.

* Move cron files to their own directory.

* Move logrotate config to it’s own directory.

* Fix typos in Makefile.am.

* Fix Debian package builds.

* Fixed issues reported by @andrewm4894.
2023-02-27 12:38:25 -05:00
Chris Akritidis
a1641a96da
Learn installation reorg part 2 ()
installation reorg part 2
2023-02-21 06:23:31 -08:00
Chris Akritidis
67222c6acf
Update static binary readme ()
Update README.md
2023-02-21 05:34:22 -08:00
Austin S. Hemmelgarn
5c7bd2c648
Assorted shellcheck cleanup. ()
* Add shellcheck config file to globally disable dead code checks.

These checks have an extremely high false positive rate and even when
they’re correctly flagging code the impact is generally very low.

* Fix assorted shellcheck errors in installer code.

This should make reviewing PRs relating to this code much easier.

* Make shellcheck quit complaining about shellcheckrc formatting.
2023-02-16 07:31:06 -05:00
Fotis Voutsas
2c60f324ee
Add markdown files in Learn ()
* add metadata for learn

* first batch of adding metadata to md files

* second batch of adding metadata to md files

* third batch of adding metadata to md files

* test one sidebar_label

* add missing sidebar_labels

* add missing sidebar_labels to files left behind

* test, ansible doc is stubborn

* fix

* fix

* fix

* don't use questionmarks in the sidebar label

* don't use exclamation marks and symbols in the sidebar label

* fix style guide

* fixes

* fixes
2023-02-08 09:48:19 -08:00
Tasos Katsoulas
80fcbaa5e3
Update static build packages ()
* bump openssl to v1.1.1t
* bump ioping to v1.3
* bump curl to v7.87

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
2023-02-08 15:48:43 +02:00
Austin S. Hemmelgarn
597f08dee6
Assorted infrastructure cleanup. ()
* Remove old documentation check related config files.

These are no longer used by any of our CI as far as I can tell.

* Purge LGTM configuration and references.

It has been fully shut down, so none of this works anymore.

* Purge Travis CI config, scripts, and references.

We are no longer using Travis CI, so all of this is useless.

* Pureg config for other CI tools we are no longer using.

* Remove old packaging related test scripts.

These haven’t been used in years, and are potentially confusing for new
contributors.

* Restore MLC configuration.

It is, in fact, still in use.

* Fix bogus CI config in dist files.

* Fix botched merge in CODEOWNERS.
2023-01-25 11:10:37 -05:00
Austin S. Hemmelgarn
df379e45fb
Finish renaming the --install option to --install-prefix. ()
* Finish renaming the `--install` option to `--install-prefix`.

* Fix remaining references to `--install` option.
2023-01-04 07:34:28 -05:00
Ilya Mashchenko
023b358b1d
feat(packaging): add netdata to www-data group on Proxmox () 2022-12-22 14:31:05 +02:00
Ilya Mashchenko
4322b1973d
remove deprecated fping.plugin in accordance with v1.37.0 deprecation notice () 2022-12-09 17:35:53 +02:00
Ilya Mashchenko
df87a538cf
feat(packaging): add CAP_NET_RAW to go.d.plugin () 2022-10-31 16:39:20 +02:00
Ilya Mashchenko
80e9a6992f
fix(packaging): add CAP_NET_ADMIN for go.d.plugin () 2022-08-11 18:57:35 +03:00
Austin S. Hemmelgarn
bd5f778838
Add basic runtime checks to static build process. ()
* Enable use of Podman for static builds.

This way those of us who have migrated away from Docker can still easily
test static builds.

* Add basic runtime testing to the static build process.

This will help catch basic runtime issues that would not show up just
from building the agent.
2022-07-14 07:26:11 -04:00
Austin S. Hemmelgarn
4ff9958519
Remove unnescesary ‘cleanup’ code. ()
This was causing the updter to be unconditionally disabled on static
builds, and we don’t actually _need_ any of it anymore since we’ve
already decoupled the auto-update handling state from the installation
process (in fact, this should have been removed then, but it got missed
somehow).
2022-06-09 13:56:22 -04:00
Austin S. Hemmelgarn
0542cc3d6b
Cache invariant components in static builds to reduce build times. ()
* Add basic build caching support to static builds.

Cache is store din `artifacts/cache/${BUILDARCH}`. Each third-party
component utilizes a separate build cache. Invalidation is only done for
version changes (more rigorous invalidation is expected to be handled
externally).

* Integrate static build caching with CI.

* Fix fping cache handling.

* Test caching in CI.

* Properly skip rebuilds on cache hits.

* Remove static build container when done with it.

* Reuse existing image automatically if it’s for the correct platform.

* Test CI build caching.

* Fix static build job names.
2022-05-27 07:03:12 -04:00
Austin S. Hemmelgarn
08568db13e
Use prebuilt builder images for static builds. () 2022-05-10 07:30:05 -04:00
Austin S. Hemmelgarn
cba0dca1f6
Add -pipe to CFLAGS in most cases for builds. ()
* Add `-pipe` to CFLAGS in most cases for builds.

This trades marginally higher memory usage at build time (on the order
of a few hundred kB in the worst case scenario) for improved build
times by avoiding using temporary files for passing data from the
compiler to commands it invokes.

* Suppress bogus shellcheck warnings.

* Fix handling of CFLAGS in netdata-installer.sh.
2022-05-02 08:54:50 -04:00
Austin S. Hemmelgarn
2946bd8c00
Tweak static build process to improve build speed and debuggability. ()
- Switch from `-O3` to `-O2` for optimization CFLAGS, bringing us
  in-line with all of our other builds. This should help avoid strange
  edge cases specific to static builds resulting from the build process.
- Stop stripping binaries in static builds so that we can get proper
  symbolic backtraces when the agent crashes in the static builds.
2022-04-28 07:17:25 -04:00
Austin S. Hemmelgarn
3f97fe0355
Disable automake dependency tracking in our various one-time builds. ()
* Disable automake dependency tracking in our various one-time builds.

* Also disable dependency tracking code in package builds.
2022-04-18 14:21:02 -04:00
Austin S. Hemmelgarn
ac0fe6cf07
Fix the static build code in light of CVE-2022-24765 ()
Also, fix handling of the source directory in the builds so that we
don’t leave behind a dirty source directory.
2022-04-13 13:27:29 -04:00
Costa Tsaousis
529da8afb0
Updated static build components to latest versions. ()
* updated static packages to latest versions

* a space
2022-03-23 21:25:16 +02:00
Austin S. Hemmelgarn
f7579fee54
Use the built agentversion for Netdata static build archive name. ()
This ensures that the version reported by `netdata -v` will match up
with the version number embedded in the static build archive file names.
2022-03-22 08:49:04 -04:00
Austin S. Hemmelgarn
c77e353088
Switch to using netdata-updater.sh to toggle auto updates on and off when installing. ()
* Switch to using netdata-updater.sh to toggle auto updates on and off on install.

* Apply suggestions from code review

Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>

* Make heading name less ambiguous.

* Fix fallback case for unsupported updater script.

* Fix invalid function name.

Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
2022-03-22 08:48:06 -04:00
Daniel Lo Nigro
ed9b6627ac
[makeself] Fix license URL () 2022-02-26 14:57:35 +03:00
Austin S. Hemmelgarn
a24f5bd75c
Revert "Overhaul handling of auto-updates in the installer code. ()" ()
This reverts commit da7f215ad6.
2022-02-18 20:35:14 -05:00
Austin S. Hemmelgarn
da7f215ad6
Overhaul handling of auto-updates in the installer code. ()
* Bundle updater script in native packages.

* Move code for enabling/disabling auto-updates to netdata-updater.sh

This lets us handle the logic sanely from the kickstart script
regardless of the install method, and allows users to more reliably
toggle auto-updates themselves without having to understand what is
being done.

* Add proper case-agnosticism to auto-update type selection.

* Move auto-updater handling code to kickstart script.

* Properly handle running against an older source tree.

* First part of updater docmentation updates.

* Fixed handling of updater in DEB packages.

* Further documentation updates.

* Minor typo fixes.
2022-02-18 10:08:38 -05:00
Tina Luedtke
c7f2647a62
Docs: Removed Google Analytics tags () 2022-02-17 10:37:46 +00:00
Ilya Mashchenko
2ff0c5c3cf
rename DO_NOT_TRACK to DISABLE_TELEMETRY () 2022-02-15 17:23:32 +03:00
boxjan
5132878fc9
fix permissions of plugins that may be built ()
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2022-01-19 16:17:15 +03:00
boxjan
4a432d99fc
fix static build, curl will be staict binary; extra args can be transfer ()
* update curl LDFLAGS to build static file

* transfer extra args to build.sh
2021-12-07 09:59:22 -05:00
Austin S. Hemmelgarn
ff9222fb97
Bump static builds to use Alpine 3.15 as a base. () 2021-12-01 11:02:00 -05:00
Austin S. Hemmelgarn
4f45e42eb2
Add POWER8+ static builds. () 2021-11-18 07:31:46 -05:00
Austin S. Hemmelgarn
49b1534305
Assorted cleanups to static builds. () 2021-11-17 14:01:35 -05:00
vkalintiris
60a2afc139
Verify checksums of makeself deps. () 2021-11-16 16:25:27 +02:00