From 517a443636daa1e8085cb4e5325524a54e8a8fd7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 17 Oct 2023 11:30:23 +0200 Subject: Merging upstream version 1.43.0. Signed-off-by: Daniel Baumann --- collectors/charts.d.plugin/ap/README.md | 105 +------------ .../ap/integrations/access_points.md | 173 +++++++++++++++++++++ collectors/charts.d.plugin/ap/metadata.yaml | 3 + 3 files changed, 177 insertions(+), 104 deletions(-) mode change 100644 => 120000 collectors/charts.d.plugin/ap/README.md create mode 100644 collectors/charts.d.plugin/ap/integrations/access_points.md (limited to 'collectors/charts.d.plugin/ap') diff --git a/collectors/charts.d.plugin/ap/README.md b/collectors/charts.d.plugin/ap/README.md deleted file mode 100644 index 339ad1375..000000000 --- a/collectors/charts.d.plugin/ap/README.md +++ /dev/null @@ -1,104 +0,0 @@ - - -# Access point collector - -The `ap` collector visualizes data related to access points. - -## Example Netdata charts - -![image](https://cloud.githubusercontent.com/assets/2662304/12377654/9f566e88-bd2d-11e5-855a-e0ba96b8fd98.png) - -## How it works - -It does the following: - -1. Runs `iw dev` searching for interfaces that have `type AP`. - - From the same output it collects the SSIDs each AP supports by looking for lines `ssid NAME`. - - Example: - -```sh -# iw dev -phy#0 - Interface wlan0 - ifindex 3 - wdev 0x1 - addr 7c:dd:90:77:34:2a - ssid TSAOUSIS - type AP - channel 7 (2442 MHz), width: 20 MHz, center1: 2442 MHz -``` - -2. For each interface found, it runs `iw INTERFACE station dump`. - - From the output is collects: - - - rx/tx bytes - - rx/tx packets - - tx retries - - tx failed - - signal strength - - rx/tx bitrate - - expected throughput - - Example: - -```sh -# iw wlan0 station dump -Station 40:b8:37:5a:ed:5e (on wlan0) - inactive time: 910 ms - rx bytes: 15588897 - rx packets: 127772 - tx bytes: 52257763 - tx packets: 95802 - tx retries: 2162 - tx failed: 28 - signal: -43 dBm - signal avg: -43 dBm - tx bitrate: 65.0 MBit/s MCS 7 - rx bitrate: 1.0 MBit/s - expected throughput: 32.125Mbps - authorized: yes - authenticated: yes - preamble: long - WMM/WME: yes - MFP: no - TDLS peer: no -``` - -3. For each interface found, it creates 6 charts: - - - Number of Connected clients - - Bandwidth for all clients - - Packets for all clients - - Transmit Issues for all clients - - Average Signal among all clients - - Average Bitrate (including average expected throughput) among all clients - -## 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`. - -```bash -cd /etc/netdata # Replace this path with your Netdata config directory, if different -sudo ./edit-config charts.d/ap.conf -``` - -You can only set `ap_update_every=NUMBER` to change the data collection frequency. - -## Auto-detection - -The plugin is able to auto-detect if you are running access points on your linux box. - - diff --git a/collectors/charts.d.plugin/ap/README.md b/collectors/charts.d.plugin/ap/README.md new file mode 120000 index 000000000..5b6e75130 --- /dev/null +++ b/collectors/charts.d.plugin/ap/README.md @@ -0,0 +1 @@ +integrations/access_points.md \ No newline at end of file diff --git a/collectors/charts.d.plugin/ap/integrations/access_points.md b/collectors/charts.d.plugin/ap/integrations/access_points.md new file mode 100644 index 000000000..0d8d39046 --- /dev/null +++ b/collectors/charts.d.plugin/ap/integrations/access_points.md @@ -0,0 +1,173 @@ + + +# Access Points + + + + + +Plugin: charts.d.plugin +Module: ap + + + +## Overview + +The ap collector visualizes data related to wireless access points. + +It uses the `iw` command line utility to detect access points. For each interface that is of `type AP`, it then runs `iw INTERFACE station dump` and collects statistics. + +This collector is only supported on the following platforms: + +- Linux + +This collector only supports collecting metrics from a single instance of this integration. + + +### Default Behavior + +#### Auto-Detection + +The plugin is able to auto-detect if you are running access points on your linux box. + +#### Limits + +The default configuration for this integration does not impose any limits on data collection. + +#### Performance Impact + +The default configuration for this integration is not expected to impose a significant performance impact on the system. + + +## Metrics + +Metrics grouped by *scope*. + +The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels. + + + +### Per wireless device + +These metrics refer to the entire monitored application. + +This scope has no labels. + +Metrics: + +| Metric | Dimensions | Unit | +|:------|:----------|:----| +| ap.clients | clients | clients | +| ap.net | received, sent | kilobits/s | +| ap.packets | received, sent | packets/s | +| ap.issues | retries, failures | issues/s | +| ap.signal | average signal | dBm | +| ap.bitrate | receive, transmit, expected | Mbps | + + + +## Alerts + +There are no alerts configured by default for this integration. + + +## Setup + +### Prerequisites + +#### Install charts.d plugin + +If [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 `netdata-plugin-chartsd` is installed. + + +#### `iw` utility. + +Make sure the `iw` utility is installed. + + +### Configuration + +#### File + +The configuration file name for this integration is `charts.d/ap.conf`. + + +You can edit the configuration file using the `edit-config` script from the +Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/configure/nodes.md#the-netdata-config-directory). + +```bash +cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata +sudo ./edit-config charts.d/ap.conf +``` +#### Options + +The config file is sourced by the charts.d plugin. It's a standard bash file. + +The following collapsed table contains all the options that can be configured for the ap collector. + + +
Config options + +| Name | Description | Default | Required | +|:----|:-----------|:-------|:--------:| +| ap_update_every | The data collection frequency. If unset, will inherit the netdata update frequency. | 1 | False | +| ap_priority | Controls the order of charts at the netdata dashboard. | 6900 | False | +| ap_retries | The number of retries to do in case of failure before disabling the collector. | 10 | False | + +
+ +#### Examples + +##### Change the collection frequency + +Specify a custom collection frequence (update_every) for this collector + +```yaml +# the data collection frequency +# if unset, will inherit the netdata update frequency +ap_update_every=10 + +# the charts priority on the dashboard +#ap_priority=6900 + +# the number of retries to do in case of failure +# before disabling the module +#ap_retries=10 + +``` + + +## Troubleshooting + +### Debug Mode + +To troubleshoot issues with the `ap` collector, run the `charts.d.plugin` with the debug option enabled. The output +should give you clues as to why the collector isn't working. + +- 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]`. + + ```bash + cd /usr/libexec/netdata/plugins.d/ + ``` + +- Switch to the `netdata` user. + + ```bash + sudo -u netdata -s + ``` + +- Run the `charts.d.plugin` to debug the collector: + + ```bash + ./charts.d.plugin debug 1 ap + ``` + + diff --git a/collectors/charts.d.plugin/ap/metadata.yaml b/collectors/charts.d.plugin/ap/metadata.yaml index c4e96a14a..ee941e417 100644 --- a/collectors/charts.d.plugin/ap/metadata.yaml +++ b/collectors/charts.d.plugin/ap/metadata.yaml @@ -41,6 +41,9 @@ modules: setup: prerequisites: list: + - title: "Install charts.d plugin" + description: | + If [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 `netdata-plugin-chartsd` is installed. - title: "`iw` utility." description: "Make sure the `iw` utility is installed." configuration: -- cgit v1.2.3