You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,8 @@ Once installed, the `jupyterhub-groups-exporter` service will interact with the
41
41
42
42
### Configuration
43
43
44
+
#### Exporter
45
+
44
46
The exporter supports the following argument options:
45
47
46
48
-`--port`: Port to listen on for the groups exporter. Default is `9090`.
@@ -53,9 +55,41 @@ The exporter supports the following argument options:
53
55
-`--jupyterhub_metrics_prefix`: Prefix/namespace for the JupyterHub metrics for Prometheus. Default is `"jupyterhub"`.
54
56
-`--log_level`: Logging level for the exporter service. Options are `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `CRITICAL`. Default is `"INFO"`.
55
57
56
-
### Exporting user group memberships to Prometheus
58
+
#### JupyterHub
59
+
60
+
The [`jupyterhub-groups-exporter`](https://github.com/2i2c-org/jupyterhub-groups-exporter) project provides a [service](https://jupyterhub.readthedocs.io/en/latest/reference/services.html) that integrates with JupyterHub to export user group memberships as Prometheus metrics. This component is readily deployable as part of any JupyterHub instance, such as a standalone deployment or a [Zero to JupyterHub (z2jh)](https://z2jh.jupyter.org/en/stable/) deployment on Kubernetes.
57
61
58
-
The [`jupyterhub-groups-exporter`](https://github.com/2i2c-org/jupyterhub-groups-exporter) project provides a [service](https://jupyterhub.readthedocs.io/en/latest/reference/services.html) that integrates with JupyterHub to export user group memberships as Prometheus metrics. This component is readily deployable as part of any JupyterHub instance, such as a standalone deployment or a Zero to JupyterHub deployment on Kubernetes.
62
+
To enable the `jupyterhub-groups-exporter` service in your JupyterHub deployment, you need to add the service configuration to your JupyterHub configuration through your z2jh chart values. Here is an example configuration:
63
+
64
+
```yaml
65
+
jupyterhub:
66
+
hub:
67
+
services:
68
+
jupyterhub-groups-exporter: {}
69
+
loadRoles:
70
+
jupyterhub-groups-exporter:
71
+
services:
72
+
- jupyterhub-groups-exporter
73
+
scopes:
74
+
- users
75
+
- groups
76
+
```
77
+
78
+
You may also need configure a few settings for your [authenticator](https://oauthenticator.readthedocs.io/en/latest/) to provide group information to the exporter service. Here is an example configuration for the `GitHubOAuthenticator`:
79
+
80
+
```yaml
81
+
jupyterhub:
82
+
hub:
83
+
config:
84
+
GitHubOAuthenticator:
85
+
enable_auth_state: true
86
+
manage_groups: true
87
+
populate_teams_in_auth_state: true
88
+
scope:
89
+
- read:org
90
+
```
91
+
92
+
### Exporting user group memberships to Prometheus
59
93
60
94
The exporter provides a [Gauge metric](https://prometheus.io/docs/concepts/metric_types/) called `jupyterhub_user_group_info`, which contain the following labels:
Copy file name to clipboardExpand all lines: docs/reference/configuration.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Configuration
2
2
3
+
## Exporter
4
+
3
5
The exporter supports the following argument options:
4
6
5
7
-`--port`: Port to listen on for the groups exporter. Default is `9090`.
@@ -11,3 +13,35 @@ The exporter supports the following argument options:
11
13
-`--jupyterhub_namespace`: Kubernetes namespace where the JupyterHub is deployed. Default is fetched from the environment variable `NAMESPACE`.
12
14
-`--jupyterhub_metrics_prefix`: Prefix/namespace for the JupyterHub metrics for Prometheus. Default is `"jupyterhub"`.
13
15
-`--log_level`: Logging level for the exporter service. Options are `DEBUG`, `INFO`, `WARNING`, `ERROR`, and `CRITICAL`. Default is `"INFO"`.
16
+
17
+
## JupyterHub
18
+
19
+
To enable the `jupyterhub-groups-exporter` service in your JupyterHub deployment, you need to add the service configuration to your JupyterHub configuration through your [Zero To JupyterHub](https://z2jh.jupyter.org/en/stable/) (z2jh) chart values. Here is an example configuration:
20
+
21
+
```yaml
22
+
jupyterhub:
23
+
hub:
24
+
services:
25
+
jupyterhub-groups-exporter: {}
26
+
loadRoles:
27
+
jupyterhub-groups-exporter:
28
+
services:
29
+
- jupyterhub-groups-exporter
30
+
scopes:
31
+
- users
32
+
- groups
33
+
```
34
+
35
+
You may also need configure a few settings for your [authenticator](https://oauthenticator.readthedocs.io/en/latest/) to provide group information to the exporter service. Here is an example configuration for the `GitHubOAuthenticator`:
0 commit comments