Skip to content

Commit 47857c9

Browse files
committed
docs: describe exported metrics
Also extend docs for new portal metrics.
1 parent 1143e1b commit 47857c9

File tree

1 file changed

+80
-6
lines changed

1 file changed

+80
-6
lines changed

README.md

Lines changed: 80 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
This is a [Prometheus](https://prometheus.io/) exporter for the
44
[Cambium cnMaestro Cloud controller](https://cloud.cambiumnetworks.com).
55

6+
Currently, it exports the following metrics:
7+
8+
- AP group status:
9+
- number of devices (APs), config sync status, client count
10+
- per AP:
11+
- up- and downtime
12+
- per radio:
13+
- channel, channel width, power, quality, transfer rate
14+
- Guest access portals:
15+
- number of active sessions per portal and per AP
16+
17+
(This list might be outdated. The authoritative list is defined in the
18+
sources code, see [`collector.go`](./exporter/collector.go)).
19+
620
## Installation
721

822
### Pre-built binary releases
@@ -55,24 +69,84 @@ corresponding metrics endpoints.
5569

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

72+
This template sets up Prometheus to scrape two AP groups ("Default" and
73+
"another-group") and one guest access portal ("VisitorPortal"). Omit one
74+
or the other, if you don't use the portal feature, for example.
75+
76+
In general, you should only need to fill in the `static_configs.targets`
77+
array:
78+
5879
```yml
5980
scrape_configs:
60-
- job_name: cambium
81+
- job_name: cambium_aps
82+
static_configs:
83+
- targets:
84+
# Select the AP groups you care about.
85+
# Visit http://localhost:9836 to view a list of available AP groups.
86+
- Default
87+
- another-group
6188
relabel_configs:
62-
- source_labels: [__address__]
89+
- # convert "NAME" to "/apgroups/NAME/metrics"
90+
source_labels: [__address__]
6391
regex: (.+)
6492
target_label: __metrics_path__
6593
replacement: /apgroups/$1/metrics
94+
- # override "instance" label with address, i.e. the target name
95+
source_labels: [__address__]
96+
target_label: instance
97+
- # overrride address (point to the exporter's real hostname:port)
98+
target_label: __address__
99+
replacement: 127.0.0.1:9836
100+
101+
- job_name: cambium_portals
102+
static_configs:
103+
- targets:
104+
# Select the guest access portals you care about.
105+
# Visit http://localhost:9836 to view a list of available portals.
106+
- VisitorPortal
107+
relabel_configs: # similar to the above
108+
- source_labels: [__address__]
109+
regex: (.+)
110+
target_label: __metrics_path__
111+
replacement: /portals/$1/metrics
66112
- source_labels: [__address__]
67113
target_label: instance
68114
- target_label: __address__
69-
replacement: 127.0.0.1:9836 # The exporter's real hostname:port
115+
replacement: 127.0.0.1:9836
116+
```
117+
118+
<details><summary>Using a combined jobs for AP groups and guest portals</summary>
119+
120+
You can also combine the scrape config above. In this case, the naming of
121+
`static_configs.targets` changes, and you need to prefix either `apgroups/`
122+
or `portals/` to the target name.
123+
124+
```yaml
125+
scrape_configs:
126+
- job_name: cambium
70127
static_configs:
71-
- targets: # select the AP groups you care about
72-
- Default
73-
- another-group
128+
- targets:
129+
# Select the AP groups and portals you care about.
130+
# Visit http://localhost:9836 to view a list of available entries.
131+
- apgroups/Default
132+
- apgroups/another-group
133+
- portals/VisitorPortal
134+
relabel_configs:
135+
- # convert "TYPE/NAME" to "/TYPE/NAME/metrics"
136+
source_labels: [__address__]
137+
regex: (.+)
138+
target_label: __metrics_path__
139+
replacement: /$1/metrics
140+
- # override "instance" label with address, i.e. the target name
141+
source_labels: [__address__]
142+
target_label: instance
143+
- # overrride address (point to the exporter's real hostname:port)
144+
target_label: __address__
145+
replacement: 127.0.0.1:9836
74146
```
75147

148+
</summary>
149+
76150
## License
77151

78152
This exporter is available as open soure under the terms of the

0 commit comments

Comments
 (0)