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
Conjur supports telemetry as an opt-in feature. The telemetry feature has a general purpose mechanism for collection, but currently only supports a single method for export, a Prometheus scrape target endpoint. Below are instructions for enabling and exploring the telemetry feature.
364
+
365
+
In order to enable telemetry in Conjur you must opt-in via configuration.
366
+
You have a choice between setting an environment variable:
367
+
368
+
```sh
369
+
CONJUR_TELEMETRY_ENABLED=true
370
+
```
371
+
372
+
or updating a value in the `conjur.conf` configuration file:
373
+
374
+
```yaml
375
+
telemetry_enabled: true
376
+
```
377
+
378
+
Note that the environment variables takes precedence.
379
+
380
+
1. If you are already running the Conjur Open Source quickstart environment without
381
+
telemetry, bring down the Conjur container:
382
+
383
+
```
384
+
docker-compose down conjur
385
+
```
386
+
387
+
1. Modify `docker-compose.yml` in this repository to enable telemetry
388
+
by setting the `CONJUR_TELEMETRY_ENABLED` environment variable to the value `'true'` (It needs to be a string otherwise the docker-compose YAML parser will not be happy). Below is an illustration of the required change:
389
+
390
+
```yaml
391
+
services:
392
+
# ...
393
+
conjur:
394
+
environment:
395
+
# ...
396
+
CONJUR_TELEMETRY_ENABLED: 'true'
397
+
```
398
+
399
+
1. Start the Conjur Open Source environment using telemetry:
400
+
401
+
- If you had previously been running the Conjur Open Source environment,
402
+
follow the steps 2 and 3 of the
403
+
[Set up a Conjur Open Source environment](#set-up-a-conjur-open-source-environment)
404
+
section above in order to recreate the Conjur container.
405
+
- Otherwise, follow the steps starting from Step 1 of the
406
+
[Set up a Conjur Open Source environment](#set-up-a-conjur-open-source-environment)
407
+
section above.
408
+
409
+
1. Navigate to the [telemetry README](./telemetry/README.md#getting-started) and, starting from step 2, follow the instructions to set up the telemetry related services.
410
+
411
+
The telemetry README provides instructions for a comprehensive quickstart for setting up services such as Prometheus and Grafana,
412
+
creating relevant connections between those services and the Conjur Prometheus scrape target endpoint, and providing an example
413
+
dashboard with the metrics collected by Conjur.
414
+
360
415
### Configuring Conjur with predefined admin password
361
416
362
417
The following command will allow you to specify the admin user's password:
In order to consume the telemetry data collected by Conjur, you need to setup a Prometheus node to scrape the
4
+
`/metrics` endpoint in Conjur. You can then use the myriad of tools that work on top of Prometheus to visualise the data.
5
+
6
+
Here, we provide a quickstart that sets up Prometheus and Grafana to allow you to quickly explore visualisation of the telemetry data collected by Conjur. To be comprehensive in our demostration, this quickstart additionally provides examples of gathering of metrics from services adjacent to Conjur such as Postgres and metrics about the node where Conjur is running.
7
+
8
+
This quickstart auto-magically carries out the following important tasks:
9
+
1. Configure Prometheus to consume metrics from the 3 exporters (node, postgres and conjur).
10
+
1. Configure Grafana to use Prometheus as a data source.
11
+
1. Create an example dashboard in Grafana that brings together all these metrics.
12
+
13
+
Once the services are set-up, all the metrics will available within Grafana for visual consumption.
14
+
15
+
The "important" tasks listed above are really just carried out by providing configuration files, which can be found under [./files](./files/).
16
+
17
+
## Getting Started
18
+
19
+
1. First, follow the instructions of the [README.md in the root directory of the repository](../README.md#use-conjur-with-telemetry) to
20
+
setup Conjur with telemetry. Once completed, those instructions will ask you to come back here and continue with the next step.
21
+
22
+
1. Pull the Docker images
23
+
24
+
Open a terminal session and change directory to the folder containg this README. Pull the Docker
25
+
images defined in `docker-compose.yml`:
26
+
```
27
+
docker-compose pull
28
+
```
29
+
30
+
**Verification**
31
+
When the required images are successfully pulled, the terminal returns the
32
+
following:
33
+
```
34
+
[+] Running 4/4
35
+
⠿ node-exporter Pulled 1.4s
36
+
⠿ prometheus Pulled 1.4s
37
+
⠿ pg-prometheus-exporter Pulled 1.4s
38
+
⠿ grafana Pulled 1.4s
39
+
```
40
+
41
+
1. Start all the services. The services are the Prometheus exporters for postgres and the node (pg-prometheus-exporter and
42
+
node-exporter), prometheus and grafana.
43
+
44
+
Start the services:
45
+
```
46
+
docker-compose up -d
47
+
```
48
+
49
+
When the services start the terminal returns the following:
Run the following command to see a list of running containers:
60
+
```
61
+
docker-compose ps
62
+
```
63
+
64
+
1. Use the Grafana UI
65
+
66
+
1. On a local browser, navigate to the Grafana UI available at [http://localhost:2345](http://localhost:2345).
67
+
1. Log in as `admin`/`admin`. You'll be prompted to change password, but for evaluation purposes you have the option to skip that step.
68
+
1. Once logged in, on the left column, select Dashboards. Under `General` in the `Browse` tab , select `Conjur Dashboard` from the list of available dashboards. See image below.
69
+
70
+

71
+
1. The page should now be populated with the Conjur dashboard. See image below.
72
+
73
+

74
+
1. Use Conjur as usual and observe how your activity is reflected in the updates to the Conjur dashboard.
0 commit comments