This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Run System
Hessam Shahriari edited this page Feb 13, 2020
·
1 revision
In order to run all logging and metric apps, on an environment with Hashicorp stack installed, complete the followings:
- Login to Azure Portal, create a new resource group, create a Log Analytics workspace under this new resource group, and then attached a Container Monitoring solution to it.
- Once he workspace is created, navigate to the workspace, and click on Advanced setting, and copy both Workspace ID and Primary Key:
![Screen Shot 2020-02-13 at 12 51 30 PM](https://user-images.githubusercontent.com/987473/74463311-aa0c1680-4e5f-11ea-8224-e5c87da8e83f.png)
- Login to Vault, and write down the wsid, and key as follow:
$ vault write secret/azure/logs/wsid value=XXXXX
$ vault write secret/azure/logs/key value=XXXX
NOTE: In new version of Vault you have to use KV engine.
- Clone this repo, and write the policy file located at
azure-log.hcl/azure-log-policy.hcl
:
$ vault policy write azure-log azure-log-policy.hcl
- Run OMS containers that collect and ship data buy running the nomad job located at
azure-log.hcl/azure-log.hcl
:
$ nomad plan azure-log.hcl
$ nomad run azure.log.hcl
- For metrics, we need to deploy Prometheus server, Pushgateway server, CAdvisor, Node Exporter and Grafana dashboard by running the nomad files under
prometheus
directory of this repo:
$ nomad run prometheus.hcl
$ nomad run node-info.hcl
$ nomad run grafana.hcl
- Now check the HAproxy configuration template on HAProxy server and make sure it does support
monitoring
tag withing the consul-template. If not, replace the content of HAProxy template file withprometheus\haproxy.config.tpl
and then restartconsul-template service
to load the new config:
$ sudo systemctl restart consul-template
Note: This takes 1-2min Now check the HAProxy config file to make sure monitoring end points are set:
$ cat /etc/haproxy/haproxy.cfg
- Import Garfana dashboard's located in
grafana_dashboard
directory within this repo.