Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lakinduakash/wso2-prometheus-ansible
https://github.com/lakinduakash/wso2-prometheus-ansible
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/lakinduakash/wso2-prometheus-ansible
- Owner: lakinduakash
- License: apache-2.0
- Created: 2020-01-30T10:12:57.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-31T12:53:50.000Z (about 4 years ago)
- Last Synced: 2024-04-14T09:04:03.771Z (7 months ago)
- Language: HTML
- Size: 204 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WSO2 Prometheus monitoring with Grafana
## How to run#### Change ansible inventory
First of all you need to configure your inventory, which is located in [`hosts`](hosts) file. Here you set up your target hosts by changing value of `ansible_host` variable.
It have seperate node to install prometheus server,grafana and alert manager. It is defined as `prom-master`. It is under `[prometheus]` group. Then you have to define exporters. They will be installed node-exporters.
```
prom-master ansible_host=host_addr ansible_user=ubuntu
prom-node1 ansible_host=host_addr ansible_user=ubuntu
prom-node2 ansible_host=host_addr ansible_user=ubuntu[prometheus]
prom-master[alertmanager]
prom-master[grafana]
prom-master[exporters]
prom-node1
prom-node2
```#### Set passwords
Currently it sets password for grafana. To change password edit file located at [`group_vars/grafana/vault`](group_vars/grafana/vault) with following content:
```
vault_grafana_password: <>
```To generate password you can use `ansible-vault stringToEncrypt`. Then it will be asked password to encrypt the string and after you confirmed you can paste it to the file. Remember the password you entered.
#### Run ansible playbook
You can run script `deploy.sh` located at [`here`](deploy.sh). It needs to provide ansible vault password to decrypt the grafana password you set.
You can set it as environment variable `export ANSIBLE_VAULT_PASSWORD=vault_password`. After setting the vault password you can run `deploy.sh````bash
#!/bin/bashexport ANSIBLE_FORCE_COLOR=true
ansible-galaxy install -r roles/requirements.yml
echo "Creating Vault-file: /tmp/vault"
/bin/cat </tmp/vault
${ANSIBLE_VAULT_PASSWORD}
EOMansible-playbook --vault-id /tmp/vault site.yml -vv
EXIT_CODE=$?shred /tmp/vault
exit $EXIT_CODE
```### Default ports for grafana/prometheus/node_exporter
- node_exporter_http - 9100
- prometheus_http - 9090
- alertmanager_http - 9093
- grafana_http - 3000### Add new dashboards
Copy dashboard