diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/debian/control | 19 | ||||
-rw-r--r-- | contrib/debian/netdata-plugin-logs-management.postinst | 17 | ||||
-rw-r--r-- | contrib/debian/netdata-plugin-logs-management.preinst | 13 | ||||
-rw-r--r-- | contrib/debian/netdata-plugin-perf.postinst | 14 | ||||
-rwxr-xr-x | contrib/debian/rules | 15 |
5 files changed, 65 insertions, 13 deletions
diff --git a/contrib/debian/control b/contrib/debian/control index 4f819ac1..4163aa1d 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -4,6 +4,7 @@ Build-Depends: debhelper (>= 9.20160709), dpkg-dev (>= 1.13.19), zlib1g-dev, uuid-dev, + libcurl4-openssl-dev, libelf-dev, libuv1-dev, liblz4-dev, @@ -15,6 +16,7 @@ Build-Depends: debhelper (>= 9.20160709), libipmimonitoring-dev, libnetfilter-acct-dev, libsnappy-dev, + libpcre2-dev, libprotobuf-dev, libprotoc-dev, libsystemd-dev, @@ -24,7 +26,9 @@ Build-Depends: debhelper (>= 9.20160709), automake, pkg-config, curl, - protobuf-compiler + protobuf-compiler, + bison, + flex Section: net Priority: optional Maintainer: Netdata Builder <bot@netdata.cloud> @@ -55,7 +59,8 @@ Conflicts: netdata-core, netdata-web Suggests: netdata-plugin-cups (= ${source:Version}), netdata-plugin-freeipmi (= ${source:Version}) -Recommends: netdata-plugin-systemd-journal (= ${source:Version}) +Recommends: netdata-plugin-systemd-journal (= ${source:Version}), + netdata-plugin-logs-management (= ${source:Version}) Description: real-time charts for system monitoring Netdata is a daemon that collects data in realtime (per second) and presents a web site to view and analyze them. The presentation @@ -201,3 +206,13 @@ Conflicts: netdata (<< ${source:Version}) Description: The systemd-journal collector for the Netdata Agent This plugin allows the Netdata Agent to present logs from the systemd journal on Netdata Cloud or the local Agent dashboard. + +Package: netdata-plugin-logs-management +Architecture: any +Depends: ${shlibs:Depends}, + netdata (= ${source:Version}) +Pre-Depends: libcap2-bin, adduser +Conflicts: netdata (<< ${source:Version}) +Description: The logs-management plugin for the Netdata Agent + This plugin allows the Netdata Agent to collect logs from the system + and parse them to extract metrics. diff --git a/contrib/debian/netdata-plugin-logs-management.postinst b/contrib/debian/netdata-plugin-logs-management.postinst new file mode 100644 index 00000000..0565b54e --- /dev/null +++ b/contrib/debian/netdata-plugin-logs-management.postinst @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +case "$1" in + configure|reconfigure) + chown root:netdata /usr/libexec/netdata/plugins.d/logs-management.plugin + chmod 0750 /usr/libexec/netdata/plugins.d/logs-management.plugin + if ! setcap "cap_dac_read_search=eip cap_syslog=eip" /usr/libexec/netdata/plugins.d/logs-management.plugin; then + chmod -f 4750 /usr/libexec/netdata/plugins.d/logs-management.plugin + fi + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/contrib/debian/netdata-plugin-logs-management.preinst b/contrib/debian/netdata-plugin-logs-management.preinst new file mode 100644 index 00000000..fcabb415 --- /dev/null +++ b/contrib/debian/netdata-plugin-logs-management.preinst @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +case "$1" in + install) + if ! getent group netdata > /dev/null; then + addgroup --quiet --system netdata + fi + ;; +esac + +#DEBHELPER# diff --git a/contrib/debian/netdata-plugin-perf.postinst b/contrib/debian/netdata-plugin-perf.postinst index 76905878..aa4f0f8d 100644 --- a/contrib/debian/netdata-plugin-perf.postinst +++ b/contrib/debian/netdata-plugin-perf.postinst @@ -7,16 +7,10 @@ case "$1" in chown root:netdata /usr/libexec/netdata/plugins.d/perf.plugin chmod 0750 /usr/libexec/netdata/plugins.d/perf.plugin - if capsh --supports=cap_perfmon 2>/dev/null; then - setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin - ret="$?" - else - setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin - ret="$?" - fi - - if [ "${ret}" -ne 0 ]; then - chmod -f 4750 /usr/libexec/netdata/plugins.d/perf.plugin + if ! setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin 2>/dev/null; then + if ! setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin 2>/dev/null; then + chmod -f 4750 /usr/libexec/netdata/plugins.d/perf.plugin + fi fi ;; esac diff --git a/contrib/debian/rules b/contrib/debian/rules index c1dbb6f6..d0aa3539 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -128,7 +128,17 @@ override_dh_install: # Add systemd-journal plugin install rules mkdir -p $(TOP)-plugin-systemd-journal/usr/libexec/netdata/plugins.d/ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/systemd-journal.plugin \ - $(TOP)-plugin-systemd-journal/usr/libexec/netdata/plugins.d/systemd-journal.plugin; \ + $(TOP)-plugin-systemd-journal/usr/libexec/netdata/plugins.d/systemd-journal.plugin + + # Add logs-management plugin install rules + mkdir -p $(TOP)-plugin-logs-management/usr/libexec/netdata/plugins.d/ + mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/logs-management.plugin \ + $(TOP)-plugin-logs-management/usr/libexec/netdata/plugins.d/logs-management.plugin + mkdir -p $(TOP)-plugin-logs-management/usr/lib/netdata/conf.d/ + mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/logsmanagement.d.conf \ + $(TOP)-plugin-logs-management/usr/lib/netdata/conf.d/logsmanagement.d.conf + mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/logsmanagement.d/ \ + $(TOP)-plugin-logs-management/usr/lib/netdata/conf.d/logsmanagement.d/ # Set the rest of the software in the main package # @@ -221,6 +231,9 @@ override_dh_fixperms: # systemd-journal chmod 4750 $(TOP)-plugin-systemd-journal/usr/libexec/netdata/plugins.d/systemd-journal.plugin + # systemd-journal + chmod 4750 $(TOP)-plugin-logs-management/usr/libexec/netdata/plugins.d/logs-management.plugin + override_dh_installlogrotate: cp system/logrotate/netdata debian/netdata.logrotate dh_installlogrotate |