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: content/manuals/scout/explore/metrics-exporter.md
+16-15
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,13 @@ The metrics endpoint exposes the following metrics:
37
37
## Creating an access token
38
38
39
39
To export metrics from your organization, first make sure your organization is enrolled in Docker Scout.
40
-
Then, create a Personal Access Token (PAT) - a secret token that allows the exporter to authenticate with the Docker Scout API.
40
+
Then, create an Organization Access Token (OAT) - a secret token that allows the exporter to authenticate the organization with the Docker Scout API.
41
41
42
-
The PAT does not require any specific permissions, but it must be created by a user who is an owner of the Docker organization.
43
-
To create a PAT, follow the steps in [Create an access token](/security/for-developers/access-tokens/#create-an-access-token).
42
+
The access token does not require any specific permissions, but it must be an organization access token created for the Docker organization in question,
43
+
or a personal access token created by a user who is an owner of the Docker organization.
44
+
For instructions on how to create an access token, follow the steps in [Create an access token](/security/for-developers/access-tokens/#create-an-access-token).
44
45
45
-
Once you have created the PAT, store it in a secure location.
46
+
Once you have created the access token, store it in a secure location.
46
47
You will need to provide this token to the exporter when scraping metrics.
47
48
48
49
## Prometheus
@@ -70,11 +71,11 @@ Make sure that there's no firewall rule in place preventing the server from comm
70
71
71
72
### Add bearer token authentication
72
73
73
-
To scrape metrics from the Docker Scout Exporter endpoint using Prometheus, you need to configure Prometheus to use the PAT as a bearer token.
74
-
The exporter requires the PAT to be passed in the `Authorization` header of the request.
74
+
To scrape metrics from the Docker Scout Exporter endpoint using Prometheus, you need to configure Prometheus to use the Docker access token as a bearer token.
75
+
The exporter requires the access token to be passed in the `Authorization` header of the request.
75
76
76
77
Update the Prometheus configuration file to include the `authorization` configuration block.
77
-
This block defines the PAT as a bearer token stored in a file:
78
+
This block defines the access token as a bearer token stored in a file:
78
79
79
80
```yaml
80
81
scrape_configs:
@@ -84,10 +85,10 @@ scrape_configs:
84
85
credentials_file: /etc/prometheus/token
85
86
```
86
87
87
-
The content of the file should be the PAT in plain text:
88
+
The content of the file should be the access token in plain text:
88
89
89
90
```console
90
-
dckr_pat_...
91
+
dckr_oat_...
91
92
```
92
93
93
94
If you are running Prometheus in a Docker container or Kubernetes pod, mount the file into the container using a volume or secret.
@@ -112,7 +113,7 @@ alongside Grafana with a pre-configured dashboard to visualize the vulnerability
112
113
and store it in a plain text file at `/prometheus/prometheus/token` under the template directory.
113
114
114
115
```plaintext {title=token}
115
-
$ echo $DOCKER_PAT > ./prometheus/token
116
+
$ echo $DOCKER_TOKEN > ./prometheus/token
116
117
```
117
118
118
119
3. In the Prometheus configuration file at `/prometheus/prometheus/prometheus.yml`,
@@ -245,7 +246,7 @@ and a Datadog site.
245
246
and store it in a plain text file at `/datadog/token` under the template directory.
246
247
247
248
```plaintext {title=token}
248
-
$ echo $DOCKER_PAT > ./token
249
+
$ echo $DOCKER_TOKEN > ./token
249
250
```
250
251
251
252
3. In the `/datadog/compose.yaml` file, update the `DD_API_KEY` and `DD_SITE` environment variables
@@ -346,8 +347,8 @@ To change the scrape interval:
346
347
347
348
## Revoke an access token
348
349
349
-
If you suspect that your PAT has been compromised or is no longer needed, you can revoke it at any time.
350
-
To revoke a PAT, follow the steps in the [Create and manage access tokens](/security/for-developers/access-tokens/#modify-existing-tokens).
350
+
If you suspect that your access token has been compromised or is no longer needed, you can revoke it at any time.
351
+
To revoke an access token, follow the steps in the [Create and manage access tokens](/security/for-developers/access-tokens/#modify-existing-tokens).
351
352
352
-
Revoking a PAT immediately invalidates the token, and prevents Prometheus from scraping metrics using that token.
353
-
You will need to create a new PAT and update the Prometheus configuration to use the new token.
353
+
Revoking an access token immediately invalidates the token, and prevents Prometheus from scraping metrics using that token.
354
+
You will need to create a new access token and update the Prometheus configuration to use the new token.
0 commit comments