diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2023-08-04 12:22:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 12:22:53 -0400 |
commit | ca1b3eebb21b8ed8510b738c7ace780b38023efe (patch) | |
tree | 57441836fcb8ea04d9e356d0ac65e2ee3537e805 /contrib | |
parent | 15ee2e7af12f68eec295a2acc9893303cbd2ce72 (diff) |
Add netdata-plugin-systemd-journal package. (#15733)
* Add netdata-plugin-systemd-journal package.
* Fix suggests usage in spec file.
* Skip systemd journal on old platforms in native packages.
* Actually build systemd-journal plugin everywhere.
* Fix spec file syntax.
* Install systemd-journal plugin by default on supported systems.
* Update packaging/installer/netdata-updater.sh
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
* Explicitly mark optional plugins as auto-installed when possible.
---------
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/debian/control | 14 | ||||
-rw-r--r-- | contrib/debian/control.xenial | 61 | ||||
-rw-r--r-- | contrib/debian/netdata-plugin-systemd-journal.postinst | 14 | ||||
-rw-r--r-- | contrib/debian/netdata-plugin-systemd-journal.preinst | 13 | ||||
-rwxr-xr-x | contrib/debian/rules | 7 |
5 files changed, 46 insertions, 63 deletions
diff --git a/contrib/debian/control b/contrib/debian/control index f326c4b90d..e2b0ca140e 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -54,6 +54,7 @@ Conflicts: netdata-core, netdata-web Suggests: netdata-plugin-cups, netdata-plugin-freeipmi +Recommends: netdata-plugin-systemd-journal 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 @@ -182,10 +183,21 @@ Description: The perf metrics collector for the Netdata Agent Package: netdata-plugin-debugfs Architecture: any -Depends: ${shlibs:Debends}, +Depends: ${shlibs:Depends}, netdata (= ${source:Version}) Pre-Depends: libcap2-bin, adduser Conflicts: netdata (<< ${source:Version}) Description: The debugfs metrics collector for the Netdata Agent This plugin allows the Netdata Agent to collect Linux kernel metrics exposed through debugfs. + +Package: netdata-plugin-systemd-journal +Architecture: any +Depends: ${shlibs:Depends}, + netdata (= ${source:Version}) +Pre-Depends: libcap2-bin, adduser +Build-Depends: libsystemd-dev +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. diff --git a/contrib/debian/control.xenial b/contrib/debian/control.xenial deleted file mode 100644 index 43246d7163..0000000000 --- a/contrib/debian/control.xenial +++ /dev/null @@ -1,61 +0,0 @@ -Source: netdata -Build-Depends: debhelper (>= 9), - dh-autoreconf, - dh-systemd (>= 1.5), - dpkg-dev (>= 1.13.19), - zlib1g-dev, - uuid-dev, - libelf-dev, - libuv1-dev, - liblz4-dev, - libssl-dev, - libmnl-dev, - libjson-c-dev, - libcups2-dev, - libipmimonitoring-dev, - libnetfilter-acct-dev, - libsnappy-dev, - libprotobuf-dev, - libprotoc-dev, - cmake, - autogen, - autoconf, - automake, - pkg-config, - curl, - protobuf-compiler -Section: net -Priority: optional -Maintainer: Netdata Builder <bot@netdata.cloud> -Standards-Version: 3.9.6 -Homepage: https://netdata.cloud - -Package: netdata -Architecture: any -Depends: adduser, - libcap2-bin (>= 1:2.0), - lsb-base (>= 3.1-23.2), - openssl, - ${misc:Depends}, - ${shlibs:Depends} -Pre-Depends: dpkg (>= 1.17.14) -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 - is also real-time and full of interactive charts that precisely - render all collected values. - -Package: netdata-plugin-cups -Architecture: any -Depends: cups, - netdata (>= ${source:Version}) -Description: The Common Unix Printing System plugin for metrics collection from cupsd - -Package: netdata-plugin-freeipmi -Architecture: any -Depends: freeipmi, - netdata (= ${source:Version}) -Description: FreeIPMI - The Intelligent Platform Management System. - The IPMI specification defines a set of interfaces for platform management. - It is implemented by a number vendors for system management. The features of IPMI that most users will be interested in - are sensor monitoring, system event monitoring, power control, and serial-over-LAN (SOL). diff --git a/contrib/debian/netdata-plugin-systemd-journal.postinst b/contrib/debian/netdata-plugin-systemd-journal.postinst new file mode 100644 index 0000000000..d2f71970f0 --- /dev/null +++ b/contrib/debian/netdata-plugin-systemd-journal.postinst @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +case "$1" in + configure|reconfigure) + chown root:netdata /usr/libexec/netdata/plugins.d/systemd-journal.plugin + setcap "cap_dac_read_search=eip" /usr/libexec/netdata/plugins.d/systemd-journal.plugin + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/contrib/debian/netdata-plugin-systemd-journal.preinst b/contrib/debian/netdata-plugin-systemd-journal.preinst new file mode 100644 index 0000000000..fcabb415aa --- /dev/null +++ b/contrib/debian/netdata-plugin-systemd-journal.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/rules b/contrib/debian/rules index d41b289b78..c1dbb6f619 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -125,6 +125,11 @@ override_dh_install: mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/debugfs.plugin \ $(TOP)-plugin-debugfs/usr/libexec/netdata/plugins.d/debugfs.plugin + # 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; \ + # Set the rest of the software in the main package # cp -rp $(TEMPTOP)/usr $(TOP) @@ -214,7 +219,7 @@ override_dh_fixperms: chmod 4750 $(TOP)/usr/libexec/netdata/plugins.d/local-listeners # systemd-journal - # chmod 4750 $(TOP)/usr/libexec/netdata/plugins.d/systemd-journal.plugin + chmod 4750 $(TOP)-plugin-systemd-journal/usr/libexec/netdata/plugins.d/systemd-journal.plugin override_dh_installlogrotate: cp system/logrotate/netdata debian/netdata.logrotate |