Skip to content

Commit

Permalink
docs: describe exported metrics
Browse files Browse the repository at this point in the history
Also extend docs for new portal metrics.
  • Loading branch information
dmke committed Jul 21, 2021
1 parent 1143e1b commit 47857c9
Showing 1 changed file with 80 additions and 6 deletions.
86 changes: 80 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
This is a [Prometheus](https://prometheus.io/) exporter for the
[Cambium cnMaestro Cloud controller](https://cloud.cambiumnetworks.com).

Currently, it exports the following metrics:

- AP group status:
- number of devices (APs), config sync status, client count
- per AP:
- up- and downtime
- per radio:
- channel, channel width, power, quality, transfer rate
- Guest access portals:
- number of active sessions per portal and per AP

(This list might be outdated. The authoritative list is defined in the
sources code, see [`collector.go`](./exporter/collector.go)).

## Installation

### Pre-built binary releases
Expand Down Expand Up @@ -55,24 +69,84 @@ corresponding metrics endpoints.

Add a scrape config to your Prometheus configuration and reload Prometheus.

This template sets up Prometheus to scrape two AP groups ("Default" and
"another-group") and one guest access portal ("VisitorPortal"). Omit one
or the other, if you don't use the portal feature, for example.

In general, you should only need to fill in the `static_configs.targets`
array:

```yml
scrape_configs:
- job_name: cambium
- job_name: cambium_aps
static_configs:
- targets:
# Select the AP groups you care about.
# Visit http://localhost:9836 to view a list of available AP groups.
- Default
- another-group
relabel_configs:
- source_labels: [__address__]
- # convert "NAME" to "/apgroups/NAME/metrics"
source_labels: [__address__]
regex: (.+)
target_label: __metrics_path__
replacement: /apgroups/$1/metrics
- # override "instance" label with address, i.e. the target name
source_labels: [__address__]
target_label: instance
- # overrride address (point to the exporter's real hostname:port)
target_label: __address__
replacement: 127.0.0.1:9836

- job_name: cambium_portals
static_configs:
- targets:
# Select the guest access portals you care about.
# Visit http://localhost:9836 to view a list of available portals.
- VisitorPortal
relabel_configs: # similar to the above
- source_labels: [__address__]
regex: (.+)
target_label: __metrics_path__
replacement: /portals/$1/metrics
- source_labels: [__address__]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9836 # The exporter's real hostname:port
replacement: 127.0.0.1:9836
```
<details><summary>Using a combined jobs for AP groups and guest portals</summary>
You can also combine the scrape config above. In this case, the naming of
`static_configs.targets` changes, and you need to prefix either `apgroups/`
or `portals/` to the target name.

```yaml
scrape_configs:
- job_name: cambium
static_configs:
- targets: # select the AP groups you care about
- Default
- another-group
- targets:
# Select the AP groups and portals you care about.
# Visit http://localhost:9836 to view a list of available entries.
- apgroups/Default
- apgroups/another-group
- portals/VisitorPortal
relabel_configs:
- # convert "TYPE/NAME" to "/TYPE/NAME/metrics"
source_labels: [__address__]
regex: (.+)
target_label: __metrics_path__
replacement: /$1/metrics
- # override "instance" label with address, i.e. the target name
source_labels: [__address__]
target_label: instance
- # overrride address (point to the exporter's real hostname:port)
target_label: __address__
replacement: 127.0.0.1:9836
```

</summary>

## License

This exporter is available as open soure under the terms of the
Expand Down

0 comments on commit 47857c9

Please sign in to comment.