-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb7870e
commit 8a99b4e
Showing
16 changed files
with
3,838 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Conjur telemetry quickstart | ||
|
||
In order to consume the telemetry data collected by Conjur, you need to setup a Prometheus node to scrape the | ||
`/metrics` endpoint in Conjur. You can then use the myriad of tools that work on top of Prometheus to visualise the data. | ||
|
||
Here, we provide a quickstart that sets up Prometheus and Graphana 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. | ||
|
||
This quickstart auto-magically carries out the following important tasks: | ||
1. Configure Prometheus to consume metrics from the 3 exporters (node, postgres and conjur). | ||
1. Configure Graphana to use Prometheus as a data source. | ||
1. Create an example dashboard in Graphana that brings together all these metrics. | ||
|
||
Once the services are set-up, all the metrics will available within Graphana for visual consumption. | ||
|
||
The "important" tasks listed above are really just carried out by providing configuration files, which can be found under [./files](./files/). | ||
|
||
## Getting Started | ||
|
||
1. Pull the Docker images | ||
|
||
Open a terminal session and change directory to the folder containg this README. Pull the Docker | ||
images defined in `docker-compose.yml`: | ||
``` | ||
docker-compose pull | ||
``` | ||
|
||
**Verification** | ||
When the required images are successfully pulled, the terminal returns the | ||
following: | ||
``` | ||
[+] Running 4/4 | ||
⠿ node-exporter Pulled 1.4s | ||
⠿ prometheus Pulled 1.4s | ||
⠿ pg-prometheus-exporter Pulled 1.4s | ||
⠿ grafana Pulled 1.4s | ||
``` | ||
|
||
1. Start all the services. The services are the Prometheus exporters for postgres and the node (pg-prometheus-exporter and node-exporter), prometheus and graphana. | ||
|
||
Start the services: | ||
``` | ||
docker-compose up -d | ||
``` | ||
|
||
When the services start the terminal returns the following: | ||
``` | ||
[+] Running 4/0 | ||
⠿ Container telemetry-grafana-1 Running 0.0s | ||
⠿ Container telemetry-node-exporter-1 Running 0.0s | ||
⠿ Container telemetry-pg-prometheus-exporter-1 Running 0.0s | ||
⠿ Container telemetry-prometheus-1 Running 0.0s | ||
``` | ||
|
||
**Verification** | ||
Run the following command to see a list of running containers: | ||
``` | ||
docker-compose ps | ||
``` | ||
|
||
1. Use the Graphana UI | ||
|
||
1. On a local browser, navigate to the Graphana UI available at [http://localhost:2345](http://localhost:2345). | ||
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. | ||
1. Once logged in, on the left column, select Dashboards. | ||
![](./select-dashboard.png) | ||
1. Under `General` in the `Browse` tab , select `Conjur Dashboard` from the list of available dashboards. The page should then | ||
be populated with the Conjur Dashboard: | ||
![](./dashboard.png) | ||
1. Use Conjur as usual and observe how your activity is reflected in the updates to the Conjur dashboard. | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: '3' | ||
services: | ||
pg-prometheus-exporter: | ||
image: quay.io/prometheuscommunity/postgres-exporter | ||
environment: | ||
DATA_SOURCE_NAME: postgres://postgres@database/postgres?sslmode=disable | ||
PG_EXPORTER_CONSTANT_LABELS: component=pg | ||
|
||
prometheus: | ||
image: prom/prometheus | ||
volumes: | ||
- ./files/prometheus:/etc/prometheus | ||
ports: | ||
- 9090:9090 | ||
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml | ||
|
||
grafana: | ||
image: grafana/grafana | ||
environment: | ||
- GF_SERVER_HTTP_PORT=2345 | ||
ports: | ||
- 2345:2345 | ||
volumes: | ||
- ./files/grafana/storage:/var/lib/grafana | ||
- ./files/grafana/grafana.ini:/etc/grafana/grafana.ini | ||
- ./files/grafana/provisioning:/etc/grafana/provisioning | ||
- ./files/grafana/dashboards:/etc/grafana/dashboards | ||
|
||
# Node exporter provides CPU and Memory metrics to Prometheus for the Docker | ||
# host machine. | ||
node-exporter: | ||
image: quay.io/prometheus/node-exporter:latest | ||
|
||
networks: | ||
default: | ||
name: conjur-quickstart_default | ||
external: true |
Oops, something went wrong.