Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from netdata:master #107

Merged
merged 5 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/scripts/pkg-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ esac

trap dump_log EXIT

export NETDATA_LIBEXEC_PREFIX=/usr/libexec/netdata
export NETDATA_SKIP_LIBEXEC_PARTS="logs-management|freeipmi|xenstat|nfacct|cups"

if [ "$(uname -m)" != "x86_64" ]; then
export NETDATA_SKIP_LIBEXEC_PARTS="${NETDATA_SKIP_LIBEXEC_PARTS}|ebpf"
fi

/usr/sbin/netdata -D > ./netdata.log 2>&1 &

"${SCRIPT_DIR}/../../packaging/runtime-check.sh" || exit 1
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

**Merged pull requests:**

- Fix DEB package builds. [\#17765](https://github.com/netdata/netdata/pull/17765) ([Ferroin](https://github.com/Ferroin))
- Fix version for go.d plugin [\#17764](https://github.com/netdata/netdata/pull/17764) ([vkalintiris](https://github.com/vkalintiris))
- go.d sd local-listeners fix extractComm [\#17763](https://github.com/netdata/netdata/pull/17763) ([ilyam8](https://github.com/ilyam8))
- Schedule a node info on label reload [\#17762](https://github.com/netdata/netdata/pull/17762) ([stelfrag](https://github.com/stelfrag))
- Regenerate integrations.js [\#17761](https://github.com/netdata/netdata/pull/17761) ([netdatabot](https://github.com/netdatabot))
- add clickhouse alerts [\#17760](https://github.com/netdata/netdata/pull/17760) ([ilyam8](https://github.com/ilyam8))
- simplify installation page [\#17759](https://github.com/netdata/netdata/pull/17759) ([Ancairon](https://github.com/Ancairon))
Expand Down Expand Up @@ -431,8 +435,6 @@
- Fix issues with permissions when installing from source on macOS [\#17198](https://github.com/netdata/netdata/pull/17198) ([ilyam8](https://github.com/ilyam8))
- Handle agents will wrong alert\_hash table definition [\#17197](https://github.com/netdata/netdata/pull/17197) ([stelfrag](https://github.com/stelfrag))
- Fix alert hash table definition [\#17196](https://github.com/netdata/netdata/pull/17196) ([stelfrag](https://github.com/stelfrag))
- health: unsilence cpu % alarm [\#17194](https://github.com/netdata/netdata/pull/17194) ([ilyam8](https://github.com/ilyam8))
- Fix sum calculation in rrdr2value [\#17193](https://github.com/netdata/netdata/pull/17193) ([stelfrag](https://github.com/stelfrag))

## [v1.44.3](https://github.com/netdata/netdata/tree/v1.44.3) (2024-02-12)

Expand Down
27 changes: 13 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,23 +141,23 @@ option(ENABLE_DBENGINE "Enable dbengine metrics storage" True)
option(ENABLE_PLUGIN_APPS "Enable per-process resource usage monitoring" ${DEFAULT_FEATURE_STATE})
option(ENABLE_PLUGIN_GO "Enable metric collectors written in Go" ${DEFAULT_FEATURE_STATE})

cmake_dependent_option(ENABLE_PLUGIN_CUPS "Enable CUPS monitoring" ${DEFAULT_FEATURE_STATE} "LINUX OR FREEBSD OR MACOS" False)
cmake_dependent_option(ENABLE_PLUGIN_CUPS "Enable CUPS monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX OR OS_FREEBSD OR OS_MACOS" False)

cmake_dependent_option(ENABLE_PLUGIN_FREEIPMI "Enable IPMI monitoring" ${DEFAULT_FEATURE_STATE} "LINUX OR FREEBSD" False)
cmake_dependent_option(ENABLE_PLUGIN_FREEIPMI "Enable IPMI monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX OR OS_FREEBSD" False)

cmake_dependent_option(ENABLE_PLUGIN_CGROUP_NETWORK "Enable Linux CGroup network usage monitoring" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_DEBUGFS "Enable Linux DebugFS metric collection" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_EBPF "Enable Linux eBPF metric collection" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_CGROUP_NETWORK "Enable Linux CGroup network usage monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_DEBUGFS "Enable Linux DebugFS metric collection" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_EBPF "Enable Linux eBPF metric collection" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_LEGACY_EBPF_PROGRAMS "Enable eBPF programs for kernels without BTF support" True "ENABLE_PLUGIN_EBPF" False)
mark_as_advanced(ENABLE_LEGACY_EBPF_PROGRAMS)
cmake_dependent_option(ENABLE_PLUGIN_LOCAL_LISTENERS "Enable local listening socket tracking (including service auto-discovery support)" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_LOGS_MANAGEMENT "Enable log collection and monitoring based on Fluent Bit" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_NETWORK_VIEWER "Enable network viewer functionality" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_NFACCT "Enable Linux NFACCT metric collection" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_PERF "Enable Linux performance counter monitoring" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_SLABINFO "Enable Linux kernel SLAB allocator monitoring" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_SYSTEMD_JOURNAL "Enable systemd journal log collection" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_XENSTAT "Enable Xen domain monitoring" ${DEFAULT_FEATURE_STATE} "LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_LOCAL_LISTENERS "Enable local listening socket tracking (including service auto-discovery support)" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_LOGS_MANAGEMENT "Enable log collection and monitoring based on Fluent Bit" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_NETWORK_VIEWER "Enable network viewer functionality" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_NFACCT "Enable Linux NFACCT metric collection" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_PERF "Enable Linux performance counter monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_SLABINFO "Enable Linux kernel SLAB allocator monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_SYSTEMD_JOURNAL "Enable systemd journal log collection" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)
cmake_dependent_option(ENABLE_PLUGIN_XENSTAT "Enable Xen domain monitoring" ${DEFAULT_FEATURE_STATE} "OS_LINUX" False)

# Metrics exporters
option(ENABLE_EXPORTER_PROMETHEUS_REMOTE_WRITE "Enable exporting to Prometheus via remote write API" ${DEFAULT_FEATURE_STATE})
Expand Down Expand Up @@ -2367,7 +2367,6 @@ set(CONFIGURE_COMMAND "dummy-configure-command")
if (NOT NETDATA_USER)
set(NETDATA_USER "netdata")
endif()
set(VERSION "${GIT_DESCRIBE_OUTPUT}")

configure_file(packaging/cmake/config.cmake.h.in config.h)

Expand Down
2 changes: 1 addition & 1 deletion packaging/build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ add_cmake_option ENABLE_PLUGIN_DEBUGFS On
add_cmake_option ENABLE_PLUGIN_FREEIPMI On
add_cmake_option ENABLE_PLUGIN_GO On
add_cmake_option ENABLE_PLUGIN_LOCAL_LISTENERS On
add_cmake_option ENABLE_PLUGIN_LOGS_MANAGEMENT On
add_cmake_option ENABLE_PLUGIN_LOGS_MANAGEMENT Off
add_cmake_option ENABLE_PLUGIN_NFACCT On
add_cmake_option ENABLE_PLUGIN_PERF On
add_cmake_option ENABLE_PLUGIN_SLABINFO On
Expand Down
4 changes: 2 additions & 2 deletions packaging/cmake/Modules/NetdataGoTools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
# SPDX-License-Identifier: GPL

if(CMAKE_BUILD_TYPE STREQUAL Debug)
set(GO_LDFLAGS "-X github.com/netdata/netdata/go/go.d.plugin/pkg/buildinfo.Version=${NETDATA_VERSION}")
set(GO_LDFLAGS "-X github.com/netdata/netdata/go/go.d.plugin/pkg/buildinfo.Version=${NETDATA_VERSION_STRING}")
else()
set(GO_LDFLAGS "-w -s -X github.com/netdata/netdata/go/go.d.plugin/pkg/buildinfo.Version=${NETDATA_VERSION}")
set(GO_LDFLAGS "-w -s -X github.com/netdata/netdata/go/go.d.plugin/pkg/buildinfo.Version=${NETDATA_VERSION_STRING}")
endif()

# add_go_target: Add a new target that needs to be built using the Go toolchain.
Expand Down
2 changes: 1 addition & 1 deletion packaging/cmake/Modules/NetdataVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function(netdata_version)
endif()

string(STRIP ${GIT_DESCRIBE_OUTPUT} GIT_DESCRIBE_OUTPUT)
set(GIT_DESCRIBE_OUTPUT "${GIT_DESCRIBE_OUTPUT}" PARENT_SCOPE)
set(NETDATA_VERSION_STRING "${GIT_DESCRIBE_OUTPUT}" PARENT_SCOPE)

string(REGEX MATCH "v?([0-9]+)\\.([0-9]+)\\.([0-9]+)-?([0-9]+)?-?([0-9a-zA-Z]+)?" MATCHES "${GIT_DESCRIBE_OUTPUT}")
if(CMAKE_MATCH_COUNT EQUAL 3)
Expand Down
2 changes: 1 addition & 1 deletion packaging/cmake/config.cmake.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
#define NETDATA_VERSION_TWEAK "@NETDATA_VERSION_TWEAK@"
#define NETDATA_VERSION_DESCR "@NETDATA_VERSION_DESCR@"

#define NETDATA_VERSION "@GIT_DESCRIBE_OUTPUT@"
#define NETDATA_VERSION "@NETDATA_VERSION_STRING@"

#define ENABLE_JSONC 1

Expand Down
7 changes: 7 additions & 0 deletions packaging/makeself/jobs/90-netdata-runtime-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ dump_log() {

trap dump_log EXIT

export NETDATA_LIBEXEC_PREFIX="${NETDATA_INSTALL_PATH}/usr/libexec/netdata"
export NETDATA_SKIP_LIBEXEC_PARTS="logs-management|freeipmi|xenstat|cups"

if [ "$(uname -m)" != "x86_64" ]; then
export NETDATA_SKIP_LIBEXEC_PARTS="${NETDATA_SKIP_LIBEXEC_PARTS}|ebpf"
fi

"${NETDATA_INSTALL_PATH}/bin/netdata" -D > ./netdata.log 2>&1 &

"${NETDATA_SOURCE_PATH}/packaging/runtime-check.sh" || exit 1
Expand Down
40 changes: 40 additions & 0 deletions packaging/runtime-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,43 @@ curl -sfS http://127.0.0.1:19999/index.html || exit 1
curl -sfS http://127.0.0.1:19999/v0/index.html || exit 1
curl -sfS http://127.0.0.1:19999/v1/index.html || exit 1
curl -sfS http://127.0.0.1:19999/v2/index.html || exit 1

NETDATA_LIBEXEC_PARTS="
plugins.d/apps.plugin
plugins.d/cgroup-network
plugins.d/charts.d.plugin
plugins.d/cups.plugin
plugins.d/debugfs.plugin
plugins.d/ebpf.plugin
plugins.d/freeipmi.plugin
plugins.d/go.d.plugin
plugins.d/ioping.plugin
plugins.d/local-listeners
plugins.d/logs-management.plugin
plugins.d/ndsudo
plugins.d/network-viewer.plugin
plugins.d/nfacct.plugin
plugins.d/perf.plugin
plugins.d/python.d.plugin
plugins.d/slabinfo.plugin
plugins.d/xenstat.plugin
"

if [ -d "${NETDATA_LIBEXEC_PREFIX}" ]; then
success=1
for part in ${NETDATA_LIBEXEC_PARTS}; do
# shellcheck disable=SC2254
if echo "${part}" | grep -qE "${NETDATA_SKIP_LIBEXEC_PARTS}"; then
continue
fi

if [ ! -x "${NETDATA_LIBEXEC_PREFIX}/${part}" ]; then
success=0
echo "!!! ${NETDATA_LIBEXEC_PREFIX}/${part} is missing"
fi
done

if [ "${success}" -eq 0 ]; then
exit 1
fi
fi
2 changes: 1 addition & 1 deletion packaging/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.45.0-490-nightly
v1.45.0-495-nightly
1 change: 1 addition & 0 deletions src/daemon/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ static cmd_status_t cmd_reload_labels_execute(char *args, char **message)
(void)args;
netdata_log_info("COMMAND: reloading host labels.");
reload_host_labels();
aclk_queue_node_info(localhost, 1);

BUFFER *wb = buffer_create(10, NULL);
rrdlabels_log_to_buffer(localhost->rrdlabels, wb);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,10 @@ func (e *localListenersExec) discover(ctx context.Context) ([]byte, error) {
}

func extractComm(cmdLine string) string {
i := strings.IndexByte(cmdLine, ' ')
if i <= 0 {
return strings.TrimSuffix(cmdLine, ":")
if i := strings.IndexByte(cmdLine, ' '); i != -1 {
cmdLine = cmdLine[:i]
}
_, comm := filepath.Split(cmdLine[:i])
_, comm := filepath.Split(cmdLine)
return strings.TrimSuffix(comm, ":")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ func TestDiscoverer_Discover(t *testing.T) {
tests := map[string]discoverySim{
"add listeners": {
listenersCli: func(cli listenersCli, interval, expiry time.Duration) {
cli.addListener("UDP|127.0.0.1|323|/usr/sbin/chronyd")
cli.addListener("UDP6|::1|8125|/opt/netdata/usr/sbin/netdata -P /run/netdata/netdata.pid -D")
cli.addListener("TCP6|::1|8125|/opt/netdata/usr/sbin/netdata -P /run/netdata/netdata.pid -D")
cli.addListener("TCP6|::|8125|/opt/netdata/usr/sbin/netdata -P /run/netdata/netdata.pid -D")
Expand All @@ -31,6 +32,14 @@ func TestDiscoverer_Discover(t *testing.T) {
provider: "sd:net_listeners",
source: "discoverer=net_listeners,host=localhost",
targets: []model.Target{
withHash(&target{
Protocol: "UDP",
IPAddress: "127.0.0.1",
Port: "323",
Address: "127.0.0.1:323",
Comm: "chronyd",
Cmdline: "/usr/sbin/chronyd",
}),
withHash(&target{
Protocol: "TCP",
IPAddress: "127.0.0.1",
Expand Down
Loading