|
3 | 3 | This is a [Prometheus](https://prometheus.io/) exporter for the |
4 | 4 | [Cambium cnMaestro Cloud controller](https://cloud.cambiumnetworks.com). |
5 | 5 |
|
| 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 | + |
6 | 20 | ## Installation |
7 | 21 |
|
8 | 22 | ### Pre-built binary releases |
@@ -55,24 +69,84 @@ corresponding metrics endpoints. |
55 | 69 |
|
56 | 70 | Add a scrape config to your Prometheus configuration and reload Prometheus. |
57 | 71 |
|
| 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 | + |
58 | 79 | ```yml |
59 | 80 | 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 |
61 | 88 | relabel_configs: |
62 | | - - source_labels: [__address__] |
| 89 | + - # convert "NAME" to "/apgroups/NAME/metrics" |
| 90 | + source_labels: [__address__] |
63 | 91 | regex: (.+) |
64 | 92 | target_label: __metrics_path__ |
65 | 93 | 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 |
66 | 112 | - source_labels: [__address__] |
67 | 113 | target_label: instance |
68 | 114 | - 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 |
70 | 127 | 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 |
74 | 146 | ``` |
75 | 147 |
|
| 148 | +</summary> |
| 149 | + |
76 | 150 | ## License |
77 | 151 |
|
78 | 152 | This exporter is available as open soure under the terms of the |
|
0 commit comments