From 6089849cf6ce909a73a78c39819bbe648e18de11 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Thu, 8 Aug 2024 07:24:31 -0400 Subject: [PATCH 01/15] Add detailed reporting of failed checksums in kickstart script. (#18265) * Add detailed reporting of failed checksums in kickstart script. * Fix output. --- packaging/installer/kickstart.sh | 33 +++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh index e9f02da7d6e4da..72b82be261c753 100755 --- a/packaging/installer/kickstart.sh +++ b/packaging/installer/kickstart.sh @@ -455,7 +455,7 @@ deferred_warnings() { fatal() { deferred_warnings - printf >&2 "%s\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD} ABORTED ${TPUT_RESET} ${1}" + printf >&2 "%b\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD} ABORTED ${TPUT_RESET} ${1}" printf >&2 "%s\n" "For community support, you can connect with us on:" support_list telemetry_event "INSTALL_FAILED" "${1}" "${2}" @@ -743,8 +743,6 @@ get_redirect() { } safe_sha256sum() { - # Within the context of the installer, we only use -c option that is common between the two commands - # We will have to reconsider if we start using non-common options if command -v shasum > /dev/null 2>&1; then shasum -a 256 "$@" elif command -v sha256sum > /dev/null 2>&1; then @@ -754,6 +752,17 @@ safe_sha256sum() { fi } +report_bad_sha256sum() { + file="${1}" + sums="${2}" + + actual="$(safe_sha256sum "${file}" | awk '{ print $1 }')" + expected="$(grep "${file}" "${sums}" | awk '{ print $1 }')" + + printf "Expected: %s\n" "${expected}" + printf "Actual: %s\n" "${actual}" +} + get_system_info() { SYSARCH="$(uname -m)" @@ -1809,7 +1818,8 @@ try_static_install() { else if [ -z "${INSTALL_VERSION}" ]; then if ! grep "${netdata_agent}" ./sha256sum.txt | safe_sha256sum -c - > /dev/null 2>&1; then - fatal "Static binary checksum validation failed. ${BADCACHE_MSG}." F0207 + bad_sums_report="$(report_bad_sha256sum "${netdata_agent}" "./sha256sum.txt")" + fatal "Static binary checksum validation failed.\n${bad_sums_report}\n${BADCACHE_MSG}." F0207 fi fi fi @@ -1984,7 +1994,8 @@ try_build_install() { if [ -z "${INSTALL_VERSION}" ]; then # shellcheck disable=SC2086 if ! grep netdata-latest.tar.gz "./sha256sum.txt" | safe_sha256sum -c - > /dev/null 2>&1; then - fatal "Tarball checksum validation failed. ${BADCACHE_MSG}." F0005 + bad_sums_report="$(report_bad_sha256sum netdata-latest.tar.gz "./sha256sum.txt")" + fatal "Tarball checksum validation failed.\n${bad_sums_report}\n${BADCACHE_MSG}." F0005 fi fi fi @@ -2077,8 +2088,16 @@ prepare_offline_install_source() { if [ "${DRY_RUN}" -ne 1 ]; then progress "Verifying checksums." - if ! grep -e "$(find . -name '*.gz.run')" sha256sums.txt | safe_sha256sum -c -; then - fatal "Checksums for offline install files are incorrect. ${BADCACHE_MSG}." F0507 + + failed_files="" + for file in $(find . -name '*.gz.run'); do + if ! grep -e "${file}" sha256sums.txt | safe_sha256sum -c -; then + failed_files="${failed_files}\n${file}\n$(report_bad_sha256sums "${file}" sha256sums.txt)" + fi + done + + if [ -n "${failed_files}" ]; then + fatal "Checksums for offline install files are incorrect.\n${failed_files}\n${BADCACHE_MSG}." F0507 fi else progress "Would verify SHA256 checksums of downloaded installation files." From a3ea51ed156df8903b9ebfb11ee8f80edbd03a6b Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Thu, 8 Aug 2024 07:24:54 -0400 Subject: [PATCH 02/15] Add code signing for Windows executables. (#18222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add code signing for Windows executables. * Fix typos and add failure notification. * Use full version for trusted signing action. Because MS isn’t publishing it with proper semver tags. * Avoid reinstalling dependencies that are already installed. * Fix CMake 3.30 compatibility. * Don’t let BUILD_DIR propagate to cmake. * Fix JSON-C build warning. * Fix handling of externally specified build directories. While regular Windows paths do actually work under MSYS2, they seem to confuse CMake, so we need to convert to a standard MSYS2 path if `BUILD_DIR` is set to a Windows path. * Fix typo. * Fix build directory handling. --- .github/workflows/build.yml | 62 +++++++++++++++++++ .../Modules/NetdataFetchContentExtra.cmake | 15 ++++- packaging/cmake/Modules/NetdataJSONC.cmake | 2 +- packaging/windows/compile-on-windows.sh | 19 ++---- packaging/windows/msys2-dependencies.sh | 2 +- packaging/windows/package-windows.sh | 21 ++----- packaging/windows/win-build-dir.sh | 20 ++++++ 7 files changed, 105 insertions(+), 36 deletions(-) create mode 100644 packaging/windows/win-build-dir.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 86a2590e91f6cd..f642d792d8032c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1082,11 +1082,47 @@ jobs: - name: Build Netdata id: build if: needs.file-check.outputs.run == 'true' + env: + BUILD_DIR: ${{ github.workspace }}\build run: ./packaging/windows/build.ps1 + - name: Sign Agent Code + id: sign-agent + if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' + uses: azure/trusted-signing-action@v0.4.0 + with: + azure-tennant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} + azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} + azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} + endpoint: "https://eus.codesigning.azure.net/" + trusted-signing-account-name: Netdata + certificate-profile-name: Netdata + files-folder: ${{ github.workspace }}\build + files-folder-filter: exe,dll + files-recurse: true + file-digest: SHA256 + timestamp-rfc3161: "http://timestamp.acs.microsoft.com" + timestamp-digest: SHA256 - name: Package Netdata id: package if: needs.file-check.outputs.run == 'true' + env: + BUILD_DIR: ${{ github.workspace }}\build run: ./packaging/windows/package.ps1 + - name: Sign Installer + id: sign-installer + if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' + uses: azure/trusted-signing-action@v0.4.0 + with: + azure-tennant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} + azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} + azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} + endpoint: "https://eus.codesigning.azure.net/" + trusted-signing-account-name: Netdata + certificate-profile-name: Netdata + files: ${{ github.workspace }}\packaging\windows\netdata-installer.exe + file-digest: SHA256 + timestamp-rfc3161: "http://timestamp.acs.microsoft.com" + timestamp-digest: SHA256 - name: Upload Installer id: upload uses: actions/upload-artifact@v4 @@ -1094,6 +1130,32 @@ jobs: name: windows-x86_64-installer path: packaging\windows\netdata-installer.exe retention-days: 30 + - name: Failure Notification + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_COLOR: 'danger' + SLACK_FOOTER: '' + SLACK_ICON_EMOJI: ':github-actions:' + SLACK_TITLE: 'Windows build failed:' + SLACK_USERNAME: 'GitHub Actions' + SLACK_MESSAGE: |- + ${{ github.repository }}: Updater checks for ${{ matrix.distro }} failed. + Checkout: ${{ steps.checkout.outcome }} + Set Up Dependencies: ${{ steps.deps.outcome }} + Build Netdata: ${{ steps.build.outcome }} + Sign Agent Code: ${{ steps.sign-agent.outcome }} + Package Netdata: ${{ steps.package.outcome }} + Sign Installer: ${{ steps.sign-installer.outcome }} + Upload Installer: ${{ steps.upload.outcome }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} + if: >- + ${{ + failure() + && startsWith(github.ref, 'refs/heads/master') + && github.event_name != 'pull_request' + && github.repository == 'netdata/netdata' + && needs.file-check.outputs.run == 'true' + }} updater-check: # Test the generated dist archive using the updater code. name: Test Generated Distfile and Updater Code diff --git a/packaging/cmake/Modules/NetdataFetchContentExtra.cmake b/packaging/cmake/Modules/NetdataFetchContentExtra.cmake index 6601b6d95e6999..e82fe413b776bd 100644 --- a/packaging/cmake/Modules/NetdataFetchContentExtra.cmake +++ b/packaging/cmake/Modules/NetdataFetchContentExtra.cmake @@ -38,8 +38,17 @@ endmacro() # # This needs to be explicitly included for any sub-project that needs # to be built for the target system. +# +# This also needs to _NOT_ have any generator expressions, as they are not +# supported for the required usage of this variable in CMake 3.30 or newer. set(NETDATA_PROPAGATE_TOOLCHAIN_ARGS "-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - $<$:-DCMAKE_C_COMPILER_TARGET=${CMAKE_C_COMPILER_TARGET} - $<$:-DCMAKE_CXX_COMPILER_TARGET=${CMAKE_CXX_COMPILER_TARGET}") + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}") + +if(DEFINED CMAKE_C_COMPILER_TARGET) + set(NETDATA_PROPAGATE_TOOLCHAIN_ARGS "${NETDATA_PROPAGATE_TOOLCHAIN_ARGS} -DCMAKE_C_COMPILER_TARGET=${CMAKE_C_COMPILER_TARGET}") +endif() + +if(DEFINED CMAKE_CXX_COMPILER_TARGET) + set(NETDATA_PROPAGATE_TOOLCHAIN_ARGS "${NETDATA_PROPAGATE_TOOLCHAIN_ARGS} -DCMAKE_CXX_COMPILER_TARGET=${CMAKE_CXX_COMPILER_TARGET}") +endif() diff --git a/packaging/cmake/Modules/NetdataJSONC.cmake b/packaging/cmake/Modules/NetdataJSONC.cmake index 2f500b2c50a7ab..89ec70265029ac 100644 --- a/packaging/cmake/Modules/NetdataJSONC.cmake +++ b/packaging/cmake/Modules/NetdataJSONC.cmake @@ -75,7 +75,7 @@ macro(netdata_detect_jsonc) endif() if(NOT JSONC_FOUND) - set(ENABLE_BUNDLED_JSONC True PARENT_SCOPE) + set(ENABLE_BUNDLED_JSONC True) netdata_bundle_jsonc() set(NETDATA_JSONC_LDFLAGS json-c) set(NETDATA_JSONC_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/include) diff --git a/packaging/windows/compile-on-windows.sh b/packaging/windows/compile-on-windows.sh index 44266bf5fdb626..ceb4f5502f39b3 100755 --- a/packaging/windows/compile-on-windows.sh +++ b/packaging/windows/compile-on-windows.sh @@ -1,21 +1,10 @@ #!/bin/bash -repo_root="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")" +REPO_ROOT="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")" CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-RelWithDebInfo}" -if [ -n "${BUILD_DIR}" ]; then - build="${BUILD_DIR}" -elif [ -n "${OSTYPE}" ]; then - if [ -n "${MSYSTEM}" ]; then - build="${repo_root}/build-${OSTYPE}-${MSYSTEM}" - else - build="${repo_root}/build-${OSTYPE}" - fi -elif [ "$USER" = "vk" ]; then - build="${repo_root}/build" -else - build="${repo_root}/build" -fi +# shellcheck source=./win-build-dir.sh +. "${REPO_ROOT}/packaging/windows/win-build-dir.sh" set -exu -o pipefail @@ -42,7 +31,7 @@ fi ${GITHUB_ACTIONS+echo "::group::Configuring"} # shellcheck disable=SC2086 CFLAGS="${BUILD_CFLAGS}" /usr/bin/cmake \ - -S "${repo_root}" \ + -S "${REPO_ROOT}" \ -B "${build}" \ -G "${generator}" \ -DCMAKE_INSTALL_PREFIX="/opt/netdata" \ diff --git a/packaging/windows/msys2-dependencies.sh b/packaging/windows/msys2-dependencies.sh index e31b7e0de95d63..95a1952df8820c 100755 --- a/packaging/windows/msys2-dependencies.sh +++ b/packaging/windows/msys2-dependencies.sh @@ -11,7 +11,7 @@ pacman -Syuu --noconfirm ${GITHUB_ACTIONS+echo "::endgroup::"} ${GITHUB_ACTIONS+echo "::group::Installing dependencies"} -pacman -S --noconfirm \ +pacman -S --noconfirm --needed \ base-devel \ cmake \ git \ diff --git a/packaging/windows/package-windows.sh b/packaging/windows/package-windows.sh index 08749d82c8f355..4c62e0c08f8ac9 100755 --- a/packaging/windows/package-windows.sh +++ b/packaging/windows/package-windows.sh @@ -1,20 +1,9 @@ #!/bin/bash -repo_root="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")" +REPO_ROOT="$(dirname "$(dirname "$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd -P)")")" -if [ -n "${BUILD_DIR}" ]; then - build="${BUILD_DIR}" -elif [ -n "${OSTYPE}" ]; then - if [ -n "${MSYSTEM}" ]; then - build="${repo_root}/build-${OSTYPE}-${MSYSTEM}" - else - build="${repo_root}/build-${OSTYPE}" - fi -elif [ "$USER" = "vk" ]; then - build="${repo_root}/build" -else - build="${repo_root}/build" -fi +# shellcheck source=./win-build-dir.sh +. "${REPO_ROOT}/packaging/windows/win-build-dir.sh" set -exu -o pipefail @@ -24,7 +13,7 @@ ${GITHUB_ACTIONS+echo "::endgroup::"} if [ ! -f "/msys2-installer.exe" ]; then ${GITHUB_ACTIONS+echo "::group::Fetching MSYS2 installer"} - "${repo_root}/packaging/windows/fetch-msys2-installer.py" /msys2-installer.exe + "${REPO_ROOT}/packaging/windows/fetch-msys2-installer.py" /msys2-installer.exe ${GITHUB_ACTIONS+echo "::endgroup::"} fi @@ -33,5 +22,5 @@ NDVERSION=$"$(grep 'CMAKE_PROJECT_VERSION:STATIC' "${build}/CMakeCache.txt"| cut NDMAJORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MAJOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" NDMINORVERSION=$"$(grep 'CMAKE_PROJECT_VERSION_MINOR:STATIC' "${build}/CMakeCache.txt"| cut -d= -f2)" -/mingw64/bin/makensis.exe -DCURRVERSION="${NDVERSION}" -DMAJORVERSION="${NDMAJORVERSION}" -DMINORVERSION="${NDMINORVERSION}" "${repo_root}/packaging/windows/installer.nsi" +/mingw64/bin/makensis.exe -DCURRVERSION="${NDVERSION}" -DMAJORVERSION="${NDMAJORVERSION}" -DMINORVERSION="${NDMINORVERSION}" "${REPO_ROOT}/packaging/windows/installer.nsi" ${GITHUB_ACTIONS+echo "::endgroup::"} diff --git a/packaging/windows/win-build-dir.sh b/packaging/windows/win-build-dir.sh new file mode 100644 index 00000000000000..09dd6b977266e0 --- /dev/null +++ b/packaging/windows/win-build-dir.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ -n "${BUILD_DIR}" ]; then + if (echo "${BUILD_DIR}" | grep -q -E "^[A-Z]:\\\\"); then + build="$(echo "${BUILD_DIR}" | sed -e 's/\\/\//g' -e 's/^\([A-Z]\):\//\/\1\//' -)" + else + build="${BUILD_DIR}" + fi +elif [ -n "${OSTYPE}" ]; then + if [ -n "${MSYSTEM}" ]; then + build="${REPO_ROOT}/build-${OSTYPE}-${MSYSTEM}" + else + build="${REPO_ROOT}/build-${OSTYPE}" + fi +elif [ "$USER" = "vk" ]; then + build="${REPO_ROOT}/build" +else + # shellcheck disable=SC2034 + build="${REPO_ROOT}/build" +fi From 171f1de956cdcecd024c902b291e50fd4146f166 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Thu, 8 Aug 2024 07:47:57 -0400 Subject: [PATCH 03/15] Fix typos in code signing steps in Windows build job. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f642d792d8032c..8ae9dec3648118 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1090,7 +1090,7 @@ jobs: if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' uses: azure/trusted-signing-action@v0.4.0 with: - azure-tennant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} + azure-tenant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} endpoint: "https://eus.codesigning.azure.net/" @@ -1098,7 +1098,7 @@ jobs: certificate-profile-name: Netdata files-folder: ${{ github.workspace }}\build files-folder-filter: exe,dll - files-recurse: true + files-folder-recurse: true file-digest: SHA256 timestamp-rfc3161: "http://timestamp.acs.microsoft.com" timestamp-digest: SHA256 @@ -1113,7 +1113,7 @@ jobs: if: needs.file-check.outputs.run == 'true' && github.event_name != 'pull_request' uses: azure/trusted-signing-action@v0.4.0 with: - azure-tennant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} + azure-tenant-id: ${{ secrets.CODE_SIGNING_TENNANT_ID }} azure-client-id: ${{ secrets.CODE_SIGNING_CLIENT_ID }} azure-client-secret: ${{ secrets.CODE_SIGNING_CLIENT_SECRET }} endpoint: "https://eus.codesigning.azure.net/" From 5dedeeca156e442f9d6a5ba68272739f35ac7b2b Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Thu, 8 Aug 2024 21:48:07 +0300 Subject: [PATCH 04/15] add go.d/rethinkdb (#18278) --- src/collectors/apps.plugin/apps_groups.conf | 2 + src/go/go.mod | 4 + src/go/go.sum | 34 +++ src/go/plugin/go.d/README.md | 1 + src/go/plugin/go.d/config/go.d.conf | 1 + src/go/plugin/go.d/config/go.d/rethinkdb.conf | 6 + src/go/plugin/go.d/config/go.d/sd/docker.conf | 7 + .../go.d/config/go.d/sd/net_listeners.conf | 7 + src/go/plugin/go.d/modules/init.go | 1 + .../plugin/go.d/modules/rethinkdb/charts.go | 189 +++++++++++++ .../plugin/go.d/modules/rethinkdb/client.go | 72 +++++ .../plugin/go.d/modules/rethinkdb/collect.go | 123 +++++++++ .../go.d/modules/rethinkdb/config_schema.json | 82 ++++++ .../go.d/modules/rethinkdb/metadata.yaml | 198 +++++++++++++ .../go.d/modules/rethinkdb/rethinkdb.go | 107 ++++++++ .../go.d/modules/rethinkdb/rethinkdb_test.go | 259 ++++++++++++++++++ .../modules/rethinkdb/testdata/config.json | 7 + .../modules/rethinkdb/testdata/config.yaml | 5 + .../rethinkdb/testdata/v2.4.4/stats.txt | 3 + 19 files changed, 1108 insertions(+) create mode 100644 src/go/plugin/go.d/config/go.d/rethinkdb.conf create mode 100644 src/go/plugin/go.d/modules/rethinkdb/charts.go create mode 100644 src/go/plugin/go.d/modules/rethinkdb/client.go create mode 100644 src/go/plugin/go.d/modules/rethinkdb/collect.go create mode 100644 src/go/plugin/go.d/modules/rethinkdb/config_schema.json create mode 100644 src/go/plugin/go.d/modules/rethinkdb/metadata.yaml create mode 100644 src/go/plugin/go.d/modules/rethinkdb/rethinkdb.go create mode 100644 src/go/plugin/go.d/modules/rethinkdb/rethinkdb_test.go create mode 100644 src/go/plugin/go.d/modules/rethinkdb/testdata/config.json create mode 100644 src/go/plugin/go.d/modules/rethinkdb/testdata/config.yaml create mode 100644 src/go/plugin/go.d/modules/rethinkdb/testdata/v2.4.4/stats.txt diff --git a/src/collectors/apps.plugin/apps_groups.conf b/src/collectors/apps.plugin/apps_groups.conf index 5eac24b05851f2..c41f0b8db5a355 100644 --- a/src/collectors/apps.plugin/apps_groups.conf +++ b/src/collectors/apps.plugin/apps_groups.conf @@ -375,6 +375,8 @@ inetd: inetd xinetd # ----------------------------------------------------------------------------- # other application servers +rethinkdb: rethinkdb + beanstalkd: beanstalkd rspamd: rspamd diff --git a/src/go/go.mod b/src/go/go.mod index bdcfd64e953e83..536e0427299429 100644 --- a/src/go/go.mod +++ b/src/go/go.mod @@ -49,6 +49,7 @@ require ( golang.org/x/text v0.16.0 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220504211119-3d4a969bb56b gopkg.in/ini.v1 v1.67.0 + gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.2 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.30.3 k8s.io/apimachinery v0.30.3 @@ -86,6 +87,7 @@ require ( github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect + github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/huandu/xstrings v1.3.3 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect @@ -114,6 +116,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opentracing/opentracing-go v1.1.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 // indirect @@ -143,6 +146,7 @@ require ( golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b // indirect google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/cenkalti/backoff.v2 v2.2.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/klog/v2 v2.120.1 // indirect diff --git a/src/go/go.sum b/src/go/go.sum index c02bcb661376b8..e7660b2c206c87 100644 --- a/src/go/go.sum +++ b/src/go/go.sum @@ -22,10 +22,14 @@ github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhP github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de/go.mod h1:DCaWoUhZrYW9p1lxo/cm8EmUOOzAPSEZNGF2DK1dJgw= github.com/axiomhq/hyperloglog v0.0.0-20240507144631-af9851f82b27 h1:60m4tnanN1ctzIu4V3bfCNJ39BiOPSm1gHFlFjTkRE0= github.com/axiomhq/hyperloglog v0.0.0-20240507144631-af9851f82b27/go.mod h1:k08r+Yj1PRAmuayFiRK6MYuR5Ve4IuZtTfxErMIh0+c= +github.com/bitly/go-hostpool v0.1.0 h1:XKmsF6k5el6xHG3WPJ8U0Ku/ye7njX7W81Ng7O2ioR0= +github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bmatcuk/doublestar/v4 v4.6.1 h1:FH9SifrbvJhnlQpztAx++wlkk70QBf0iBWDwNy7PA4I= github.com/bmatcuk/doublestar/v4 v4.6.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -68,6 +72,7 @@ github.com/facebook/time v0.0.0-20240626113945-18207c5d8ddc h1:0VQsg5ZXW9MPUxzem github.com/facebook/time v0.0.0-20240626113945-18207c5d8ddc/go.mod h1:2UFAomOuD2vAK1x68czUtCVjAqmyWCEnAXOlmGqf+G0= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= @@ -103,6 +108,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -130,6 +137,9 @@ github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWf github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 h1:RtRsiaGvWxcwd8y3BiRZxsylPT8hLWZ5SPcfI+3IDNk= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0/go.mod h1:TzP6duP4Py2pHLVPPQp42aoYI92+PCrVotyR5e8Vqlk= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ilyam8/hashstructure v1.1.0 h1:N8t8hzzKLf2Da87XgC/DBYqXUmSbclgx+2cZxS5/klU= @@ -272,18 +282,25 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.31.0 h1:54UJxxj6cPInHS3a35wm6BK/F9nHYueZ1NVujHDrnXE= github.com/onsi/gomega v1.31.0/go.mod h1:DW9aCi7U6Yi40wNVAvT6kzFnEVEI5n3DloYBiKiT6zk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -310,6 +327,7 @@ github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7 github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= @@ -323,6 +341,8 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -390,6 +410,7 @@ golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= @@ -409,6 +430,7 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -423,6 +445,7 @@ golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -431,6 +454,7 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -438,6 +462,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -508,19 +533,28 @@ google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= +gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.2 h1:tczPZjdz6soV2thcuq1IFOuNLrBUGonFyUXBbIWXWis= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.2/go.mod h1:c7Wo0IjB7JL9B9Avv0UZKorYJCUhiergpj3u1WtGT1E= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/src/go/plugin/go.d/README.md b/src/go/plugin/go.d/README.md index a8ad76c5b5f017..5f367d8a8b9183 100644 --- a/src/go/plugin/go.d/README.md +++ b/src/go/plugin/go.d/README.md @@ -123,6 +123,7 @@ see the appropriate collector readme. | [puppet](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/puppet) | Puppet | | [rabbitmq](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/rabbitmq) | RabbitMQ | | [redis](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/redis) | Redis | +| [rethinkdb](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/rethinkdb) | RethinkDB | | [rspamd](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/rspamd) | Rspamd | | [scaleio](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/scaleio) | Dell EMC ScaleIO | | [sensors](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/sensors) | Hardware Sensors | diff --git a/src/go/plugin/go.d/config/go.d.conf b/src/go/plugin/go.d/config/go.d.conf index 5129a933f46a01..7aa25d5655ff01 100644 --- a/src/go/plugin/go.d/config/go.d.conf +++ b/src/go/plugin/go.d/config/go.d.conf @@ -87,6 +87,7 @@ modules: # puppet: yes # rabbitmq: yes # redis: yes +# rethinkdb: yes # rspamd: yes # scaleio: yes # sensors: yes diff --git a/src/go/plugin/go.d/config/go.d/rethinkdb.conf b/src/go/plugin/go.d/config/go.d/rethinkdb.conf new file mode 100644 index 00000000000000..7d0502aca810eb --- /dev/null +++ b/src/go/plugin/go.d/config/go.d/rethinkdb.conf @@ -0,0 +1,6 @@ +## All available configuration options, their descriptions and default values: +## https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/rethinkdb#readme + +#jobs: +# - name: local +# address: 127.0.0.1:28015 diff --git a/src/go/plugin/go.d/config/go.d/sd/docker.conf b/src/go/plugin/go.d/config/go.d/sd/docker.conf index 8350c755e4da1b..9a15f6155bd0ea 100644 --- a/src/go/plugin/go.d/config/go.d/sd/docker.conf +++ b/src/go/plugin/go.d/config/go.d/sd/docker.conf @@ -66,6 +66,8 @@ classify: expr: '{{ or (eq .PrivatePort "15672") (match "sp" .Image "rabbitmq rabbitmq:* */rabbitmq */rabbitmq:*") }}' - tags: "redis" expr: '{{ or (eq .PrivatePort "6379") (match "sp" .Image "redis redis:* */redis */redis:*") }}' + - tags: "rethinkdb" + expr: '{{ and (eq .PrivatePort "28015") (match "sp" .Image "rethinkdb rethinkdb:* */rethinkdb */rethinkdb:*") }}' - tags: "tengine" expr: '{{ match "sp" .Image "*/tengine */tengine:*" }}' - tags: "tomcat" @@ -179,6 +181,11 @@ compose: module: pika name: docker_{{.Name}} address: redis://@{{.Address}} + - selector: "rethinkdb" + template: | + module: rethinkdb + name: docker_{{.Name}} + address: {{.Address}} - selector: "postgres" template: | module: postgres diff --git a/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf b/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf index fc528a20401dd0..89857c6d0cd372 100644 --- a/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf +++ b/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf @@ -104,6 +104,8 @@ classify: expr: '{{ or (eq .Port "15672") (glob .Cmdline "*rabbitmq*") }}' - tags: "redis" expr: '{{ or (eq .Port "6379") (eq .Comm "redis-server") }}' + - tags: "rethinkdb" + expr: '{{ and (eq .Port "28015") (eq .Comm "rethinkdb") }}' - tags: "rspamd" expr: '{{ and (eq .Port "11334") (eq .Comm "rspamd") }}' - tags: "supervisord" @@ -362,6 +364,11 @@ compose: module: pika name: local address: redis://@{{.IPAddress}}:{{.Port}} + - selector: "rethinkdb" + template: | + module: rethinkdb + name: local + address: {{.Address}} - selector: "rspamd" template: | module: rspamd diff --git a/src/go/plugin/go.d/modules/init.go b/src/go/plugin/go.d/modules/init.go index 6e0bbe3fc7f385..935a13d743c140 100644 --- a/src/go/plugin/go.d/modules/init.go +++ b/src/go/plugin/go.d/modules/init.go @@ -79,6 +79,7 @@ import ( _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/puppet" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/rabbitmq" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/redis" + _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/rethinkdb" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/rspamd" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/scaleio" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/sensors" diff --git a/src/go/plugin/go.d/modules/rethinkdb/charts.go b/src/go/plugin/go.d/modules/rethinkdb/charts.go new file mode 100644 index 00000000000000..989a8c1e9cd840 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/charts.go @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package rethinkdb + +import ( + "fmt" + "strings" + + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" +) + +const ( + prioClusterServersStatsRequest = module.Priority + iota + prioClusterClientConnections + prioClusterActiveClients + prioClusterQueries + prioClusterDocuments + + prioServerStatsRequestStatus + prioServerClientConnections + prioServerActiveClients + prioServerQueries + prioServerDocuments +) + +var clusterCharts = module.Charts{ + clusterServersStatsRequestChart.Copy(), + clusterClientConnectionsChart.Copy(), + clusterActiveClientsChart.Copy(), + clusterQueriesChart.Copy(), + clusterDocumentsChart.Copy(), +} + +var ( + clusterServersStatsRequestChart = module.Chart{ + ID: "cluster_cluster_servers_stats_request", + Title: "Cluster Servers Stats Request", + Units: "servers", + Fam: "servers", + Ctx: "rethinkdb.cluster_servers_stats_request", + Priority: prioClusterServersStatsRequest, + Dims: module.Dims{ + {ID: "cluster_servers_stats_request_success", Name: "success"}, + {ID: "cluster_servers_stats_request_timeout", Name: "timeout"}, + }, + } + clusterClientConnectionsChart = module.Chart{ + ID: "cluster_client_connections", + Title: "Cluster Client Connections", + Units: "connections", + Fam: "connections", + Ctx: "rethinkdb.cluster_client_connections", + Priority: prioClusterClientConnections, + Dims: module.Dims{ + {ID: "cluster_client_connections", Name: "connections"}, + }, + } + clusterActiveClientsChart = module.Chart{ + ID: "cluster_active_clients", + Title: "Cluster Active Clients", + Units: "clients", + Fam: "clients", + Ctx: "rethinkdb.cluster_active_clients", + Priority: prioClusterActiveClients, + Dims: module.Dims{ + {ID: "cluster_clients_active", Name: "active"}, + }, + } + clusterQueriesChart = module.Chart{ + ID: "cluster_queries", + Title: "Cluster Queries", + Units: "queries/s", + Fam: "queries", + Ctx: "rethinkdb.cluster_queries", + Priority: prioClusterQueries, + Dims: module.Dims{ + {ID: "cluster_queries_total", Name: "queries", Algo: module.Incremental}, + }, + } + clusterDocumentsChart = module.Chart{ + ID: "cluster_documents", + Title: "Cluster Documents", + Units: "documents/s", + Fam: "documents", + Ctx: "rethinkdb.cluster_documents", + Priority: prioClusterDocuments, + Dims: module.Dims{ + {ID: "cluster_read_docs_total", Name: "read", Algo: module.Incremental}, + {ID: "cluster_written_docs_total", Name: "written", Mul: -1, Algo: module.Incremental}, + }, + } +) + +var serverChartsTmpl = module.Charts{ + serverStatsRequestStatusChartTmpl.Copy(), + serverConnectionsChartTmpl.Copy(), + serverActiveClientsChartTmpl.Copy(), + serverQueriesChartTmpl.Copy(), + serverDocumentsChartTmpl.Copy(), +} + +var ( + serverStatsRequestStatusChartTmpl = module.Chart{ + ID: "server_%s_stats_request_status", + Title: "Server Stats Request Status", + Units: "status", + Fam: "srv status", + Ctx: "rethinkdb.server_stats_request_status", + Priority: prioServerStatsRequestStatus, + Dims: module.Dims{ + {ID: "server_%s_stats_request_status_success", Name: "success"}, + {ID: "server_%s_stats_request_status_timeout", Name: "timeout"}, + }, + } + serverConnectionsChartTmpl = module.Chart{ + ID: "server_%s_client_connections", + Title: "Server Client Connections", + Units: "connections", + Fam: "srv connections", + Ctx: "rethinkdb.server_client_connections", + Priority: prioServerClientConnections, + Dims: module.Dims{ + {ID: "server_%s_client_connections", Name: "connections"}, + }, + } + serverActiveClientsChartTmpl = module.Chart{ + ID: "server_%s_active_clients", + Title: "Server Active Clients", + Units: "clients", + Fam: "srv clients", + Ctx: "rethinkdb.server_active_clients", + Priority: prioServerActiveClients, + Dims: module.Dims{ + {ID: "server_%s_clients_active", Name: "active"}, + }, + } + serverQueriesChartTmpl = module.Chart{ + ID: "server_%s_queries", + Title: "Server Queries", + Units: "queries/s", + Fam: "srv queries", + Ctx: "rethinkdb.server_queries", + Priority: prioServerQueries, + Dims: module.Dims{ + {ID: "server_%s_queries_total", Name: "queries", Algo: module.Incremental}, + }, + } + serverDocumentsChartTmpl = module.Chart{ + ID: "server_%s_documents", + Title: "Server Documents", + Units: "documents/s", + Fam: "srv documents", + Ctx: "rethinkdb.server_documents", + Priority: prioServerDocuments, + Dims: module.Dims{ + {ID: "server_%s_read_docs_total", Name: "read", Algo: module.Incremental}, + {ID: "server_%s_written_docs_total", Name: "written", Mul: -1, Algo: module.Incremental}, + }, + } +) + +func (r *Rethinkdb) addServerCharts(srvUUID, srvName string) { + charts := serverChartsTmpl.Copy() + + for _, chart := range *charts { + chart.ID = fmt.Sprintf(chart.ID, srvUUID) + chart.Labels = []module.Label{ + {Key: "sever_uuid", Value: srvUUID}, + {Key: "sever_name", Value: srvName}, + } + for _, dim := range chart.Dims { + dim.ID = fmt.Sprintf(dim.ID, srvUUID) + } + } + + if err := r.Charts().Add(*charts...); err != nil { + r.Warningf("failed to add chart for '%s' server: %v", srvName, err) + } +} + +func (r *Rethinkdb) removeServerCharts(srvUUID string) { + px := fmt.Sprintf("server_%s_", srvUUID) + for _, chart := range *r.Charts() { + if strings.HasPrefix(chart.ID, px) { + chart.MarkRemove() + chart.MarkNotCreated() + } + } +} diff --git a/src/go/plugin/go.d/modules/rethinkdb/client.go b/src/go/plugin/go.d/modules/rethinkdb/client.go new file mode 100644 index 00000000000000..d790d5439a22a0 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/client.go @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package rethinkdb + +import ( + "context" + "errors" + "time" + + "gopkg.in/rethinkdb/rethinkdb-go.v6" +) + +type rdbConn interface { + stats() ([][]byte, error) + close() error +} + +func newRethinkdbConn(cfg Config) (rdbConn, error) { + sess, err := rethinkdb.Connect(rethinkdb.ConnectOpts{ + Address: cfg.Address, + Username: cfg.Username, + Password: cfg.Password, + }) + if err != nil { + return nil, err + } + + client := &rethinkdbClient{ + timeout: cfg.Timeout.Duration(), + sess: sess, + } + + return client, nil +} + +type rethinkdbClient struct { + timeout time.Duration + + sess *rethinkdb.Session +} + +func (c *rethinkdbClient) stats() ([][]byte, error) { + ctx, cancel := context.WithTimeout(context.Background(), c.timeout) + defer cancel() + + opts := rethinkdb.RunOpts{Context: ctx} + + cur, err := rethinkdb.DB("rethinkdb").Table("stats").Run(c.sess, opts) + if err != nil { + return nil, err + } + + if cur.IsNil() { + return nil, errors.New("no stats found (cursor is nil)") + } + defer func() { _ = cur.Close() }() + + var stats [][]byte + for { + bs, ok := cur.NextResponse() + if !ok { + break + } + stats = append(stats, bs) + } + + return stats, nil +} + +func (c *rethinkdbClient) close() (err error) { + return c.sess.Close() +} diff --git a/src/go/plugin/go.d/modules/rethinkdb/collect.go b/src/go/plugin/go.d/modules/rethinkdb/collect.go new file mode 100644 index 00000000000000..b24d3649877aac --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/collect.go @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package rethinkdb + +import ( + "encoding/json" + "errors" + "fmt" + + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/stm" +) + +type ( + // https://rethinkdb.com/docs/system-stats/ + serverStats struct { + ID []string `json:"id"` + Server string `json:"server"` + QueryEngine struct { + ClientConnections int64 `json:"client_connections" stm:"client_connections"` + ClientsActive int64 `json:"clients_active" stm:"clients_active"` + QueriesTotal int64 `json:"queries_total" stm:"queries_total"` + ReadDocsTotal int64 `json:"read_docs_total" stm:"read_docs_total"` + WrittenDocsTotal int64 `json:"written_docs_total" stm:"written_docs_total"` + } `json:"query_engine" stm:""` + + Error string `json:"error"` + } +) + +func (r *Rethinkdb) collect() (map[string]int64, error) { + if r.rdb == nil { + conn, err := r.newConn(r.Config) + if err != nil { + return nil, err + } + r.rdb = conn + } + + mx := make(map[string]int64) + + if err := r.collectStats(mx); err != nil { + return nil, err + } + + return mx, nil +} + +func (r *Rethinkdb) collectStats(mx map[string]int64) error { + resp, err := r.rdb.stats() + if err != nil { + return err + } + + if len(resp) == 0 { + return errors.New("empty stats response from server") + } + + for _, v := range []string{ + "cluster_servers_stats_request_success", + "cluster_servers_stats_request_timeout", + "cluster_client_connections", + "cluster_clients_active", + "cluster_queries_total", + "cluster_read_docs_total", + "cluster_written_docs_total", + } { + mx[v] = 0 + } + + seen := make(map[string]bool) + + for _, bs := range resp[1:] { // skip cluster + var srv serverStats + + if err := json.Unmarshal(bs, &srv); err != nil { + return fmt.Errorf("invalid stats response: failed to unmarshal server data: %v", err) + } + if len(srv.ID[0]) == 0 { + return errors.New("invalid stats response: empty id") + } + if srv.ID[0] != "server" { + continue + } + if len(srv.ID) != 2 { + return fmt.Errorf("invalid stats response: unexpected server id: '%v'", srv.ID) + } + + srvUUID := srv.ID[1] + + seen[srvUUID] = true + + if !r.seenServers[srvUUID] { + r.seenServers[srvUUID] = true + r.addServerCharts(srvUUID, srv.Server) + } + + px := fmt.Sprintf("server_%s_", srv.ID[1]) // uuid + + mx[px+"stats_request_status_success"] = 0 + mx[px+"stats_request_status_timeout"] = 0 + if srv.Error != "" { + mx["cluster_servers_stats_request_timed_out"]++ + mx[px+"stats_request_status_timeout"] = 1 + continue + } + mx["cluster_servers_stats_request_success"]++ + mx[px+"stats_request_status_success"] = 1 + + for k, v := range stm.ToMap(srv.QueryEngine) { + mx["cluster_"+k] += v + mx[px+k] = v + } + } + + for k := range r.seenServers { + if !seen[k] { + delete(r.seenServers, k) + r.removeServerCharts(k) + } + } + + return nil +} diff --git a/src/go/plugin/go.d/modules/rethinkdb/config_schema.json b/src/go/plugin/go.d/modules/rethinkdb/config_schema.json new file mode 100644 index 00000000000000..9a84aeca4b27d9 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/config_schema.json @@ -0,0 +1,82 @@ +{ + "jsonSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "RethinkDB collector configuration.", + "type": "object", + "properties": { + "update_every": { + "title": "Update every", + "description": "Data collection interval, measured in seconds.", + "type": "integer", + "minimum": 1, + "default": 1 + }, + "address": { + "title": "Address", + "description": "The IP address and port where the RethinkDB service listens for connections.", + "type": "string", + "default": "127.0.0.1:28015" + }, + "timeout": { + "title": "Timeout", + "description": "Timeout for establishing a connection and communication (reading and writing) in seconds.", + "type": "number", + "minimum": 0.5, + "default": 1 + }, + "username": { + "title": "Username", + "description": "The username for basic authentication.", + "type": "string", + "sensitive": true + }, + "password": { + "title": "Password", + "description": "The password for basic authentication.", + "type": "string", + "sensitive": true + } + }, + "required": [ + "address" + ], + "additionalProperties": false, + "patternProperties": { + "^name$": {} + } + }, + "uiSchema": { + "uiOptions": { + "fullPage": true + }, + "timeout": { + "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)." + }, + "username": { + "ui:widget": "password" + }, + "password": { + "ui:widget": "password" + }, + "ui:flavour": "tabs", + "ui:options": { + "tabs": [ + { + "title": "Base", + "fields": [ + "update_every", + "address", + "timeout" + ] + }, + { + "title": "Auth", + "fields": [ + "username", + "password" + ] + } + ] + } + } +} diff --git a/src/go/plugin/go.d/modules/rethinkdb/metadata.yaml b/src/go/plugin/go.d/modules/rethinkdb/metadata.yaml new file mode 100644 index 00000000000000..057d71a066a5d5 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/metadata.yaml @@ -0,0 +1,198 @@ +plugin_name: go.d.plugin +modules: + - meta: + id: collector-go.d.plugin-rethinkdb + plugin_name: go.d.plugin + module_name: rethinkdb + monitored_instance: + name: RethinkDB + link: https://rethinkdb.com + categories: + - data-collection.database-servers + icon_filename: "rethinkdb.png" + related_resources: + integrations: + list: [] + info_provided_to_referring_integrations: + description: "" + keywords: + - rethinkdb + - database + - db + most_popular: false + overview: + data_collection: + metrics_description: | + It collects cluster-wide metrics such as server status, client connections, active clients, query rate, and document read/write rates. + For each server, it offers similar metrics. + method_description: | + The data is gathered by querying the stats table in RethinkDB, which stores real-time statistics related to the cluster and its individual servers. + supported_platforms: + include: [] + exclude: [] + multi_instance: true + additional_permissions: + description: "" + default_behavior: + auto_detection: + description: | + If no configuration is given, collector will attempt to connect to RethinkDB instance on `127.0.0.1:28015` address. + limits: + description: "" + performance_impact: + description: "" + setup: + prerequisites: + list: [] + configuration: + file: + name: go.d/rethinkdb.conf + options: + description: | + The following options can be defined globally: update_every, autodetection_retry. + folding: + title: Config options + enabled: true + list: + - name: update_every + description: Data collection frequency. + default_value: 1 + required: false + - name: autodetection_retry + description: Recheck interval in seconds. Zero means no recheck will be scheduled. + default_value: 0 + required: false + - name: address + description: The IP address and port where the RethinkDB service listens for connections. + default_value: 127.0.0.1:28015 + required: true + - name: timeout + description: Connection, read, and write timeout duration in seconds. The timeout includes name resolution. + default_value: 1 + required: false + - name: username + description: Username used for authentication. + default_value: "" + required: false + - name: password + description: Password used for authentication. + default_value: "" + required: false + examples: + folding: + title: Config + enabled: true + list: + - name: Basic + description: A basic example configuration. + config: | + jobs: + - name: local + address: 127.0.0.1:28015 + - name: With authentication + description: An example configuration with authentication. + config: | + jobs: + - name: local + address: 127.0.0.1:28015 + username: name + password: pass + - name: Multi-instance + description: | + > **Note**: When you define multiple jobs, their names must be unique. + + Collecting metrics from local and remote instances. + config: | + jobs: + - name: local + address: 127.0.0.1:28015 + + - name: remote + address: 203.0.113.0:28015 + troubleshooting: + problems: + list: [] + alerts: [] + metrics: + folding: + title: Metrics + enabled: false + description: "" + availability: [] + scopes: + - name: global + description: "These metrics refer to the entire monitored application." + labels: [] + metrics: + - name: rethinkdb.cluster_servers_stats_request + description: Cluster Servers Stats Request + unit: "servers" + chart_type: line + dimensions: + - name: success + - name: timeout + - name: rethinkdb.cluster_client_connections + description: Cluster Client Connections + unit: "connections" + chart_type: line + dimensions: + - name: connections + - name: rethinkdb.cluster_active_clients + description: Cluster Active Clients + unit: "clients" + chart_type: line + dimensions: + - name: active + - name: rethinkdb.cluster_queries + description: Cluster Queries + unit: "queries/s" + chart_type: line + dimensions: + - name: queries + - name: rethinkdb.cluster_documents + description: Cluster Documents + unit: "documents/s" + chart_type: line + dimensions: + - name: read + - name: written + - name: server + description: "These metrics refer to the server (cluster member)." + labels: + - name: server_uuid + description: Server UUID. + - name: server_name + description: Server name. + metrics: + - name: rethinkdb.server_stats_request_status + description: Server Stats Request Status + unit: "status" + chart_type: line + dimensions: + - name: success + - name: timeout + - name: rethinkdb.server_client_connections + description: Server Client Connections + unit: "connections" + chart_type: line + dimensions: + - name: connections + - name: rethinkdb.server_active_clients + description: Server Active Clients + unit: "clients" + chart_type: line + dimensions: + - name: active + - name: rethinkdb.server_queries + description: Server Queries + unit: "queries/s" + chart_type: line + dimensions: + - name: queries + - name: rethinkdb.server_documents + description: Server Documents + unit: "documents/s" + chart_type: line + dimensions: + - name: read + - name: written diff --git a/src/go/plugin/go.d/modules/rethinkdb/rethinkdb.go b/src/go/plugin/go.d/modules/rethinkdb/rethinkdb.go new file mode 100644 index 00000000000000..ccde593de8125e --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/rethinkdb.go @@ -0,0 +1,107 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package rethinkdb + +import ( + _ "embed" + "errors" + "time" + + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" +) + +//go:embed "config_schema.json" +var configSchema string + +func init() { + module.Register("rethinkdb", module.Creator{ + JobConfigSchema: configSchema, + Create: func() module.Module { return New() }, + Config: func() any { return &Config{} }, + }) +} + +func New() *Rethinkdb { + return &Rethinkdb{ + Config: Config{ + Address: "127.0.0.1:28015", + Timeout: web.Duration(time.Second * 1), + }, + + charts: clusterCharts.Copy(), + newConn: newRethinkdbConn, + seenServers: make(map[string]bool), + } +} + +type Config struct { + UpdateEvery int `yaml:"update_every,omitempty" json:"update_every"` + Address string `yaml:"address" json:"address"` + Timeout web.Duration `yaml:"timeout,omitempty" json:"timeout"` + Username string `yaml:"username,omitempty" json:"username"` + Password string `yaml:"password,omitempty" json:"password"` +} + +type ( + Rethinkdb struct { + module.Base + Config `yaml:",inline" json:""` + + charts *module.Charts + + newConn func(cfg Config) (rdbConn, error) + rdb rdbConn + + seenServers map[string]bool + } +) + +func (r *Rethinkdb) Configuration() any { + return r.Config +} + +func (r *Rethinkdb) Init() error { + if r.Address == "" { + r.Error("address is not set") + return errors.New("address is not set") + } + return nil +} + +func (r *Rethinkdb) Check() error { + mx, err := r.collect() + if err != nil { + r.Error(err) + return err + } + if len(mx) == 0 { + return errors.New("no metrics collected") + } + return nil +} + +func (r *Rethinkdb) Charts() *module.Charts { + return r.charts +} + +func (r *Rethinkdb) Collect() map[string]int64 { + ms, err := r.collect() + if err != nil { + r.Error(err) + } + + if len(ms) == 0 { + return nil + } + return ms +} + +func (r *Rethinkdb) Cleanup() { + if r.rdb != nil { + if err := r.rdb.close(); err != nil { + r.Warningf("cleanup: error on closing client [%s]: %v", r.Address, err) + } + r.rdb = nil + } +} diff --git a/src/go/plugin/go.d/modules/rethinkdb/rethinkdb_test.go b/src/go/plugin/go.d/modules/rethinkdb/rethinkdb_test.go new file mode 100644 index 00000000000000..8beaad5b025742 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/rethinkdb_test.go @@ -0,0 +1,259 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package rethinkdb + +import ( + "bytes" + "errors" + "fmt" + "os" + "testing" + + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +var ( + dataConfigJSON, _ = os.ReadFile("testdata/config.json") + dataConfigYAML, _ = os.ReadFile("testdata/config.yaml") + + dataStats, _ = os.ReadFile("testdata/v2.4.4/stats.txt") +) + +func Test_testDataIsValid(t *testing.T) { + for name, data := range map[string][]byte{ + "dataConfigJSON": dataConfigJSON, + "dataConfigYAML": dataConfigYAML, + + "dataStats": dataStats, + } { + require.NotNil(t, data, name) + } +} + +func TestRethinkdb_ConfigurationSerialize(t *testing.T) { + module.TestConfigurationSerialize(t, &Rethinkdb{}, dataConfigJSON, dataConfigYAML) +} + +func TestRethinkdb_Init(t *testing.T) { + tests := map[string]struct { + config Config + wantFail bool + }{ + "success with default config": { + wantFail: false, + config: New().Config, + }, + "fails if address not set": { + wantFail: true, + config: func() Config { + conf := New().Config + conf.Address = "" + return conf + }(), + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + rdb := New() + rdb.Config = test.config + + if test.wantFail { + assert.Error(t, rdb.Init()) + } else { + assert.NoError(t, rdb.Init()) + } + }) + } +} + +func TestRethinkdb_Cleanup(t *testing.T) { + tests := map[string]struct { + prepare func() *Rethinkdb + }{ + "not initialized": { + prepare: func() *Rethinkdb { + return New() + }, + }, + "after check": { + prepare: func() *Rethinkdb { + rdb := New() + rdb.newConn = func(config Config) (rdbConn, error) { + return &mockRethinkdbConn{dataStats: dataStats}, nil + } + _ = rdb.Check() + return rdb + }, + }, + "after collect": { + prepare: func() *Rethinkdb { + rdb := New() + rdb.newConn = func(config Config) (rdbConn, error) { + return &mockRethinkdbConn{dataStats: dataStats}, nil + } + _ = rdb.Check() + return rdb + }, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + rdb := test.prepare() + + assert.NotPanics(t, rdb.Cleanup) + }) + } +} + +func TestRethinkdb_Check(t *testing.T) { + tests := map[string]struct { + prepare func() *Rethinkdb + wantFail bool + }{ + "success on valid response": { + wantFail: false, + prepare: prepareCaseOk, + }, + "fails if error on stats": { + wantFail: true, + prepare: prepareCaseErrOnStats, + }, + "fails if error on connect": { + wantFail: true, + prepare: prepareCaseErrOnConnect, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + rdb := test.prepare() + + if test.wantFail { + assert.Error(t, rdb.Check()) + } else { + assert.NoError(t, rdb.Check()) + } + + if m, ok := rdb.rdb.(*mockRethinkdbConn); ok { + assert.False(t, m.disconnectCalled, "rdb close before cleanup") + rdb.Cleanup() + assert.True(t, m.disconnectCalled, "rdb close after cleanup") + } + }) + } +} + +func TestRethinkdb_Collect(t *testing.T) { + tests := map[string]struct { + prepare func() *Rethinkdb + wantMetrics map[string]int64 + wantCharts int + }{ + "success on valid response": { + prepare: prepareCaseOk, + wantCharts: len(clusterCharts) + len(serverChartsTmpl)*2, + wantMetrics: map[string]int64{ + "cluster_client_connections": 3, + "cluster_clients_active": 3, + "cluster_queries_total": 27, + "cluster_read_docs_total": 3, + "cluster_servers_stats_request_success": 2, + "cluster_servers_stats_request_timeout": 0, + "cluster_written_docs_total": 3, + "server_b7730db2-4303-4719-aef8-2a3c339c672b_client_connections": 1, + "server_b7730db2-4303-4719-aef8-2a3c339c672b_clients_active": 1, + "server_b7730db2-4303-4719-aef8-2a3c339c672b_queries_total": 13, + "server_b7730db2-4303-4719-aef8-2a3c339c672b_read_docs_total": 1, + "server_b7730db2-4303-4719-aef8-2a3c339c672b_stats_request_status_success": 1, + "server_b7730db2-4303-4719-aef8-2a3c339c672b_stats_request_status_timeout": 0, + "server_b7730db2-4303-4719-aef8-2a3c339c672b_written_docs_total": 1, + "server_f325e3c3-22d9-4005-b4b2-1f561d384edc_client_connections": 2, + "server_f325e3c3-22d9-4005-b4b2-1f561d384edc_clients_active": 2, + "server_f325e3c3-22d9-4005-b4b2-1f561d384edc_queries_total": 14, + "server_f325e3c3-22d9-4005-b4b2-1f561d384edc_read_docs_total": 2, + "server_f325e3c3-22d9-4005-b4b2-1f561d384edc_stats_request_status_success": 1, + "server_f325e3c3-22d9-4005-b4b2-1f561d384edc_stats_request_status_timeout": 0, + "server_f325e3c3-22d9-4005-b4b2-1f561d384edc_written_docs_total": 2, + }, + }, + "fails if error on stats": { + wantCharts: len(clusterCharts), + prepare: prepareCaseErrOnStats, + }, + "fails if error on connect": { + wantCharts: len(clusterCharts), + prepare: prepareCaseErrOnStats, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + rdb := test.prepare() + + require.NoError(t, rdb.Init()) + + mx := rdb.Collect() + + require.Equal(t, test.wantMetrics, mx) + + assert.Equal(t, test.wantCharts, len(*rdb.Charts())) + + if len(test.wantMetrics) > 0 { + module.TestMetricsHasAllChartsDims(t, rdb.Charts(), mx) + } + + if m, ok := rdb.rdb.(*mockRethinkdbConn); ok { + assert.False(t, m.disconnectCalled, "rdb close before cleanup") + rdb.Cleanup() + assert.True(t, m.disconnectCalled, "rdb close after cleanup") + } + }) + } +} + +func prepareCaseOk() *Rethinkdb { + rdb := New() + rdb.newConn = func(cfg Config) (rdbConn, error) { + return &mockRethinkdbConn{dataStats: dataStats}, nil + } + return rdb +} + +func prepareCaseErrOnStats() *Rethinkdb { + rdb := New() + rdb.newConn = func(cfg Config) (rdbConn, error) { + return &mockRethinkdbConn{errOnStats: true}, nil + } + return rdb +} + +func prepareCaseErrOnConnect() *Rethinkdb { + rdb := New() + rdb.newConn = func(cfg Config) (rdbConn, error) { + return nil, errors.New("mock failed to connect") + } + return rdb +} + +type mockRethinkdbConn struct { + dataStats []byte + errOnStats bool + disconnectCalled bool +} + +func (m *mockRethinkdbConn) stats() ([][]byte, error) { + if m.errOnStats { + return nil, fmt.Errorf("mock.stats() error") + } + return bytes.Split(bytes.TrimSpace(m.dataStats), []byte("\n")), nil +} + +func (m *mockRethinkdbConn) close() error { + m.disconnectCalled = true + return nil +} diff --git a/src/go/plugin/go.d/modules/rethinkdb/testdata/config.json b/src/go/plugin/go.d/modules/rethinkdb/testdata/config.json new file mode 100644 index 00000000000000..47f755ea497bf1 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/testdata/config.json @@ -0,0 +1,7 @@ +{ + "update_every": 123, + "address": "ok", + "timeout": 123.123, + "username": "ok", + "password": "ok" +} diff --git a/src/go/plugin/go.d/modules/rethinkdb/testdata/config.yaml b/src/go/plugin/go.d/modules/rethinkdb/testdata/config.yaml new file mode 100644 index 00000000000000..6857aae7c73206 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/testdata/config.yaml @@ -0,0 +1,5 @@ +update_every: 123 +address: "ok" +timeout: 123.123 +username: "ok" +password: "ok" diff --git a/src/go/plugin/go.d/modules/rethinkdb/testdata/v2.4.4/stats.txt b/src/go/plugin/go.d/modules/rethinkdb/testdata/v2.4.4/stats.txt new file mode 100644 index 00000000000000..a0aa1c8f529e1c --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/testdata/v2.4.4/stats.txt @@ -0,0 +1,3 @@ +{"id":["cluster"],"query_engine":{"client_connections":1,"clients_active":1,"queries_per_sec":1,"read_docs_per_sec":0,"written_docs_per_sec":0}} +{"id":["server","b7730db2-4303-4719-aef8-2a3c339c672b"],"query_engine":{"client_connections":1,"clients_active":1,"queries_per_sec":1,"queries_total":13,"read_docs_per_sec":0,"read_docs_total":1,"written_docs_per_sec":0,"written_docs_total":1},"server":"some_hostname_182"} +{"id":["server","f325e3c3-22d9-4005-b4b2-1f561d384edc"],"query_engine":{"client_connections":2,"clients_active":2,"queries_per_sec":1,"queries_total":14,"read_docs_per_sec":0,"read_docs_total":2,"written_docs_per_sec":0,"written_docs_total":2},"server":"pve_deb_work_183"} From 6d94a51a8015bb0e7c59630408bdec3acd9c49e7 Mon Sep 17 00:00:00 2001 From: Ilya Mashchenko Date: Thu, 8 Aug 2024 21:48:22 +0300 Subject: [PATCH 05/15] remove python.d/rethinkdb (#18277) --- CMakeLists.txt | 2 - src/collectors/python.d.plugin/python.d.conf | 2 +- .../python.d.plugin/rethinkdbs/README.md | 1 - .../rethinkdbs/integrations/rethinkdb.md | 223 ---------------- .../python.d.plugin/rethinkdbs/metadata.yaml | 188 ------------- .../rethinkdbs/rethinkdbs.chart.py | 247 ------------------ .../rethinkdbs/rethinkdbs.conf | 76 ------ 7 files changed, 1 insertion(+), 738 deletions(-) delete mode 120000 src/collectors/python.d.plugin/rethinkdbs/README.md delete mode 100644 src/collectors/python.d.plugin/rethinkdbs/integrations/rethinkdb.md delete mode 100644 src/collectors/python.d.plugin/rethinkdbs/metadata.yaml delete mode 100644 src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.chart.py delete mode 100644 src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a0ef5cc355203..44ea1e40acdc1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2793,7 +2793,6 @@ install(FILES src/collectors/python.d.plugin/openldap/openldap.conf src/collectors/python.d.plugin/oracledb/oracledb.conf src/collectors/python.d.plugin/pandas/pandas.conf - src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.conf src/collectors/python.d.plugin/retroshare/retroshare.conf src/collectors/python.d.plugin/riakkv/riakkv.conf src/collectors/python.d.plugin/samba/samba.conf @@ -2827,7 +2826,6 @@ install(FILES src/collectors/python.d.plugin/openldap/openldap.chart.py src/collectors/python.d.plugin/oracledb/oracledb.chart.py src/collectors/python.d.plugin/pandas/pandas.chart.py - src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.chart.py src/collectors/python.d.plugin/retroshare/retroshare.chart.py src/collectors/python.d.plugin/riakkv/riakkv.chart.py src/collectors/python.d.plugin/samba/samba.chart.py diff --git a/src/collectors/python.d.plugin/python.d.conf b/src/collectors/python.d.plugin/python.d.conf index c4386ead4b9a8e..719b4de71c2996 100644 --- a/src/collectors/python.d.plugin/python.d.conf +++ b/src/collectors/python.d.plugin/python.d.conf @@ -44,7 +44,6 @@ go_expvar: no # openldap: yes # oracledb: yes # pandas: yes -# rethinkdbs: yes # retroshare: yes # riakkv: yes # samba: yes @@ -80,6 +79,7 @@ postfix: no # Removed (replaced with go.d/postfix). postgres: no # Removed (replaced with go.d/postgres). proxysql: no # Removed (replaced with go.d/proxysql). redis: no # Removed (replaced with go.d/redis). +rethinkdbs: no # Removed (replaced with go.d/rethinkdb). sensors: no # Removed (replaced with go.d/sensors). tomcat: no # Removed (replaced with go.d/tomcat) puppet: no # Removed (replaced with go.d/puppet). diff --git a/src/collectors/python.d.plugin/rethinkdbs/README.md b/src/collectors/python.d.plugin/rethinkdbs/README.md deleted file mode 120000 index 78ddcfa18e2c66..00000000000000 --- a/src/collectors/python.d.plugin/rethinkdbs/README.md +++ /dev/null @@ -1 +0,0 @@ -integrations/rethinkdb.md \ No newline at end of file diff --git a/src/collectors/python.d.plugin/rethinkdbs/integrations/rethinkdb.md b/src/collectors/python.d.plugin/rethinkdbs/integrations/rethinkdb.md deleted file mode 100644 index f8d8847187faf1..00000000000000 --- a/src/collectors/python.d.plugin/rethinkdbs/integrations/rethinkdb.md +++ /dev/null @@ -1,223 +0,0 @@ - - -# RethinkDB - - - - - -Plugin: python.d.plugin -Module: rethinkdbs - - - -## Overview - -This collector monitors metrics about RethinkDB clusters and database servers. - -It uses the `rethinkdb` python module to connect to a RethinkDB server instance and gather statistics. - -This collector is supported on all platforms. - -This collector supports collecting metrics from multiple instances of this integration, including remote instances. - - -### Default Behavior - -#### Auto-Detection - -When no configuration file is found, the collector tries to connect to 127.0.0.1:28015. - -#### Limits - -The default configuration for this integration does not impose any limits on data collection. - -#### Performance Impact - -The default configuration for this integration is not expected to impose a significant performance impact on the system. - - -## Metrics - -Metrics grouped by *scope*. - -The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. - - - -### Per RethinkDB instance - -These metrics refer to the entire monitored application. - -This scope has no labels. - -Metrics: - -| Metric | Dimensions | Unit | -|:------|:----------|:----| -| rethinkdb.cluster_connected_servers | connected, missing | servers | -| rethinkdb.cluster_clients_active | active | clients | -| rethinkdb.cluster_queries | queries | queries/s | -| rethinkdb.cluster_documents | reads, writes | documents/s | - -### Per database server - - - -This scope has no labels. - -Metrics: - -| Metric | Dimensions | Unit | -|:------|:----------|:----| -| rethinkdb.client_connections | connections | connections | -| rethinkdb.clients_active | active | clients | -| rethinkdb.queries | queries | queries/s | -| rethinkdb.documents | reads, writes | documents/s | - - - -## Alerts - -There are no alerts configured by default for this integration. - - -## Setup - -### Prerequisites - -#### Required python module - -The collector requires the `rethinkdb` python module to be installed. - - -### Configuration - -#### File - -The configuration file name for this integration is `python.d/rethinkdbs.conf`. - - -You can edit the configuration file using the `edit-config` script from the -Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). - -```bash -cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata -sudo ./edit-config python.d/rethinkdbs.conf -``` -#### Options - -There are 2 sections: - -* Global variables -* One or more JOBS that can define multiple different instances to monitor. - -The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. - -Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. - -Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. - - -
Config options - -| Name | Description | Default | Required | -|:----|:-----------|:-------|:--------:| -| update_every | Sets the default data collection frequency. | 5 | no | -| priority | Controls the order of charts at the netdata dashboard. | 60000 | no | -| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no | -| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no | -| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | | no | -| host | Hostname or ip of the RethinkDB server. | localhost | no | -| port | Port to connect to the RethinkDB server. | 28015 | no | -| user | The username to use to connect to the RethinkDB server. | admin | no | -| password | The password to use to connect to the RethinkDB server. | | no | -| timeout | Set a connect timeout to the RethinkDB server. | 2 | no | - -
- -#### Examples - -##### Local RethinkDB server - -An example of a configuration for a local RethinkDB server - -```yaml -localhost: - name: 'local' - host: '127.0.0.1' - port: 28015 - user: "user" - password: "pass" - -``` - - -## Troubleshooting - -### Debug Mode - -To troubleshoot issues with the `rethinkdbs` collector, run the `python.d.plugin` with the debug option enabled. The output -should give you clues as to why the collector isn't working. - -- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on - your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. - - ```bash - cd /usr/libexec/netdata/plugins.d/ - ``` - -- Switch to the `netdata` user. - - ```bash - sudo -u netdata -s - ``` - -- Run the `python.d.plugin` to debug the collector: - - ```bash - ./python.d.plugin rethinkdbs debug trace - ``` - -### Getting Logs - -If you're encountering problems with the `rethinkdbs` collector, follow these steps to retrieve logs and identify potential issues: - -- **Run the command** specific to your system (systemd, non-systemd, or Docker container). -- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem. - -#### System with systemd - -Use the following command to view logs generated since the last Netdata service restart: - -```bash -journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep rethinkdbs -``` - -#### System without systemd - -Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name: - -```bash -grep rethinkdbs /var/log/netdata/collector.log -``` - -**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues. - -#### Docker Container - -If your Netdata runs in a Docker container named "netdata" (replace if different), use this command: - -```bash -docker logs netdata 2>&1 | grep rethinkdbs -``` - - diff --git a/src/collectors/python.d.plugin/rethinkdbs/metadata.yaml b/src/collectors/python.d.plugin/rethinkdbs/metadata.yaml deleted file mode 100644 index bbc50eac66c839..00000000000000 --- a/src/collectors/python.d.plugin/rethinkdbs/metadata.yaml +++ /dev/null @@ -1,188 +0,0 @@ -plugin_name: python.d.plugin -modules: - - meta: - plugin_name: python.d.plugin - module_name: rethinkdbs - monitored_instance: - name: RethinkDB - link: 'https://rethinkdb.com/' - categories: - - data-collection.database-servers - icon_filename: 'rethinkdb.png' - related_resources: - integrations: - list: [] - info_provided_to_referring_integrations: - description: '' - keywords: - - rethinkdb - - database - - db - most_popular: false - overview: - data_collection: - metrics_description: 'This collector monitors metrics about RethinkDB clusters and database servers.' - method_description: 'It uses the `rethinkdb` python module to connect to a RethinkDB server instance and gather statistics.' - supported_platforms: - include: [] - exclude: [] - multi_instance: true - additional_permissions: - description: '' - default_behavior: - auto_detection: - description: 'When no configuration file is found, the collector tries to connect to 127.0.0.1:28015.' - limits: - description: '' - performance_impact: - description: '' - setup: - prerequisites: - list: - - title: 'Required python module' - description: 'The collector requires the `rethinkdb` python module to be installed.' - configuration: - file: - name: python.d/rethinkdbs.conf - options: - description: | - There are 2 sections: - - * Global variables - * One or more JOBS that can define multiple different instances to monitor. - - The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. - - Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. - - Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. - folding: - title: "Config options" - enabled: true - list: - - name: update_every - description: Sets the default data collection frequency. - default_value: 5 - required: false - - name: priority - description: Controls the order of charts at the netdata dashboard. - default_value: 60000 - required: false - - name: autodetection_retry - description: Sets the job re-check interval in seconds. - default_value: 0 - required: false - - name: penalty - description: Indicates whether to apply penalty to update_every in case of failures. - default_value: yes - required: false - - name: name - description: Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. - default_value: '' - required: false - - name: host - description: Hostname or ip of the RethinkDB server. - default_value: 'localhost' - required: false - - name: port - description: Port to connect to the RethinkDB server. - default_value: '28015' - required: false - - name: user - description: The username to use to connect to the RethinkDB server. - default_value: 'admin' - required: false - - name: password - description: The password to use to connect to the RethinkDB server. - default_value: '' - required: false - - name: timeout - description: Set a connect timeout to the RethinkDB server. - default_value: '2' - required: false - examples: - folding: - enabled: false - title: "Config" - list: - - name: Local RethinkDB server - description: An example of a configuration for a local RethinkDB server - folding: - enabled: false - config: | - localhost: - name: 'local' - host: '127.0.0.1' - port: 28015 - user: "user" - password: "pass" - troubleshooting: - problems: - list: [] - alerts: [] - metrics: - folding: - title: Metrics - enabled: false - description: "" - availability: [] - scopes: - - name: global - description: "These metrics refer to the entire monitored application." - labels: [] - metrics: - - name: rethinkdb.cluster_connected_servers - description: Connected Servers - unit: "servers" - chart_type: stacked - dimensions: - - name: connected - - name: missing - - name: rethinkdb.cluster_clients_active - description: Active Clients - unit: "clients" - chart_type: line - dimensions: - - name: active - - name: rethinkdb.cluster_queries - description: Queries - unit: "queries/s" - chart_type: line - dimensions: - - name: queries - - name: rethinkdb.cluster_documents - description: Documents - unit: "documents/s" - chart_type: line - dimensions: - - name: reads - - name: writes - - name: database server - description: "" - labels: [] - metrics: - - name: rethinkdb.client_connections - description: Client Connections - unit: "connections" - chart_type: line - dimensions: - - name: connections - - name: rethinkdb.clients_active - description: Active Clients - unit: "clients" - chart_type: line - dimensions: - - name: active - - name: rethinkdb.queries - description: Queries - unit: "queries/s" - chart_type: line - dimensions: - - name: queries - - name: rethinkdb.documents - description: Documents - unit: "documents/s" - chart_type: line - dimensions: - - name: reads - - name: writes diff --git a/src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.chart.py b/src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.chart.py deleted file mode 100644 index e3fbc3632a4fbe..00000000000000 --- a/src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.chart.py +++ /dev/null @@ -1,247 +0,0 @@ -# -*- coding: utf-8 -*- -# Description: rethinkdb netdata python.d module -# Author: Ilya Mashchenko (ilyam8) -# SPDX-License-Identifier: GPL-3.0-or-later - -try: - import rethinkdb as rdb - - HAS_RETHINKDB = True -except ImportError: - HAS_RETHINKDB = False - -from bases.FrameworkServices.SimpleService import SimpleService - -ORDER = [ - 'cluster_connected_servers', - 'cluster_clients_active', - 'cluster_queries', - 'cluster_documents', -] - - -def cluster_charts(): - return { - 'cluster_connected_servers': { - 'options': [None, 'Connected Servers', 'servers', 'cluster', 'rethinkdb.cluster_connected_servers', - 'stacked'], - 'lines': [ - ['cluster_servers_connected', 'connected'], - ['cluster_servers_missing', 'missing'], - ] - }, - 'cluster_clients_active': { - 'options': [None, 'Active Clients', 'clients', 'cluster', 'rethinkdb.cluster_clients_active', - 'line'], - 'lines': [ - ['cluster_clients_active', 'active'], - ] - }, - 'cluster_queries': { - 'options': [None, 'Queries', 'queries/s', 'cluster', 'rethinkdb.cluster_queries', 'line'], - 'lines': [ - ['cluster_queries_per_sec', 'queries'], - ] - }, - 'cluster_documents': { - 'options': [None, 'Documents', 'documents/s', 'cluster', 'rethinkdb.cluster_documents', 'line'], - 'lines': [ - ['cluster_read_docs_per_sec', 'reads'], - ['cluster_written_docs_per_sec', 'writes'], - ] - }, - } - - -def server_charts(n): - o = [ - '{0}_client_connections'.format(n), - '{0}_clients_active'.format(n), - '{0}_queries'.format(n), - '{0}_documents'.format(n), - ] - f = 'server {0}'.format(n) - - c = { - o[0]: { - 'options': [None, 'Client Connections', 'connections', f, 'rethinkdb.client_connections', 'line'], - 'lines': [ - ['{0}_client_connections'.format(n), 'connections'], - ] - }, - o[1]: { - 'options': [None, 'Active Clients', 'clients', f, 'rethinkdb.clients_active', 'line'], - 'lines': [ - ['{0}_clients_active'.format(n), 'active'], - ] - }, - o[2]: { - 'options': [None, 'Queries', 'queries/s', f, 'rethinkdb.queries', 'line'], - 'lines': [ - ['{0}_queries_total'.format(n), 'queries', 'incremental'], - ] - }, - o[3]: { - 'options': [None, 'Documents', 'documents/s', f, 'rethinkdb.documents', 'line'], - 'lines': [ - ['{0}_read_docs_total'.format(n), 'reads', 'incremental'], - ['{0}_written_docs_total'.format(n), 'writes', 'incremental'], - ] - }, - } - - return o, c - - -class Cluster: - def __init__(self, raw): - self.raw = raw - - def data(self): - qe = self.raw['query_engine'] - - return { - 'cluster_clients_active': qe['clients_active'], - 'cluster_queries_per_sec': qe['queries_per_sec'], - 'cluster_read_docs_per_sec': qe['read_docs_per_sec'], - 'cluster_written_docs_per_sec': qe['written_docs_per_sec'], - 'cluster_servers_connected': 0, - 'cluster_servers_missing': 0, - } - - -class Server: - def __init__(self, raw): - self.name = raw['server'] - self.raw = raw - - def error(self): - return self.raw.get('error') - - def data(self): - qe = self.raw['query_engine'] - - d = { - 'client_connections': qe['client_connections'], - 'clients_active': qe['clients_active'], - 'queries_total': qe['queries_total'], - 'read_docs_total': qe['read_docs_total'], - 'written_docs_total': qe['written_docs_total'], - } - - return dict(('{0}_{1}'.format(self.name, k), d[k]) for k in d) - - -# https://pypi.org/project/rethinkdb/2.4.0/ -# rdb.RethinkDB() can be used as rdb drop in replacement. -# https://github.com/rethinkdb/rethinkdb-python#quickstart -def get_rethinkdb(): - if hasattr(rdb, 'RethinkDB'): - return rdb.RethinkDB() - return rdb - - -class Service(SimpleService): - def __init__(self, configuration=None, name=None): - SimpleService.__init__(self, configuration=configuration, name=name) - self.order = list(ORDER) - self.definitions = cluster_charts() - self.host = self.configuration.get('host', '127.0.0.1') - self.port = self.configuration.get('port', 28015) - self.user = self.configuration.get('user', 'admin') - self.password = self.configuration.get('password') - self.timeout = self.configuration.get('timeout', 2) - self.rdb = None - self.conn = None - self.alive = True - - def check(self): - if not HAS_RETHINKDB: - self.error('"rethinkdb" module is needed to use rethinkdbs.py') - return False - - self.debug("rethinkdb driver version {0}".format(rdb.__version__)) - self.rdb = get_rethinkdb() - - if not self.connect(): - return None - - stats = self.get_stats() - - if not stats: - return None - - for v in stats[1:]: - if get_id(v) == 'server': - o, c = server_charts(v['server']) - self.order.extend(o) - self.definitions.update(c) - - return True - - def get_data(self): - if not self.is_alive(): - return None - - stats = self.get_stats() - - if not stats: - return None - - data = dict() - - # cluster - data.update(Cluster(stats[0]).data()) - - # servers - for v in stats[1:]: - if get_id(v) != 'server': - continue - - s = Server(v) - - if s.error(): - data['cluster_servers_missing'] += 1 - else: - data['cluster_servers_connected'] += 1 - data.update(s.data()) - - return data - - def get_stats(self): - try: - return list(self.rdb.db('rethinkdb').table('stats').run(self.conn).items) - except rdb.errors.ReqlError: - self.alive = False - return None - - def connect(self): - try: - self.conn = self.rdb.connect( - host=self.host, - port=self.port, - user=self.user, - password=self.password, - timeout=self.timeout, - ) - self.alive = True - return True - except rdb.errors.ReqlError as error: - self.error('Connection to {0}:{1} failed: {2}'.format(self.host, self.port, error)) - return False - - def reconnect(self): - # The connection is already closed after rdb.errors.ReqlError, - # so we do not need to call conn.close() - if self.connect(): - return True - return False - - def is_alive(self): - if not self.alive: - return self.reconnect() - return True - - -def get_id(v): - return v['id'][0] diff --git a/src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.conf b/src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.conf deleted file mode 100644 index d671acbb060b93..00000000000000 --- a/src/collectors/python.d.plugin/rethinkdbs/rethinkdbs.conf +++ /dev/null @@ -1,76 +0,0 @@ -# netdata python.d.plugin configuration for rethinkdb -# -# This file is in YaML format. Generally the format is: -# -# name: value -# -# There are 2 sections: -# - global variables -# - one or more JOBS -# -# JOBS allow you to collect values from multiple sources. -# Each source will have its own set of charts. -# -# JOB parameters have to be indented (using spaces only, example below). - -# ---------------------------------------------------------------------- -# Global Variables -# These variables set the defaults for all JOBs, however each JOB -# may define its own, overriding the defaults. - -# update_every sets the default data collection frequency. -# If unset, the python.d.plugin default is used. -# update_every: 1 - -# priority controls the order of charts at the netdata dashboard. -# Lower numbers move the charts towards the top of the page. -# If unset, the default for python.d.plugin is used. -# priority: 60000 - -# penalty indicates whether to apply penalty to update_every in case of failures. -# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes. -# penalty: yes - -# autodetection_retry sets the job re-check interval in seconds. -# The job is not deleted if check fails. -# Attempts to start the job are made once every autodetection_retry. -# This feature is disabled by default. -# autodetection_retry: 0 - -# ---------------------------------------------------------------------- -# JOBS (data collection sources) -# -# The default JOBS share the same *name*. JOBS with the same name -# are mutually exclusive. Only one of them will be allowed running at -# any time. This allows autodetection to try several alternatives and -# pick the one that works. -# -# Any number of jobs is supported. -# -# All python.d.plugin JOBS (for all its modules) support a set of -# predefined parameters. These are: -# -# job_name: -# name: myname # the JOB's name as it will appear at the -# # dashboard (by default is the job_name) -# # JOBs sharing a name are mutually exclusive -# update_every: 1 # the JOB's data collection frequency -# priority: 60000 # the JOB's order on the dashboard -# penalty: yes # the JOB's penalty -# autodetection_retry: 0 # the JOB's re-check interval in seconds -# -# Additionally to the above, rethinkdb also supports the following: -# -# host: IP or HOSTNAME # default is 'localhost' -# port: PORT # default is 28015 -# user: USERNAME # default is 'admin' -# password: PASSWORD # not set by default -# timeout: TIMEOUT # default is 2 - -# ---------------------------------------------------------------------- -# AUTO-DETECTION JOBS -# only one of them will run (they have the same name) - -local: - name: 'local' - host: 'localhost' From f6b17c45d9faaef30a16574c9d5ce83b26dba211 Mon Sep 17 00:00:00 2001 From: Netdata bot <43409846+netdatabot@users.noreply.github.com> Date: Thu, 8 Aug 2024 14:55:10 -0400 Subject: [PATCH 06/15] Regenerate integrations.js (#18280) Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com> --- integrations/integrations.js | 75 +++--- integrations/integrations.json | 75 +++--- src/collectors/COLLECTORS.md | 2 +- .../plugin/go.d/modules/rethinkdb/README.md | 1 + .../rethinkdb/integrations/rethinkdb.md | 255 ++++++++++++++++++ 5 files changed, 333 insertions(+), 75 deletions(-) create mode 120000 src/go/plugin/go.d/modules/rethinkdb/README.md create mode 100644 src/go/plugin/go.d/modules/rethinkdb/integrations/rethinkdb.md diff --git a/integrations/integrations.js b/integrations/integrations.js index eb0b961b1ec97e..a798c766ac3fe0 100644 --- a/integrations/integrations.js +++ b/integrations/integrations.js @@ -16059,6 +16059,44 @@ export const integrations = [ "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/redis/metadata.yaml", "related_resources": "" }, + { + "meta": { + "id": "collector-go.d.plugin-rethinkdb", + "plugin_name": "go.d.plugin", + "module_name": "rethinkdb", + "monitored_instance": { + "name": "RethinkDB", + "link": "https://rethinkdb.com", + "categories": [ + "data-collection.database-servers" + ], + "icon_filename": "rethinkdb.png" + }, + "related_resources": { + "integrations": { + "list": [] + } + }, + "info_provided_to_referring_integrations": { + "description": "" + }, + "keywords": [ + "rethinkdb", + "database", + "db" + ], + "most_popular": false + }, + "overview": "# RethinkDB\n\nPlugin: go.d.plugin\nModule: rethinkdb\n\n## Overview\n\nIt collects cluster-wide metrics such as server status, client connections, active clients, query rate, and document read/write rates.\nFor each server, it offers similar metrics.\n\n\nThe data is gathered by querying the stats table in RethinkDB, which stores real-time statistics related to the cluster and its individual servers.\n\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nIf no configuration is given, collector will attempt to connect to RethinkDB instance on `127.0.0.1:28015` address.\n\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", + "setup": "## Setup\n\n### Prerequisites\n\nNo action required.\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `go.d/rethinkdb.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/rethinkdb.conf\n```\n#### Options\n\nThe following options can be defined globally: update_every, autodetection_retry.\n\n\n{% details open=true summary=\"Config options\" %}\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Data collection frequency. | 1 | no |\n| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |\n| address | The IP address and port where the RethinkDB service listens for connections. | 127.0.0.1:28015 | yes |\n| timeout | Connection, read, and write timeout duration in seconds. The timeout includes name resolution. | 1 | no |\n| username | Username used for authentication. | | no |\n| password | Password used for authentication. | | no |\n\n{% /details %}\n#### Examples\n\n##### Basic\n\nA basic example configuration.\n\n{% details open=true summary=\"Config\" %}\n```yaml\njobs:\n - name: local\n address: 127.0.0.1:28015\n\n```\n{% /details %}\n##### With authentication\n\nAn example configuration with authentication.\n\n{% details open=true summary=\"Config\" %}\n```yaml\njobs:\n - name: local\n address: 127.0.0.1:28015\n username: name\n password: pass\n\n```\n{% /details %}\n##### Multi-instance\n\n> **Note**: When you define multiple jobs, their names must be unique.\n\nCollecting metrics from local and remote instances.\n\n\n{% details open=true summary=\"Config\" %}\n```yaml\njobs:\n - name: local\n address: 127.0.0.1:28015\n\n - name: remote\n address: 203.0.113.0:28015\n\n```\n{% /details %}\n", + "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `rethinkdb` collector, run the `go.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `go.d.plugin` to debug the collector:\n\n ```bash\n ./go.d.plugin -d -m rethinkdb\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `rethinkdb` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep rethinkdb\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep rethinkdb /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep rethinkdb\n```\n\n", + "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", + "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per RethinkDB instance\n\nThese metrics refer to the entire monitored application.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.cluster_servers_stats_request | success, timeout | servers |\n| rethinkdb.cluster_client_connections | connections | connections |\n| rethinkdb.cluster_active_clients | active | clients |\n| rethinkdb.cluster_queries | queries | queries/s |\n| rethinkdb.cluster_documents | read, written | documents/s |\n\n### Per server\n\nThese metrics refer to the server (cluster member).\n\nLabels:\n\n| Label | Description |\n|:-----------|:----------------|\n| server_uuid | Server UUID. |\n| server_name | Server name. |\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.server_stats_request_status | success, timeout | status |\n| rethinkdb.server_client_connections | connections | connections |\n| rethinkdb.server_active_clients | active | clients |\n| rethinkdb.server_queries | queries | queries/s |\n| rethinkdb.server_documents | read, written | documents/s |\n\n", + "integration_type": "collector", + "id": "go.d.plugin-rethinkdb-RethinkDB", + "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/rethinkdb/metadata.yaml", + "related_resources": "" + }, { "meta": { "id": "collector-go.d.plugin-rspamd", @@ -19175,43 +19213,6 @@ export const integrations = [ "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/pandas/metadata.yaml", "related_resources": "" }, - { - "meta": { - "plugin_name": "python.d.plugin", - "module_name": "rethinkdbs", - "monitored_instance": { - "name": "RethinkDB", - "link": "https://rethinkdb.com/", - "categories": [ - "data-collection.database-servers" - ], - "icon_filename": "rethinkdb.png" - }, - "related_resources": { - "integrations": { - "list": [] - } - }, - "info_provided_to_referring_integrations": { - "description": "" - }, - "keywords": [ - "rethinkdb", - "database", - "db" - ], - "most_popular": false - }, - "overview": "# RethinkDB\n\nPlugin: python.d.plugin\nModule: rethinkdbs\n\n## Overview\n\nThis collector monitors metrics about RethinkDB clusters and database servers.\n\nIt uses the `rethinkdb` python module to connect to a RethinkDB server instance and gather statistics.\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nWhen no configuration file is found, the collector tries to connect to 127.0.0.1:28015.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", - "setup": "## Setup\n\n### Prerequisites\n\n#### Required python module\n\nThe collector requires the `rethinkdb` python module to be installed.\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `python.d/rethinkdbs.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config python.d/rethinkdbs.conf\n```\n#### Options\n\nThere are 2 sections:\n\n* Global variables\n* One or more JOBS that can define multiple different instances to monitor.\n\nThe following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.\n\nAdditionally, the following collapsed table contains all the options that can be configured inside a JOB definition.\n\nEvery configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.\n\n\n{% details open=true summary=\"Config options\" %}\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Sets the default data collection frequency. | 5 | no |\n| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |\n| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |\n| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |\n| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | | no |\n| host | Hostname or ip of the RethinkDB server. | localhost | no |\n| port | Port to connect to the RethinkDB server. | 28015 | no |\n| user | The username to use to connect to the RethinkDB server. | admin | no |\n| password | The password to use to connect to the RethinkDB server. | | no |\n| timeout | Set a connect timeout to the RethinkDB server. | 2 | no |\n\n{% /details %}\n#### Examples\n\n##### Local RethinkDB server\n\nAn example of a configuration for a local RethinkDB server\n\n```yaml\nlocalhost:\n name: 'local'\n host: '127.0.0.1'\n port: 28015\n user: \"user\"\n password: \"pass\"\n\n```\n", - "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `rethinkdbs` collector, run the `python.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `python.d.plugin` to debug the collector:\n\n ```bash\n ./python.d.plugin rethinkdbs debug trace\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `rethinkdbs` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep rethinkdbs\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep rethinkdbs /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep rethinkdbs\n```\n\n", - "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", - "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per RethinkDB instance\n\nThese metrics refer to the entire monitored application.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.cluster_connected_servers | connected, missing | servers |\n| rethinkdb.cluster_clients_active | active | clients |\n| rethinkdb.cluster_queries | queries | queries/s |\n| rethinkdb.cluster_documents | reads, writes | documents/s |\n\n### Per database server\n\n\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.client_connections | connections | connections |\n| rethinkdb.clients_active | active | clients |\n| rethinkdb.queries | queries | queries/s |\n| rethinkdb.documents | reads, writes | documents/s |\n\n", - "integration_type": "collector", - "id": "python.d.plugin-rethinkdbs-RethinkDB", - "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/rethinkdbs/metadata.yaml", - "related_resources": "" - }, { "meta": { "plugin_name": "python.d.plugin", diff --git a/integrations/integrations.json b/integrations/integrations.json index ed564dcfb53957..fcd7e9fdb0ea0f 100644 --- a/integrations/integrations.json +++ b/integrations/integrations.json @@ -16057,6 +16057,44 @@ "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/redis/metadata.yaml", "related_resources": "" }, + { + "meta": { + "id": "collector-go.d.plugin-rethinkdb", + "plugin_name": "go.d.plugin", + "module_name": "rethinkdb", + "monitored_instance": { + "name": "RethinkDB", + "link": "https://rethinkdb.com", + "categories": [ + "data-collection.database-servers" + ], + "icon_filename": "rethinkdb.png" + }, + "related_resources": { + "integrations": { + "list": [] + } + }, + "info_provided_to_referring_integrations": { + "description": "" + }, + "keywords": [ + "rethinkdb", + "database", + "db" + ], + "most_popular": false + }, + "overview": "# RethinkDB\n\nPlugin: go.d.plugin\nModule: rethinkdb\n\n## Overview\n\nIt collects cluster-wide metrics such as server status, client connections, active clients, query rate, and document read/write rates.\nFor each server, it offers similar metrics.\n\n\nThe data is gathered by querying the stats table in RethinkDB, which stores real-time statistics related to the cluster and its individual servers.\n\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nIf no configuration is given, collector will attempt to connect to RethinkDB instance on `127.0.0.1:28015` address.\n\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", + "setup": "## Setup\n\n### Prerequisites\n\nNo action required.\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `go.d/rethinkdb.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/rethinkdb.conf\n```\n#### Options\n\nThe following options can be defined globally: update_every, autodetection_retry.\n\n\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Data collection frequency. | 1 | no |\n| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |\n| address | The IP address and port where the RethinkDB service listens for connections. | 127.0.0.1:28015 | yes |\n| timeout | Connection, read, and write timeout duration in seconds. The timeout includes name resolution. | 1 | no |\n| username | Username used for authentication. | | no |\n| password | Password used for authentication. | | no |\n\n#### Examples\n\n##### Basic\n\nA basic example configuration.\n\n```yaml\njobs:\n - name: local\n address: 127.0.0.1:28015\n\n```\n##### With authentication\n\nAn example configuration with authentication.\n\n```yaml\njobs:\n - name: local\n address: 127.0.0.1:28015\n username: name\n password: pass\n\n```\n##### Multi-instance\n\n> **Note**: When you define multiple jobs, their names must be unique.\n\nCollecting metrics from local and remote instances.\n\n\n```yaml\njobs:\n - name: local\n address: 127.0.0.1:28015\n\n - name: remote\n address: 203.0.113.0:28015\n\n```\n", + "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `rethinkdb` collector, run the `go.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `go.d.plugin` to debug the collector:\n\n ```bash\n ./go.d.plugin -d -m rethinkdb\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `rethinkdb` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep rethinkdb\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep rethinkdb /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep rethinkdb\n```\n\n", + "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", + "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per RethinkDB instance\n\nThese metrics refer to the entire monitored application.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.cluster_servers_stats_request | success, timeout | servers |\n| rethinkdb.cluster_client_connections | connections | connections |\n| rethinkdb.cluster_active_clients | active | clients |\n| rethinkdb.cluster_queries | queries | queries/s |\n| rethinkdb.cluster_documents | read, written | documents/s |\n\n### Per server\n\nThese metrics refer to the server (cluster member).\n\nLabels:\n\n| Label | Description |\n|:-----------|:----------------|\n| server_uuid | Server UUID. |\n| server_name | Server name. |\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.server_stats_request_status | success, timeout | status |\n| rethinkdb.server_client_connections | connections | connections |\n| rethinkdb.server_active_clients | active | clients |\n| rethinkdb.server_queries | queries | queries/s |\n| rethinkdb.server_documents | read, written | documents/s |\n\n", + "integration_type": "collector", + "id": "go.d.plugin-rethinkdb-RethinkDB", + "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/rethinkdb/metadata.yaml", + "related_resources": "" + }, { "meta": { "id": "collector-go.d.plugin-rspamd", @@ -19173,43 +19211,6 @@ "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/pandas/metadata.yaml", "related_resources": "" }, - { - "meta": { - "plugin_name": "python.d.plugin", - "module_name": "rethinkdbs", - "monitored_instance": { - "name": "RethinkDB", - "link": "https://rethinkdb.com/", - "categories": [ - "data-collection.database-servers" - ], - "icon_filename": "rethinkdb.png" - }, - "related_resources": { - "integrations": { - "list": [] - } - }, - "info_provided_to_referring_integrations": { - "description": "" - }, - "keywords": [ - "rethinkdb", - "database", - "db" - ], - "most_popular": false - }, - "overview": "# RethinkDB\n\nPlugin: python.d.plugin\nModule: rethinkdbs\n\n## Overview\n\nThis collector monitors metrics about RethinkDB clusters and database servers.\n\nIt uses the `rethinkdb` python module to connect to a RethinkDB server instance and gather statistics.\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nWhen no configuration file is found, the collector tries to connect to 127.0.0.1:28015.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", - "setup": "## Setup\n\n### Prerequisites\n\n#### Required python module\n\nThe collector requires the `rethinkdb` python module to be installed.\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `python.d/rethinkdbs.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config python.d/rethinkdbs.conf\n```\n#### Options\n\nThere are 2 sections:\n\n* Global variables\n* One or more JOBS that can define multiple different instances to monitor.\n\nThe following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.\n\nAdditionally, the following collapsed table contains all the options that can be configured inside a JOB definition.\n\nEvery configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.\n\n\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Sets the default data collection frequency. | 5 | no |\n| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |\n| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |\n| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |\n| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | | no |\n| host | Hostname or ip of the RethinkDB server. | localhost | no |\n| port | Port to connect to the RethinkDB server. | 28015 | no |\n| user | The username to use to connect to the RethinkDB server. | admin | no |\n| password | The password to use to connect to the RethinkDB server. | | no |\n| timeout | Set a connect timeout to the RethinkDB server. | 2 | no |\n\n#### Examples\n\n##### Local RethinkDB server\n\nAn example of a configuration for a local RethinkDB server\n\n```yaml\nlocalhost:\n name: 'local'\n host: '127.0.0.1'\n port: 28015\n user: \"user\"\n password: \"pass\"\n\n```\n", - "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `rethinkdbs` collector, run the `python.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `python.d.plugin` to debug the collector:\n\n ```bash\n ./python.d.plugin rethinkdbs debug trace\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `rethinkdbs` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep rethinkdbs\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep rethinkdbs /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep rethinkdbs\n```\n\n", - "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", - "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per RethinkDB instance\n\nThese metrics refer to the entire monitored application.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.cluster_connected_servers | connected, missing | servers |\n| rethinkdb.cluster_clients_active | active | clients |\n| rethinkdb.cluster_queries | queries | queries/s |\n| rethinkdb.cluster_documents | reads, writes | documents/s |\n\n### Per database server\n\n\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| rethinkdb.client_connections | connections | connections |\n| rethinkdb.clients_active | active | clients |\n| rethinkdb.queries | queries | queries/s |\n| rethinkdb.documents | reads, writes | documents/s |\n\n", - "integration_type": "collector", - "id": "python.d.plugin-rethinkdbs-RethinkDB", - "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/rethinkdbs/metadata.yaml", - "related_resources": "" - }, { "meta": { "plugin_name": "python.d.plugin", diff --git a/src/collectors/COLLECTORS.md b/src/collectors/COLLECTORS.md index a5e5cde93ec988..90a7a130f26d39 100644 --- a/src/collectors/COLLECTORS.md +++ b/src/collectors/COLLECTORS.md @@ -267,7 +267,7 @@ If you don't see the app/service you'd like to monitor in this list: - [Redis](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/redis/integrations/redis.md) -- [RethinkDB](https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/rethinkdbs/integrations/rethinkdb.md) +- [RethinkDB](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/rethinkdb/integrations/rethinkdb.md) - [RiakKV](https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/riakkv/integrations/riakkv.md) diff --git a/src/go/plugin/go.d/modules/rethinkdb/README.md b/src/go/plugin/go.d/modules/rethinkdb/README.md new file mode 120000 index 00000000000000..78ddcfa18e2c66 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/README.md @@ -0,0 +1 @@ +integrations/rethinkdb.md \ No newline at end of file diff --git a/src/go/plugin/go.d/modules/rethinkdb/integrations/rethinkdb.md b/src/go/plugin/go.d/modules/rethinkdb/integrations/rethinkdb.md new file mode 100644 index 00000000000000..2f973ccbadc104 --- /dev/null +++ b/src/go/plugin/go.d/modules/rethinkdb/integrations/rethinkdb.md @@ -0,0 +1,255 @@ + + +# RethinkDB + + + + + +Plugin: go.d.plugin +Module: rethinkdb + + + +## Overview + +It collects cluster-wide metrics such as server status, client connections, active clients, query rate, and document read/write rates. +For each server, it offers similar metrics. + + +The data is gathered by querying the stats table in RethinkDB, which stores real-time statistics related to the cluster and its individual servers. + + +This collector is supported on all platforms. + +This collector supports collecting metrics from multiple instances of this integration, including remote instances. + + +### Default Behavior + +#### Auto-Detection + +If no configuration is given, collector will attempt to connect to RethinkDB instance on `127.0.0.1:28015` address. + + +#### Limits + +The default configuration for this integration does not impose any limits on data collection. + +#### Performance Impact + +The default configuration for this integration is not expected to impose a significant performance impact on the system. + + +## Metrics + +Metrics grouped by *scope*. + +The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. + + + +### Per RethinkDB instance + +These metrics refer to the entire monitored application. + +This scope has no labels. + +Metrics: + +| Metric | Dimensions | Unit | +|:------|:----------|:----| +| rethinkdb.cluster_servers_stats_request | success, timeout | servers | +| rethinkdb.cluster_client_connections | connections | connections | +| rethinkdb.cluster_active_clients | active | clients | +| rethinkdb.cluster_queries | queries | queries/s | +| rethinkdb.cluster_documents | read, written | documents/s | + +### Per server + +These metrics refer to the server (cluster member). + +Labels: + +| Label | Description | +|:-----------|:----------------| +| server_uuid | Server UUID. | +| server_name | Server name. | + +Metrics: + +| Metric | Dimensions | Unit | +|:------|:----------|:----| +| rethinkdb.server_stats_request_status | success, timeout | status | +| rethinkdb.server_client_connections | connections | connections | +| rethinkdb.server_active_clients | active | clients | +| rethinkdb.server_queries | queries | queries/s | +| rethinkdb.server_documents | read, written | documents/s | + + + +## Alerts + +There are no alerts configured by default for this integration. + + +## Setup + +### Prerequisites + +No action required. + +### Configuration + +#### File + +The configuration file name for this integration is `go.d/rethinkdb.conf`. + + +You can edit the configuration file using the `edit-config` script from the +Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). + +```bash +cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata +sudo ./edit-config go.d/rethinkdb.conf +``` +#### Options + +The following options can be defined globally: update_every, autodetection_retry. + + +
Config options + +| Name | Description | Default | Required | +|:----|:-----------|:-------|:--------:| +| update_every | Data collection frequency. | 1 | no | +| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | +| address | The IP address and port where the RethinkDB service listens for connections. | 127.0.0.1:28015 | yes | +| timeout | Connection, read, and write timeout duration in seconds. The timeout includes name resolution. | 1 | no | +| username | Username used for authentication. | | no | +| password | Password used for authentication. | | no | + +
+ +#### Examples + +##### Basic + +A basic example configuration. + +
Config + +```yaml +jobs: + - name: local + address: 127.0.0.1:28015 + +``` +
+ +##### With authentication + +An example configuration with authentication. + +
Config + +```yaml +jobs: + - name: local + address: 127.0.0.1:28015 + username: name + password: pass + +``` +
+ +##### Multi-instance + +> **Note**: When you define multiple jobs, their names must be unique. + +Collecting metrics from local and remote instances. + + +
Config + +```yaml +jobs: + - name: local + address: 127.0.0.1:28015 + + - name: remote + address: 203.0.113.0:28015 + +``` +
+ + + +## Troubleshooting + +### Debug Mode + +To troubleshoot issues with the `rethinkdb` collector, run the `go.d.plugin` with the debug option enabled. The output +should give you clues as to why the collector isn't working. + +- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on + your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. + + ```bash + cd /usr/libexec/netdata/plugins.d/ + ``` + +- Switch to the `netdata` user. + + ```bash + sudo -u netdata -s + ``` + +- Run the `go.d.plugin` to debug the collector: + + ```bash + ./go.d.plugin -d -m rethinkdb + ``` + +### Getting Logs + +If you're encountering problems with the `rethinkdb` collector, follow these steps to retrieve logs and identify potential issues: + +- **Run the command** specific to your system (systemd, non-systemd, or Docker container). +- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem. + +#### System with systemd + +Use the following command to view logs generated since the last Netdata service restart: + +```bash +journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep rethinkdb +``` + +#### System without systemd + +Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name: + +```bash +grep rethinkdb /var/log/netdata/collector.log +``` + +**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues. + +#### Docker Container + +If your Netdata runs in a Docker container named "netdata" (replace if different), use this command: + +```bash +docker logs netdata 2>&1 | grep rethinkdb +``` + + From c4940f3e752a8dc273f8c707cd84ac7917329938 Mon Sep 17 00:00:00 2001 From: Fotis Voutsas Date: Thu, 8 Aug 2024 22:49:34 +0300 Subject: [PATCH 07/15] inital commit for Go squid (#18279) --- CMakeLists.txt | 2 - src/collectors/python.d.plugin/python.d.conf | 2 +- .../python.d.plugin/squid/README.md | 1 - .../squid/integrations/squid.md | 232 ------------------ .../python.d.plugin/squid/metadata.yaml | 174 ------------- .../python.d.plugin/squid/squid.chart.py | 123 ---------- .../python.d.plugin/squid/squid.conf | 167 ------------- 7 files changed, 1 insertion(+), 700 deletions(-) delete mode 120000 src/collectors/python.d.plugin/squid/README.md delete mode 100644 src/collectors/python.d.plugin/squid/integrations/squid.md delete mode 100644 src/collectors/python.d.plugin/squid/metadata.yaml delete mode 100644 src/collectors/python.d.plugin/squid/squid.chart.py delete mode 100644 src/collectors/python.d.plugin/squid/squid.conf diff --git a/CMakeLists.txt b/CMakeLists.txt index 44ea1e40acdc1e..e10db7f3ed8652 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2797,7 +2797,6 @@ install(FILES src/collectors/python.d.plugin/riakkv/riakkv.conf src/collectors/python.d.plugin/samba/samba.conf src/collectors/python.d.plugin/spigotmc/spigotmc.conf - src/collectors/python.d.plugin/squid/squid.conf src/collectors/python.d.plugin/tor/tor.conf src/collectors/python.d.plugin/traefik/traefik.conf src/collectors/python.d.plugin/uwsgi/uwsgi.conf @@ -2830,7 +2829,6 @@ install(FILES src/collectors/python.d.plugin/riakkv/riakkv.chart.py src/collectors/python.d.plugin/samba/samba.chart.py src/collectors/python.d.plugin/spigotmc/spigotmc.chart.py - src/collectors/python.d.plugin/squid/squid.chart.py src/collectors/python.d.plugin/tor/tor.chart.py src/collectors/python.d.plugin/traefik/traefik.chart.py src/collectors/python.d.plugin/uwsgi/uwsgi.chart.py diff --git a/src/collectors/python.d.plugin/python.d.conf b/src/collectors/python.d.plugin/python.d.conf index 719b4de71c2996..947afc438394c7 100644 --- a/src/collectors/python.d.plugin/python.d.conf +++ b/src/collectors/python.d.plugin/python.d.conf @@ -49,7 +49,6 @@ go_expvar: no # samba: yes # smartd_log: yes # spigotmc: yes -# squid: yes # traefik: yes # tor: yes # uwsgi: yes @@ -81,5 +80,6 @@ proxysql: no # Removed (replaced with go.d/proxysql). redis: no # Removed (replaced with go.d/redis). rethinkdbs: no # Removed (replaced with go.d/rethinkdb). sensors: no # Removed (replaced with go.d/sensors). +squid: no # Removed (replaced with go.d/squid). tomcat: no # Removed (replaced with go.d/tomcat) puppet: no # Removed (replaced with go.d/puppet). diff --git a/src/collectors/python.d.plugin/squid/README.md b/src/collectors/python.d.plugin/squid/README.md deleted file mode 120000 index c4e5a03d773053..00000000000000 --- a/src/collectors/python.d.plugin/squid/README.md +++ /dev/null @@ -1 +0,0 @@ -integrations/squid.md \ No newline at end of file diff --git a/src/collectors/python.d.plugin/squid/integrations/squid.md b/src/collectors/python.d.plugin/squid/integrations/squid.md deleted file mode 100644 index 3270c9627a6ed9..00000000000000 --- a/src/collectors/python.d.plugin/squid/integrations/squid.md +++ /dev/null @@ -1,232 +0,0 @@ - - -# Squid - - - - - -Plugin: python.d.plugin -Module: squid - - - -## Overview - -This collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests. - - -It collects metrics from the endpoint where Squid exposes its `counters` data. - -This collector is supported on all platforms. - -This collector supports collecting metrics from multiple instances of this integration, including remote instances. - - -### Default Behavior - -#### Auto-Detection - -By default, this collector will try to autodetect where Squid presents its `counters` data, by trying various configurations. - -#### Limits - -The default configuration for this integration does not impose any limits on data collection. - -#### Performance Impact - -The default configuration for this integration is not expected to impose a significant performance impact on the system. - - -## Metrics - -Metrics grouped by *scope*. - -The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. - - - -### Per Squid instance - -These metrics refer to each monitored Squid instance. - -This scope has no labels. - -Metrics: - -| Metric | Dimensions | Unit | -|:------|:----------|:----| -| squid.clients_net | in, out, hits | kilobits/s | -| squid.clients_requests | requests, hits, errors | requests/s | -| squid.servers_net | in, out | kilobits/s | -| squid.servers_requests | requests, errors | requests/s | - - - -## Alerts - -There are no alerts configured by default for this integration. - - -## Setup - -### Prerequisites - -#### Configure Squid's Cache Manager - -Take a look at [Squid's official documentation](https://wiki.squid-cache.org/Features/CacheManager/Index#controlling-access-to-the-cache-manager) on how to configure access to the Cache Manager. - - - -### Configuration - -#### File - -The configuration file name for this integration is `python.d/squid.conf`. - - -You can edit the configuration file using the `edit-config` script from the -Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). - -```bash -cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata -sudo ./edit-config python.d/squid.conf -``` -#### Options - -There are 2 sections: - -* Global variables -* One or more JOBS that can define multiple different instances to monitor. - -The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. - -Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. - -Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. - - -
Config options - -| Name | Description | Default | Required | -|:----|:-----------|:-------|:--------:| -| update_every | Sets the default data collection frequency. | 1 | no | -| priority | Controls the order of charts at the netdata dashboard. | 60000 | no | -| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no | -| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no | -| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | local | no | -| host | The host to connect to. | | yes | -| port | The port to connect to. | | yes | -| request | The URL to request from Squid. | | yes | - -
- -#### Examples - -##### Basic - -A basic configuration example. - -```yaml -example_job_name: - name: 'local' - host: 'localhost' - port: 3128 - request: 'cache_object://localhost:3128/counters' - -``` -##### Multi-instance - -> **Note**: When you define multiple jobs, their names must be unique. - -Collecting metrics from local and remote instances. - - -
Config - -```yaml -local_job: - name: 'local' - host: '127.0.0.1' - port: 3128 - request: 'cache_object://127.0.0.1:3128/counters' - -remote_job: - name: 'remote' - host: '192.0.2.1' - port: 3128 - request: 'cache_object://192.0.2.1:3128/counters' - -``` -
- - - -## Troubleshooting - -### Debug Mode - -To troubleshoot issues with the `squid` collector, run the `python.d.plugin` with the debug option enabled. The output -should give you clues as to why the collector isn't working. - -- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on - your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. - - ```bash - cd /usr/libexec/netdata/plugins.d/ - ``` - -- Switch to the `netdata` user. - - ```bash - sudo -u netdata -s - ``` - -- Run the `python.d.plugin` to debug the collector: - - ```bash - ./python.d.plugin squid debug trace - ``` - -### Getting Logs - -If you're encountering problems with the `squid` collector, follow these steps to retrieve logs and identify potential issues: - -- **Run the command** specific to your system (systemd, non-systemd, or Docker container). -- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem. - -#### System with systemd - -Use the following command to view logs generated since the last Netdata service restart: - -```bash -journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep squid -``` - -#### System without systemd - -Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name: - -```bash -grep squid /var/log/netdata/collector.log -``` - -**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues. - -#### Docker Container - -If your Netdata runs in a Docker container named "netdata" (replace if different), use this command: - -```bash -docker logs netdata 2>&1 | grep squid -``` - - diff --git a/src/collectors/python.d.plugin/squid/metadata.yaml b/src/collectors/python.d.plugin/squid/metadata.yaml deleted file mode 100644 index d0c5b3ecc81453..00000000000000 --- a/src/collectors/python.d.plugin/squid/metadata.yaml +++ /dev/null @@ -1,174 +0,0 @@ -plugin_name: python.d.plugin -modules: - - meta: - plugin_name: python.d.plugin - module_name: squid - monitored_instance: - name: Squid - link: "http://www.squid-cache.org/" - categories: - - data-collection.web-servers-and-web-proxies - icon_filename: "squid.png" - related_resources: - integrations: - list: [] - info_provided_to_referring_integrations: - description: "" - keywords: - - squid - - web delivery - - squid caching proxy - most_popular: false - overview: - data_collection: - metrics_description: | - This collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests. - method_description: "It collects metrics from the endpoint where Squid exposes its `counters` data." - supported_platforms: - include: [] - exclude: [] - multi_instance: true - additional_permissions: - description: "" - default_behavior: - auto_detection: - description: "By default, this collector will try to autodetect where Squid presents its `counters` data, by trying various configurations." - limits: - description: "" - performance_impact: - description: "" - setup: - prerequisites: - list: - - title: Configure Squid's Cache Manager - description: | - Take a look at [Squid's official documentation](https://wiki.squid-cache.org/Features/CacheManager/Index#controlling-access-to-the-cache-manager) on how to configure access to the Cache Manager. - configuration: - file: - name: "python.d/squid.conf" - options: - description: | - There are 2 sections: - - * Global variables - * One or more JOBS that can define multiple different instances to monitor. - - The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values. - - Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition. - - Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified. - folding: - title: "Config options" - enabled: true - list: - - name: update_every - description: Sets the default data collection frequency. - default_value: 1 - required: false - - name: priority - description: Controls the order of charts at the netdata dashboard. - default_value: 60000 - required: false - - name: autodetection_retry - description: Sets the job re-check interval in seconds. - default_value: 0 - required: false - - name: penalty - description: Indicates whether to apply penalty to update_every in case of failures. - default_value: yes - required: false - - name: name - description: > - Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. - default_value: "local" - required: false - - name: host - description: The host to connect to. - default_value: "" - required: true - - name: port - description: The port to connect to. - default_value: "" - required: true - - name: request - description: The URL to request from Squid. - default_value: "" - required: true - examples: - folding: - enabled: true - title: "Config" - list: - - name: Basic - description: A basic configuration example. - folding: - enabled: false - config: | - example_job_name: - name: 'local' - host: 'localhost' - port: 3128 - request: 'cache_object://localhost:3128/counters' - - name: Multi-instance - description: | - > **Note**: When you define multiple jobs, their names must be unique. - - Collecting metrics from local and remote instances. - config: | - local_job: - name: 'local' - host: '127.0.0.1' - port: 3128 - request: 'cache_object://127.0.0.1:3128/counters' - - remote_job: - name: 'remote' - host: '192.0.2.1' - port: 3128 - request: 'cache_object://192.0.2.1:3128/counters' - troubleshooting: - problems: - list: [] - alerts: [] - metrics: - folding: - title: Metrics - enabled: false - description: "" - availability: [] - scopes: - - name: Squid instance - description: "These metrics refer to each monitored Squid instance." - labels: [] - metrics: - - name: squid.clients_net - description: Squid Client Bandwidth - unit: "kilobits/s" - chart_type: area - dimensions: - - name: in - - name: out - - name: hits - - name: squid.clients_requests - description: Squid Client Requests - unit: "requests/s" - chart_type: line - dimensions: - - name: requests - - name: hits - - name: errors - - name: squid.servers_net - description: Squid Server Bandwidth - unit: "kilobits/s" - chart_type: area - dimensions: - - name: in - - name: out - - name: squid.servers_requests - description: Squid Server Requests - unit: "requests/s" - chart_type: line - dimensions: - - name: requests - - name: errors diff --git a/src/collectors/python.d.plugin/squid/squid.chart.py b/src/collectors/python.d.plugin/squid/squid.chart.py deleted file mode 100644 index bcae2d8922ed2b..00000000000000 --- a/src/collectors/python.d.plugin/squid/squid.chart.py +++ /dev/null @@ -1,123 +0,0 @@ -# -*- coding: utf-8 -*- -# Description: squid netdata python.d module -# Author: Pawel Krupa (paulfantom) -# SPDX-License-Identifier: GPL-3.0-or-later - -from bases.FrameworkServices.SocketService import SocketService - -ORDER = [ - 'clients_net', - 'clients_requests', - 'servers_net', - 'servers_requests', -] - -CHARTS = { - 'clients_net': { - 'options': [None, 'Squid Client Bandwidth', 'kilobits/s', 'clients', 'squid.clients_net', 'area'], - 'lines': [ - ['client_http_kbytes_in', 'in', 'incremental', 8, 1], - ['client_http_kbytes_out', 'out', 'incremental', -8, 1], - ['client_http_hit_kbytes_out', 'hits', 'incremental', -8, 1] - ] - }, - 'clients_requests': { - 'options': [None, 'Squid Client Requests', 'requests/s', 'clients', 'squid.clients_requests', 'line'], - 'lines': [ - ['client_http_requests', 'requests', 'incremental'], - ['client_http_hits', 'hits', 'incremental'], - ['client_http_errors', 'errors', 'incremental', -1, 1] - ] - }, - 'servers_net': { - 'options': [None, 'Squid Server Bandwidth', 'kilobits/s', 'servers', 'squid.servers_net', 'area'], - 'lines': [ - ['server_all_kbytes_in', 'in', 'incremental', 8, 1], - ['server_all_kbytes_out', 'out', 'incremental', -8, 1] - ] - }, - 'servers_requests': { - 'options': [None, 'Squid Server Requests', 'requests/s', 'servers', 'squid.servers_requests', 'line'], - 'lines': [ - ['server_all_requests', 'requests', 'incremental'], - ['server_all_errors', 'errors', 'incremental', -1, 1] - ] - } -} - - -class Service(SocketService): - def __init__(self, configuration=None, name=None): - SocketService.__init__(self, configuration=configuration, name=name) - self._keep_alive = True - self.request = '' - self.host = 'localhost' - self.port = 3128 - self.order = ORDER - self.definitions = CHARTS - - def _get_data(self): - """ - Get data via http request - :return: dict - """ - response = self._get_raw_data() - - data = dict() - try: - raw = '' - for tmp in response.split('\r\n'): - if tmp.startswith('sample_time'): - raw = tmp - break - - if raw.startswith('<'): - self.error('invalid data received') - return None - - for row in raw.split('\n'): - if row.startswith(('client', 'server.all')): - tmp = row.split('=') - data[tmp[0].replace('.', '_').strip(' ')] = int(tmp[1]) - - except (ValueError, AttributeError, TypeError): - self.error('invalid data received') - return None - - if not data: - self.error('no data received') - return None - return data - - def _check_raw_data(self, data): - header = data[:1024].lower() - - if 'connection: keep-alive' in header: - self._keep_alive = True - else: - self._keep_alive = False - - if data[-7:] == '\r\n0\r\n\r\n' and 'transfer-encoding: chunked' in header: # HTTP/1.1 response - self.debug('received full response from squid') - return True - - self.debug('waiting more data from squid') - return False - - def check(self): - """ - Parse essential configuration, autodetect squid configuration (if needed), and check if data is available - :return: boolean - """ - self._parse_config() - # format request - req = self.request.decode() - if not req.startswith('GET'): - req = 'GET ' + req - if not req.endswith(' HTTP/1.1\r\n\r\n'): - req += ' HTTP/1.1\r\n\r\n' - self.request = req.encode() - if self._get_data() is not None: - return True - else: - return False diff --git a/src/collectors/python.d.plugin/squid/squid.conf b/src/collectors/python.d.plugin/squid/squid.conf deleted file mode 100644 index b90a52c0cf621d..00000000000000 --- a/src/collectors/python.d.plugin/squid/squid.conf +++ /dev/null @@ -1,167 +0,0 @@ -# netdata python.d.plugin configuration for squid -# -# This file is in YaML format. Generally the format is: -# -# name: value -# -# There are 2 sections: -# - global variables -# - one or more JOBS -# -# JOBS allow you to collect values from multiple sources. -# Each source will have its own set of charts. -# -# JOB parameters have to be indented (using spaces only, example below). - -# ---------------------------------------------------------------------- -# Global Variables -# These variables set the defaults for all JOBs, however each JOB -# may define its own, overriding the defaults. - -# update_every sets the default data collection frequency. -# If unset, the python.d.plugin default is used. -# update_every: 1 - -# priority controls the order of charts at the netdata dashboard. -# Lower numbers move the charts towards the top of the page. -# If unset, the default for python.d.plugin is used. -# priority: 60000 - -# penalty indicates whether to apply penalty to update_every in case of failures. -# Penalty will increase every 5 failed updates in a row. Maximum penalty is 10 minutes. -# penalty: yes - -# autodetection_retry sets the job re-check interval in seconds. -# The job is not deleted if check fails. -# Attempts to start the job are made once every autodetection_retry. -# This feature is disabled by default. -# autodetection_retry: 0 - -# ---------------------------------------------------------------------- -# JOBS (data collection sources) -# -# The default JOBS share the same *name*. JOBS with the same name -# are mutually exclusive. Only one of them will be allowed running at -# any time. This allows autodetection to try several alternatives and -# pick the one that works. -# -# Any number of jobs is supported. -# -# All python.d.plugin JOBS (for all its modules) support a set of -# predefined parameters. These are: -# -# job_name: -# name: myname # the JOB's name as it will appear at the -# # dashboard (by default is the job_name) -# # JOBs sharing a name are mutually exclusive -# update_every: 1 # the JOB's data collection frequency -# priority: 60000 # the JOB's order on the dashboard -# penalty: yes # the JOB's penalty -# autodetection_retry: 0 # the JOB's re-check interval in seconds -# -# Additionally to the above, squid also supports the following: -# -# host : 'IP or HOSTNAME' # the host to connect to -# port : PORT # the port to connect to -# request: 'URL' # the URL to request from squid -# - -# ---------------------------------------------------------------------- -# SQUID CONFIGURATION -# -# See: -# http://wiki.squid-cache.org/Features/CacheManager -# -# In short, add to your squid configuration these: -# -# http_access allow localhost manager -# http_access deny manager -# -# To remotely monitor a squid: -# -# acl managerAdmin src 192.0.2.1 -# http_access allow localhost manager -# http_access allow managerAdmin manager -# http_access deny manager -# - -# ---------------------------------------------------------------------- -# AUTO-DETECTION JOBS -# only one of them will run (they have the same name) - -tcp3128old: - name : 'local' - host : 'localhost' - port : 3128 - request : 'cache_object://localhost:3128/counters' - -tcp8080old: - name : 'local' - host : 'localhost' - port : 8080 - request : 'cache_object://localhost:3128/counters' - -tcp3128new: - name : 'local' - host : 'localhost' - port : 3128 - request : '/squid-internal-mgr/counters' - -tcp8080new: - name : 'local' - host : 'localhost' - port : 8080 - request : '/squid-internal-mgr/counters' - -# IPv4 - -tcp3128oldipv4: - name : 'local' - host : '127.0.0.1' - port : 3128 - request : 'cache_object://127.0.0.1:3128/counters' - -tcp8080oldipv4: - name : 'local' - host : '127.0.0.1' - port : 8080 - request : 'cache_object://127.0.0.1:3128/counters' - -tcp3128newipv4: - name : 'local' - host : '127.0.0.1' - port : 3128 - request : '/squid-internal-mgr/counters' - -tcp8080newipv4: - name : 'local' - host : '127.0.0.1' - port : 8080 - request : '/squid-internal-mgr/counters' - -# IPv6 - -tcp3128oldipv6: - name : 'local' - host : '::1' - port : 3128 - request : 'cache_object://[::1]:3128/counters' - -tcp8080oldipv6: - name : 'local' - host : '::1' - port : 8080 - request : 'cache_object://[::1]:3128/counters' - -tcp3128newipv6: - name : 'local' - host : '::1' - port : 3128 - request : '/squid-internal-mgr/counters' - -tcp8080newipv6: - name : 'local' - host : '::1' - port : 8080 - request : '/squid-internal-mgr/counters' - From de7689e0dfebff5a940f1fa2deb44731d73fad79 Mon Sep 17 00:00:00 2001 From: Fotis Voutsas Date: Thu, 8 Aug 2024 23:05:47 +0300 Subject: [PATCH 08/15] Squid collector port to Go (#18276) Co-authored-by: ilyam8 --- src/go/plugin/go.d/README.md | 1 + src/go/plugin/go.d/config/go.d.conf | 1 + src/go/plugin/go.d/config/go.d/sd/docker.conf | 7 + .../go.d/config/go.d/sd/net_listeners.conf | 7 + src/go/plugin/go.d/config/go.d/squid.conf | 6 + src/go/plugin/go.d/modules/init.go | 1 + src/go/plugin/go.d/modules/squid/charts.go | 81 +++++++ src/go/plugin/go.d/modules/squid/collect.go | 105 +++++++++ .../go.d/modules/squid/config_schema.json | 177 ++++++++++++++ .../plugin/go.d/modules/squid/metadata.yaml | 195 +++++++++++++++ src/go/plugin/go.d/modules/squid/squid.go | 114 +++++++++ .../plugin/go.d/modules/squid/squid_test.go | 223 ++++++++++++++++++ .../go.d/modules/squid/testdata/config.json | 20 ++ .../go.d/modules/squid/testdata/config.yaml | 17 ++ .../go.d/modules/squid/testdata/counters.txt | 59 +++++ 15 files changed, 1014 insertions(+) create mode 100644 src/go/plugin/go.d/config/go.d/squid.conf create mode 100644 src/go/plugin/go.d/modules/squid/charts.go create mode 100644 src/go/plugin/go.d/modules/squid/collect.go create mode 100644 src/go/plugin/go.d/modules/squid/config_schema.json create mode 100644 src/go/plugin/go.d/modules/squid/metadata.yaml create mode 100644 src/go/plugin/go.d/modules/squid/squid.go create mode 100644 src/go/plugin/go.d/modules/squid/squid_test.go create mode 100644 src/go/plugin/go.d/modules/squid/testdata/config.json create mode 100644 src/go/plugin/go.d/modules/squid/testdata/config.yaml create mode 100644 src/go/plugin/go.d/modules/squid/testdata/counters.txt diff --git a/src/go/plugin/go.d/README.md b/src/go/plugin/go.d/README.md index 5f367d8a8b9183..8abc7870f3a8a7 100644 --- a/src/go/plugin/go.d/README.md +++ b/src/go/plugin/go.d/README.md @@ -128,6 +128,7 @@ see the appropriate collector readme. | [scaleio](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/scaleio) | Dell EMC ScaleIO | | [sensors](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/sensors) | Hardware Sensors | | [SNMP](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/snmp) | SNMP | +| [squid](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/squid) | Squid | | [squidlog](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/squidlog) | Squid | | [smartctl](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/smartctl) | S.M.A.R.T Storage Devices | | [storcli](https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/storcli) | Broadcom Hardware RAID | diff --git a/src/go/plugin/go.d/config/go.d.conf b/src/go/plugin/go.d/config/go.d.conf index 7aa25d5655ff01..67671b4862864b 100644 --- a/src/go/plugin/go.d/config/go.d.conf +++ b/src/go/plugin/go.d/config/go.d.conf @@ -92,6 +92,7 @@ modules: # scaleio: yes # sensors: yes # snmp: yes +# squid: yes # squidlog: yes # smartctl: yes # storcli: yes diff --git a/src/go/plugin/go.d/config/go.d/sd/docker.conf b/src/go/plugin/go.d/config/go.d/sd/docker.conf index 9a15f6155bd0ea..f91abbb4a22277 100644 --- a/src/go/plugin/go.d/config/go.d/sd/docker.conf +++ b/src/go/plugin/go.d/config/go.d/sd/docker.conf @@ -68,6 +68,8 @@ classify: expr: '{{ or (eq .PrivatePort "6379") (match "sp" .Image "redis redis:* */redis */redis:*") }}' - tags: "rethinkdb" expr: '{{ and (eq .PrivatePort "28015") (match "sp" .Image "rethinkdb rethinkdb:* */rethinkdb */rethinkdb:*") }}' + - tags: "squid" + expr: '{{ match "sp" .Image "*/squid */squid:*" }}' - tags: "tengine" expr: '{{ match "sp" .Image "*/tengine */tengine:*" }}' - tags: "tomcat" @@ -212,6 +214,11 @@ compose: module: redis name: docker_{{.Name}} address: redis://@{{.Address}} + - selector: "squid" + template: | + module: squid + name: docker_{{.Name}} + url: http://{{.Address}} - selector: "tengine" template: | module: tengine diff --git a/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf b/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf index 89857c6d0cd372..437d5721557a2d 100644 --- a/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf +++ b/src/go/plugin/go.d/config/go.d/sd/net_listeners.conf @@ -108,6 +108,8 @@ classify: expr: '{{ and (eq .Port "28015") (eq .Comm "rethinkdb") }}' - tags: "rspamd" expr: '{{ and (eq .Port "11334") (eq .Comm "rspamd") }}' + - tags: "squid" + expr: '{{ and (eq .Port "3128") (eq .Comm "squid") }}' - tags: "supervisord" expr: '{{ and (eq .Port "9001") (eq .Comm "supervisord") }}' - tags: "tomcat" @@ -423,6 +425,11 @@ compose: module: redis name: local address: redis://@{{.Address}} + - selector: "squid" + template: | + module: squid + name: local + url: http://{{.Address}} - selector: "supervisord" template: | module: supervisord diff --git a/src/go/plugin/go.d/config/go.d/squid.conf b/src/go/plugin/go.d/config/go.d/squid.conf new file mode 100644 index 00000000000000..21c711d38c674e --- /dev/null +++ b/src/go/plugin/go.d/config/go.d/squid.conf @@ -0,0 +1,6 @@ +## All available configuration options, their descriptions and default values: +## https://github.com/netdata/netdata/tree/master/src/go/plugin/go.d/modules/squid#readme + +#jobs: +# - name: local +# url: http://localhost:3128 diff --git a/src/go/plugin/go.d/modules/init.go b/src/go/plugin/go.d/modules/init.go index 935a13d743c140..ecc142d330d225 100644 --- a/src/go/plugin/go.d/modules/init.go +++ b/src/go/plugin/go.d/modules/init.go @@ -85,6 +85,7 @@ import ( _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/sensors" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/smartctl" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/snmp" + _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/squid" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/squidlog" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/storcli" _ "github.com/netdata/netdata/go/plugins/plugin/go.d/modules/supervisord" diff --git a/src/go/plugin/go.d/modules/squid/charts.go b/src/go/plugin/go.d/modules/squid/charts.go new file mode 100644 index 00000000000000..47bab60f48a623 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/charts.go @@ -0,0 +1,81 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package squid + +import ( + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" +) + +const ( + prioClientsNet = module.Priority + iota + prioClientsRequests + prioServersNet + prioServersRequests +) + +var charts = module.Charts{ + clientsNetChart.Copy(), + clientsRequestsChart.Copy(), + serversNetChart.Copy(), + serversRequestsChart.Copy(), +} + +var ( + clientsNetChart = module.Chart{ + ID: "clients_net", + Title: "Squid Client Bandwidth", + Units: "kilobits/s", + Fam: "clients", + Ctx: "squid.clients_net", + Type: module.Area, + Priority: prioClientsNet, + Dims: module.Dims{ + {ID: "client_http.kbytes_in", Name: "in", Algo: module.Incremental, Mul: 8}, + {ID: "client_http.kbytes_out", Name: "out", Algo: module.Incremental, Mul: -8}, + {ID: "client_http.hit_kbytes_out", Name: "hits", Algo: module.Incremental, Mul: -8}, + }, + } + + clientsRequestsChart = module.Chart{ + ID: "clients_requests", + Title: "Squid Client Requests", + Units: "requests/s", + Fam: "clients", + Ctx: "squid.clients_requests", + Type: module.Line, + Priority: prioClientsRequests, + Dims: module.Dims{ + {ID: "client_http.requests", Name: "requests", Algo: module.Incremental}, + {ID: "client_http.hits", Name: "hits", Algo: module.Incremental}, + {ID: "client_http.errors", Name: "errors", Algo: module.Incremental, Mul: -1}, + }, + } + + serversNetChart = module.Chart{ + ID: "servers_net", + Title: "Squid Server Bandwidth", + Units: "kilobits/s", + Fam: "servers", + Ctx: "squid.servers_net", + Type: module.Area, + Priority: prioServersNet, + Dims: module.Dims{ + {ID: "server.all.kbytes_in", Name: "in", Algo: module.Incremental, Mul: 8}, + {ID: "server.all.kbytes_out", Name: "out", Algo: module.Incremental, Mul: -8}, + }, + } + + serversRequestsChart = module.Chart{ + ID: "servers_requests", + Title: "Squid Server Requests", + Units: "requests/s", + Fam: "servers", + Ctx: "squid.servers_requests", + Type: module.Line, + Priority: prioServersRequests, + Dims: module.Dims{ + {ID: "server.all.requests", Name: "requests", Algo: module.Incremental}, + {ID: "server.all.errors", Name: "errors", Algo: module.Incremental, Mul: -1}, + }, + } +) diff --git a/src/go/plugin/go.d/modules/squid/collect.go b/src/go/plugin/go.d/modules/squid/collect.go new file mode 100644 index 00000000000000..bb0cf1ab493714 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/collect.go @@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package squid + +import ( + "bufio" + "fmt" + "io" + "net/http" + "strconv" + "strings" + + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" +) + +const ( + // https://wiki.squid-cache.org/Features/CacheManager/Index#controlling-access-to-the-cache-manager + urlPathServerStats = "/squid-internal-mgr/counters" +) + +var statsCounters = map[string]bool{ + "client_http.kbytes_in": true, + "client_http.kbytes_out": true, + "server.all.errors": true, + "server.all.requests": true, + "server.all.kbytes_out": true, + "server.all.kbytes_in": true, + "client_http.errors": true, + "client_http.hits": true, + "client_http.requests": true, + "client_http.hit_kbytes_out": true, +} + +func (s *Squid) collect() (map[string]int64, error) { + mx := make(map[string]int64) + + if err := s.collectCounters(mx); err != nil { + return nil, err + } + + return mx, nil +} + +func (s *Squid) collectCounters(mx map[string]int64) error { + req, err := web.NewHTTPRequestWithPath(s.Request, urlPathServerStats) + if err != nil { + return err + } + + if err := s.doOK(req, func(body io.Reader) error { + sc := bufio.NewScanner(body) + + for sc.Scan() { + key, value, ok := strings.Cut(sc.Text(), "=") + if !ok { + continue + } + + key, value = strings.TrimSpace(key), strings.TrimSpace(value) + + if !statsCounters[key] { + continue + } + + v, err := strconv.ParseInt(value, 10, 64) + if err != nil { + s.Debugf("failed to parse key %s value %s: %v", key, value, err) + continue + } + + mx[key] = v + } + return nil + }); err != nil { + return err + } + + if len(mx) == 0 { + return fmt.Errorf("unexpected response from '%s': no metrics found", req.URL) + } + + return nil +} + +func (s *Squid) doOK(req *http.Request, parse func(body io.Reader) error) error { + resp, err := s.httpClient.Do(req) + if err != nil { + return fmt.Errorf("error on HTTP request '%s': %v", req.URL, err) + } + + defer closeBody(resp) + + if resp.StatusCode != http.StatusOK { + return fmt.Errorf("'%s' returned HTTP status code: %d", req.URL, resp.StatusCode) + } + + return parse(resp.Body) +} + +func closeBody(resp *http.Response) { + if resp != nil && resp.Body != nil { + _, _ = io.Copy(io.Discard, resp.Body) + _ = resp.Body.Close() + } +} diff --git a/src/go/plugin/go.d/modules/squid/config_schema.json b/src/go/plugin/go.d/modules/squid/config_schema.json new file mode 100644 index 00000000000000..b1264b2b1502c4 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/config_schema.json @@ -0,0 +1,177 @@ +{ + "jsonSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Squid collector configuration.", + "type": "object", + "properties": { + "update_every": { + "title": "Update every", + "description": "Data collection interval, measured in seconds.", + "type": "integer", + "minimum": 1, + "default": 1 + }, + "url": { + "title": "URL", + "description": "The base URL where the Squid endpoint can be accessed.", + "type": "string", + "default": "http://127.0.0.1:1328", + "format": "uri" + }, + "timeout": { + "title": "Timeout", + "description": "The timeout in seconds for the HTTP request.", + "type": "number", + "minimum": 0.5, + "default": 1 + }, + "not_follow_redirects": { + "title": "Not follow redirects", + "description": "If set, the client will not follow HTTP redirects automatically.", + "type": "boolean" + }, + "username": { + "title": "Username", + "description": "The username for basic authentication.", + "type": "string", + "sensitive": true + }, + "password": { + "title": "Password", + "description": "The password for basic authentication.", + "type": "string", + "sensitive": true + }, + "proxy_url": { + "title": "Proxy URL", + "description": "The URL of the proxy server.", + "type": "string" + }, + "proxy_username": { + "title": "Proxy username", + "description": "The username for proxy authentication.", + "type": "string", + "sensitive": true + }, + "proxy_password": { + "title": "Proxy password", + "description": "The password for proxy authentication.", + "type": "string", + "sensitive": true + }, + "headers": { + "title": "Headers", + "description": "Additional HTTP headers to include in the request.", + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "string" + } + }, + "tls_skip_verify": { + "title": "Skip TLS verification", + "description": "If set, TLS certificate verification will be skipped.", + "type": "boolean" + }, + "tls_ca": { + "title": "TLS CA", + "description": "The path to the CA certificate file for TLS verification.", + "type": "string", + "pattern": "^$|^/" + }, + "tls_cert": { + "title": "TLS certificate", + "description": "The path to the client certificate file for TLS authentication.", + "type": "string", + "pattern": "^$|^/" + }, + "tls_key": { + "title": "TLS key", + "description": "The path to the client key file for TLS authentication.", + "type": "string", + "pattern": "^$|^/" + }, + "body": { + "title": "Body", + "type": "string" + }, + "method": { + "title": "Method", + "type": "string" + } + }, + "required": [ + "url" + ], + "additionalProperties": false, + "patternProperties": { + "^name$": {} + } + }, + "uiSchema": { + "uiOptions": { + "fullPage": true + }, + "body": { + "ui:widget": "hidden" + }, + "method": { + "ui:widget": "hidden" + }, + "timeout": { + "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)." + }, + "password": { + "ui:widget": "password" + }, + "proxy_password": { + "ui:widget": "password" + }, + "ui:flavour": "tabs", + "ui:options": { + "tabs": [ + { + "title": "Base", + "fields": [ + "update_every", + "url", + "timeout", + "not_follow_redirects" + ] + }, + { + "title": "Auth", + "fields": [ + "username", + "password" + ] + }, + { + "title": "TLS", + "fields": [ + "tls_skip_verify", + "tls_ca", + "tls_cert", + "tls_key" + ] + }, + { + "title": "Proxy", + "fields": [ + "proxy_url", + "proxy_username", + "proxy_password" + ] + }, + { + "title": "Headers", + "fields": [ + "headers" + ] + } + ] + } + } +} diff --git a/src/go/plugin/go.d/modules/squid/metadata.yaml b/src/go/plugin/go.d/modules/squid/metadata.yaml new file mode 100644 index 00000000000000..fbe0202eecc85e --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/metadata.yaml @@ -0,0 +1,195 @@ +plugin_name: go.d.plugin +modules: + - meta: + id: collector-go.d.plugin-squid + plugin_name: go.d.plugin + module_name: squid + monitored_instance: + name: Squid + link: "https://www.squid-cache.org/" + categories: + - data-collection.web-servers-and-web-proxies + icon_filename: "squid.png" + related_resources: + integrations: + list: [] + info_provided_to_referring_integrations: + description: "" + keywords: + - squid + - web delivery + - squid caching proxy + most_popular: false + overview: + data_collection: + metrics_description: | + This collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests. + method_description: "It collects metrics from the `squid-internal-mgr/counters` endpoint." + supported_platforms: + include: [] + exclude: [] + multi_instance: true + additional_permissions: + description: "" + default_behavior: + auto_detection: + description: | + By default, it detects Squid instances running on localhost that are listening on port 3128. + On startup, it tries to collect metrics from: + + - https://127.0.0.1:3128 + limits: + description: "" + performance_impact: + description: "" + setup: + prerequisites: + list: [] + configuration: + file: + name: "go.d/squid.conf" + options: + description: | + The following options can be defined globally: update_every, autodetection_retry. + folding: + title: "Config options" + enabled: true + list: + - name: update_every + description: Data collection frequency. + default_value: 1 + required: false + - name: autodetection_retry + description: Recheck interval in seconds. Zero means no recheck will be scheduled. + default_value: 0 + required: false + - name: url + description: Server URL. + default_value: http://127.0.0.1:3128 + required: true + - name: timeout + description: HTTP request timeout. + default_value: 1 + required: false + - name: username + description: Username for basic HTTP authentication. + default_value: "" + required: false + - name: password + description: Password for basic HTTP authentication. + default_value: "" + required: false + - name: proxy_url + description: Proxy URL. + default_value: "" + required: false + - name: proxy_username + description: Username for proxy basic HTTP authentication. + default_value: "" + required: false + - name: proxy_password + description: Password for proxy basic HTTP authentication. + default_value: "" + required: false + - name: method + description: HTTP request method. + default_value: POST + required: false + - name: body + description: HTTP request body. + default_value: "" + required: false + - name: headers + description: HTTP request headers. + default_value: "" + required: false + - name: not_follow_redirects + description: Redirect handling policy. Controls whether the client follows redirects. + default_value: false + required: false + - name: tls_skip_verify + description: Server certificate chain and hostname validation policy. Controls whether the client performs this check. + default_value: false + required: false + - name: tls_ca + description: Certification authority that the client uses when verifying the server's certificates. + default_value: "" + required: false + - name: tls_cert + description: Client TLS certificate. + default_value: "" + required: false + - name: tls_key + description: Client TLS key. + default_value: "" + required: false + examples: + folding: + enabled: true + title: Config + list: + - name: Basic + description: A basic example configuration. + folding: + enabled: false + config: | + jobs: + - name: local + url: http://127.0.0.1:3128 + - name: Multi-instance + description: | + > **Note**: When you define multiple jobs, their names must be unique. + + Collecting metrics from local and remote instances. + config: | + jobs: + - name: local + url: http://127.0.0.1:3128 + + - name: remote + url: http://192.0.2.1:3128 + troubleshooting: + problems: + list: [] + alerts: [] + metrics: + folding: + title: Metrics + enabled: false + description: "" + availability: [] + scopes: + - name: Squid instance + description: "These metrics refer to each monitored Squid instance." + labels: [] + metrics: + - name: squid.clients_net + description: Squid Client Bandwidth + unit: "kilobits/s" + chart_type: area + dimensions: + - name: in + - name: out + - name: hits + - name: squid.clients_requests + description: Squid Client Requests + unit: "requests/s" + chart_type: line + dimensions: + - name: requests + - name: hits + - name: errors + - name: squid.servers_net + description: Squid Server Bandwidth + unit: "kilobits/s" + chart_type: area + dimensions: + - name: in + - name: out + - name: squid.servers_requests + description: Squid Server Requests + unit: "requests/s" + chart_type: line + dimensions: + - name: requests + - name: errors diff --git a/src/go/plugin/go.d/modules/squid/squid.go b/src/go/plugin/go.d/modules/squid/squid.go new file mode 100644 index 00000000000000..fe9c15ecb55629 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/squid.go @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package squid + +import ( + _ "embed" + "errors" + "net/http" + "time" + + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" +) + +//go:embed "config_schema.json" +var configSchema string + +func init() { + module.Register("squid", module.Creator{ + JobConfigSchema: configSchema, + Create: func() module.Module { return New() }, + Config: func() any { return &Config{} }, + }) +} + +func New() *Squid { + return &Squid{ + Config: Config{ + HTTP: web.HTTP{ + Request: web.Request{ + URL: "http://127.0.0.1:3128", + }, + Client: web.Client{ + Timeout: web.Duration(time.Second * 1), + }, + }, + }, + charts: charts.Copy(), + } +} + +type Config struct { + UpdateEvery int `yaml:"update_every,omitempty" json:"update_every"` + web.HTTP `yaml:",inline" json:""` +} + +type Squid struct { + module.Base + Config `yaml:",inline" json:""` + + charts *module.Charts + + httpClient *http.Client +} + +func (s *Squid) Configuration() any { + return s.Config +} + +func (s *Squid) Init() error { + if s.URL == "" { + s.Error("URL not set") + return errors.New("url not set") + } + + client, err := web.NewHTTPClient(s.Client) + if err != nil { + s.Error(err) + return err + } + s.httpClient = client + + s.Debugf("using URL %s", s.URL) + s.Debugf("using timeout: %s", s.Timeout) + + return nil +} + +func (s *Squid) Check() error { + mx, err := s.collect() + if err != nil { + s.Error(err) + return err + } + + if len(mx) == 0 { + return errors.New("no metrics collected") + } + + return nil +} + +func (s *Squid) Charts() *module.Charts { + return s.charts +} + +func (s *Squid) Collect() map[string]int64 { + mx, err := s.collect() + if err != nil { + s.Error(err) + } + + if len(mx) == 0 { + return nil + } + + return mx +} + +func (s *Squid) Cleanup() { + if s.httpClient != nil { + s.httpClient.CloseIdleConnections() + } +} diff --git a/src/go/plugin/go.d/modules/squid/squid_test.go b/src/go/plugin/go.d/modules/squid/squid_test.go new file mode 100644 index 00000000000000..c0856f89dd82d2 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/squid_test.go @@ -0,0 +1,223 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +package squid + +import ( + "net/http" + "net/http/httptest" + "os" + "testing" + + "github.com/netdata/netdata/go/plugins/plugin/go.d/agent/module" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/web" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +var ( + dataConfigJSON, _ = os.ReadFile("testdata/config.json") + dataConfigYAML, _ = os.ReadFile("testdata/config.yaml") + dataCounters, _ = os.ReadFile("testdata/counters.txt") +) + +func Test_testDataIsValid(t *testing.T) { + for name, data := range map[string][]byte{ + "dataConfigJSON": dataConfigJSON, + "dataConfigYAML": dataConfigYAML, + "dataCounters": dataCounters, + } { + require.NotNil(t, data, name) + } +} + +func TestSquid_ConfigurationSerialize(t *testing.T) { + module.TestConfigurationSerialize(t, &Squid{}, dataConfigJSON, dataConfigYAML) +} + +func TestSquid_Init(t *testing.T) { + tests := map[string]struct { + wantFail bool + config Config + }{ + "success with default": { + wantFail: false, + config: New().Config, + }, + "fail when URL not set": { + wantFail: true, + config: Config{ + HTTP: web.HTTP{ + Request: web.Request{URL: ""}, + }, + }, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + squid := New() + squid.Config = test.config + + if test.wantFail { + assert.Error(t, squid.Init()) + } else { + assert.NoError(t, squid.Init()) + } + }) + } +} + +func TestSquid_Charts(t *testing.T) { + assert.NotNil(t, New().Charts()) +} + +func TestSquid_Check(t *testing.T) { + tests := map[string]struct { + wantFail bool + prepare func(t *testing.T) (*Squid, func()) + }{ + "success case": { + wantFail: false, + prepare: prepareCaseSuccess, + }, + "fails on unexpected response": { + wantFail: true, + prepare: prepareCaseUnexpectedResponse, + }, + "fails on empty response": { + wantFail: true, + prepare: prepareCaseEmptyResponse, + }, + "fails on connection refused": { + wantFail: true, + prepare: prepareCaseConnectionRefused, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + squid, cleanup := test.prepare(t) + defer cleanup() + + if test.wantFail { + assert.Error(t, squid.Check()) + } else { + assert.NoError(t, squid.Check()) + } + }) + } +} + +func TestSquid_Collect(t *testing.T) { + tests := map[string]struct { + prepare func(t *testing.T) (*Squid, func()) + wantMetrics map[string]int64 + wantCharts int + }{ + "success case": { + prepare: prepareCaseSuccess, + wantCharts: len(charts), + wantMetrics: map[string]int64{ + "client_http.errors": 5, + "client_http.hit_kbytes_out": 11, + "client_http.hits": 1, + "client_http.kbytes_in": 566, + "client_http.kbytes_out": 16081, + "client_http.requests": 9019, + "server.all.errors": 0, + "server.all.kbytes_in": 0, + "server.all.kbytes_out": 0, + "server.all.requests": 0, + }, + }, + "fails on unexpected response": { + prepare: prepareCaseUnexpectedResponse, + }, + "fails on empty response": { + prepare: prepareCaseEmptyResponse, + }, + "fails on connection refused": { + prepare: prepareCaseConnectionRefused, + }, + } + + for name, test := range tests { + t.Run(name, func(t *testing.T) { + squid, cleanup := test.prepare(t) + defer cleanup() + + mx := squid.Collect() + + require.Equal(t, test.wantMetrics, mx) + + if len(test.wantMetrics) > 0 { + assert.Equal(t, test.wantCharts, len(*squid.Charts())) + module.TestMetricsHasAllChartsDims(t, squid.Charts(), mx) + } + }) + } +} + +func prepareCaseSuccess(t *testing.T) (*Squid, func()) { + t.Helper() + srv := httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case urlPathServerStats: + _, _ = w.Write(dataCounters) + default: + w.WriteHeader(http.StatusNotFound) + } + })) + + squid := New() + squid.URL = srv.URL + require.NoError(t, squid.Init()) + + return squid, srv.Close +} + +func prepareCaseUnexpectedResponse(t *testing.T) (*Squid, func()) { + t.Helper() + resp := []byte(` +Lorem ipsum dolor sit amet, consectetur adipiscing elit. +Nulla malesuada erat id magna mattis, eu viverra tellus rhoncus. +Fusce et felis pulvinar, posuere sem non, porttitor eros.`) + + srv := httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + _, _ = w.Write([]byte(resp)) + })) + + squid := New() + squid.URL = srv.URL + require.NoError(t, squid.Init()) + + return squid, srv.Close +} + +func prepareCaseEmptyResponse(t *testing.T) (*Squid, func()) { + t.Helper() + resp := []byte(``) + + srv := httptest.NewServer(http.HandlerFunc( + func(w http.ResponseWriter, r *http.Request) { + _, _ = w.Write([]byte(resp)) + })) + + squid := New() + squid.URL = srv.URL + require.NoError(t, squid.Init()) + + return squid, srv.Close +} + +func prepareCaseConnectionRefused(t *testing.T) (*Squid, func()) { + t.Helper() + squid := New() + squid.URL = "http://127.0.0.1:65001" + require.NoError(t, squid.Init()) + + return squid, func() {} +} diff --git a/src/go/plugin/go.d/modules/squid/testdata/config.json b/src/go/plugin/go.d/modules/squid/testdata/config.json new file mode 100644 index 00000000000000..984c3ed6e7a880 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/testdata/config.json @@ -0,0 +1,20 @@ +{ + "update_every": 123, + "url": "ok", + "body": "ok", + "method": "ok", + "headers": { + "ok": "ok" + }, + "username": "ok", + "password": "ok", + "proxy_url": "ok", + "proxy_username": "ok", + "proxy_password": "ok", + "timeout": 123.123, + "not_follow_redirects": true, + "tls_ca": "ok", + "tls_cert": "ok", + "tls_key": "ok", + "tls_skip_verify": true +} diff --git a/src/go/plugin/go.d/modules/squid/testdata/config.yaml b/src/go/plugin/go.d/modules/squid/testdata/config.yaml new file mode 100644 index 00000000000000..8558b61cc05cf8 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/testdata/config.yaml @@ -0,0 +1,17 @@ +update_every: 123 +url: "ok" +body: "ok" +method: "ok" +headers: + ok: "ok" +username: "ok" +password: "ok" +proxy_url: "ok" +proxy_username: "ok" +proxy_password: "ok" +timeout: 123.123 +not_follow_redirects: yes +tls_ca: "ok" +tls_cert: "ok" +tls_key: "ok" +tls_skip_verify: yes diff --git a/src/go/plugin/go.d/modules/squid/testdata/counters.txt b/src/go/plugin/go.d/modules/squid/testdata/counters.txt new file mode 100644 index 00000000000000..250a003d317ecc --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/testdata/counters.txt @@ -0,0 +1,59 @@ +sample_time = 1723030944.784818 (Wed, 07 Aug 2024 11:42:24 GMT) +client_http.requests = 9019 +client_http.hits = 1 +client_http.errors = 5 +client_http.kbytes_in = 566 +client_http.kbytes_out = 16081 +client_http.hit_kbytes_out = 11 +server.all.requests = 0 +server.all.errors = 0 +server.all.kbytes_in = 0 +server.all.kbytes_out = 0 +server.http.requests = 0 +server.http.errors = 0 +server.http.kbytes_in = 0 +server.http.kbytes_out = 0 +server.ftp.requests = 0 +server.ftp.errors = 0 +server.ftp.kbytes_in = 0 +server.ftp.kbytes_out = 0 +server.other.requests = 0 +server.other.errors = 0 +server.other.kbytes_in = 0 +server.other.kbytes_out = 0 +icp.pkts_sent = 0 +icp.pkts_recv = 0 +icp.queries_sent = 0 +icp.replies_sent = 0 +icp.queries_recv = 0 +icp.replies_recv = 0 +icp.query_timeouts = 0 +icp.replies_queued = 0 +icp.kbytes_sent = 0 +icp.kbytes_recv = 0 +icp.q_kbytes_sent = 0 +icp.r_kbytes_sent = 0 +icp.q_kbytes_recv = 0 +icp.r_kbytes_recv = 0 +icp.times_used = 0 +cd.times_used = 0 +cd.msgs_sent = 0 +cd.msgs_recv = 0 +cd.memory = 0 +cd.local_memory = 0 +cd.kbytes_sent = 0 +cd.kbytes_recv = 0 +unlink.requests = 0 +page_faults = 874 +select_loops = 91146 +cpu_time = 8.501572 +wall_time = 13.524214 +swap.outs = 0 +swap.ins = 0 +swap.files_cleaned = 0 +aborted_requests = 0 +hit_validation.attempts = 0 +hit_validation.refusals.due_to_locking = 0 +hit_validation.refusals.due_to_zeroSize = 0 +hit_validation.refusals.due_to_timeLimit = 0 +hit_validation.failures = 0 From 40c624503ebfee3e3c6b0758a25f86abab8bc8a4 Mon Sep 17 00:00:00 2001 From: Netdata bot <43409846+netdatabot@users.noreply.github.com> Date: Thu, 8 Aug 2024 16:11:30 -0400 Subject: [PATCH 09/15] Regenerate integrations.js (#18282) Co-authored-by: ilyam8 <22274335+ilyam8@users.noreply.github.com> --- integrations/integrations.js | 75 +++--- integrations/integrations.json | 75 +++--- src/collectors/COLLECTORS.md | 2 +- src/go/plugin/go.d/modules/squid/README.md | 1 + .../go.d/modules/squid/integrations/squid.md | 225 ++++++++++++++++++ 5 files changed, 303 insertions(+), 75 deletions(-) create mode 120000 src/go/plugin/go.d/modules/squid/README.md create mode 100644 src/go/plugin/go.d/modules/squid/integrations/squid.md diff --git a/integrations/integrations.js b/integrations/integrations.js index a798c766ac3fe0..6369f928a7ec62 100644 --- a/integrations/integrations.js +++ b/integrations/integrations.js @@ -16299,6 +16299,44 @@ export const integrations = [ "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/snmp/metadata.yaml", "related_resources": "" }, + { + "meta": { + "id": "collector-go.d.plugin-squid", + "plugin_name": "go.d.plugin", + "module_name": "squid", + "monitored_instance": { + "name": "Squid", + "link": "https://www.squid-cache.org/", + "categories": [ + "data-collection.web-servers-and-web-proxies" + ], + "icon_filename": "squid.png" + }, + "related_resources": { + "integrations": { + "list": [] + } + }, + "info_provided_to_referring_integrations": { + "description": "" + }, + "keywords": [ + "squid", + "web delivery", + "squid caching proxy" + ], + "most_popular": false + }, + "overview": "# Squid\n\nPlugin: go.d.plugin\nModule: squid\n\n## Overview\n\nThis collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests.\n\n\nIt collects metrics from the `squid-internal-mgr/counters` endpoint.\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nBy default, it detects Squid instances running on localhost that are listening on port 3128.\nOn startup, it tries to collect metrics from:\n\n- https://127.0.0.1:3128\n\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", + "setup": "## Setup\n\n### Prerequisites\n\nNo action required.\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `go.d/squid.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/squid.conf\n```\n#### Options\n\nThe following options can be defined globally: update_every, autodetection_retry.\n\n\n{% details open=true summary=\"Config options\" %}\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Data collection frequency. | 1 | no |\n| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |\n| url | Server URL. | http://127.0.0.1:3128 | yes |\n| timeout | HTTP request timeout. | 1 | no |\n| username | Username for basic HTTP authentication. | | no |\n| password | Password for basic HTTP authentication. | | no |\n| proxy_url | Proxy URL. | | no |\n| proxy_username | Username for proxy basic HTTP authentication. | | no |\n| proxy_password | Password for proxy basic HTTP authentication. | | no |\n| method | HTTP request method. | POST | no |\n| body | HTTP request body. | | no |\n| headers | HTTP request headers. | | no |\n| not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no |\n| tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no |\n| tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no |\n| tls_cert | Client TLS certificate. | | no |\n| tls_key | Client TLS key. | | no |\n\n{% /details %}\n#### Examples\n\n##### Basic\n\nA basic example configuration.\n\n```yaml\njobs:\n - name: local\n url: http://127.0.0.1:3128\n\n```\n##### Multi-instance\n\n> **Note**: When you define multiple jobs, their names must be unique.\n\nCollecting metrics from local and remote instances.\n\n\n{% details open=true summary=\"Config\" %}\n```yaml\njobs:\n - name: local\n url: http://127.0.0.1:3128\n\n - name: remote\n url: http://192.0.2.1:3128\n\n```\n{% /details %}\n", + "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `squid` collector, run the `go.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `go.d.plugin` to debug the collector:\n\n ```bash\n ./go.d.plugin -d -m squid\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `squid` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep squid\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep squid /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep squid\n```\n\n", + "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", + "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per Squid instance\n\nThese metrics refer to each monitored Squid instance.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| squid.clients_net | in, out, hits | kilobits/s |\n| squid.clients_requests | requests, hits, errors | requests/s |\n| squid.servers_net | in, out | kilobits/s |\n| squid.servers_requests | requests, errors | requests/s |\n\n", + "integration_type": "collector", + "id": "go.d.plugin-squid-Squid", + "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/squid/metadata.yaml", + "related_resources": "" + }, { "meta": { "id": "collector-go.d.plugin-squidlog", @@ -19359,43 +19397,6 @@ export const integrations = [ "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/spigotmc/metadata.yaml", "related_resources": "" }, - { - "meta": { - "plugin_name": "python.d.plugin", - "module_name": "squid", - "monitored_instance": { - "name": "Squid", - "link": "http://www.squid-cache.org/", - "categories": [ - "data-collection.web-servers-and-web-proxies" - ], - "icon_filename": "squid.png" - }, - "related_resources": { - "integrations": { - "list": [] - } - }, - "info_provided_to_referring_integrations": { - "description": "" - }, - "keywords": [ - "squid", - "web delivery", - "squid caching proxy" - ], - "most_popular": false - }, - "overview": "# Squid\n\nPlugin: python.d.plugin\nModule: squid\n\n## Overview\n\nThis collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests.\n\n\nIt collects metrics from the endpoint where Squid exposes its `counters` data.\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nBy default, this collector will try to autodetect where Squid presents its `counters` data, by trying various configurations.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", - "setup": "## Setup\n\n### Prerequisites\n\n#### Configure Squid's Cache Manager\n\nTake a look at [Squid's official documentation](https://wiki.squid-cache.org/Features/CacheManager/Index#controlling-access-to-the-cache-manager) on how to configure access to the Cache Manager.\n\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `python.d/squid.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config python.d/squid.conf\n```\n#### Options\n\nThere are 2 sections:\n\n* Global variables\n* One or more JOBS that can define multiple different instances to monitor.\n\nThe following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.\n\nAdditionally, the following collapsed table contains all the options that can be configured inside a JOB definition.\n\nEvery configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.\n\n\n{% details open=true summary=\"Config options\" %}\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Sets the default data collection frequency. | 1 | no |\n| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |\n| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |\n| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |\n| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | local | no |\n| host | The host to connect to. | | yes |\n| port | The port to connect to. | | yes |\n| request | The URL to request from Squid. | | yes |\n\n{% /details %}\n#### Examples\n\n##### Basic\n\nA basic configuration example.\n\n```yaml\nexample_job_name:\n name: 'local'\n host: 'localhost'\n port: 3128\n request: 'cache_object://localhost:3128/counters'\n\n```\n##### Multi-instance\n\n> **Note**: When you define multiple jobs, their names must be unique.\n\nCollecting metrics from local and remote instances.\n\n\n{% details open=true summary=\"Config\" %}\n```yaml\nlocal_job:\n name: 'local'\n host: '127.0.0.1'\n port: 3128\n request: 'cache_object://127.0.0.1:3128/counters'\n\nremote_job:\n name: 'remote'\n host: '192.0.2.1'\n port: 3128\n request: 'cache_object://192.0.2.1:3128/counters'\n\n```\n{% /details %}\n", - "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `squid` collector, run the `python.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `python.d.plugin` to debug the collector:\n\n ```bash\n ./python.d.plugin squid debug trace\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `squid` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep squid\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep squid /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep squid\n```\n\n", - "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", - "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per Squid instance\n\nThese metrics refer to each monitored Squid instance.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| squid.clients_net | in, out, hits | kilobits/s |\n| squid.clients_requests | requests, hits, errors | requests/s |\n| squid.servers_net | in, out | kilobits/s |\n| squid.servers_requests | requests, errors | requests/s |\n\n", - "integration_type": "collector", - "id": "python.d.plugin-squid-Squid", - "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/squid/metadata.yaml", - "related_resources": "" - }, { "meta": { "plugin_name": "python.d.plugin", diff --git a/integrations/integrations.json b/integrations/integrations.json index fcd7e9fdb0ea0f..361e7792e4d85f 100644 --- a/integrations/integrations.json +++ b/integrations/integrations.json @@ -16297,6 +16297,44 @@ "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/snmp/metadata.yaml", "related_resources": "" }, + { + "meta": { + "id": "collector-go.d.plugin-squid", + "plugin_name": "go.d.plugin", + "module_name": "squid", + "monitored_instance": { + "name": "Squid", + "link": "https://www.squid-cache.org/", + "categories": [ + "data-collection.web-servers-and-web-proxies" + ], + "icon_filename": "squid.png" + }, + "related_resources": { + "integrations": { + "list": [] + } + }, + "info_provided_to_referring_integrations": { + "description": "" + }, + "keywords": [ + "squid", + "web delivery", + "squid caching proxy" + ], + "most_popular": false + }, + "overview": "# Squid\n\nPlugin: go.d.plugin\nModule: squid\n\n## Overview\n\nThis collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests.\n\n\nIt collects metrics from the `squid-internal-mgr/counters` endpoint.\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nBy default, it detects Squid instances running on localhost that are listening on port 3128.\nOn startup, it tries to collect metrics from:\n\n- https://127.0.0.1:3128\n\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", + "setup": "## Setup\n\n### Prerequisites\n\nNo action required.\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `go.d/squid.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config go.d/squid.conf\n```\n#### Options\n\nThe following options can be defined globally: update_every, autodetection_retry.\n\n\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Data collection frequency. | 1 | no |\n| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no |\n| url | Server URL. | http://127.0.0.1:3128 | yes |\n| timeout | HTTP request timeout. | 1 | no |\n| username | Username for basic HTTP authentication. | | no |\n| password | Password for basic HTTP authentication. | | no |\n| proxy_url | Proxy URL. | | no |\n| proxy_username | Username for proxy basic HTTP authentication. | | no |\n| proxy_password | Password for proxy basic HTTP authentication. | | no |\n| method | HTTP request method. | POST | no |\n| body | HTTP request body. | | no |\n| headers | HTTP request headers. | | no |\n| not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no |\n| tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no |\n| tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no |\n| tls_cert | Client TLS certificate. | | no |\n| tls_key | Client TLS key. | | no |\n\n#### Examples\n\n##### Basic\n\nA basic example configuration.\n\n```yaml\njobs:\n - name: local\n url: http://127.0.0.1:3128\n\n```\n##### Multi-instance\n\n> **Note**: When you define multiple jobs, their names must be unique.\n\nCollecting metrics from local and remote instances.\n\n\n```yaml\njobs:\n - name: local\n url: http://127.0.0.1:3128\n\n - name: remote\n url: http://192.0.2.1:3128\n\n```\n", + "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `squid` collector, run the `go.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `go.d.plugin` to debug the collector:\n\n ```bash\n ./go.d.plugin -d -m squid\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `squid` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep squid\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep squid /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep squid\n```\n\n", + "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", + "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per Squid instance\n\nThese metrics refer to each monitored Squid instance.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| squid.clients_net | in, out, hits | kilobits/s |\n| squid.clients_requests | requests, hits, errors | requests/s |\n| squid.servers_net | in, out | kilobits/s |\n| squid.servers_requests | requests, errors | requests/s |\n\n", + "integration_type": "collector", + "id": "go.d.plugin-squid-Squid", + "edit_link": "https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/squid/metadata.yaml", + "related_resources": "" + }, { "meta": { "id": "collector-go.d.plugin-squidlog", @@ -19357,43 +19395,6 @@ "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/spigotmc/metadata.yaml", "related_resources": "" }, - { - "meta": { - "plugin_name": "python.d.plugin", - "module_name": "squid", - "monitored_instance": { - "name": "Squid", - "link": "http://www.squid-cache.org/", - "categories": [ - "data-collection.web-servers-and-web-proxies" - ], - "icon_filename": "squid.png" - }, - "related_resources": { - "integrations": { - "list": [] - } - }, - "info_provided_to_referring_integrations": { - "description": "" - }, - "keywords": [ - "squid", - "web delivery", - "squid caching proxy" - ], - "most_popular": false - }, - "overview": "# Squid\n\nPlugin: python.d.plugin\nModule: squid\n\n## Overview\n\nThis collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests.\n\n\nIt collects metrics from the endpoint where Squid exposes its `counters` data.\n\nThis collector is supported on all platforms.\n\nThis collector supports collecting metrics from multiple instances of this integration, including remote instances.\n\n\n### Default Behavior\n\n#### Auto-Detection\n\nBy default, this collector will try to autodetect where Squid presents its `counters` data, by trying various configurations.\n\n#### Limits\n\nThe default configuration for this integration does not impose any limits on data collection.\n\n#### Performance Impact\n\nThe default configuration for this integration is not expected to impose a significant performance impact on the system.\n", - "setup": "## Setup\n\n### Prerequisites\n\n#### Configure Squid's Cache Manager\n\nTake a look at [Squid's official documentation](https://wiki.squid-cache.org/Features/CacheManager/Index#controlling-access-to-the-cache-manager) on how to configure access to the Cache Manager.\n\n\n\n### Configuration\n\n#### File\n\nThe configuration file name for this integration is `python.d/squid.conf`.\n\n\nYou can edit the configuration file using the `edit-config` script from the\nNetdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory).\n\n```bash\ncd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata\nsudo ./edit-config python.d/squid.conf\n```\n#### Options\n\nThere are 2 sections:\n\n* Global variables\n* One or more JOBS that can define multiple different instances to monitor.\n\nThe following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.\n\nAdditionally, the following collapsed table contains all the options that can be configured inside a JOB definition.\n\nEvery configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.\n\n\n| Name | Description | Default | Required |\n|:----|:-----------|:-------|:--------:|\n| update_every | Sets the default data collection frequency. | 1 | no |\n| priority | Controls the order of charts at the netdata dashboard. | 60000 | no |\n| autodetection_retry | Sets the job re-check interval in seconds. | 0 | no |\n| penalty | Indicates whether to apply penalty to update_every in case of failures. | yes | no |\n| name | Job name. This value will overwrite the `job_name` value. JOBS with the same name are mutually exclusive. Only one of them will be allowed running at any time. This allows autodetection to try several alternatives and pick the one that works. | local | no |\n| host | The host to connect to. | | yes |\n| port | The port to connect to. | | yes |\n| request | The URL to request from Squid. | | yes |\n\n#### Examples\n\n##### Basic\n\nA basic configuration example.\n\n```yaml\nexample_job_name:\n name: 'local'\n host: 'localhost'\n port: 3128\n request: 'cache_object://localhost:3128/counters'\n\n```\n##### Multi-instance\n\n> **Note**: When you define multiple jobs, their names must be unique.\n\nCollecting metrics from local and remote instances.\n\n\n```yaml\nlocal_job:\n name: 'local'\n host: '127.0.0.1'\n port: 3128\n request: 'cache_object://127.0.0.1:3128/counters'\n\nremote_job:\n name: 'remote'\n host: '192.0.2.1'\n port: 3128\n request: 'cache_object://192.0.2.1:3128/counters'\n\n```\n", - "troubleshooting": "## Troubleshooting\n\n### Debug Mode\n\nTo troubleshoot issues with the `squid` collector, run the `python.d.plugin` with the debug option enabled. The output\nshould give you clues as to why the collector isn't working.\n\n- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on\n your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.\n\n ```bash\n cd /usr/libexec/netdata/plugins.d/\n ```\n\n- Switch to the `netdata` user.\n\n ```bash\n sudo -u netdata -s\n ```\n\n- Run the `python.d.plugin` to debug the collector:\n\n ```bash\n ./python.d.plugin squid debug trace\n ```\n\n### Getting Logs\n\nIf you're encountering problems with the `squid` collector, follow these steps to retrieve logs and identify potential issues:\n\n- **Run the command** specific to your system (systemd, non-systemd, or Docker container).\n- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.\n\n#### System with systemd\n\nUse the following command to view logs generated since the last Netdata service restart:\n\n```bash\njournalctl _SYSTEMD_INVOCATION_ID=\"$(systemctl show --value --property=InvocationID netdata)\" --namespace=netdata --grep squid\n```\n\n#### System without systemd\n\nLocate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name:\n\n```bash\ngrep squid /var/log/netdata/collector.log\n```\n\n**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues.\n\n#### Docker Container\n\nIf your Netdata runs in a Docker container named \"netdata\" (replace if different), use this command:\n\n```bash\ndocker logs netdata 2>&1 | grep squid\n```\n\n", - "alerts": "## Alerts\n\nThere are no alerts configured by default for this integration.\n", - "metrics": "## Metrics\n\nMetrics grouped by *scope*.\n\nThe scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.\n\n\n\n### Per Squid instance\n\nThese metrics refer to each monitored Squid instance.\n\nThis scope has no labels.\n\nMetrics:\n\n| Metric | Dimensions | Unit |\n|:------|:----------|:----|\n| squid.clients_net | in, out, hits | kilobits/s |\n| squid.clients_requests | requests, hits, errors | requests/s |\n| squid.servers_net | in, out | kilobits/s |\n| squid.servers_requests | requests, errors | requests/s |\n\n", - "integration_type": "collector", - "id": "python.d.plugin-squid-Squid", - "edit_link": "https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/squid/metadata.yaml", - "related_resources": "" - }, { "meta": { "plugin_name": "python.d.plugin", diff --git a/src/collectors/COLLECTORS.md b/src/collectors/COLLECTORS.md index 90a7a130f26d39..75fe0e934791d6 100644 --- a/src/collectors/COLLECTORS.md +++ b/src/collectors/COLLECTORS.md @@ -1151,7 +1151,7 @@ If you don't see the app/service you'd like to monitor in this list: - [Squid log files](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/squidlog/integrations/squid_log_files.md) -- [Squid](https://github.com/netdata/netdata/blob/master/src/collectors/python.d.plugin/squid/integrations/squid.md) +- [Squid](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/squid/integrations/squid.md) - [Tengine](https://github.com/netdata/netdata/blob/master/src/go/plugin/go.d/modules/tengine/integrations/tengine.md) diff --git a/src/go/plugin/go.d/modules/squid/README.md b/src/go/plugin/go.d/modules/squid/README.md new file mode 120000 index 00000000000000..c4e5a03d773053 --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/README.md @@ -0,0 +1 @@ +integrations/squid.md \ No newline at end of file diff --git a/src/go/plugin/go.d/modules/squid/integrations/squid.md b/src/go/plugin/go.d/modules/squid/integrations/squid.md new file mode 100644 index 00000000000000..f04c55c196a96b --- /dev/null +++ b/src/go/plugin/go.d/modules/squid/integrations/squid.md @@ -0,0 +1,225 @@ + + +# Squid + + + + + +Plugin: go.d.plugin +Module: squid + + + +## Overview + +This collector monitors statistics about the Squid Clients and Servers, like bandwidth and requests. + + +It collects metrics from the `squid-internal-mgr/counters` endpoint. + +This collector is supported on all platforms. + +This collector supports collecting metrics from multiple instances of this integration, including remote instances. + + +### Default Behavior + +#### Auto-Detection + +By default, it detects Squid instances running on localhost that are listening on port 3128. +On startup, it tries to collect metrics from: + +- https://127.0.0.1:3128 + + +#### Limits + +The default configuration for this integration does not impose any limits on data collection. + +#### Performance Impact + +The default configuration for this integration is not expected to impose a significant performance impact on the system. + + +## Metrics + +Metrics grouped by *scope*. + +The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. + + + +### Per Squid instance + +These metrics refer to each monitored Squid instance. + +This scope has no labels. + +Metrics: + +| Metric | Dimensions | Unit | +|:------|:----------|:----| +| squid.clients_net | in, out, hits | kilobits/s | +| squid.clients_requests | requests, hits, errors | requests/s | +| squid.servers_net | in, out | kilobits/s | +| squid.servers_requests | requests, errors | requests/s | + + + +## Alerts + +There are no alerts configured by default for this integration. + + +## Setup + +### Prerequisites + +No action required. + +### Configuration + +#### File + +The configuration file name for this integration is `go.d/squid.conf`. + + +You can edit the configuration file using the `edit-config` script from the +Netdata [config directory](/docs/netdata-agent/configuration/README.md#the-netdata-config-directory). + +```bash +cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata +sudo ./edit-config go.d/squid.conf +``` +#### Options + +The following options can be defined globally: update_every, autodetection_retry. + + +
Config options + +| Name | Description | Default | Required | +|:----|:-----------|:-------|:--------:| +| update_every | Data collection frequency. | 1 | no | +| autodetection_retry | Recheck interval in seconds. Zero means no recheck will be scheduled. | 0 | no | +| url | Server URL. | http://127.0.0.1:3128 | yes | +| timeout | HTTP request timeout. | 1 | no | +| username | Username for basic HTTP authentication. | | no | +| password | Password for basic HTTP authentication. | | no | +| proxy_url | Proxy URL. | | no | +| proxy_username | Username for proxy basic HTTP authentication. | | no | +| proxy_password | Password for proxy basic HTTP authentication. | | no | +| method | HTTP request method. | POST | no | +| body | HTTP request body. | | no | +| headers | HTTP request headers. | | no | +| not_follow_redirects | Redirect handling policy. Controls whether the client follows redirects. | no | no | +| tls_skip_verify | Server certificate chain and hostname validation policy. Controls whether the client performs this check. | no | no | +| tls_ca | Certification authority that the client uses when verifying the server's certificates. | | no | +| tls_cert | Client TLS certificate. | | no | +| tls_key | Client TLS key. | | no | + +
+ +#### Examples + +##### Basic + +A basic example configuration. + +```yaml +jobs: + - name: local + url: http://127.0.0.1:3128 + +``` +##### Multi-instance + +> **Note**: When you define multiple jobs, their names must be unique. + +Collecting metrics from local and remote instances. + + +
Config + +```yaml +jobs: + - name: local + url: http://127.0.0.1:3128 + + - name: remote + url: http://192.0.2.1:3128 + +``` +
+ + + +## Troubleshooting + +### Debug Mode + +To troubleshoot issues with the `squid` collector, run the `go.d.plugin` with the debug option enabled. The output +should give you clues as to why the collector isn't working. + +- Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on + your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`. + + ```bash + cd /usr/libexec/netdata/plugins.d/ + ``` + +- Switch to the `netdata` user. + + ```bash + sudo -u netdata -s + ``` + +- Run the `go.d.plugin` to debug the collector: + + ```bash + ./go.d.plugin -d -m squid + ``` + +### Getting Logs + +If you're encountering problems with the `squid` collector, follow these steps to retrieve logs and identify potential issues: + +- **Run the command** specific to your system (systemd, non-systemd, or Docker container). +- **Examine the output** for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem. + +#### System with systemd + +Use the following command to view logs generated since the last Netdata service restart: + +```bash +journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep squid +``` + +#### System without systemd + +Locate the collector log file, typically at `/var/log/netdata/collector.log`, and use `grep` to filter for collector's name: + +```bash +grep squid /var/log/netdata/collector.log +``` + +**Note**: This method shows logs from all restarts. Focus on the **latest entries** for troubleshooting current issues. + +#### Docker Container + +If your Netdata runs in a Docker container named "netdata" (replace if different), use this command: + +```bash +docker logs netdata 2>&1 | grep squid +``` + + From 1c0f54bf9e306e023776510bfc7586cf089495bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 00:42:22 +0300 Subject: [PATCH 10/15] Bump go.mongodb.org/mongo-driver from 1.16.0 to 1.16.1 in /src/go (#18286) Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.16.0 to 1.16.1. - [Release notes](https://github.com/mongodb/mongo-go-driver/releases) - [Commits](https://github.com/mongodb/mongo-go-driver/compare/v1.16.0...v1.16.1) --- updated-dependencies: - dependency-name: go.mongodb.org/mongo-driver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/go/go.mod | 2 +- src/go/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/go/go.mod b/src/go/go.mod index 536e0427299429..d5299b3dd66887 100644 --- a/src/go/go.mod +++ b/src/go/go.mod @@ -44,7 +44,7 @@ require ( github.com/tidwall/gjson v1.17.3 github.com/valyala/fastjson v1.6.4 github.com/vmware/govmomi v0.39.0 - go.mongodb.org/mongo-driver v1.16.0 + go.mongodb.org/mongo-driver v1.16.1 golang.org/x/net v0.27.0 golang.org/x/text v0.16.0 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220504211119-3d4a969bb56b diff --git a/src/go/go.sum b/src/go/go.sum index e7660b2c206c87..447c502e0a7bf9 100644 --- a/src/go/go.sum +++ b/src/go/go.sum @@ -376,8 +376,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.mongodb.org/mongo-driver v1.16.0 h1:tpRsfBJMROVHKpdGyc1BBEzzjDUWjItxbVSZ8Ls4BQ4= -go.mongodb.org/mongo-driver v1.16.0/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= +go.mongodb.org/mongo-driver v1.16.1 h1:rIVLL3q0IHM39dvE+z2ulZLp9ENZKThVfuvN/IiN4l8= +go.mongodb.org/mongo-driver v1.16.1/go.mod h1:oB6AhJQvFQL4LEHyXi6aJzQJtBiTQHiAd83l0GdFaiw= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= From 898be9f934ea17ec664163e178027ad1da47e8f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 00:43:20 +0300 Subject: [PATCH 11/15] Bump github.com/gosnmp/gosnmp from 1.37.0 to 1.38.0 in /src/go (#18287) Bumps [github.com/gosnmp/gosnmp](https://github.com/gosnmp/gosnmp) from 1.37.0 to 1.38.0. - [Release notes](https://github.com/gosnmp/gosnmp/releases) - [Changelog](https://github.com/gosnmp/gosnmp/blob/master/CHANGELOG.md) - [Commits](https://github.com/gosnmp/gosnmp/compare/v1.37.0...v1.38.0) --- updated-dependencies: - dependency-name: github.com/gosnmp/gosnmp dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/go/go.mod | 2 +- src/go/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/go/go.mod b/src/go/go.mod index d5299b3dd66887..c4e60f43b87c96 100644 --- a/src/go/go.mod +++ b/src/go/go.mod @@ -24,7 +24,7 @@ require ( github.com/godbus/dbus/v5 v5.1.0 github.com/gofrs/flock v0.12.1 github.com/golang/mock v1.6.0 - github.com/gosnmp/gosnmp v1.37.0 + github.com/gosnmp/gosnmp v1.38.0 github.com/ilyam8/hashstructure v1.1.0 github.com/jackc/pgx/v4 v4.18.3 github.com/jackc/pgx/v5 v5.6.0 diff --git a/src/go/go.sum b/src/go/go.sum index 447c502e0a7bf9..fea34723d568f5 100644 --- a/src/go/go.sum +++ b/src/go/go.sum @@ -130,8 +130,8 @@ github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm4 github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gosnmp/gosnmp v1.37.0 h1:/Tf8D3b9wrnNuf/SfbvO+44mPrjVphBhRtcGg22V07Y= -github.com/gosnmp/gosnmp v1.37.0/go.mod h1:GDH9vNqpsD7f2HvZhKs5dlqSEcAS6s6Qp099oZRCR+M= +github.com/gosnmp/gosnmp v1.38.0 h1:I5ZOMR8kb0DXAFg/88ACurnuwGwYkXWq3eLpJPHMEYc= +github.com/gosnmp/gosnmp v1.38.0/go.mod h1:FE+PEZvKrFz9afP9ii1W3cprXuVZ17ypCcyyfYuu5LY= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd h1:PpuIBO5P3e9hpqBD0O/HjhShYuM6XE0i/lbE6J94kww= github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= From 6453c9f0f4dd0bb804d555bd39e7402e91e2833c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 00:49:58 +0300 Subject: [PATCH 12/15] Bump golang.org/x/net from 0.27.0 to 0.28.0 in /src/go (#18284) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.27.0 to 0.28.0. - [Commits](https://github.com/golang/net/compare/v0.27.0...v0.28.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- src/go/go.mod | 12 ++++++------ src/go/go.sum | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/go/go.mod b/src/go/go.mod index c4e60f43b87c96..8a3423281e4fbf 100644 --- a/src/go/go.mod +++ b/src/go/go.mod @@ -45,8 +45,8 @@ require ( github.com/valyala/fastjson v1.6.4 github.com/vmware/govmomi v0.39.0 go.mongodb.org/mongo-driver v1.16.1 - golang.org/x/net v0.27.0 - golang.org/x/text v0.16.0 + golang.org/x/net v0.28.0 + golang.org/x/text v0.17.0 golang.zx2c4.com/wireguard/wgctrl v0.0.0-20220504211119-3d4a969bb56b gopkg.in/ini.v1 v1.67.0 gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.2 @@ -134,13 +134,13 @@ require ( go.opentelemetry.io/otel v1.22.0 // indirect go.opentelemetry.io/otel/metric v1.22.0 // indirect go.opentelemetry.io/otel/trace v1.22.0 // indirect - golang.org/x/crypto v0.25.0 // indirect + golang.org/x/crypto v0.26.0 // indirect golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect golang.org/x/mod v0.18.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.22.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/term v0.23.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.22.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect diff --git a/src/go/go.sum b/src/go/go.sum index fea34723d568f5..d5b1e9436ebeb9 100644 --- a/src/go/go.sum +++ b/src/go/go.sum @@ -417,8 +417,8 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -441,8 +441,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= -golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -451,8 +451,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -476,14 +476,14 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -492,8 +492,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= From 445afae38b572607dd336981ce663803e2709483 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 00:50:18 +0300 Subject: [PATCH 13/15] Bump google-github-actions/upload-cloud-storage from 2.1.0 to 2.1.2 (#18283) Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 2.1.0 to 2.1.2. - [Release notes](https://github.com/google-github-actions/upload-cloud-storage/releases) - [Changelog](https://github.com/google-github-actions/upload-cloud-storage/blob/main/CHANGELOG.md) - [Commits](https://github.com/google-github-actions/upload-cloud-storage/compare/v2.1.0...v2.1.2) --- updated-dependencies: - dependency-name: google-github-actions/upload-cloud-storage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ae9dec3648118..1df0a7300e2b17 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -519,7 +519,7 @@ jobs: uses: google-github-actions/setup-gcloud@v2.1.0 - name: Upload Artifacts id: upload - uses: google-github-actions/upload-cloud-storage@v2.1.0 + uses: google-github-actions/upload-cloud-storage@v2.1.2 with: destination: ${{ secrets.GCP_NIGHTLY_STORAGE_BUCKET }} gzip: false From 93465ad8171f37a3b763f94a8fba72d8e1d58897 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 00:50:33 +0300 Subject: [PATCH 14/15] Bump google-github-actions/setup-gcloud from 2.1.0 to 2.1.1 (#18285) Bumps [google-github-actions/setup-gcloud](https://github.com/google-github-actions/setup-gcloud) from 2.1.0 to 2.1.1. - [Release notes](https://github.com/google-github-actions/setup-gcloud/releases) - [Changelog](https://github.com/google-github-actions/setup-gcloud/blob/main/CHANGELOG.md) - [Commits](https://github.com/google-github-actions/setup-gcloud/compare/v2.1.0...v2.1.1) --- updated-dependencies: - dependency-name: google-github-actions/setup-gcloud dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1df0a7300e2b17..e5a327909d056d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -516,7 +516,7 @@ jobs: credentials_json: ${{ secrets.GCS_STORAGE_SERVICE_KEY_JSON }} - name: Setup GCS id: gcs-setup - uses: google-github-actions/setup-gcloud@v2.1.0 + uses: google-github-actions/setup-gcloud@v2.1.1 - name: Upload Artifacts id: upload uses: google-github-actions/upload-cloud-storage@v2.1.2 From 88347ff2728a87b9e3065a62d87c40b0cd95ddb2 Mon Sep 17 00:00:00 2001 From: netdatabot Date: Fri, 9 Aug 2024 00:17:38 +0000 Subject: [PATCH 15/15] [ci skip] Update changelog and version for nightly build: v1.46.0-264-nightly. --- CHANGELOG.md | 24 +++++++++++------------- packaging/version | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 177388be75dba9..d95156ad3aaeba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ **Merged pull requests:** +- Bump github.com/gosnmp/gosnmp from 1.37.0 to 1.38.0 in /src/go [\#18287](https://github.com/netdata/netdata/pull/18287) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump go.mongodb.org/mongo-driver from 1.16.0 to 1.16.1 in /src/go [\#18286](https://github.com/netdata/netdata/pull/18286) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Bump golang.org/x/net from 0.27.0 to 0.28.0 in /src/go [\#18284](https://github.com/netdata/netdata/pull/18284) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Regenerate integrations.js [\#18282](https://github.com/netdata/netdata/pull/18282) ([netdatabot](https://github.com/netdatabot)) +- Regenerate integrations.js [\#18280](https://github.com/netdata/netdata/pull/18280) ([netdatabot](https://github.com/netdatabot)) +- Remove python squid collector implementation [\#18279](https://github.com/netdata/netdata/pull/18279) ([Ancairon](https://github.com/Ancairon)) +- add go.d/rethinkdb [\#18278](https://github.com/netdata/netdata/pull/18278) ([ilyam8](https://github.com/ilyam8)) +- remove python.d/rethinkdb [\#18277](https://github.com/netdata/netdata/pull/18277) ([ilyam8](https://github.com/ilyam8)) +- Squid collector port to Go [\#18276](https://github.com/netdata/netdata/pull/18276) ([Ancairon](https://github.com/Ancairon)) - set GOPROXY when building go.d.plugin [\#18275](https://github.com/netdata/netdata/pull/18275) ([ilyam8](https://github.com/ilyam8)) - go.d snmp: adjust max repetitions automatically [\#18274](https://github.com/netdata/netdata/pull/18274) ([ilyam8](https://github.com/ilyam8)) - go.d fix dimension id check [\#18272](https://github.com/netdata/netdata/pull/18272) ([ilyam8](https://github.com/ilyam8)) @@ -14,6 +23,7 @@ - Regenerate integrations.js [\#18268](https://github.com/netdata/netdata/pull/18268) ([netdatabot](https://github.com/netdatabot)) - apps conf add beanstalkd [\#18267](https://github.com/netdata/netdata/pull/18267) ([ilyam8](https://github.com/ilyam8)) - Fix CI issues in build workflow. [\#18266](https://github.com/netdata/netdata/pull/18266) ([Ferroin](https://github.com/Ferroin)) +- Add detailed reporting of failed checksums in kickstart script. [\#18265](https://github.com/netdata/netdata/pull/18265) ([Ferroin](https://github.com/Ferroin)) - go.d beanstalk [\#18263](https://github.com/netdata/netdata/pull/18263) ([ilyam8](https://github.com/ilyam8)) - Regenerate integrations.js [\#18262](https://github.com/netdata/netdata/pull/18262) ([netdatabot](https://github.com/netdatabot)) - go.d x509check add not\_revoked dimension [\#18261](https://github.com/netdata/netdata/pull/18261) ([ilyam8](https://github.com/ilyam8)) @@ -39,6 +49,7 @@ - Update libbpf \(1.45.0\) [\#18226](https://github.com/netdata/netdata/pull/18226) ([thiagoftsm](https://github.com/thiagoftsm)) - Regenerate integrations.js [\#18225](https://github.com/netdata/netdata/pull/18225) ([netdatabot](https://github.com/netdatabot)) - Update Cloud MSTeam documentation [\#18224](https://github.com/netdata/netdata/pull/18224) ([car12o](https://github.com/car12o)) +- Add code signing for Windows executables. [\#18222](https://github.com/netdata/netdata/pull/18222) ([Ferroin](https://github.com/Ferroin)) - go.d fix netdata dir path on win under msys [\#18221](https://github.com/netdata/netdata/pull/18221) ([ilyam8](https://github.com/ilyam8)) - Port Tomcat collector to Go [\#18220](https://github.com/netdata/netdata/pull/18220) ([Ancairon](https://github.com/Ancairon)) - go.d drop using cancelreader [\#18219](https://github.com/netdata/netdata/pull/18219) ([ilyam8](https://github.com/ilyam8)) @@ -404,19 +415,6 @@ - Win processes \("System" name\) [\#17704](https://github.com/netdata/netdata/pull/17704) ([thiagoftsm](https://github.com/thiagoftsm)) - some markdown fixes [\#17703](https://github.com/netdata/netdata/pull/17703) ([ilyam8](https://github.com/ilyam8)) - go.d fix some JB code inspection issues [\#17702](https://github.com/netdata/netdata/pull/17702) ([ilyam8](https://github.com/ilyam8)) -- Regenerate integrations.js [\#17701](https://github.com/netdata/netdata/pull/17701) ([netdatabot](https://github.com/netdatabot)) -- Corrected grammar and mispelling [\#17699](https://github.com/netdata/netdata/pull/17699) ([zallaevan](https://github.com/zallaevan)) -- go.d dyncfg rm space yaml contentType [\#17698](https://github.com/netdata/netdata/pull/17698) ([ilyam8](https://github.com/ilyam8)) -- Revert "Support to WolfSSL \(Step 1\)" [\#17697](https://github.com/netdata/netdata/pull/17697) ([stelfrag](https://github.com/stelfrag)) -- fix sender parsing when receiving remote input [\#17696](https://github.com/netdata/netdata/pull/17696) ([ktsaou](https://github.com/ktsaou)) -- dyncfg files on disk do not contain colons [\#17694](https://github.com/netdata/netdata/pull/17694) ([ktsaou](https://github.com/ktsaou)) -- Simplify and unify the way we are handling versions. [\#17693](https://github.com/netdata/netdata/pull/17693) ([vkalintiris](https://github.com/vkalintiris)) -- DYNCFG: add userconfig action [\#17692](https://github.com/netdata/netdata/pull/17692) ([ktsaou](https://github.com/ktsaou)) -- Add agent CLI command to remove a stale node [\#17691](https://github.com/netdata/netdata/pull/17691) ([stelfrag](https://github.com/stelfrag)) -- Check for empty dimension id from a plugin [\#17690](https://github.com/netdata/netdata/pull/17690) ([stelfrag](https://github.com/stelfrag)) -- Fix timex slow shutdown [\#17688](https://github.com/netdata/netdata/pull/17688) ([stelfrag](https://github.com/stelfrag)) -- Rename a variable in FreeIMPI \(WolfSSL support\) [\#17687](https://github.com/netdata/netdata/pull/17687) ([thiagoftsm](https://github.com/thiagoftsm)) -- go.d sd fix rspamd classify match [\#17686](https://github.com/netdata/netdata/pull/17686) ([ilyam8](https://github.com/ilyam8)) ## [v1.45.6](https://github.com/netdata/netdata/tree/v1.45.6) (2024-06-05) diff --git a/packaging/version b/packaging/version index acba50951e7bae..147c507b09fb22 100644 --- a/packaging/version +++ b/packaging/version @@ -1 +1 @@ -v1.46.0-249-nightly +v1.46.0-264-nightly