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 #334

Merged
merged 10 commits into from
Jan 31, 2025
Merged
7 changes: 0 additions & 7 deletions .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ exclude_paths:
- src/collectors/python.d.plugin/python_modules/urllib3/**
- src/collectors/python.d.plugin/python_modules/third_party/**
- packaging/makeself/**
- src/web/gui/css/**
- src/web/gui/lib/**
- src/web/gui/old/**
- src/web/gui/src/**
- src/web/gui/v1/**
- src/web/gui/v2/**
- src/web/gui/main.js
- tests/**
- aclk/tests/**
- src/libnetdata/libjudy/**
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/dashboard-pr.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ README
TODO.md
TODO.txt

src/web/gui/chart-info/
src/web/gui/control.html
src/web/gui/dashboard.js
src/web/gui/datasource.css
src/web/gui/gadget.xml
src/web/gui/index_new.html
src/web/gui/version.txt

# related to karma/javascript/node
/node_modules/
/coverage/
Expand Down
15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()

include(NetdataCompilerFlags)

set(CMAKE_EXPORT_COMPILE_COMMANDS On)

# Check for the mold linker and try to use it if available
Expand Down Expand Up @@ -83,11 +81,6 @@ if(USE_MOLD)
endif()
endif()

check_c_compiler_flag("-fexceptions" HAVE_FEXCEPTIONS)
if (NOT HAVE_FEXCEPTIONS)
message(FATAL_ERROR "Missing required compiler flag: -fexceptions.")
endif()

set(CONFIG_H_DIR ${CMAKE_BINARY_DIR})
set(CONFIG_H ${CONFIG_H_DIR}/config.h)

Expand Down Expand Up @@ -154,6 +147,13 @@ else()
message(FATAL_ERROR "Unknown/unsupported platform: ${CMAKE_SYSTEM_NAME} (Supported platforms: FreeBSD, Linux, macOS, Windows)")
endif()

include(NetdataCompilerFlags)

check_c_compiler_flag("-fexceptions" HAVE_FEXCEPTIONS)
if (NOT HAVE_FEXCEPTIONS)
message(FATAL_ERROR "Missing required compiler flag: -fexceptions.")
endif()

# This is intended to make life easier for developers who are working on one
# specific feature.
#
Expand Down Expand Up @@ -1775,6 +1775,7 @@ set(WINDOWS_PLUGIN_FILES
src/collectors/windows.plugin/GetSystemUptime.c
src/collectors/windows.plugin/GetSystemRAM.c
src/collectors/windows.plugin/GetSystemCPU.c
src/collectors/windows.plugin/perflib-adcs.c
src/collectors/windows.plugin/perflib-rrd.c
src/collectors/windows.plugin/perflib-rrd.h
src/collectors/windows.plugin/perflib-ad.c
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,6 @@ The Netdata ecosystem consists of three key parts:

- **Netdata Cloud**: A commercial, closed-source component, Netdata Cloud enhances the capabilities of the open-source Netdata Agent by providing horizontal scalability, centralized alert notification dispatch (including a mobile app), user management, role-based access control, and other enterprise-grade features. It is available both as a SaaS solution and for on-premises deployment, with a free-to-use community tier also offered.

- **Netdata UI**: The Netdata UI is closed-source, and handles all visualization and dashboard functionalities related to metrics, logs and other collected data, as well as the central configuration and management of the Netdata ecosystem. It serves both the Netdata Agent and Netdata Cloud. The Netdata UI is distributed in binary form with the Netdata Agent and is publicly accessible via a CDN, licensed under the [Netdata Cloud UI License 1 (NCUL1)](https://app.netdata.cloud/LICENSE.txt). It integrates third-party open-source components, detailed in the [Netdata UI third-party licenses](https://github.com/netdata/netdata/blob/master/src/web/gui/v2/3D_PARTY_LICENSES.txt).
- **Netdata UI**: The Netdata UI is closed-source, and handles all visualization and dashboard functionalities related to metrics, logs and other collected data, as well as the central configuration and management of the Netdata ecosystem. It serves both the Netdata Agent and Netdata Cloud. The Netdata UI is distributed in binary form with the Netdata Agent and is publicly accessible via a CDN, licensed under the [Netdata Cloud UI License 1 (NCUL1)](https://app.netdata.cloud/LICENSE.txt). It integrates third-party open-source components, detailed in the [Netdata UI third-party licenses](https://app.netdata.cloud/3D_PARTY_LICENSES.txt).

The binary installation packages provided by Netdata include the Netdata Agent and the Netdata UI. Since the Netdata Agent is open-source, it is frequently packaged by third parties (e.g., Linux Distributions) excluding the closed-source components (Netdata UI is not included). While their packages can still be useful in providing the necessary back-ends and the APIs of a fully functional monitoring solution, we recommend using the installation packages we provide to experience the full feature set of Netdata.
2 changes: 0 additions & 2 deletions docs/dashboards-and-charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ You can access the dashboard at <https://app.netdata.cloud/> and [sign-in with a
### Netdata Agent

To view your Netdata dashboard, open a web browser and enter the address `http://NODE:19999` - replace `NODE` with your Agent's IP address or hostname. If the Agent is on the same machine, use `http://localhost:19999`.

Documentation for the previous Agent dashboard can still be found [here](/src/web/gui/README.md).
1 change: 0 additions & 1 deletion docs/developer-and-contributor-corner/python-collector.txt
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ At minimum, to be buildable and testable, the PR needs to include:
- A basic configuration for the plugin in the appropriate global config file: `collectors/python.d.plugin/python.d.conf`, which is also in YAML format. Either add a line that reads `# <module_name>: yes` if the module is to be enabled by default, or one that reads `<module_name>: no` if it is to be disabled by default.
- A makefile for the plugin at `collectors/python.d.plugin/<module_dir>/Makefile.inc`. Check an existing plugin for what this should look like.
- A line in `collectors/python.d.plugin/Makefile.am` including the above-mentioned makefile. Place it with the other plugin includes (please keep the includes sorted alphabetically).
- Optionally, chart information in `src/web/gui/dashboard_info.js`. This generally involves specifying a name and icon for the section, and may include descriptions for the section or individual charts.
- Optionally, some default alert configurations for your collector in `health/health.d/<module_name>.conf` and a line adding `<module_name>.conf` in `health/Makefile.am`.

## Framework class reference
Expand Down
2 changes: 0 additions & 2 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ Missing a term? Let us know or submit a request to expand our glossary. Together

- [**Context**](/docs/dashboards-and-charts/netdata-charts.md#contexts): A way of grouping charts by the types of metrics collected and dimensions displayed. It's kind of like a machine-readable naming and organization scheme.

- [**Custom dashboards**](/src/web/gui/custom/README.md) A dashboard that you can create using simple HTML (no JavaScript is required for basic dashboards).

## D

- [**Dashboard**](/docs/dashboards-and-charts/README.md): Out-of-the-box visual representation of metrics to provide insight into your infrastructure, its health and performance.
Expand Down
8 changes: 2 additions & 6 deletions netdata-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,8 @@ while [ -n "${1}" ]; do
;;
"--enable-ml") NETDATA_ENABLE_ML=1 ;;
"--disable-ml") NETDATA_ENABLE_ML=0 ;;
"--enable-lto")
# TODO: Needs CMake support
;;
"--disable-lto")
# TODO: Needs CMake support
;;
"--enable-lto") NETDATA_ENABLE_LTO=1 ;;
"--disable-lto") NETDATA_ENABLE_LTO=0 ;;
"--disable-x86-sse")
# XXX: No longer supported.
;;
Expand Down
1 change: 1 addition & 0 deletions netdata.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ happened, on your systems and applications.
-DUSE_CXX_11=On \
%endif
%endif
-DDISABLE_LTO=On \
%if %{_have_cups}
-DENABLE_PLUGIN_CUPS=On \
%else
Expand Down
44 changes: 44 additions & 0 deletions packaging/cmake/Modules/NetdataCompilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,32 @@ function(add_double_extra_compiler_flag match flag1 flag2)
endif()
endfunction()

# Add a required extra compiler flag to C and C++ flags.
#
# Similar logic as add_simple_extra_compiler_flag, but ignores existing
# instances and throws an error if the flag is not supported.
function(add_required_compiler_flag flag)
set(CMAKE_REQUIRED_FLAGS "-Werror")

make_cpp_safe_name("${flag}" flag_name)

check_c_compiler_flag("${flag}" HAVE_C_${flag_name})
check_cxx_compiler_flag("${flag}" HAVE_CXX_${flag_name})

if(HAVE_C_${flag_name} AND HAVE_CXX_${flag_name})
add_compile_options("${flag}")
add_link_options("${flag}")
else()
message(FATAL_ERROR "${flag} support is required to build Netdata")
endif()
endfunction()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
option(DISABLE_HARDENING "Disable adding extra compiler flags for hardening" TRUE)
option(USE_LTO "Attempt to use of LTO when building. Defaults to being enabled if supported for release builds." FALSE)
else()
option(DISABLE_HARDENING "Disable adding extra compiler flags for hardening" FALSE)
option(USE_LTO "Attempt to use of LTO when building. Defaults to being enabled if supported for release builds." TRUE)
endif()

option(ENABLE_ADDRESS_SANITIZER "Build with address sanitizer enabled" False)
Expand All @@ -82,8 +104,30 @@ if(ENABLE_ADDRESS_SANITIZER)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
endif()

if(USE_LTO)
if(OS_WINDOWS)
message(WARNING "LTO not supported on Windows, not checking for it")
else()
include(CheckIPOSupported)

message(CHECK_START "Checking for LTO support")
check_ipo_supported(RESULT HAVE_LTO)

if(HAVE_LTO)
message(CHECK_PASS "supported")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
message(CHECK_FAIL "not supported")
endif()
endif()
else()
message(STATUS "Not checking for LTO support as it has been explicitly disabled")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}")

add_required_compiler_flag("-fexceptions")

if(NOT ${DISABLE_HARDENING})
add_double_extra_compiler_flag("stack-protector" "-fstack-protector-strong" "-fstack-protector")
add_double_extra_compiler_flag("_FORTIFY_SOURCE" "-D_FORTIFY_SOURCE=3" "-D_FORTIFY_SOURCE=2")
Expand Down
8 changes: 8 additions & 0 deletions packaging/installer/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ prepare_cmake_options() {
NETDATA_CMAKE_OPTIONS="${NETDATA_CMAKE_OPTIONS} -DUSE_CXX_11=On"
fi

if [ -n "${NETDATA_ENABLE_LTO}" ]; then
if [ "${NETDATA_ENABLE_LTO}" -eq 1 ]; then
NETDATA_CMAKE_OPTIONS="${NETDATA_CMAKE_OPTIONS} -DDISABLE_LTO=Off"
else
NETDATA_CMAKE_OPTIONS="${NETDATA_CMAKE_OPTIONS} -DDISABLE_LTO=On"
fi
fi

if [ "${ENABLE_GO:-1}" -eq 1 ]; then
enable_feature PLUGIN_GO 1
else
Expand Down
11 changes: 8 additions & 3 deletions src/aclk/aclk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,12 +1002,15 @@ void aclk_host_state_update(RRDHOST *host, int cmd, int queryable)
aclk_add_job(query);
}

void aclk_send_node_instances()
void aclk_send_node_instances(mqtt_wss_client client)
{
struct node_instance_list *list_head = get_node_list();
struct node_instance_list *list = list_head;
if (unlikely(!list)) {
error_report("Failure to get_node_list from DB!");
sleep_usec(USEC_PER_SEC);
aclk_query_t query = aclk_query_new(SEND_NODE_INSTANCES);
aclk_add_job(query);
return;
}
while (!uuid_is_null(list->host_id)) {
Expand Down Expand Up @@ -1045,7 +1048,8 @@ void aclk_send_node_instances()
freez((void*)node_state_update.node_id);
query->data.bin_payload.msg_name = "UpdateNodeInstanceConnection";
query->data.bin_payload.topic = ACLK_TOPICID_NODE_CONN;
aclk_add_job(query);
send_bin_msg(client, query);
aclk_query_free(query);
} else {
aclk_query_t create_query;
create_query = aclk_query_new(REGISTER_NODE);
Expand All @@ -1067,7 +1071,8 @@ void aclk_send_node_instances()
(char*)node_instance_creation.machine_guid, list->hops);

freez((void *)node_instance_creation.machine_guid);
aclk_add_job(create_query);
send_bin_msg(client, create_query);
aclk_query_free(create_query);
}
freez(list->hostname);

Expand Down
2 changes: 1 addition & 1 deletion src/aclk/aclk.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ extern struct aclk_shared_state {
void aclk_host_state_update(RRDHOST *host, int cmd, int queryable);
bool aclk_host_state_update_auto(RRDHOST *host);

void aclk_send_node_instances(void);
void aclk_send_node_instances(mqtt_wss_client client);

void aclk_send_bin_msg(char *msg, size_t msg_len, enum aclk_topics subtopic, const char *msgname);

Expand Down
2 changes: 0 additions & 2 deletions src/collectors/statsd.plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,6 @@ At this point, you have used StatsD to gather metrics for k6, creating a whole n
Netdata dashboard in the process. Moreover, you can further customize the icon of the particular section,
as well as the description for each chart.

To edit the section, please follow the Netdata [documentation](/src/web/gui/README.md#customizing-the-local-dashboard).

While the following configuration will be placed in a new file, as the documentation suggests, it is
instructing to use `dashboard_info.js` as a template. Open the file and see how the rest of sections and collectors have been defined.

Expand Down
14 changes: 14 additions & 0 deletions src/collectors/windows.plugin/integrations/net_framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ Metrics:
| netframework.clrloading_assemblies_loaded | loaded | assemblies/s |
| netframework.clrloading_classes_loaded | loaded | classes/s |
| netframework.clrloading_class_load_failures | class_load | failures/s |
| netframework.clrremoting_channels | registered | channels/s |
| netframework.clrremoting_context_bound_classes_loaded | loaded | classes |
| netframework.clrremoting_context_bound_objects | objects | objects/s |
| netframework.clrremoting_context_proxies | contexts | objects/s |
| netframework.clrremoting_remote_calls | rpc | calls/s |
| netframework.clrsecurity_link_time_checks | linktime | checks/s |
| netframework.clrsecurity_checks_time | time | percentage |
| netframework.clrsecurity_stack_walk_depth | stack | depth |
| netframework.clrsecurity_runtime_checks | runtime | checks/s |
| netframework.clrlocksandthreads_queue_length | threads | threads/s |
| netframework.clrlocksandthreads_current_logical_threads | logical | threads |
| netframework.clrlocksandthreads_current_physical_threads | physical | threads |
| netframework.clrlocksandthreads_recognized_threads | threads | threads/s |
| netframework.clrlocksandthreads_contentions | contentions | contentions/s |



Expand Down
Loading
Loading