@@ -16,7 +16,9 @@ Prometheus is an open source monitoring system for which Grafana provides out-of
16
16
17
17
In order to provision Prometheus and Grafana, you need bastetools, docker, minikube as dependencies.
18
18
19
- ` vagrant up --provision-with basetools,docker,minikube,prometheus-grafana `
19
+ :bulb : We enable Vault, because we monitor it with Prometheus and we enable Minikube because we host Grafana and Prometheus on Minikkube using Helm
20
+
21
+ ` vagrant up --provision-with basetools,docker,vault,minikube,prometheus-grafana `
20
22
21
23
Prometheus http://localhost:9090 <br />
22
24
Alertmanager http://localhost:9093 <br />
@@ -73,4 +75,55 @@ and you should be able to see some graphs.
73
75
74
76
![ Grafana Dashboard Kubernetes Cluster (Prometheus)] ( images/grafana_dashboard_6417.png?raw=true " Grafana Dashboard Kubernetes Cluster (Prometheus) ")
75
77
78
+ ## Monitoring Hashicorp Vault
79
+
80
+ https://developer.hashicorp.com/vault/docs/configuration/telemetry#prometheus <br />
81
+ https://developer.hashicorp.com/vault/docs/configuration/telemetry
82
+
83
+ In hashicorp/vault.sh we enabled Telemetry in the Vault config file see ` hashicorp/vault.sh `
84
+
85
+ ``` hcl
86
+ # https://developer.hashicorp.com/vault/docs/configuration/telemetry
87
+ # https://developer.hashicorp.com/vault/docs/configuration/telemetry#prometheus
88
+ telemetry {
89
+ disable_hostname = true
90
+ prometheus_retention_time = "12h"
91
+ }
92
+ ```
93
+
94
+ When we install Prometheus with Helm we set a values.yaml file that specify an ` extraScrapeConfigs ` You guessed it! Vault...
95
+
96
+ ` helm install prometheus prometheus-community/prometheus -f /vagrant/prometheus-grafana/values.yaml `
97
+
98
+ [ filename] ( values.yaml ' :include :type=code ')
99
+
100
+ You should now see the Vault target in Prometheus web interface at http://localhost:9090/targets
101
+
102
+ ![ Prometheus Vault Target] ( images/prometheus-targets-vault.png?raw=true " Prometheus Vault Target ")
103
+
104
+ We now need to Grafana Datasource of Type Prometheus based on this Target
105
+
106
+ Please navigate to http://localhost:3000/connections/your-connections/datasources
107
+
108
+ And add a Vault Datasource
109
+
110
+ Name: Vault
111
+ URL: http://10.9.99.10:9090
112
+
113
+ ![ Grafana Datasource Prometheus Vault] ( images/grafana-datasource-prometheus-vault.png?raw=true " Grafana Datasource Prometheus Vault ")
114
+
115
+ Now, let's import the Vault Grafana Dashboard, to do that, click on the top right + and select ` Import Dashboard ` ref: https://grafana.com/grafana/dashboards/12904-hashicorp-vault/
116
+
117
+ ![ Grafana Import Dashboard Vault 12904] ( images/grafana-import-dashboard-vault-12904.png?raw=true " Grafana Import Dashboard Vault 12904 ")
118
+
119
+ Enter ` 12904 ` and click on Load
120
+
121
+ ![ Grafana Import Dashboard Vault 12904 Load] ( images/grafana-import-dashboard-vault-12904-load.png?raw=true " Grafana Import Dashboard Vault 12904 Load ")
122
+
123
+ Navigating to Grafana -> Dashboards you should now be able to see the Hashicorp Vault Grafana Dashboard
124
+
125
+ ![ Grafana Hashicorp Vault Dashboard] ( images/grafana-hashicorp-vault-dashboard.png?raw=true " Grafana Hashicorp Vault Dashboard ")
126
+
127
+ ## Prometheus Grafana Vagrant Provisioner
76
128
129
+ [ filename] ( prometheus-grafana.sh ' :include :type=code ')
0 commit comments