Metadata fixes for some collectors (#15982)
Fotis Voutsas committed
Sep 16, 2023 at 20:07 UTC
19f85f76f9a9d5838fe511509141662dc7eb926e
5 files changed
+70
-22
collectors/perf.plugin/metadata.yaml
+40
-4
@@ -40,7 +40,22 @@ modules:
40
description: ""
41
setup:
42
prerequisites:
43
- list: []
43
+ list:
44
+ - title: Install perf plugin
45
+ description: |
46
+ If you are [using our official native DEB/RPM packages](https://github.com/netdata/netdata/blob/master/packaging/installer/UPDATE.md#determine-which-installation-method-you-used), make sure the `netdata-plugin-perf` package is installed.
47
+ - title: Enable the pref plugin
48
+ description: |
49
+ The plugin is disabled by default because the number of PMUs is usually quite limited and it is not desired to allow Netdata to struggle silently for PMUs, interfering with other performance monitoring software.
50
+
51
+ To enable it, use `edit-config` from the Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`, to edit the `netdata.conf` file.
52
+
53
+ ```bash
54
+ cd /etc/netdata # Replace this path with your Netdata config directory, if different
55
+ sudo ./edit-config netdata.conf
56
+ ```
57
+
58
+ Change the value of the `perf` setting to `yes` in the `[plugins]` section. Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate method](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for your system.
59
configuration:
60
file:
61
name: "netdata.conf"
@@ -49,7 +64,7 @@ modules:
64
options:
65
description: |
66
You can get the available options running:
52
-
67
+
68
```bash
69
/usr/libexec/netdata/plugins.d/perf.plugin --help
70
````
@@ -62,7 +77,7 @@ modules:
77
default_value: 1
78
required: false
79
- name: command options
65
- description: Command options that specify charts shown by plugin.
80
+ description: Command options that specify charts shown by plugin. `cycles`, `instructions`, `branch`, `cache`, `bus`, `stalled`, `migrations`, `alignment`, `emulation`, `L1D`, `L1D-prefetch`, `L1I`, `LL`, `DTLB`, `ITLB`, `PBU`.
81
default_value: 1
82
required: true
83
examples:
@@ -84,7 +99,28 @@ modules:
99
command options = cycles
100
troubleshooting:
101
problems:
87
- list: []
102
+ list:
103
+ - name: Debug Mode
104
+ description: |
105
+ You can run `perf.plugin` with the debug option enabled, to troubleshoot issues with it. The output should give you clues as to why the collector isn't working.
106
+
107
+ - Navigate to the `plugins.d` directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on your system, open `netdata.conf` and look for the `plugins` setting under `[directories]`.
108
+
109
+ ```bash
110
+ cd /usr/libexec/netdata/plugins.d/
111
+ ```
112
+
113
+ - Switch to the `netdata` user.
114
+
115
+ ```bash
116
+ sudo -u netdata -s
117
+ ```
118
+
119
+ - Run the `perf.plugin` in debug mode:
120
+
121
+ ```bash
122
+ ./perf.plugin 1 all debug
123
+ ```
124
alerts: []
125
metrics:
126
folding:
collectors/python.d.plugin/hddtemp/metadata.yaml
+1
-1
@@ -105,7 +105,7 @@ modules:
105
examples:
106
folding:
107
enabled: true
108
- title: ""
108
+ title: "Config"
109
list:
110
- name: Basic
111
description: A basic example configuration.
collectors/python.d.plugin/nsd/metadata.yaml
+3
@@ -40,6 +40,9 @@ modules:
40
setup:
41
prerequisites:
42
list:
43
+ - title: NSD version
44
+ description: |
45
+ The version of `nsd` must be 4.0+.
46
- title: Provide Netdata the permissions to run the command
47
description: |
48
Netdata must have permissions to run the `nsd-control stats_noreset` command.
collectors/python.d.plugin/samba/metadata.yaml
+25
-16
@@ -23,9 +23,9 @@ modules:
23
metrics_description: "This collector monitors the performance metrics of Samba file sharing."
24
method_description: |
25
It is using the `smbstatus` command-line tool.
26
-
26
+
27
Executed commands:
28
-
28
+
29
- `sudo -n smbstatus -P`
30
supported_platforms:
31
include: []
@@ -44,32 +44,41 @@ modules:
44
setup:
45
prerequisites:
46
list:
47
+ - title: Enable the samba collector
48
+ description: |
49
+ The `samba` collector is disabled by default. To enable it, use `edit-config` from the Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md), which is typically at `/etc/netdata`, to edit the `python.d.conf` file.
50
+
51
+ ```bash
52
+ cd /etc/netdata # Replace this path with your Netdata config directory, if different
53
+ sudo ./edit-config python.d.conf
54
+ ```
55
+ Change the value of the `samba` setting to `yes`. Save the file and restart the Netdata Agent with `sudo systemctl restart netdata`, or the [appropriate method](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for your system.
56
- title: Permissions and programs
57
description: |
58
To run the collector you need:
50
-
59
+
60
- `smbstatus` program
61
- `sudo` program
62
- `smbd` must be compiled with profiling enabled
63
- `smbd` must be started either with the `-P 1` option or inside `smb.conf` using `smbd profiling level`
55
-
64
+
65
The module uses `smbstatus`, which can only be executed by `root`. It uses `sudo` and assumes that it is configured such that the `netdata` user can execute `smbstatus` as root without a password.
57
-
66
+
67
- add to your `/etc/sudoers` file:
59
-
68
+
69
`which smbstatus` shows the full path to the binary.
61
-
70
+
71
```bash
72
netdata ALL=(root) NOPASSWD: /path/to/smbstatus
73
```
65
-
74
+
75
- Reset Netdata's systemd unit [CapabilityBoundingSet](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Capabilities) (Linux distributions with systemd)
67
-
76
+
77
The default CapabilityBoundingSet doesn't allow using `sudo`, and is quite strict in general. Resetting is not optimal, but a next-best solution given the inability to execute `smbstatus` using `sudo`.
69
-
70
-
78
+
79
+
80
As the `root` user, do the following:
72
-
81
+
82
```cmd
83
mkdir /etc/systemd/system/netdata.service.d
84
echo -e '[Service]\nCapabilityBoundingSet=~' | tee /etc/systemd/system/netdata.service.d/unset-capability-bounding-set.conf
@@ -82,14 +91,14 @@ modules:
91
options:
92
description: |
93
There are 2 sections:
85
-
94
+
95
* Global variables
96
* One or more JOBS that can define multiple different instances to monitor.
88
-
97
+
98
The following options can be defined globally: priority, penalty, autodetection_retry, update_every, but can also be defined per JOB to override the global values.
90
-
99
+
100
Additionally, the following collapsed table contains all the options that can be configured inside a JOB definition.
92
-
101
+
102
Every configuration JOB starts with a `job_name` value which will appear in the dashboard, unless a `name` parameter is specified.
103
folding:
104
title: "Config options"
collectors/python.d.plugin/tomcat/metadata.yaml
+1
-1
@@ -45,7 +45,7 @@ modules:
45
prerequisites:
46
list:
47
- title: Create a read-only `netdata` user, to monitor the `/status` endpoint.
48
- description: You will need this configuring the collector
48
+ description: This is necessary for configuring the collector.
49
configuration:
50
file:
51
name: "python.d/tomcat.conf"