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

129 commits

Author SHA1 Message Date
Austin S. Hemmelgarn
5ce422daf0
Skip Go code in CI if it hasn’t changed. ()
* Skip building Go components for Docker CI if they have not changed.

* Properly handle Go code in general checks PR.

* Skip Go code in build checks if it hasn’t changed.

* Fix linting issues.

* Fix propagation of installer flags.

* Fix propagation of environment variables through static build process.

* Fix handling of extra install options in static builds.

* Skip starting the agent in updater checks.

* Fix actionlint warning.
2024-04-10 09:38:44 -04:00
Tasos Katsoulas
48507277a3
Cache key wasn't taking account changes in the version of bundled software ()
To optimize the CI we are trying to cache build artifacts such as all the software we build and statically bundle for static binaries (for each arch) In a nutshell the artifacts of these https://github.com/netdata/netdata/tree/master/packaging/makeself/jobs source files. With this https://github.com/netdata/netdata/blob/master/.github/scripts/get-static-cache-key.sh script we generate the keys for these cached artifacts taking into account the (source files of the jobs, version of the software, static packages bundled in the base images). The effort  to make a centralized file for all the versions expanded the problem of not considering the exact versions.

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
2024-02-29 14:15:34 +02:00
Costa Tsaousis
919dbe175e
Network Viewer (local-sockets version) ()
* network viewer based on local-sockets

* added more fields for the UI

* added socket state

* added inodes to the lists
2024-01-30 11:28:38 +02:00
Austin S. Hemmelgarn
27c4fb4a82
Add ARMv6 static builds. () 2024-01-29 11:59:13 +02:00
Austin S. Hemmelgarn
ffb5791a4f
CI runtime check cleanup ()
* Centralize runtime check code used throughout CI.

* Add checks to confirm that each of the agent dashboards can be fetched.
2024-01-17 08:24:22 -05:00
Ilya Mashchenko
1b3eb5b42f
packaging: add cap_dac_read_search to go.d.plugin () 2024-01-11 17:31:20 +02:00
Ilya Mashchenko
7d36ac1946
add --disable-logsmanagement when building static () 2023-12-29 15:01:06 +02:00
Costa Tsaousis
0c8b46cbfd
ndsudo - a helper to run privileged commands ()
* ndsudo command

* added help

* make ndsudo setuid to root

* fix megacli binary name on FreeBSD

* move ndsudo to collectors/plugins.d/

* address PR comments

* do not print the command line argument, instead print its index

---------

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2023-12-15 16:09:24 +02:00
Costa Tsaousis
3e508c8f95
New logging layer ()
* cleanup of logging - wip

* first working iteration

* add errno annotator

* replace old logging functions with netdata_logger()

* cleanup

* update error_limit

* fix remanining error_limit references

* work on fatal()

* started working on structured logs

* full cleanup

* default logging to files; fix all plugins initialization

* fix formatting of numbers

* cleanup and reorg

* fix coverity issues

* cleanup obsolete code

* fix formatting of numbers

* fix log rotation

* fix for older systems

* add detection of systemd journal via stderr

* finished on access.log

* remove left-over transport

* do not add empty fields to the logs

* journal get compact uuids; X-Transaction-ID header is added in web responses

* allow compiling on systems without memfd sealing

* added libnetdata/uuid directory

* move datetime formatters to libnetdata

* add missing files

* link the makefiles in libnetdata

* added uuid_parse_flexi() to parse UUIDs with and without hyphens; the web server now read X-Transaction-ID and uses it for functions and web responses

* added stream receiver, sender, proc plugin and pluginsd log stack

* iso8601 advanced usage; line_splitter module in libnetdata; code cleanup

* add message ids to streaming inbound and outbound connections

* cleanup line_splitter between lines to avoid logging garbage; when killing children, kill them with SIGABRT if internal checks is enabled

* send SIGABRT to external plugins only if we are not shutting down

* fix cross cleanup in pluginsd parser

* fatal when there is a stack error in logs

* compile netdata with -fexceptions

* do not kill external plugins with SIGABRT

* metasync info logs to debug level

* added severity to logs

* added json output; added options per log output; added documentation; fixed issues mentioned

* allow memfd only on linux

* moved journal low level functions to journal.c/h

* move health logs to daemon.log with proper priorities

* fixed a couple of bugs; health log in journal

* updated docs

* systemd-cat-native command to push structured logs to journal from the command line

* fix makefiles

* restored NETDATA_LOG_SEVERITY_LEVEL

* fix makefiles

* systemd-cat-native can also work as the logger of Netdata scripts

* do not require a socket to systemd-journal to log-as-netdata

* alarm notify logs in native format

* properly compare log ids

* fatals log alerts; alarm-notify.sh working

* fix overflow warning

* alarm-notify.sh now logs the request (command line)

* anotate external plugins logs with the function cmd they run

* added context, component and type to alarm-notify.sh; shell sanitization removes control character and characters that may be expanded by bash

* reformatted alarm-notify logs

* unify cgroup-network-helper.sh

* added quotes around params

* charts.d.plugin switched logging to journal native

* quotes for logfmt

* unify the status codes of streaming receivers and senders

* alarm-notify: dont log anything, if there is nothing to do

* all external plugins log to stderr when running outside netdata; alarm-notify now shows an error when notifications menthod are needed but are not available

* migrate cgroup-name.sh to new logging

* systemd-cat-native now supports messages with newlines

* socket.c logs use priority

* cleanup log field types

* inherit the systemd set INVOCATION_ID if found

* allow systemd-cat-native to send messages to a systemd-journal-remote URL

* log2journal command that can convert structured logs to journal export format

* various fixes and documentation of log2journal

* updated log2journal docs

* updated log2journal docs

* updated documentation of fields

* allow compiling without libcurl

* do not use socket as format string

* added version information to newly added tools

* updated documentation and help messages

* fix the namespace socket path

* print errno with error

* do not timeout

* updated docs

* updated docs

* updated docs

* log2journal updated docs and params

* when talking to a remote journal, systemd-cat-native batches the messages

* enable lz4 compression for systemd-cat-native when sending messages to a systemd-journal-remote

* Revert "enable lz4 compression for systemd-cat-native when sending messages to a systemd-journal-remote"

This reverts commit b079d53c11.

* note about uncompressed traffic

* log2journal: code reorg and cleanup to make modular

* finished rewriting log2journal

* more comments

* rewriting rules support

* increased limits

* updated docs

* updated docs

* fix old log call

* use journal only when stderr is connected to journal

* update netdata.spec for libcurl, libpcre2 and log2journal

* pcre2-devel

* do not require pcre2 in centos < 8, amazonlinux < 2023, open suse

* log2journal only on systems pcre2 is available

* ignore log2journal in .gitignore

* avoid log2journal on centos 7, amazonlinux 2 and opensuse

* add pcre2-8 to static build

* undo last commit

* Bundle to static

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>

* Add build deps for deb packages

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>

* Add dependencies; build from source

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>

* Test build for amazon linux and centos expect to fail for suse

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>

* fix minor oversight

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>

* Reorg code

* Add the install from source (deps) as a TODO
* Not enable the build on suse ecosystem

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>

---------

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
Co-authored-by: Tasos Katsoulas <tasos@netdata.cloud>
2023-11-22 10:27:25 +02:00
Ilya Mashchenko
09e5102818
fix zstd in static build () 2023-11-07 10:49:50 +02:00
Tasos Katsoulas
77996e73ee
Update packaging instructions ()
1. Add repo clean up instructions for the netdata/netdata repo (clean up from previous builds)
2. Make the static build instruction to use the more generic script

---------

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
Co-authored-by: Austin S. Hemmelgarn <austin@netdata.cloud>
2023-11-06 18:40:01 +02:00
Tasos Katsoulas
a245d9c957
bump openssl for static in 3.1.4 () 2023-10-30 15:08:14 +02:00
Tasos Katsoulas
cd65c4258e
Introduce workflow to always update bundled packages (static builds) into their latest release (part1) ()
* Make bundled-packages file as the source of truth for all the bundled packages

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
2023-10-20 18:01:08 +03:00
Tasos Katsoulas
b7ef34c3dd
Update bundled static packages ()
Update bundle versions static packages

* Bump curl to v8_4_0
* Bump openssl to version 3.1.3

Signed-off-by: Tasos Katsoulas <tasos@netdata.cloud>
2023-10-13 20:59:02 +03:00
Austin S. Hemmelgarn
609e2c4acc
Update to use versioned base images for CI. ()
* Update to use versioned base images for CI.

* Fix typos.
2023-09-27 07:05:45 -04:00
Austin S. Hemmelgarn
162287c26c
Disable mongodb exporter builds where broken. () 2023-09-22 12:27:32 +03:00
Ilya Mashchenko
2c46b3a631
packaging cleanup after () 2023-08-21 17:27:40 +03:00
Ilya Mashchenko
28d9cdabcd
fix packaging static build openssl 32bit () 2023-08-21 14:23:35 +03:00
Costa Tsaousis
b090c9f80b
Fix static build SSL () 2023-08-21 11:19:32 +03:00
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