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