summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-05-30 08:38:32 -0400
committerGitHub <noreply@github.com>2023-05-30 08:38:32 -0400
commit1aef5a70d8ba6df58ae29cd320fb0f7c0eeca6f0 (patch)
tree2180fb07537fb3506e877f4c10e1d48ed9a212f8
parent44b6c223b3e13774df45a96dd48588aa8a66ba42 (diff)
Split plugins to individual packages for DEB/RPM packaging. (#13927)
* Update and normalize plugin package descriptions. This ensures they have accurate and cnocise descriptions of what they do, and that the descriptions are the same for both the RPM and DEB packages. * Split NFACCT plugin to it’s own package. Most users do not actually use it, so make life easier for them by reducing our dependency footprint and cutting down on how much they need to download. * Split charts.d.plugin to it’s own package. * Split eBPF plugin and code to their own packages. The code is in a separate package to simplify handling updates for it separately from the main agent code in the future. The eBPF plugin will still be installed by default in most cases when installing the Netdata Agent * Split python.d plugin to it’s own package. The python.d plugin will still be installed by default in most cases when installing the Netdata Agent * Split go.d plugin to it’s own package. The go.d plugin will still be installed by default in most cases when installing the Netdata Agent * Split apps.plugin to it’s own package The apps plugin will still be installed by default in most cases when installing the Netdata Agent * Properly split out postinst scripts for DEB packages. We should be modifying permissions and filecaps for plugins in the specific packages that install those plugins. * Clean up main files section in RPM spec file. This should get rid of the duplicate files warnings, as well as probably producing a more technically correct RPM. * Properly format DEB package descriptions. They should be folded at 76 characters. * Fix dependencies for split RPM plugin packages. * Fix most duplicate file warnings for RPM builds. * Split slabinfo plugin to it’s own package. * Clean up RPM conditional build. All platforms we build RPMs for have both netns and systemd support, so quit supporting platforms that don’t in our spec file. * Include loopsleepms.sh.inc in RPM package. * Fix packaging of nfacct plugin. * Skip building NFACCT plugin on RHEL clones. They lack the required dependencies. * Split perf.plugin to it’s own package. Also, start using CAP_PERFMON for it in RPM packages when available. * Fix typo in DEB postinstall scripts. * Fix issues with ebpf bundling scripts. They don’t need to preserve permissions, and choosing not to do so makes them work more reliably in a number of cases. * Improve dependency handling of secondary plugins. * Fix dependency handling. * Match ebpf code files more specifically in RPM spec file. * Fix branding and dependencies for RPM packages. - Change the eBPF plugin legacy code package name and description to reflect what it actually is. - Properly have the new plugin packages conflict with the older Netdata packages. This is needed for updates to work cleanly. - Only require the eBPF legacy code on older systems that need it. * Fix branding and dependencies for DEB packages. - Change the eBPF plugin legacy code package name and description to reflect what it actually is. - Properly have the new plugin packages conflict with the older Netdata packages. This is needed for updates to work cleanly. * Update docs for non-default plugins. * Have docs link back to package document. * Address review feedback. * Explicitly suggest plugins we are not including by default. This does not pull them in by default, but does make it easier for users to discover them. * Explicitly pull in default plugins on CentOS 7. * Fix broken merge of netdata spec file. * Resolve typo in kickstart script. * Explicitly disable FreeIPMI and NFACCT in RPMs if they are not available. * Fix RPM changelog. * Fix conditional plugin handling. * Fix disabling FreeIPMI on Amazon Linux. * Split new debugfs plugin to separate package. * Install debugfs plugin by default.
-rw-r--r--collectors/charts.d.plugin/README.md2
-rw-r--r--collectors/charts.d.plugin/ap/README.md2
-rw-r--r--collectors/charts.d.plugin/apcupsd/README.md2
-rw-r--r--collectors/charts.d.plugin/libreswan/README.md2
-rw-r--r--collectors/charts.d.plugin/nut/README.md2
-rw-r--r--collectors/charts.d.plugin/opensips/README.md2
-rw-r--r--collectors/charts.d.plugin/sensors/README.md6
-rw-r--r--collectors/nfacct.plugin/README.md5
-rw-r--r--collectors/perf.plugin/README.md3
-rw-r--r--collectors/slabinfo.plugin/README.md3
-rw-r--r--contrib/debian/control129
-rw-r--r--contrib/debian/netdata-plugin-apps.postinst13
-rw-r--r--contrib/debian/netdata-plugin-debugfs.postinst13
-rw-r--r--contrib/debian/netdata-plugin-ebpf.postinst13
-rw-r--r--contrib/debian/netdata-plugin-freeipmi.postinst13
-rw-r--r--contrib/debian/netdata-plugin-go.postinst13
-rw-r--r--contrib/debian/netdata-plugin-nfacct.postinst13
-rw-r--r--contrib/debian/netdata-plugin-perf.postinst17
-rw-r--r--contrib/debian/netdata-plugin-slabinfo.postinst13
-rw-r--r--contrib/debian/netdata.postinst17
-rwxr-xr-xcontrib/debian/rules97
-rw-r--r--netdata.spec.in408
-rwxr-xr-xpackaging/bundle-ebpf.sh2
-rwxr-xr-xpackaging/bundle-libbpf.sh6
-rwxr-xr-xpackaging/installer/kickstart.sh12
25 files changed, 690 insertions, 118 deletions
diff --git a/collectors/charts.d.plugin/README.md b/collectors/charts.d.plugin/README.md
index 3e4edf5625..97c2446fa9 100644
--- a/collectors/charts.d.plugin/README.md
+++ b/collectors/charts.d.plugin/README.md
@@ -17,6 +17,8 @@ memory, collecting data with as little overheads as possible
`charts.d.plugin` looks for scripts in `/usr/lib/netdata/charts.d`.
The scripts should have the filename suffix: `.chart.sh`.
+By default, `charts.d.plugin` is not included as part of the install when using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md). You can install it by installing the `netdata-plugin-chartsd` package.
+
## Configuration
`charts.d.plugin` itself can be [configured](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#use-edit-config-to-edit-configuration-files) using the configuration file `/etc/netdata/charts.d.conf`. This file is also a BASH script.
diff --git a/collectors/charts.d.plugin/ap/README.md b/collectors/charts.d.plugin/ap/README.md
index bc7460a28f..339ad13751 100644
--- a/collectors/charts.d.plugin/ap/README.md
+++ b/collectors/charts.d.plugin/ap/README.md
@@ -85,6 +85,8 @@ Station 40:b8:37:5a:ed:5e (on wlan0)
## Configuration
+If using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), make sure `netdata-plugin-chartsd` is installed.
+
Edit the `charts.d/ap.conf` configuration file using `edit-config` from the Netdata [config
directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`.
diff --git a/collectors/charts.d.plugin/apcupsd/README.md b/collectors/charts.d.plugin/apcupsd/README.md
index 6934d59c03..00e9697dc8 100644
--- a/collectors/charts.d.plugin/apcupsd/README.md
+++ b/collectors/charts.d.plugin/apcupsd/README.md
@@ -13,6 +13,8 @@ Monitors different APC UPS models and retrieves status information using `apcacc
## Configuration
+If using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), make sure `netdata-plugin-chartsd` is installed.
+
Edit the `charts.d/apcupsd.conf` configuration file using `edit-config` from the Netdata [config
directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`.
diff --git a/collectors/charts.d.plugin/libreswan/README.md b/collectors/charts.d.plugin/libreswan/README.md
index a20eb86c0a..b6eeb0180c 100644
--- a/collectors/charts.d.plugin/libreswan/README.md
+++ b/collectors/charts.d.plugin/libreswan/README.md
@@ -24,6 +24,8 @@ The following charts are created, **per tunnel**:
## Configuration
+If using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), make sure `netdata-plugin-chartsd` is installed.
+
Edit the `charts.d/libreswan.conf` configuration file using `edit-config` from the Netdata [config
directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`.
diff --git a/collectors/charts.d.plugin/nut/README.md b/collectors/charts.d.plugin/nut/README.md
index 4488254451..4608ce3e1a 100644
--- a/collectors/charts.d.plugin/nut/README.md
+++ b/collectors/charts.d.plugin/nut/README.md
@@ -53,6 +53,8 @@ The following charts will be created:
## Configuration
+If using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), make sure `netdata-plugin-chartsd` is installed.
+
Edit the `charts.d/nut.conf` configuration file using `edit-config` from the Netdata [config
directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`.
diff --git a/collectors/charts.d.plugin/opensips/README.md b/collectors/charts.d.plugin/opensips/README.md
index c278b53a02..1d73221405 100644
--- a/collectors/charts.d.plugin/opensips/README.md
+++ b/collectors/charts.d.plugin/opensips/README.md
@@ -11,6 +11,8 @@ learn_rel_path: "Integrations/Monitor/Networking"
## Configuration
+If using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), make sure `netdata-plugin-chartsd` is installed.
+
Edit the `charts.d/opensips.conf` configuration file using `edit-config` from the Netdata [config
directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`.
diff --git a/collectors/charts.d.plugin/sensors/README.md b/collectors/charts.d.plugin/sensors/README.md
index 2601a2b65f..0dbe96225b 100644
--- a/collectors/charts.d.plugin/sensors/README.md
+++ b/collectors/charts.d.plugin/sensors/README.md
@@ -21,13 +21,15 @@ One chart for every sensor chip found and each of the above will be created.
## Enable the collector
+If using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), make sure `netdata-plugin-chartsd` is installed.
+
The `sensors` collector is disabled by default.
-To enable the collector, you need to edit the configuration file of `charts.d/sensors.conf`. You can do so by using the `edit config` script.
+To enable the collector, you need to edit the configuration file of `charts.d/sensors.conf`. You can do so by using the `edit config` script.
> ### Info
>
-> To edit configuration files in a safe way, we provide the [`edit config` script](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#use-edit-config-to-edit-configuration-files) located in your [Netdata config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory) (typically is `/etc/netdata`) that creates the proper file and opens it in an editor automatically.
+> To edit configuration files in a safe way, we provide the [`edit config` script](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#use-edit-config-to-edit-configuration-files) located in your [Netdata config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory) (typically is `/etc/netdata`) that creates the proper file and opens it in an editor automatically.
> It is recommended to use this way for configuring Netdata.
>
> Please also note that after most configuration changes you will need to [restart the Agent](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for the changes to take effect.
diff --git a/collectors/nfacct.plugin/README.md b/collectors/nfacct.plugin/README.md
index e8502236fe..ae6597a409 100644
--- a/collectors/nfacct.plugin/README.md
+++ b/collectors/nfacct.plugin/README.md
@@ -13,6 +13,11 @@ learn_rel_path: "Integrations/Monitor/Networking"
## Prerequisites
+If you are using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), install the
+`netdata-plugin-nfacct` package using your system package manager.
+
+If you built Netdata locally:
+
1. install `libmnl-dev` and `libnetfilter-acct-dev` using the package manager of your system.
2. re-install Netdata from source. The installer will detect that the required libraries are now available and will also build `netdata.plugin`.
diff --git a/collectors/perf.plugin/README.md b/collectors/perf.plugin/README.md
index e519be9c47..a8bd4b0e5e 100644
--- a/collectors/perf.plugin/README.md
+++ b/collectors/perf.plugin/README.md
@@ -14,6 +14,9 @@ the `perf_event_open()` system call.
## Important Notes
+If you are using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), you will need to install
+the `netdata-plugin-perf` package using your system package manager.
+
Accessing hardware PMUs requires root permissions, so the plugin is setuid to root.
Keep in mind that the number of PMUs in a system is usually quite limited and every hardware monitoring
diff --git a/collectors/slabinfo.plugin/README.md b/collectors/slabinfo.plugin/README.md
index e0abaff807..abcbe1e3fe 100644
--- a/collectors/slabinfo.plugin/README.md
+++ b/collectors/slabinfo.plugin/README.md
@@ -18,6 +18,9 @@ Each internal structure (process, file descriptor, inode...) is stored within a
The plugin is disabled by default because it collects and displays a huge amount of metrics.
To enable it set `slabinfo = yes` in the `plugins` section of the `netdata.conf` configuration file.
+If you are using [our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/methods/packages.md), you will additionally need to install the `netdata-plugin-slabinfo`
+package using your system package manager.
+
There is currently no configuration needed for the plugin itself.
As `/proc/slabinfo` is only readable by root, this plugin is setuid root.
diff --git a/contrib/debian/control b/contrib/debian/control
index eeeb8d25c6..f4a767b320 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -42,6 +42,17 @@ Conflicts: netdata-core,
netdata-plugins-bash,
netdata-plugins-python,
netdata-web
+Recommends: netdata-plugin-ebpf,
+ netdata-plugin-apps,
+ netdata-plugin-pythond,
+ netdata-plugin-go,
+ netdata-plugin-debugfs
+Suggests: netdata-plugin-cups,
+ netdata-plugin-freeipmi,
+ netdata-plugin-nfacct,
+ netdata-plugin-chartsd,
+ netdata-plugin-slabinfo,
+ netdata-plugin-perf
Pre-Depends: dpkg (>= 1.17.14)
Description: real-time charts for system monitoring
Netdata is a daemon that collects data in realtime (per second)
@@ -54,14 +65,120 @@ Architecture: any
Depends: cups,
${shlibs:Depends},
netdata (>= ${source:Version})
-Description: The Common Unix Printing System plugin for metrics collection from cupsd
+Description: The CUPS metrics collection plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to collect metrics from the Common
+ UNIX Printing System.
Package: netdata-plugin-freeipmi
Architecture: any
Depends: freeipmi,
${shlibs:Depends},
- 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).
+ netdata (>= ${source:Version})
+Description: The FreeIPMI metrics collection plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to collect metrics from hardware
+ using FreeIPMI.
+
+Package: netdata-plugin-nfacct
+Architecture: any
+Depends: ${shlibs:Depends},
+ netdata (>= ${source:Version})
+Conflicts: netdata (< ${source:Version})
+Description: The NFACCT metrics collection plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to collect metrics from the firewall
+ using NFACCT objects.
+
+Package: netdata-plugin-chartsd
+Architecture: all
+Depends: bash,
+ netdata (>= ${source:Version})
+Conflicts: netdata (< ${source:Version})
+Suggests: apcupsd, nut, iw, sudo
+Description: The charts.d metrics collection plugin for the Netdata Agent
+ This plugin adds a selection of additional collectors written in shell
+ script to the Netdata Agent. It includes collectors for NUT, APCUPSD,
+ LibreSWAN, OpenSIPS, and Wireless access point statistics.
+
+Package: netdata-plugin-ebpf
+Architecture: any
+Depends: ${shlibs:Depends},
+ netdata (>= ${source:Version})
+Recommends: netdata-ebpf-code-legacy (>= ${source:Version}),
+ netdata-plugin-apps (>= ${source:Version})
+Conflicts: netdata (< ${source:Version})
+Description: The eBPF metrics collection plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to use eBPF code to collect more
+ detailed kernel-level metrics for the system.
+
+Package: netdata-ebpf-code-legacy
+Architecture: i386 amd64
+Depends: netdata-plugin-ebpf (= ${source:Version})
+Conflicts: netdata (< ${source:Version})
+Description: Compiled eBPF legacy code for the Netdata eBPF plugin
+ This package provides the pre-compiled eBPF legacy code for use by
+ the Netdata eBPF plugin. This code is only needed when using the eBPF
+ plugin with kernel that do not include BTF support (mostly kernel
+ versions lower than 5.10)..
+
+Package: netdata-plugin-pythond
+Architecture: all
+Depends: ${shlibs:Depends},
+ netdata (>= ${source:Version})
+Suggests: sudo
+Conflicts: netdata (< ${source:Version})
+Description: The python.d metrics collection plugin for the Netdata Agent
+ Many of the collectors provided by this package are also available
+ in netdata-plugin-god. In msot cases, you probably want to use those
+ versions instead of the Python versions.
+
+Package: netdata-plugin-go
+Architecture: any
+Depends: ${shlibs:Depends},
+ libcap2-bin,
+ netdata (>= ${source:Version})
+Suggests: nvme-cli, sudo
+Conflicts: netdata (< ${source:Version})
+Description: The go.d metrics collection plugin for the Netdata Agent
+ This plugin adds a selection of additional collectors written in Go to
+ the Netdata Agent. A significant percentage of the application specific
+ collectors provided by Netdata are part of this plugin, so most users
+ will want it installed.
+
+Package: netdata-plugin-apps
+Architecture: any
+Depends: ${shlibs:Depends},
+ libcap2-bin,
+ netdata (>= ${source:Version})
+Conflicts: netdata (< ${source:Version})
+Description: The per-application metrics collection plugin for the Netdata Agent
+ This plugin allows the Netdata Agent to collect per-application and
+ per-user metrics without using cgroups.
+
+Package: netdata-plugin-slabinfo
+Architecture: any
+Depends: ${shlibs:Depends},
+ libcap2-bin,
+ netdata (>= ${source:Version})
+Conflicts: netdata (< ${source:Version})
+Description: The slabinfo metrics collector for the Netdata Agent
+ This plugin allows the Netdata Agent to collect perfromance and
+ utilization metrics for the Linux kernel’s SLAB allocator.
+
+Package: netdata-plugin-perf
+Architecture: any
+Depends: ${shlibs:Depends},
+ libcap2-bin,
+ netdata (>= ${source:Version})
+Conflicts: netdata (< ${source:Version})
+Description: The perf metrics collector for the Netdata Agent
+ This plugin allows the Netdata to collect metrics from the Linux perf
+ subsystem.
+
+Package: netdata-plugin-debugfs
+Architecture: any
+Depends: ${shlibs:Debends},
+ libcap2-bin,
+ netdata (>= ${source:Version})
+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.
diff --git a/contrib/debian/netdata-plugin-apps.postinst b/contrib/debian/netdata-plugin-apps.postinst
new file mode 100644
index 0000000000..c224edd921
--- /dev/null
+++ b/contrib/debian/netdata-plugin-apps.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ setcap "cap_dac_read_search=eip cap_sys_ptrace=eip" /usr/libexec/netdata/plugins.d/apps.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-debugfs.postinst b/contrib/debian/netdata-plugin-debugfs.postinst
new file mode 100644
index 0000000000..f4b04406c0
--- /dev/null
+++ b/contrib/debian/netdata-plugin-debugfs.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ setcap "cap_dac_read_search=eip" /usr/libexec/netdata/plugins.d/debugfs.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-ebpf.postinst b/contrib/debian/netdata-plugin-ebpf.postinst
new file mode 100644
index 0000000000..412bc82e81
--- /dev/null
+++ b/contrib/debian/netdata-plugin-ebpf.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/ebpf.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-freeipmi.postinst b/contrib/debian/netdata-plugin-freeipmi.postinst
new file mode 100644
index 0000000000..303f77d617
--- /dev/null
+++ b/contrib/debian/netdata-plugin-freeipmi.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/freeipmi.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-go.postinst b/contrib/debian/netdata-plugin-go.postinst
new file mode 100644
index 0000000000..90888c4df4
--- /dev/null
+++ b/contrib/debian/netdata-plugin-go.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ setcap "cap_net_admin=eip cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-nfacct.postinst b/contrib/debian/netdata-plugin-nfacct.postinst
new file mode 100644
index 0000000000..d9c8671ae3
--- /dev/null
+++ b/contrib/debian/netdata-plugin-nfacct.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ chmod -f 4750 /usr/libexec/netdata/plugins.d/nfacct.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-perf.postinst b/contrib/debian/netdata-plugin-perf.postinst
new file mode 100644
index 0000000000..731e1aaf62
--- /dev/null
+++ b/contrib/debian/netdata-plugin-perf.postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ if capsh --supports=cap_perfmon 2>/dev/null; then
+ setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin
+ else
+ setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata-plugin-slabinfo.postinst b/contrib/debian/netdata-plugin-slabinfo.postinst
new file mode 100644
index 0000000000..3a66044662
--- /dev/null
+++ b/contrib/debian/netdata-plugin-slabinfo.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure|reconfigure)
+ setcap "cap_dac_read_search=eip" /usr/libexec/netdata/plugins.d/apps.plugin
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/contrib/debian/netdata.postinst b/contrib/debian/netdata.postinst
index 07b5b0eb59..d5c84dc5d0 100644
--- a/contrib/debian/netdata.postinst
+++ b/contrib/debian/netdata.postinst
@@ -59,28 +59,11 @@ case "$1" in
dpkg-statoverride --force --update --add root netdata 0775 /var/lib/netdata/registry > /dev/null 2>&1
chown -R root:netdata /usr/libexec/netdata/plugins.d
- setcap cap_dac_read_search,cap_sys_ptrace+ep /usr/libexec/netdata/plugins.d/apps.plugin
- setcap cap_dac_read_search+ep /usr/libexec/netdata/plugins.d/slabinfo.plugin
setcap cap_dac_read_search+ep /usr/libexec/netdata/plugins.d/debugfs.plugin
- if capsh --supports=cap_perfmon 2>/dev/null; then
- setcap cap_perfmon+ep /usr/libexec/netdata/plugins.d/perf.plugin
- else
- setcap cap_sys_admin+ep /usr/libexec/netdata/plugins.d/perf.plugin
- fi
-
- if [ -f "/usr/libexec/netdata/plugins.d/go.d.plugin" ]; then
- setcap "cap_net_admin+epi cap_net_raw=eip" /usr/libexec/netdata/plugins.d/go.d.plugin
- fi
-
chmod 4750 /usr/libexec/netdata/plugins.d/cgroup-network
- chmod 4750 /usr/libexec/netdata/plugins.d/nfacct.plugin
-
- # Workaround if system does not have ebpf.plugin
- chmod -f 4750 /usr/libexec/netdata/plugins.d/ebpf.plugin || true
# Workaround for other plugins not installed directly by this package
- chmod -f 4750 /usr/libexec/netdata/plugins.d/freeipmi.plugin || true
chmod -f 4750 /usr/libexec/netdata/plugins.d/ioping || true
;;
diff --git a/contrib/debian/rules b/contrib/debian/rules
index 3d458654b8..626b5a69ff 100755
--- a/contrib/debian/rules
+++ b/contrib/debian/rules
@@ -60,6 +60,67 @@ override_dh_install:
mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/freeipmi.plugin \
$(TOP)-plugin-freeipmi/usr/libexec/netdata/plugins.d/freeipmi.plugin
+ # Add free IPMI plugin install rules
+ #
+ mkdir -p $(TOP)-plugin-nfacct/usr/libexec/netdata/plugins.d
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/nfacct.plugin \
+ $(TOP)-plugin-nfacct/usr/libexec/netdata/plugins.d/nfacct.plugin
+
+ # Add charts.d plugin install rules
+ #
+ mkdir -p $(TOP)-plugin-chartsd/usr/libexec/netdata/plugins.d/
+ mkdir -p $(TOP)-plugin-chartsd/usr/lib/netdata/conf.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/charts.d.plugin \
+ $(TOP)-plugin-chartsd/usr/libexec/netdata/plugins.d/charts.d.plugin
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/charts.d.dryrun-helper.sh \
+ $(TOP)-plugin-chartsd/usr/libexec/netdata/plugins.d/charts.d.dryrun-helper.sh
+ mv -f $(TEMPTOP)/usr/libexec/netdata/charts.d \
+ $(TOP)-plugin-chartsd/usr/libexec/netdata/charts.d
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/charts.d.conf \
+ $(TOP)-plugin-chartsd/usr/lib/netdata/conf.d/charts.d.conf
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/charts.d \
+ $(TOP)-plugin-chartsd/usr/lib/netdata/conf.d/charts.d
+
+ # Add ebpf plugin install rules
+ [ $(HAVE_EBPF) -eq 1 ] && mkdir -p $(TOP)-plugin-ebpf/usr/libexec/netdata/plugins.d/
+ [ $(HAVE_EBPF) -eq 1 ] && mkdir -p $(TOP)-plugin-ebpf/usr/lib/netdata/conf.d/
+ [ $(HAVE_EBPF) -eq 1 ] && mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/ebpf.plugin \
+ $(TOP)-plugin-ebpf/usr/libexec/netdata/plugins.d/ebpf.plugin
+ [ $(HAVE_EBPF) -eq 1 ] && mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/ebpf.d.conf \
+ $(TOP)-plugin-ebpf/usr/lib/netdata/conf.d/ebpf.d.conf
+ [ $(HAVE_EBPF) -eq 1 ] && mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/ebpf.d \
+ $(TOP)-plugin-ebpf/usr/lib/netdata/conf.d/ebpf.d
+
+ # Add python plugin install rules
+ mkdir -p $(TOP)-plugin-pythond/usr/libexec/netdata/plugins.d/
+ mkdir -p $(TOP)-plugin-pythond/usr/lib/netdata/conf.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/python.d.plugin \
+ $(TOP)-plugin-pythond/usr/libexec/netdata/plugins.d/python.d.plugin
+ mv -f $(TEMPTOP)/usr/libexec/netdata/python.d \
+ $(TOP)-plugin-pythond/usr/libexec/netdata/python.d
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/python.d.conf \
+ $(TOP)-plugin-pythond/usr/lib/netdata/conf.d/python.d.conf
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/python.d \
+ $(TOP)-plugin-pythond/usr/lib/netdata/conf.d/python.d
+
+ # Add apps plugin install rules
+ mkdir -p $(TOP)-plugin-apps/usr/libexec/netdata/plugins.d/
+ mkdir -p $(TOP)-plugin-apps/usr/lib/netdata/conf.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/apps.plugin \
+ $(TOP)-plugin-apps/usr/libexec/netdata/plugins.d/apps.plugin
+ mv -f $(TEMPTOP)/usr/lib/netdata/conf.d/apps_groups.conf \
+ $(TOP)-plugin-apps/usr/lib/netdata/conf.d/apps_groups.conf
+
+ # Add slabinfo plugin install rules
+ mkdir -p $(TOP)-plugin-slabinfo/usr/libexec/netdata/plugins.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/slabinfo.plugin \
+ $(TOP)-plugin-slabinfo/usr/libexec/netdata/plugins.d/slabinfo.plugin
+
+ # Add perf plugin install rules
+ mkdir -p $(TOP)-plugin-perf/usr/libexec/netdata/plugins.d/
+ mv -f $(TEMPTOP)/usr/libexec/netdata/plugins.d/perf.plugin \
+ $(TOP)-plugin-perf/usr/libexec/netdata/plugins.d/perf.plugin
+
# Set the rest of the software in the main package
#
cp -rp $(TEMPTOP)/usr $(TOP)
@@ -82,13 +143,18 @@ override_dh_install:
ln -s "/usr/share/netdata/www/$$D" "$(TOP)/var/lib/netdata/www/$$D"; \
done
- if [ $(HAVE_EBPF) -eq 1 ]; then \
- packaging/bundle-ebpf.sh . ${TOP}/usr/libexec/netdata/plugins.d; \
- fi
+ # Handle eBPF code
+ #
+ [ $(HAVE_EBPF) -eq 1 ] && mkdir -p $(TOP)-plugin-ebpf-code/usr/libexec/netdata/plugins.d/
+ [ $(HAVE_EBPF) -eq 1 ] && packaging/bundle-ebpf.sh . ${TOP}-plugin-ebpf-code/usr/libexec/netdata/plugins.d/
- # Install go
+ # Install go to it's own package directory
#
- debian/install_go.sh $$(cat ${CURDIR}/packaging/go.d.version) $(TOP)/usr/lib/netdata $(TOP)/usr/libexec/netdata
+ mkdir -p $(TOP)-plugin-go/usr/lib/netdata/conf.d
+ mkdir -p $(TOP)-plugin-go/usr/libexec/netdata/plugins.d
+ debian/install_go.sh $$(cat ${CURDIR}/packaging/go.d.version) \
+ $(TOP)-plugin-go/usr/lib/netdata \
+ $(TOP)-plugin-go/usr/libexec/netdata
override_dh_installdocs:
dh_installdocs
@@ -109,14 +175,22 @@ override_dh_fixperms:
#
chmod 0755 $(TOP)/usr/libexec/netdata/netdata-updater.sh
+ # debugfs plugin
+ chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/debugfs.plugin
+
# apps.plugin should only be runnable by the netdata user. It will be
# given extra capabilities in the postinst script.
#
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/apps.plugin
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/debugfs.plugin
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/perf.plugin
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/slabinfo.plugin
- chmod 0750 $(TOP)/usr/libexec/netdata/plugins.d/go.d.plugin
+ chmod 0750 $(TOP)-plugin-apps/usr/libexec/netdata/plugins.d/apps.plugin
+
+ # slabinfo package
+ chmod 0750 $(TOP)-plugin-slabinfo/usr/libexec/netdata/plugins.d/slabinfo.plugin
+
+ # perf package
+ chmod 0750 $(TOP)-plugin-perf/usr/libexec/netdata/plugins.d/perf.plugin
+
+ # Go plugin package
+ chmod 0750 $(TOP)-plugin-go/usr/libexec/netdata/plugins.d/go.d.plugin
# CUPS plugin package
chmod 0750 $(TOP)-plugin-cups/usr/libexec/netdata/plugins.d/cups.plugin
@@ -124,6 +198,9 @@ override_dh_fixperms:
# freeIPMI plugin package
chmod 4750 $(TOP)-plugin-freeipmi/usr/libexec/netdata/plugins.d/freeipmi.plugin
+ # NFACCT plugin package
+ chmod 4750 $(TOP)-plugin-nfacct/usr/libexec/netdata/plugins.d/nfacct.plugin
+
override_dh_installlogrotate:
cp system/logrotate/netdata debian/netdata.logrotate
dh_installlogrotate
diff --git a/netdata.spec.in b/netdata.spec.in
index 98fdbf71fa..426d105f26 100644
--- a/netdata.spec.in
++