Initial Commit
- initial default booting image
This commit is contained in:
43
package/collectd/0001-src-netlink.c-remove-REG_NOERROR.patch
Normal file
43
package/collectd/0001-src-netlink.c-remove-REG_NOERROR.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
From 5e600ae2ad370ddbb759e84ce55a7dfaa9a0bdd7 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sun, 6 Sep 2020 14:17:23 +0200
|
||||
Subject: [PATCH] src/netlink.c: remove REG_NOERROR
|
||||
|
||||
REG_NOERROR is used since version 5.12.0 and
|
||||
https://github.com/collectd/collectd/commit/f7fd32e5209e188db7985a42054252fc4cbfe7c1
|
||||
|
||||
However, REG_NOERROR is not defined by musl, even GNU regex do not
|
||||
mention REG_NOERROR, so just remove it to avoid the following build
|
||||
failure:
|
||||
|
||||
src/netlink.c: In function 'check_ignorelist':
|
||||
src/netlink.c:243:51: error: 'REG_NOERROR' undeclared (first use in this function); did you mean 'REG_NOTBOL'?
|
||||
if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
|
||||
^~~~~~~~~~~
|
||||
REG_NOTBOL
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/cd4d75888b5259b028132dd224be34f69bcbb702
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/collectd/collectd/pull/3569]
|
||||
---
|
||||
src/netlink.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/netlink.c b/src/netlink.c
|
||||
index 7a5da762..fac2fb1e 100644
|
||||
--- a/src/netlink.c
|
||||
+++ b/src/netlink.c
|
||||
@@ -240,7 +240,7 @@ static int check_ignorelist(const char *dev, const char *type,
|
||||
for (ir_ignorelist_t *i = ir_ignorelist_head; i != NULL; i = i->next) {
|
||||
#if HAVE_REGEX_H
|
||||
if (i->rdevice != NULL) {
|
||||
- if (regexec(i->rdevice, dev, 0, NULL, 0) != REG_NOERROR)
|
||||
+ if (regexec(i->rdevice, dev, 0, NULL, 0))
|
||||
continue;
|
||||
} else
|
||||
#endif
|
||||
--
|
||||
2.28.0
|
||||
|
||||
96
package/collectd/0002-configure.ac-fix-grpc-build.patch
Normal file
96
package/collectd/0002-configure.ac-fix-grpc-build.patch
Normal file
@@ -0,0 +1,96 @@
|
||||
From d355618813bb8180e460ba45a0ebd3ce5183e267 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Mon, 22 Jan 2024 22:15:21 +0100
|
||||
Subject: [PATCH] configure.ac: fix grpc build
|
||||
|
||||
abseil and other google tools are now subject to
|
||||
"Google's Foundational C++ Support Policy" [0][1]. This currently
|
||||
mandates gcc 7.3.1 and C++14 as minimum versions. So replace -std=c++11
|
||||
by -std=c++14 to fix following build failure:
|
||||
|
||||
checking whether /home/buildroot/autobuild/instance-0/output-1/host/bin/sparc64-linux-g++ accepts -std=c++11
|
||||
configure:25105: result: yes
|
||||
configure:25127: checking grpc++/grpc++.h usability
|
||||
configure:25127: /home/buildroot/autobuild/instance-0/output-1/host/bin/sparc64-linux-g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O1 -g0 -D_FORTIFY_SOURCE=2 -std=c++11 -DNOMINMAX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.cpp >&5
|
||||
In file included from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/base/config.h:86,
|
||||
from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/base/const_init.h:25,
|
||||
from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/synchronization/mutex.h:67,
|
||||
from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/impl/codegen/sync.h:32,
|
||||
from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/completion_queue.h:41,
|
||||
from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/channel.h:25,
|
||||
from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpcpp/grpcpp.h:52,
|
||||
from /home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/grpc++/grpc++.h:26,
|
||||
from conftest.cpp:167:
|
||||
/home/buildroot/autobuild/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
|
||||
79 | #error "C++ versions less than C++14 are not supported."
|
||||
| ^~~~~
|
||||
|
||||
[0] https://github.com/abseil/abseil-cpp/releases/tag/20230125.0
|
||||
[1] https://github.com/google/oss-policies-info/blob/b842c39db88e6569dfe2cf98be434b03507cb503/foundational-cxx-support-matrix.md
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/e2cf909ab3c356f1881fd18cfa039e87faa10d7d
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Upstream: https://github.com/collectd/collectd/commit/d355618813bb8180e460ba45a0ebd3ce5183e267
|
||||
---
|
||||
configure.ac | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c816d3dbbc..dad27f53b0 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2853,20 +2853,20 @@ PKG_CHECK_MODULES([GRPCPP], [grpc++],
|
||||
fi
|
||||
|
||||
if test "x$withval" != "xno"; then
|
||||
- AC_MSG_CHECKING([whether $CXX accepts -std=c++11])
|
||||
- if test_cxx_flags -std=c++11; then
|
||||
+ AC_MSG_CHECKING([whether $CXX accepts -std=c++14])
|
||||
+ if test_cxx_flags -std=c++14; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
- with_libgrpcpp="no (requires C++11 support)"
|
||||
- with_libprotobuf="no (<google/protobuf/util/time_util.h> requires C++11 support)"
|
||||
+ with_libgrpcpp="no (requires C++14 support)"
|
||||
+ with_libprotobuf="no (<absl/base/policy_checks.h> requires C++14 support)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_libgrpcpp" = "xyes"; then
|
||||
AC_LANG_PUSH(C++)
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
- CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
+ CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
AC_CHECK_HEADERS([grpc++/grpc++.h],
|
||||
[with_libgrpcpp="yes"],
|
||||
[with_libgrpcpp="no (<grpc++/grpc++.h> not found)"]
|
||||
@@ -2880,7 +2880,7 @@ if test "x$with_libgrpcpp" = "xyes"; then
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
SAVE_LDFLAGS="$LDFLAGS"
|
||||
SAVE_LIBS="$LIBS"
|
||||
- CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
+ CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$with_libgrpcpp_ldflags"
|
||||
if test "x$GRPCPP_LIBS" = "x"; then
|
||||
LIBS="-lgrpc++"
|
||||
@@ -2908,7 +2908,7 @@ if test "x$with_libgrpcpp" = "xyes"; then
|
||||
AC_LANG_POP(C++)
|
||||
fi
|
||||
|
||||
-BUILD_WITH_LIBGRPCPP_CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS"
|
||||
+BUILD_WITH_LIBGRPCPP_CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS"
|
||||
BUILD_WITH_LIBGRPCPP_LDFLAGS="$with_libgrpcpp_ldflags"
|
||||
BUILD_WITH_LIBGRPCPP_LIBS="$GRPCPP_LIBS"
|
||||
AC_SUBST([BUILD_WITH_LIBGRPCPP_CPPFLAGS])
|
||||
@@ -4852,7 +4852,7 @@ if test "x$withval" != "xno"; then
|
||||
AC_CHECK_LIB([protobuf], [main],
|
||||
[
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
- CPPFLAGS="-std=c++11 $with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
|
||||
+ CPPFLAGS="-std=c++14 $with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
|
||||
if test "x$PROTOBUF_LIBS" = "x"
|
||||
then
|
||||
PROTOBUF_LIBS="-lprotobuf"
|
||||
@@ -0,0 +1,153 @@
|
||||
From d409ffa2a64cac3fc2abe2bb86ec3a80cb34d0a6 Mon Sep 17 00:00:00 2001
|
||||
From: Jim Klimov <jimklimov+nut@gmail.com>
|
||||
Date: Wed, 31 Aug 2022 11:40:01 +0200
|
||||
Subject: [PATCH] configure.ac, src/nut.c: detect int types required by NUT API
|
||||
we build against
|
||||
|
||||
Either use the stricter int types required by NUT headers since v2.8.0 release,
|
||||
or the relaxed (arch-dependent) types required by older NUT releases - depending
|
||||
on which NUT API version the collectd is building against at the moment.
|
||||
|
||||
Inspired by discussion at https://github.com/networkupstools/nut/issues/1638
|
||||
|
||||
Upstream: https://github.com/collectd/collectd/commit/d409ffa2a64cac3fc2abe2bb86ec3a80cb34d0a6
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
configure.ac | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/nut.c | 4 +--
|
||||
2 files changed, 102 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1737aff316..f88ed26505 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -5881,6 +5881,106 @@ if test "x$with_libupsclient" = "xyes"; then
|
||||
CPPFLAGS="$SAVE_CPPFLAGS"
|
||||
fi
|
||||
|
||||
+if test "x$with_libupsclient" = "xyes"; then
|
||||
+ dnl The m4 script logic below is modelled after NUT_FUNC_GETNAMEINFO_ARGTYPES
|
||||
+ dnl further originating in curl autoconf scripts or beyond. See there for an
|
||||
+ dnl example of general-case logic to handle matching of numerous possible
|
||||
+ dnl data types for each argument in supported API variants.
|
||||
+ dnl Note: techically compiler complains here not about int types themselves,
|
||||
+ dnl but about pointers to such data. We know "out of band" that e.g. NUT
|
||||
+ dnl change to "size_t" happened at once for all arguments in the API, so
|
||||
+ dnl simplify the handling here and now with that assumption.
|
||||
+ AC_LANG_PUSH([C])
|
||||
+ SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
+ SAVE_LDFLAGS="$LDFLAGS"
|
||||
+ SAVE_CFLAGS="$CFLAGS"
|
||||
+ CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
|
||||
+ LDFLAGS="$LDFLAGS $with_libupsclient_libs"
|
||||
+ CFLAGS="$CFLAGS $with_libupsclient_cflags"
|
||||
+ if test "x$GCC" = "xyes"; then
|
||||
+ CFLAGS="$CFLAGS -Wall -Werror"
|
||||
+ fi
|
||||
+
|
||||
+ dnl upscli_splitname() *is* there forever (2007 or older)
|
||||
+ dnl but int types e.g. "port" changed in NUT 2.8.0
|
||||
+ dnl Also this is the UPSCONN_t::port field type:
|
||||
+ AC_CACHE_CHECK([int type of port argument for NUT upscli_splitname],
|
||||
+ [collectd_cv_func_upscli_splitname_args], [
|
||||
+ collectd_cv_func_upscli_splitname_args="unknown"
|
||||
+ for port_arg in 'uint16_t' 'int' ; do
|
||||
+ AC_COMPILE_IFELSE([
|
||||
+ AC_LANG_PROGRAM([
|
||||
+#include <upsclient.h>
|
||||
+/* int upscli_splitname(const char *buf, char **upsname, char **hostname, <port_arg> *port); */
|
||||
+ ],[
|
||||
+const char *origname = "ups@localhost:3493";
|
||||
+$port_arg port=0;
|
||||
+char *hostname;
|
||||
+char *upsname;
|
||||
+int res = upscli_splitname(origname, &upsname, &hostname, &port);
|
||||
+return(res);
|
||||
+ ])
|
||||
+ ],[
|
||||
+ collectd_cv_func_upscli_splitname_args="$port_arg"
|
||||
+ break
|
||||
+ ])
|
||||
+ done
|
||||
+ ])
|
||||
+
|
||||
+ AS_IF([test x"$collectd_cv_func_upscli_splitname_args" = xunknown],
|
||||
+ [AC_MSG_WARN([Can not find proper port type for upscli_splitname()])
|
||||
+ with_libupsclient="no (required data types for NUT API were not detected)"],
|
||||
+ [AC_DEFINE_UNQUOTED(NUT_PORT_TYPE, $collectd_cv_func_upscli_splitname_args,
|
||||
+ [Define to the integer type for TCP/IP ports used by NUT API we build against])
|
||||
+ ])
|
||||
+
|
||||
+
|
||||
+ AC_CACHE_CHECK([int type of length/numbering arguments for NUT upscli_list_next],
|
||||
+ [collectd_cv_func_upscli_list_next_args], [
|
||||
+ collectd_cv_func_upscli_list_next_args="unknown"
|
||||
+ for size_arg in 'size_t' 'unsigned int' 'int' ; do
|
||||
+ AC_COMPILE_IFELSE([
|
||||
+ AC_LANG_PROGRAM([
|
||||
+#include <upsclient.h>
|
||||
+/* int upscli_list_next(UPSCONN_t *ups, <size_arg> numq, const char **query, <size_arg> *numa, char ***answer); */
|
||||
+
|
||||
+#if HAVE_UPSCONN_T
|
||||
+typedef UPSCONN_t collectd_upsconn_t;
|
||||
+#elif HAVE_UPSCONN
|
||||
+typedef UPSCONN collectd_upsconn_t;
|
||||
+#else
|
||||
+#error "Unable to determine the UPS connection type."
|
||||
+#endif
|
||||
+ ],[
|
||||
+$size_arg query_num=0;
|
||||
+$size_arg answer_num=0;
|
||||
+const char * query;
|
||||
+char** answer;
|
||||
+collectd_upsconn_t ups;
|
||||
+int res = upscli_list_next(&ups, query_num, &query, &answer_num, &answer);
|
||||
+return(res);
|
||||
+ ])
|
||||
+ ],[
|
||||
+ collectd_cv_func_upscli_list_next_args="$size_arg"
|
||||
+ break
|
||||
+ ])
|
||||
+ done
|
||||
+ ])
|
||||
+
|
||||
+ AS_IF([test x"$collectd_cv_func_upscli_list_next_args" = xunknown],
|
||||
+ [AC_MSG_WARN([Can not find proper type for array sizes and string lengths used by upscli_list_next()])
|
||||
+ with_libupsclient="no (required data types for NUT API were not detected)"],
|
||||
+ [AC_DEFINE_UNQUOTED(NUT_SIZE_TYPE, $collectd_cv_func_upscli_list_next_args,
|
||||
+ [Define to the integer type for array sizes and string lengths used by NUT API we build against])
|
||||
+ ])
|
||||
+
|
||||
+
|
||||
+ CPPFLAGS="$SAVE_CPPFLAGS"
|
||||
+ LDFLAGS="$SAVE_LDFLAGS"
|
||||
+ CFLAGS="$SAVE_CFLAGS"
|
||||
+ AC_LANG_POP([C])
|
||||
+fi
|
||||
+
|
||||
if test "x$with_libupsclient" = "xyes"; then
|
||||
BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
|
||||
BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
|
||||
diff --git a/src/nut.c b/src/nut.c
|
||||
index a9a6c98380..1a29438b07 100644
|
||||
--- a/src/nut.c
|
||||
+++ b/src/nut.c
|
||||
@@ -46,7 +46,7 @@ struct nut_ups_s {
|
||||
collectd_upsconn_t *conn;
|
||||
char *upsname;
|
||||
char *hostname;
|
||||
- int port;
|
||||
+ NUT_PORT_TYPE port;
|
||||
nut_ups_t *next;
|
||||
};
|
||||
|
||||
@@ -250,7 +250,7 @@ static int nut_read(user_data_t *user_data) {
|
||||
const char *query[3] = {"VAR", ups->upsname, NULL};
|
||||
unsigned int query_num = 2;
|
||||
char **answer;
|
||||
- unsigned int answer_num;
|
||||
+ NUT_SIZE_TYPE answer_num;
|
||||
int status;
|
||||
|
||||
/* (Re-)Connect if we have no connection */
|
||||
@@ -0,0 +1,48 @@
|
||||
From 77f33d05355b115d3384d94c1c4e36c56ea28b09 Mon Sep 17 00:00:00 2001
|
||||
From: James Hilliard <james.hilliard1@gmail.com>
|
||||
Date: Wed, 30 Oct 2024 12:45:51 -0600
|
||||
Subject: [PATCH] configure.ac: fix protoc version check
|
||||
|
||||
The current version check for 3.0.0+ fails to handle cases where
|
||||
protoc is above version 3.0.0 but does not start with a 3, for
|
||||
example protoc may have a version of 28.1.
|
||||
|
||||
To fix this use AX_COMPARE_VERSION to properly compare the version.
|
||||
|
||||
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
|
||||
Upstream: https://github.com/collectd/collectd/pull/4332
|
||||
---
|
||||
configure.ac | 17 ++++++++++-------
|
||||
1 file changed, 10 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 86d2378b..1f7a9cdf 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -4897,13 +4897,16 @@ AC_PATH_PROG([PROTOC], [protoc])
|
||||
have_protoc3="no"
|
||||
if test "x$PROTOC" != "x"; then
|
||||
AC_MSG_CHECKING([for protoc 3.0.0+])
|
||||
- if $PROTOC --version | $EGREP libprotoc.3 >/dev/null; then
|
||||
- protoc3="yes (`$PROTOC --version`)"
|
||||
- have_protoc3="yes"
|
||||
- else
|
||||
- protoc3="no (`$PROTOC --version`)"
|
||||
- fi
|
||||
- AC_MSG_RESULT([$protoc3])
|
||||
+ AC_SUBST([PROTOC_VERSION], [`$PROTOC --version | cut -d ' ' -f 2`])
|
||||
+ AX_COMPARE_VERSION([$PROTOC_VERSION],[ge],[3],
|
||||
+ [
|
||||
+ have_protoc3="yes"
|
||||
+ AC_MSG_RESULT([yes ($PROTOC_VERSION)])
|
||||
+ ],
|
||||
+ [
|
||||
+ AC_MSG_RESULT([no ($PROTOC_VERSION)])
|
||||
+ ]
|
||||
+ )
|
||||
fi
|
||||
AM_CONDITIONAL([HAVE_PROTOC3], [test "x$have_protoc3" = "xyes"])
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
73
package/collectd/0005-configure.ax-fix-grpc-build-2025.patch
Normal file
73
package/collectd/0005-configure.ax-fix-grpc-build-2025.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
From 42b2ede4dadcf88293e408bcdf5645995b61b148 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Nosthoff <buildroot@heine.tech>
|
||||
Date: Wed, 29 Oct 2025 16:48:20 +0100
|
||||
Subject: [PATCH] configure.ac: fix grpc build
|
||||
|
||||
Similar to the previous "configure.ac: fix grpc build" commit:
|
||||
Google bumped it's compiler requirements again [1], hence the c++ version needs to be adjusted to c++17 to be able to build with the latest grpc versions.
|
||||
|
||||
[1] https://github.com/google/oss-policies-info/blob/a5e3ed43d45ad615a20201cea8f7282f595555da/foundational-cxx-support-matrix.md
|
||||
|
||||
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
|
||||
Upstream: https://github.com/collectd/collectd/commit/42b2ede4dadcf88293e408bcdf5645995b61b148
|
||||
---
|
||||
configure.ac | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8aa03fce63..eb6cbbc5d5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -2844,20 +2844,20 @@ PKG_CHECK_MODULES([GRPCPP], [grpc++],
|
||||
fi
|
||||
|
||||
if test "x$withval" != "xno"; then
|
||||
- AC_MSG_CHECKING([whether $CXX accepts -std=c++14])
|
||||
- if test_cxx_flags -std=c++14; then
|
||||
+ AC_MSG_CHECKING([whether $CXX accepts -std=c++17])
|
||||
+ if test_cxx_flags -std=c++17; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
- with_libgrpcpp="no (requires C++14 support)"
|
||||
- with_libprotobuf="no (<absl/base/policy_checks.h> requires C++14 support)"
|
||||
+ with_libgrpcpp="no (requires C++17 support)"
|
||||
+ with_libprotobuf="no (<absl/base/policy_checks.h> requires C++17 support)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$with_libgrpcpp" = "xyes"; then
|
||||
AC_LANG_PUSH(C++)
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
- CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
+ CPPFLAGS="-std=c++17 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
AC_CHECK_HEADERS([grpc++/grpc++.h],
|
||||
[with_libgrpcpp="yes"],
|
||||
[with_libgrpcpp="no (<grpc++/grpc++.h> not found)"]
|
||||
@@ -2871,7 +2871,7 @@ if test "x$with_libgrpcpp" = "xyes"; then
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
SAVE_LDFLAGS="$LDFLAGS"
|
||||
SAVE_LIBS="$LIBS"
|
||||
- CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
+ CPPFLAGS="-std=c++17 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
|
||||
LDFLAGS="$with_libgrpcpp_ldflags"
|
||||
if test "x$GRPCPP_LIBS" = "x"; then
|
||||
LIBS="-lgrpc++"
|
||||
@@ -2899,7 +2899,7 @@ if test "x$with_libgrpcpp" = "xyes"; then
|
||||
AC_LANG_POP(C++)
|
||||
fi
|
||||
|
||||
-BUILD_WITH_LIBGRPCPP_CPPFLAGS="-std=c++14 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS"
|
||||
+BUILD_WITH_LIBGRPCPP_CPPFLAGS="-std=c++17 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS"
|
||||
BUILD_WITH_LIBGRPCPP_LDFLAGS="$with_libgrpcpp_ldflags"
|
||||
BUILD_WITH_LIBGRPCPP_LIBS="$GRPCPP_LIBS"
|
||||
AC_SUBST([BUILD_WITH_LIBGRPCPP_CPPFLAGS])
|
||||
@@ -4843,7 +4843,7 @@ if test "x$withval" != "xno"; then
|
||||
AC_CHECK_LIB([protobuf], [main],
|
||||
[
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
- CPPFLAGS="-std=c++14 $with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
|
||||
+ CPPFLAGS="-std=c++17 $with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
|
||||
if test "x$PROTOBUF_LIBS" = "x"
|
||||
then
|
||||
PROTOBUF_LIBS="-lprotobuf"
|
||||
@@ -0,0 +1,45 @@
|
||||
From be6ac1ed28b4842e8f2e54c39a2b3fc48feaf8b2 Mon Sep 17 00:00:00 2001
|
||||
From: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>
|
||||
Date: Sun, 26 Oct 2025 18:36:56 +0300
|
||||
Subject: [PATCH] virt: Drop ATTRIBUTE_UNUSED for virt_eventloop_timeout_cb
|
||||
|
||||
ATTRIBUTE_UNUSED seems to be never was a public part of the libvirt interface
|
||||
and leads to the following issue with recent libvirt versions were
|
||||
ATTRIBUTE_UNUSED has been renamed to G_GNUC_UNUSED:
|
||||
|
||||
src/virt.c:2209:49: error: expected ';', ',' or ')' before 'ATTRIBUTE_UNUSED'
|
||||
2209 | static void virt_eventloop_timeout_cb(int timer ATTRIBUTE_UNUSED,
|
||||
| ^~~~~~~~~~~~~~~~
|
||||
src/virt.c: In function 'register_event_impl':
|
||||
src/virt.c:2222:26: error: 'virt_eventloop_timeout_cb' undeclared (first use in this function)
|
||||
2222 | virt_eventloop_timeout_cb, NULL, NULL) < 0) {
|
||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
src/virt.c:2222:26: note: each undeclared identifier is reported only once for each function it appears in
|
||||
|
||||
Drop ATTRIBUTE_UNUSED here as there is little use from it.
|
||||
|
||||
Upstream: https://github.com/collectd/collectd/commit/050877ed952ffc15c849803a9b3e77c5cec15f81
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
src/virt.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/virt.c b/src/virt.c
|
||||
index 01c7c777..ee0440e9 100644
|
||||
--- a/src/virt.c
|
||||
+++ b/src/virt.c
|
||||
@@ -2205,8 +2205,9 @@ static int domain_lifecycle_event_cb(__attribute__((unused)) virConnectPtr con_,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void virt_eventloop_timeout_cb(int timer ATTRIBUTE_UNUSED,
|
||||
- void *timer_info) {}
|
||||
+static void
|
||||
+virt_eventloop_timeout_cb(__attribute__((unused)) int timer,
|
||||
+ __attribute__((unused)) void *timer_info) {}
|
||||
|
||||
static int register_event_impl(void) {
|
||||
if (virEventRegisterDefaultImpl() < 0) {
|
||||
--
|
||||
2.55.0
|
||||
|
||||
824
package/collectd/Config.in
Normal file
824
package/collectd/Config.in
Normal file
@@ -0,0 +1,824 @@
|
||||
menuconfig BR2_PACKAGE_COLLECTD
|
||||
bool "collectd"
|
||||
# Uses fork()
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
depends on !BR2_STATIC_LIBS
|
||||
help
|
||||
collectd is a daemon which collects system performance
|
||||
statistics periodically and provides mechanisms to store
|
||||
the values in a variety of ways, for example in RRD files.
|
||||
|
||||
http://collectd.org/
|
||||
|
||||
if BR2_PACKAGE_COLLECTD
|
||||
|
||||
menu "match plugins"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_EMPTY_COUNTER
|
||||
bool "empty counter"
|
||||
help
|
||||
Match counter values which are currently zero.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_HASHED
|
||||
bool "hashed"
|
||||
help
|
||||
Match values using a hash function of the hostname.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_REGEX
|
||||
bool "regex"
|
||||
help
|
||||
Match values by their identifier based on regular expressions.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TIMEDIFF
|
||||
bool "timediff"
|
||||
help
|
||||
Match values with an invalid timestamp.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_VALUE
|
||||
bool "value"
|
||||
help
|
||||
Select values by their data sources' values.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "misc plugins"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_AGGREGATION
|
||||
bool "aggregation"
|
||||
help
|
||||
The Aggregate plugin allows to aggregate multiple values into
|
||||
a single value using one or several consolidation functions,
|
||||
e.g. summation and average.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOGFILE
|
||||
bool "logfile"
|
||||
default y
|
||||
help
|
||||
Writes log messages to a file or STDOUT/STDERR.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOGSTASH
|
||||
bool "logstash"
|
||||
select BR2_PACKAGE_YAJL
|
||||
help
|
||||
Writes log messages formatted as logstash JSON events.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LUA
|
||||
bool "lua"
|
||||
depends on BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
help
|
||||
Embeds a Lua interpreter into collectd and provides an
|
||||
interface to collectd's plugin system.
|
||||
|
||||
comment "lua support needs a Lua interpreter"
|
||||
depends on !BR2_PACKAGE_HAS_LUAINTERPRETER
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL
|
||||
bool "notify_email"
|
||||
depends on !BR2_STATIC_LIBS # libesmtp
|
||||
select BR2_PACKAGE_LIBESMTP
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
help
|
||||
Send an E-mail with the notification message to the
|
||||
configured recipients.
|
||||
|
||||
comment "notify_email needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NOTIFY_NAGIOS
|
||||
bool "notify_nagios"
|
||||
help
|
||||
Sends notifications to Nagios as a passive check result.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SYSLOG
|
||||
bool "syslog"
|
||||
default y
|
||||
help
|
||||
Logs to the standard UNIX logging mechanism.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_THRESHOLD
|
||||
bool "threshold"
|
||||
help
|
||||
Checks values against configured thresholds and creates
|
||||
notifications if values are out of bounds.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "read plugins"
|
||||
|
||||
comment "Select at least one for collectd to be useful"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_APACHE
|
||||
bool "apache"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Collects Apache's mod_status information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_APCUPS
|
||||
bool "apcups"
|
||||
help
|
||||
Collects UPS statistics from apcupsd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_BATTERY
|
||||
bool "battery"
|
||||
help
|
||||
Collects the battery's charge, the drawn current and voltage.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_BIND
|
||||
bool "bind"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
help
|
||||
Collects BIND DNS statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_BUDDYINFO
|
||||
bool "buddyinfo"
|
||||
help
|
||||
Statistics from buddyinfo file about memory fragmentation.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CAPABILITIES
|
||||
bool "capabilities"
|
||||
depends on BR2_aarch64 || BR2_i386 || BR2_x86_64 # dmidecode
|
||||
select BR2_PACKAGE_DMIDECODE # runtime
|
||||
select BR2_PACKAGE_JANSSON
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
help
|
||||
Collects selected static platform data using dmidecode and
|
||||
expose it through micro embedded webserver.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CEPH
|
||||
bool "ceph"
|
||||
select BR2_PACKAGE_YAJL
|
||||
help
|
||||
Statistics from the Ceph distributed storage system.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CHRONY
|
||||
bool "chrony"
|
||||
help
|
||||
Collects NTP data from the chrony NTP server.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CGROUPS
|
||||
bool "cgroups"
|
||||
help
|
||||
Collects CGroups CPU usage accounting.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CONNTRACK
|
||||
bool "conntrack"
|
||||
help
|
||||
Collects the number of entries in Linux's connection tracking
|
||||
table.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CONTEXTSWITCH
|
||||
bool "contextswitch"
|
||||
help
|
||||
Collects the number of context switches done by the operating
|
||||
system.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CPU
|
||||
bool "cpu"
|
||||
help
|
||||
Collects the amount of time spent by the CPU in various
|
||||
states.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CPUFREQ
|
||||
bool "cpufreq"
|
||||
help
|
||||
Collects the current CPU's frequency.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CPUSLEEP
|
||||
bool "cpusleep"
|
||||
help
|
||||
Measures time spent by CPU in deep sleep mode.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CURL
|
||||
bool "curl"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Uses libcurl to read files and then parses them according
|
||||
to the configuration.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CURL_JSON
|
||||
bool "curl-json"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_YAJL
|
||||
help
|
||||
Queries JSON data using the cURL library and parses it
|
||||
according to the user's configuration using YAJL.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CURL_XML
|
||||
bool "curl-xml"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
help
|
||||
Reads files using libcurl and parses it as XML.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DBI
|
||||
bool "dbi"
|
||||
depends on !BR2_STATIC_LIBS
|
||||
select BR2_PACKAGE_LIBDBI
|
||||
help
|
||||
Executes SQL statements on various databases and
|
||||
interprets the returned data.
|
||||
|
||||
comment "dbi support needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DF
|
||||
bool "df"
|
||||
help
|
||||
Collects file system usage information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DISK
|
||||
bool "disk"
|
||||
help
|
||||
Collects performance statistics of hard-disks and partitions.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DNS
|
||||
bool "dns"
|
||||
select BR2_PACKAGE_LIBPCAP
|
||||
help
|
||||
Collects statistics of DNS traffic using libpcap.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY
|
||||
bool "dpdk_telemetry"
|
||||
select BR2_PACKAGE_JANSSON
|
||||
help
|
||||
Collects DPDK ethernet device metrics via dpdk_telemetry
|
||||
library.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_DRBD
|
||||
bool "drbd"
|
||||
help
|
||||
Collect individual drbd resource statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ENTROPY
|
||||
bool "entropy"
|
||||
help
|
||||
Collects the available entropy on a system.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ETHSTAT
|
||||
bool "ethstat"
|
||||
help
|
||||
Collects network interface card statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_EXEC
|
||||
bool "exec"
|
||||
help
|
||||
Executes scripts and reads values back that are printed
|
||||
to STDOUT by that program.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_FHCOUNT
|
||||
bool "fhcount"
|
||||
help
|
||||
File handles statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_FILECOUNT
|
||||
bool "filecount"
|
||||
help
|
||||
Counts the number of files in a directory and all its
|
||||
subdirectories.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_FSCACHE
|
||||
bool "fscache"
|
||||
help
|
||||
Collects information about the file-system based caching
|
||||
infrastructure for network file-systems and other slow media.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_GPS
|
||||
bool "gps"
|
||||
select BR2_PACKAGE_GPSD
|
||||
help
|
||||
Reports the number of satellites seen by and precision
|
||||
of a GPS receiver.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_HUGEPAGES
|
||||
bool "hugepages"
|
||||
help
|
||||
Reports the number of used and free hugepages on Linux.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_INFINIBAND
|
||||
bool "infiniband"
|
||||
help
|
||||
Attributes and counters for each port on each IB device.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_INTERFACE
|
||||
bool "interface"
|
||||
help
|
||||
Collects information about the traffic of network interfaces.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IPC
|
||||
bool "ipc"
|
||||
help
|
||||
IPC counters: semaphores used, number of allocated segments
|
||||
in shared memory and more.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IPMI
|
||||
bool "ipmi"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
select BR2_PACKAGE_OPENIPMI
|
||||
help
|
||||
Read hardware sensors from servers using the Intelligent
|
||||
Platform Management Interface (IPMI).
|
||||
|
||||
comment "ipmi needs a toolchain w/ NPTL"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IPTABLES
|
||||
bool "iptables"
|
||||
select BR2_PACKAGE_IPTABLES
|
||||
help
|
||||
Gather statistics from iptables packet filter.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IPVS
|
||||
bool "ipvs"
|
||||
help
|
||||
Extracts statistics from IP Virtual Server (IPVS), the
|
||||
transport-layer load-balancer of the LVS project.
|
||||
It stores traffic and connections history for each of the
|
||||
Real Servers (RS) behind a local Virtual Server (VS).
|
||||
Collectd must be run on Directors (in LVS jargon).
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_IRQ
|
||||
bool "irq"
|
||||
help
|
||||
Collects the number of interrupts.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOAD
|
||||
bool "load"
|
||||
help
|
||||
Collects the system load.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_LOGPARSER
|
||||
bool "logparser"
|
||||
help
|
||||
Plugin for filtering and parsing log messages.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MD
|
||||
bool "md"
|
||||
help
|
||||
Collects software-RAID device information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MDEVENTS
|
||||
bool "mdevents"
|
||||
help
|
||||
Events from md (Linux Software RAID) devices.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MEMCACHEC
|
||||
bool "memcachec"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
select BR2_PACKAGE_LIBMEMCACHED
|
||||
help
|
||||
Query and parse data from a memcache daemon.
|
||||
|
||||
comment "memcachec needs a toolchain w/ C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MEMCACHED
|
||||
bool "memcached"
|
||||
help
|
||||
Collects statistics from a memcached daemon.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MEMORY
|
||||
bool "memory"
|
||||
help
|
||||
Collects physical memory utilization.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MODBUS
|
||||
bool "modbus"
|
||||
select BR2_PACKAGE_LIBMODBUS
|
||||
help
|
||||
Reads register values from a modbus "slave" via Modbus/TCP.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MYSQL
|
||||
bool "mysql"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # mysql
|
||||
depends on BR2_USE_MMU # mysql
|
||||
depends on BR2_USE_WCHAR # fmt -> mariadb
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # mysql
|
||||
select BR2_PACKAGE_MARIADB
|
||||
help
|
||||
Connects to a MySQL database and issues a "show status"
|
||||
command.
|
||||
|
||||
comment "mysql needs a toolchain w/ C++, threads, wchar"
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \
|
||||
|| !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NETLINK
|
||||
bool "netlink"
|
||||
select BR2_PACKAGE_LIBMNL
|
||||
help
|
||||
Get statistics for interfaces, qdiscs, classes, and filters.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NFS
|
||||
bool "nfs"
|
||||
help
|
||||
Collects information about the usage of the Network File
|
||||
System.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NGINX
|
||||
bool "nginx"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Collects the number of requests handled by the nginx daemon
|
||||
since startup and the number of current connections by state.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NTPD
|
||||
bool "ntpd"
|
||||
help
|
||||
Queries an NTP server and extracts parameters.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NUT
|
||||
bool "nut"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS
|
||||
select BR2_PACKAGE_NUT
|
||||
help
|
||||
The NUT plugin collects uninterruptible power supply (UPS)
|
||||
statistics using the Network UPS Tools (NUT).
|
||||
|
||||
comment "nut needs a toolchain w/ C++, threads"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OLSRD
|
||||
bool "olsrd"
|
||||
help
|
||||
Reads information about meshed networks from olsrd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ONEWIRE
|
||||
bool "onewire"
|
||||
select BR2_PACKAGE_OWFS
|
||||
help
|
||||
Collects temperature information from sensors connected over
|
||||
the OneWire bus.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OPENLDAP
|
||||
bool "openldap"
|
||||
depends on BR2_USE_WCHAR
|
||||
select BR2_PACKAGE_OPENLDAP
|
||||
help
|
||||
Read monitoring information from OpenLDAP's cn=Monitor
|
||||
subtree.
|
||||
|
||||
comment "openldap support needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_OPENVPN
|
||||
bool "openvpn"
|
||||
help
|
||||
Reads the status file of OpenVPN to collect statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_PING
|
||||
bool "ping"
|
||||
select BR2_PACKAGE_LIBOPING
|
||||
help
|
||||
Measures network latency using ICMP "echo requests".
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_POSTGRESQL
|
||||
bool "postgresql"
|
||||
depends on BR2_USE_MMU # postgresql
|
||||
depends on !BR2_sparc # postgresql
|
||||
depends on BR2_USE_WCHAR # postgresql
|
||||
depends on BR2_ENABLE_LOCALE # postgresql
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # postgresql
|
||||
depends on !BR2_STATIC_LIBS # postgresql
|
||||
depends on !BR2_OPTIMIZE_FAST # postgresql
|
||||
select BR2_PACKAGE_POSTGRESQL
|
||||
help
|
||||
Connects to and executes SQL statements on a PostgreSQL
|
||||
database. It then reads back the results and, depending on the
|
||||
configuration, the returned values are then converted into
|
||||
collectd 'value lists'.
|
||||
|
||||
comment "postgresql support needs a toolchain w/ wchar"
|
||||
depends on !BR2_sparc
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
comment "postgresql support can't be built with Optimize for fast"
|
||||
depends on BR2_OPTIMIZE_FAST
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_PROCESSES
|
||||
bool "processes"
|
||||
help
|
||||
Collects the number of processes grouped by state.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_PROTOCOLS
|
||||
bool "protocols"
|
||||
help
|
||||
Collects information about the network protocols.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_REDIS
|
||||
bool "redis"
|
||||
select BR2_PACKAGE_HIREDIS
|
||||
help
|
||||
Connects to one or more instances of Redis.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SENSORS
|
||||
bool "sensors"
|
||||
select BR2_PACKAGE_LM_SENSORS
|
||||
help
|
||||
Collects data from lm-sensors.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SERIAL
|
||||
bool "serial"
|
||||
help
|
||||
Collects the traffic on serial interfaces.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SMART
|
||||
bool "SMART"
|
||||
depends on BR2_PACKAGE_HAS_UDEV # libatasmart
|
||||
select BR2_PACKAGE_LIBATASMART
|
||||
help
|
||||
Collect SMART statistics, notably load cycle count,
|
||||
temperature and bad sectors.
|
||||
|
||||
comment "SMART requires udev to be enabled"
|
||||
depends on !BR2_PACKAGE_HAS_UDEV
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_STATSD
|
||||
bool "StatsD"
|
||||
help
|
||||
StatsD network protocol to allow clients to report "events".
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SNMP
|
||||
bool "snmp"
|
||||
select BR2_PACKAGE_NETSNMP
|
||||
help
|
||||
Reads values from SNMP devices.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SWAP
|
||||
bool "swap"
|
||||
help
|
||||
Collects the amount of memory currently written to disk.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SYNPROXY
|
||||
bool "synproxy"
|
||||
help
|
||||
Synproxy stats plugin.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TABLE
|
||||
bool "table"
|
||||
help
|
||||
Parses table-like structured plain-text files.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TAIL
|
||||
bool "tail"
|
||||
help
|
||||
Tails log files and each line is given to one or more matches
|
||||
which test if the line is relevant for any statistics.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TAIL_CSV
|
||||
bool "tail csv"
|
||||
help
|
||||
Follows (tails) files in CSV format, parses each line and
|
||||
submits extracted values.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_TCPCONNS
|
||||
bool "tcpconns"
|
||||
help
|
||||
Counts the number of TCP connections to/from a specified port.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_THERMAL
|
||||
bool "thermal"
|
||||
help
|
||||
Reads ACPI thermal zone information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_UBI
|
||||
bool "ubi"
|
||||
help
|
||||
UBI (Unsorted Block Images) is an erase block management layer
|
||||
for flash memory devices. UBI serves two purposes, tracking
|
||||
NAND flash bad blocks and providing wear leveling.
|
||||
This plugin collects some stats about UBI devices:
|
||||
* bad physical underlying blocks (bad_peb_count)
|
||||
* max erase counter value (max_ec)
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_UPTIME
|
||||
bool "uptime"
|
||||
help
|
||||
Keeps track of the system uptime.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_USERS
|
||||
bool "users"
|
||||
help
|
||||
Counts the number of users currently logged in.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_VIRT
|
||||
bool "virt"
|
||||
depends on BR2_PACKAGE_LIBVIRT_ARCH_SUPPORTS # libvirt
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # libvirt
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 || !BR2_aarch64 # libvirt
|
||||
depends on BR2_PACKAGE_HAS_UDEV # libvirt
|
||||
depends on BR2_USE_WCHAR # libvirt
|
||||
select BR2_PACKAGE_LIBVIRT
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
help
|
||||
Gather statistics about virtualized guests on a system.
|
||||
|
||||
comment "virt needs udev /dev management, a toolchain w/ wchar, kernel headers >= 3.12 (4.11 for AArch64)"
|
||||
depends on BR2_PACKAGE_LIBVIRT_ARCH_SUPPORTS
|
||||
depends on !BR2_PACKAGE_HAS_UDEV || !BR2_USE_WCHAR || \
|
||||
!(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 && \
|
||||
(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 || !BR2_aarch64))
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_VMEM
|
||||
bool "vmem"
|
||||
help
|
||||
Collects information about the virtual memory subsystem.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WIRELESS
|
||||
bool "wireless"
|
||||
help
|
||||
Collects signal quality, power and noise ratio for WLAN cards.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_ZOOKEEPER
|
||||
bool "zookeeper"
|
||||
help
|
||||
Read data from Zookeeper's MNTR command.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "target plugins"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NOTIFICATION
|
||||
bool "notification"
|
||||
help
|
||||
Create and dispatch a notification.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_REPLACE
|
||||
bool "replace"
|
||||
help
|
||||
Replace parts of an identifier using regular expressions.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SCALE
|
||||
bool "scale"
|
||||
help
|
||||
Scale (multiply) values by an arbitrary number.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_SET
|
||||
bool "set"
|
||||
help
|
||||
Set (overwrite) entire parts of an identifier.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "write plugins"
|
||||
|
||||
comment "Select at least one for collectd to be useful"
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_AMQP
|
||||
bool "amqp"
|
||||
select BR2_PACKAGE_OPENSSL # needs rabbitmq-c with ssl support
|
||||
select BR2_PACKAGE_RABBITMQ_C
|
||||
help
|
||||
Send/receive values via the Advanced Message Queuing Protocol
|
||||
(AMQP).
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_CSV
|
||||
bool "csv"
|
||||
help
|
||||
Writes values to a plain-text file in Comma Separated Values
|
||||
format.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_GRAPHITE
|
||||
bool "graphite"
|
||||
help
|
||||
Writes data collected to Carbon (Graphite's) storage API.
|
||||
http://graphite.wikidot.com/start
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_GRPC
|
||||
bool "grpc"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
|
||||
depends on BR2_INSTALL_LIBSTDCPP # grpc -> protobuf
|
||||
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # grpc -> protobuf
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # grpc -> libabseil-cpp
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
|
||||
select BR2_PACKAGE_GRPC
|
||||
help
|
||||
Send/receive values using the gRPC protocol.
|
||||
|
||||
comment "grpc needs a toolchain w/ C++, gcc >= 8"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_8
|
||||
depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
|
||||
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # grpc
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_MQTT
|
||||
bool "mqtt"
|
||||
select BR2_PACKAGE_MOSQUITTO
|
||||
help
|
||||
Sends metrics to and/or receives metrics from an MQTT broker.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NETWORK
|
||||
bool "network"
|
||||
help
|
||||
Send/receive values from other instances of collectd.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_NETWORK_GCRYPT
|
||||
bool "crypto support"
|
||||
depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
|
||||
depends on BR2_PACKAGE_COLLECTD_NETWORK
|
||||
select BR2_PACKAGE_LIBGCRYPT
|
||||
help
|
||||
Enable crypto support
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_RRDTOOL
|
||||
bool "rrdtool"
|
||||
depends on BR2_USE_WCHAR # rrdtool
|
||||
select BR2_PACKAGE_RRDTOOL
|
||||
help
|
||||
Writes values to RRD-files.
|
||||
|
||||
comment "rrdtool support needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
if BR2_PACKAGE_COLLECTD_RRDTOOL
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_RRDCACHED
|
||||
bool "rrdcached"
|
||||
help
|
||||
Use the RRDtool caching daemon.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_RIEMANN
|
||||
bool "riemann"
|
||||
# riemann-c-client -> protobuf-c
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
|
||||
depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c
|
||||
select BR2_PACKAGE_RIEMANN_C_CLIENT
|
||||
select BR2_PACKAGE_LIBTOOL
|
||||
help
|
||||
Sends data to Riemann, a stream processing and monitoring
|
||||
system.
|
||||
|
||||
comment "riemann needs a toolchain w/ C++, host gcc >= 7"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_HOST_GCC_AT_LEAST_7
|
||||
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_UNIXSOCK
|
||||
bool "unixsock"
|
||||
help
|
||||
Opens a UNIX domain socket and accepts connections.
|
||||
One can send commands to the daemon and receive information.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEHTTP
|
||||
bool "write_http"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
Sends values collected to a web-server using HTTP POST and
|
||||
PUTVAL.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEINFLUXDBUDP
|
||||
bool "write_influxdb_udp"
|
||||
help
|
||||
Sends data to an instance of InfluxDB using the "Line
|
||||
Protocol".
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITELOG
|
||||
bool "write_log"
|
||||
help
|
||||
Writes data to the log.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS
|
||||
bool "write_prometheus"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # protobuf-c
|
||||
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS # protobuf-c
|
||||
depends on BR2_HOST_GCC_AT_LEAST_7 # protobuf-c
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
select BR2_PACKAGE_PROTOBUF_C
|
||||
help
|
||||
Publishes values using an embedded HTTP server, in a format
|
||||
compatible with Prometheus' collectd_exporter.
|
||||
|
||||
comment "write_prometheus needs a toolchain w/ C++, host gcc >= 7"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_HOST_GCC_AT_LEAST_7
|
||||
depends on BR2_PACKAGE_HOST_PROTOBUF_ARCH_SUPPORTS
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITEREDIS
|
||||
bool "write_redis"
|
||||
select BR2_PACKAGE_HIREDIS
|
||||
help
|
||||
Sends data to Redis.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITESENSU
|
||||
bool "write_sensu"
|
||||
help
|
||||
Sends data to Sensu, a stream processing and monitoring
|
||||
system, via the Sensu client local TCP socket.
|
||||
|
||||
config BR2_PACKAGE_COLLECTD_WRITETSDB
|
||||
bool "write_tsdb"
|
||||
help
|
||||
Sends data OpenTSDB, a scalable no master, no shared state
|
||||
time series database.
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
comment "collectd needs a toolchain w/ threads, dynamic library"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
depends on BR2_USE_MMU
|
||||
51
package/collectd/S90collectd
Normal file
51
package/collectd/S90collectd
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
|
||||
DAEMON="collectd"
|
||||
EXEC="/usr/sbin/$DAEMON"
|
||||
PIDFILE="/var/run/$DAEMON.pid"
|
||||
COLLECTD_ARGS=""
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON"
|
||||
|
||||
start() {
|
||||
printf 'Starting %s: ' "$DAEMON"
|
||||
# shellcheck disable=SC2086 # we need the word splitting
|
||||
start-stop-daemon -S -q -p "$PIDFILE" -x "$EXEC" \
|
||||
-- $COLLECTD_ARGS
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
stop() {
|
||||
printf 'Stopping %s: ' "$DAEMON"
|
||||
start-stop-daemon -K -q -p "$PIDFILE"
|
||||
status=$?
|
||||
if [ "$status" -eq 0 ]; then
|
||||
echo "OK"
|
||||
else
|
||||
echo "FAIL"
|
||||
fi
|
||||
return "$status"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start|stop|restart)
|
||||
"$1";;
|
||||
reload)
|
||||
restart;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload}"
|
||||
exit 1
|
||||
esac
|
||||
5
package/collectd/collectd.hash
Normal file
5
package/collectd/collectd.hash
Normal file
@@ -0,0 +1,5 @@
|
||||
# Locally computed checksums
|
||||
sha512 7a15e4c0ae587db4987d673a790a4f3bea1cab29ce24a506fb21fa7bd2f60bfec70867eaa1c1395cb5b0e0ae81a024fb6109b064da0ef50e7c146d2198871c70 collectd-5.12.0.tar.bz2
|
||||
sha256 5bae043042c19c31f77eb8464e56a01a5454e0b39fa07cf7ad0f1bfc9c3a09d6 collectd-5.12.0.tar.bz2
|
||||
sha1 af36fe83e2995270b5632fc21e5a001e6702cdce collectd-5.12.0.tar.bz2
|
||||
sha256 ed0409b2b1c30566dab5fcdaf46ee70e140c99788e22f0267645a9357b476ae4 COPYING
|
||||
271
package/collectd/collectd.mk
Normal file
271
package/collectd/collectd.mk
Normal file
@@ -0,0 +1,271 @@
|
||||
################################################################################
|
||||
#
|
||||
# collectd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
COLLECTD_VERSION = 5.12.0
|
||||
COLLECTD_SITE = \
|
||||
https://github.com/collectd/collectd/releases/download/collectd-$(COLLECTD_VERSION)
|
||||
COLLECTD_SOURCE = collectd-$(COLLECTD_VERSION).tar.bz2
|
||||
COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes
|
||||
COLLECTD_INSTALL_STAGING = YES
|
||||
COLLECTD_LICENSE = MIT (daemon, plugins), GPL-2.0 (plugins), LGPL-2.1 (plugins)
|
||||
COLLECTD_LICENSE_FILES = COPYING
|
||||
COLLECTD_CPE_ID_VENDOR = collectd
|
||||
COLLECTD_SELINUX_MODULES = apache collectd
|
||||
# We're patching configure.ac
|
||||
COLLECTD_AUTORECONF = YES
|
||||
|
||||
# These require unmet dependencies, are fringe, pointless or deprecated
|
||||
COLLECTD_PLUGINS_DISABLE = \
|
||||
apple_sensors aquaero ascent barometer dpdkstat email \
|
||||
gmond hddtemp intel_rdt java lpar \
|
||||
madwifi mbmon mic multimeter netapp notify_desktop numa \
|
||||
oracle perl pf pinba powerdns python routeros \
|
||||
sigrok tape target_v5upgrade teamspeak2 ted \
|
||||
tokyotyrant turbostat uuid varnish vserver write_kafka \
|
||||
write_mongodb xencpu xmms zfs_arc zone
|
||||
|
||||
COLLECTD_CONF_ENV += LIBS="-lm"
|
||||
|
||||
COLLECTD_CFLAGS = $(TARGET_CFLAGS)
|
||||
|
||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
|
||||
COLLECTD_CFLAGS += -O0
|
||||
endif
|
||||
|
||||
COLLECTD_CONF_ENV += CFLAGS="$(COLLECTD_CFLAGS)"
|
||||
|
||||
#
|
||||
# NOTE: There's also a third available setting "intswap", which might
|
||||
# be needed on some old ARM hardware (see [2]), but is not being
|
||||
# accounted for as per discussion [1]
|
||||
#
|
||||
# [1] http://lists.busybox.net/pipermail/buildroot/2017-November/206100.html
|
||||
# [2] http://lists.busybox.net/pipermail/buildroot/2017-November/206251.html
|
||||
#
|
||||
ifeq ($(BR2_ENDIAN),"BIG")
|
||||
COLLECTD_FP_LAYOUT=endianflip
|
||||
else
|
||||
COLLECTD_FP_LAYOUT=nothing
|
||||
endif
|
||||
|
||||
COLLECTD_CONF_OPTS += \
|
||||
--with-nan-emulation \
|
||||
--with-fp-layout=$(COLLECTD_FP_LAYOUT) \
|
||||
--with-perl-bindings=no \
|
||||
--disable-werror \
|
||||
$(foreach p, $(COLLECTD_PLUGINS_DISABLE), --disable-$(p)) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_AGGREGATION),--enable-aggregation,--disable-aggregation) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_AMQP),--enable-amqp,--disable-amqp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APACHE),--enable-apache,--disable-apache) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APCUPS),--enable-apcups,--disable-apcups) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BATTERY),--enable-battery,--disable-battery) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BIND),--enable-bind,--disable-bind) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BUDDYINFO),--enable-buddyinfo,--disable-buddyinfo) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CAPABILITIES),--enable-capabilities,--disable-capabilities) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CEPH),--enable-ceph,--disable-ceph) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CHRONY),--enable-chrony,--disable-chrony) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CGROUPS),--enable-cgroups,--disable-cgroups) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CONNTRACK),--enable-conntrack,--disable-conntrack) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CONTEXTSWITCH),--enable-contextswitch,--disable-contextswitch) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CPU),--enable-cpu,--disable-cpu) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CPUFREQ),--enable-cpufreq,--disable-cpufreq) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CPUSLEEP),--enable-cpusleep,--disable-cpusleep) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CSV),--enable-csv,--disable-csv) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL),--enable-curl,--disable-curl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),--enable-curl_json,--disable-curl_json) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),--enable-curl_xml,--disable-curl_xml) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DBI),--enable-dbi,--disable-dbi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DF),--enable-df,--disable-df) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DISK),--enable-disk,--disable-disk) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DNS),--enable-dns,--disable-dns) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY),--enable-dpdk_telemetry,--disable-dpdk_telemetry) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DRBD),--enable-drbd,--disable-drbd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_EMPTY_COUNTER),--enable-match_empty_counter,--disable-match_empty_counter) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ENTROPY),--enable-entropy,--disable-entropy) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ETHSTAT),--enable-ethstat,--disable-ethstat) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_EXEC),--enable-exec,--disable-exec) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_FHCOUNT),--enable-fhcount,--disable-fhcount) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_FILECOUNT),--enable-filecount,--disable-filecount) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GPS),--enable-gps,--disable-gps) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRPC),--enable-grpc,--disable-grpc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_HUGEPAGES),--enable-hugepages,--disable-hugepages) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_INFINIBAND),--enable-infiniband,--disable-infiniband) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPC),--enable-ipc,--disable-ipc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPMI),--enable-ipmi,--disable-ipmi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),--enable-iptables,--disable-iptables) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPVS),--enable-ipvs,--disable-ipvs) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IRQ),--enable-irq,--disable-irq) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOAD),--enable-load,--disable-load) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGFILE),--enable-logfile,--disable-logfile) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGPARSER),--enable-logparser,--disable-logparser) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),--enable-log_logstash,--disable-log_logstash) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LUA),--enable-lua,--disable-lua) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MD),--enable-md,--disable-md) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MDEVENTS),--enable-mdevents,--disable-mdevents) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),--enable-memcachec,--disable-memcachec) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHED),--enable-memcached,--disable-memcached) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMORY),--enable-memory,--disable-memory) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MODBUS),--enable-modbus,--disable-modbus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MQTT),--enable-mqtt,--disable-mqtt) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MYSQL),--enable-mysql,--disable-mysql) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NETLINK),--enable-netlink,--disable-netlink) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NETWORK),--enable-network,--disable-network) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NFS),--enable-nfs,--disable-nfs) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NGINX),--enable-nginx,--disable-nginx) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFICATION),--enable-target_notification,--disable-target_notification) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),--enable-notify_email,--disable-notify_email) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_NAGIOS),--enable-notify_nagios,--disable-notify_nagios) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NTPD),--enable-ntpd,--disable-ntpd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NUT),--enable-nut,--disable-nut) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OLSRD),--enable-olsrd,--disable-olsrd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),--enable-onewire,--disable-onewire) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),--enable-openldap,--disable-openldap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENVPN),--enable-openvpn,--disable-openvpn) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PING),--enable-ping,--disable-ping) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),--enable-postgresql,--disable-postgresql) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PROCESSES),--enable-processes,--disable-processes) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PROTOCOLS),--enable-protocols,--disable-protocols) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REDIS),--enable-redis,--disable-redis) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REGEX),--enable-match_regex,--disable-match-regex) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REPLACE),--enable-target_replace,--disable-target_replace) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RIEMANN),--enable-write_riemann,--disable-write_riemann) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RRDCACHED),--enable-rrdcached,--disable-rrdcached) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),--enable-rrdtool,--disable-rrdtool) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SCALE),--enable-target_scale,--disable-target_scale) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SENSORS),--enable-sensors,--disable-sensors) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SERIAL),--enable-serial,--disable-serial) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_STATSD),--enable-statsd,--disable-statsd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SET),--enable-target_set,--disable-target_set) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SMART),--enable-smart,--disable-smart) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SNMP),--enable-snmp,--disable-snmp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SWAP),--enable-swap,--disable-swap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SYNPROXY),--enable-synproxy,--disable-synproxy) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SYSLOG),--enable-syslog,--disable-syslog) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TABLE),--enable-table,--disable-table) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TAIL),--enable-tail,--disable-tail) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TAIL_CSV),--enable-tail_csv,--disable-tail_csv) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TCPCONNS),--enable-tcpconns,--disable-tcpconns) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_THERMAL),--enable-thermal,--disable-thermal) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_THRESHOLD),--enable-threshold,--disable-threshold) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_TIMEDIFF),--enable-match_timediff,--disable-match_timediff) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_UBI),--enable-ubi,--disable-ubi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_UNIXSOCK),--enable-unixsock,--disable-unixsock) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_UPTIME),--enable-uptime,--disable-uptime) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_USERS),--enable-users,--disable-users) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_VALUE),--enable-match_value,--disable-match_value) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_VIRT),--enable-virt,--disable-virt) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_VMEM),--enable-vmem,--disable-vmem) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEINFLUXDBUDP),--enable-write_influxdb_udp,--disable-write_influxdb_udp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITELOG),--enable-write_log,--disable-write_log) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),--enable-write_prometheus,--disable-write_prometheus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),--enable-write_redis,--disable-write_redis) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITESENSU),--enable-write_sensu,--disable-write_sensu) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITETSDB),--enable-write_tsdb,--disable-write_tsdb) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ZOOKEEPER),--enable-zookeeper,--disable-zookeeper)
|
||||
|
||||
COLLECTD_DEPENDENCIES = \
|
||||
host-pkgconf \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_AMQP),rabbitmq-c) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_APACHE),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_BIND),libcurl libxml2) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CAPABILITIES),jansson libmicrohttpd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CEPH),yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),libcurl yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DBI),libdbi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_DPDK_TELEMETRY),jansson) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GPS),gpsd) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_GRPC),grpc) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPMI),openipmi) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_LUA),luainterpreter) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MQTT),mosquitto) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_MYSQL),mariadb) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NETLINK),libmnl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NGINX),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),libesmtp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_NUT),nut) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_ONEWIRE),owfs) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),openldap) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_PING),liboping) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),postgresql) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_REDIS),hiredis) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RIEMANN),libtool riemann-c-client) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),rrdtool) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SENSORS),lm-sensors) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SMART),libatasmart) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_SNMP),netsnmp) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_VIRT),libvirt libxml2) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEPROMETHEUS),libmicrohttpd protobuf-c) \
|
||||
$(if $(BR2_PACKAGE_COLLECTD_WRITEREDIS),hiredis)
|
||||
|
||||
# include/library fixups
|
||||
ifeq ($(BR2_PACKAGE_JANSSON),y)
|
||||
COLLECTD_CONF_OPTS += --with-libjansson=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_LUAJIT),y)
|
||||
COLLECTD_CONF_ENV += LIBLUA_PKG_CONFIG_NAME=luajit
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_MARIADB),y)
|
||||
COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_NETSNMP),y)
|
||||
COLLECTD_CONF_OPTS += --with-libnetsnmp=$(STAGING_DIR)/usr
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_POSTGRESQL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config
|
||||
COLLECTD_CONF_ENV += LIBS="-lpthread -lm"
|
||||
endif
|
||||
ifeq ($(BR2_PACKAGE_YAJL),y)
|
||||
COLLECTD_CONF_OPTS += --with-libyajl=$(STAGING_DIR)/usr
|
||||
endif
|
||||
|
||||
# network can use libgcrypt
|
||||
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
||||
COLLECTD_DEPENDENCIES += libgcrypt
|
||||
COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr/bin/libgcrypt-config
|
||||
else
|
||||
COLLECTD_CONF_OPTS += --with-libgcrypt=no
|
||||
endif
|
||||
|
||||
define COLLECTD_INSTALL_TARGET_CMDS
|
||||
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
|
||||
rm -f $(TARGET_DIR)/usr/bin/collectd-nagios
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_PACKAGE_COLLECTD_POSTGRESQL),)
|
||||
define COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
|
||||
rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf
|
||||
endef
|
||||
COLLECTD_POST_INSTALL_TARGET_HOOKS += COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
|
||||
endif
|
||||
|
||||
define COLLECTD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/collectd/collectd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/collectd.service
|
||||
endef
|
||||
|
||||
define COLLECTD_INSTALL_INIT_SYSV
|
||||
$(INSTALL) -D -m 0755 package/collectd/S90collectd \
|
||||
$(TARGET_DIR)/etc/init.d/S90collectd
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
17
package/collectd/collectd.service
Normal file
17
package/collectd/collectd.service
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Statistics collection and monitoring daemon
|
||||
After=local-fs.target network.target
|
||||
Requires=local-fs.target network.target
|
||||
ConditionPathExists=/etc/collectd.conf
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
EnvironmentFile=-/etc/default/collectd
|
||||
ExecStartPre=/usr/sbin/collectd -t
|
||||
ExecStart=/usr/sbin/collectd
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user