Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pyk/prometheus-grafana-ansible
Ansible playbook that I use to run prometheus & grafana in DigitalOcean
https://github.com/pyk/prometheus-grafana-ansible
digitalocean grafana prometheus
Last synced: about 1 month ago
JSON representation
Ansible playbook that I use to run prometheus & grafana in DigitalOcean
- Host: GitHub
- URL: https://github.com/pyk/prometheus-grafana-ansible
- Owner: pyk
- Created: 2020-05-07T01:13:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-07T13:40:41.000Z (over 4 years ago)
- Last Synced: 2024-10-27T11:26:05.495Z (3 months ago)
- Topics: digitalocean, grafana, prometheus
- Homepage: https://m.do.co/c/ddb6db36549a
- Size: 16.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prometheus + Grafana + Ansible
This is Ansible Playbook that I use to provision new Prometheus and Grafana
node in DigitalOcean.You can use [my referral](https://m.do.co/c/ddb6db36549a) to get $100
DigitalOcean voucher for 60 days.## Setup
Clone this repository:
git clone https://github.com/pyk/prometheus-grafana-ansible.git
cd prometheus-grafana-ansible/Create new python environment:
python3 -m venv venv
Activate the environment:
source venv/bin/activate
Install the dependencies:
pip install -r requirements.txt
## Provision
Create new `secrets.yaml` file with the following content:
digitalocean:
access_token: ACCESS_TOKEN
droplet_name: DROPLET_NAMEprometheus:
user: USERNAME
pass: PASSWORDYou can create new access token in your DigitalOcean dashboard.
Account > API > Personal access tokens
Then you can provision new node with prometheus and grafana installed using the
following command:ansible-playbook provision.yaml
Go to `http:://IP_ADDRESS` to setup the grafana, use username & password `admin:admin`
to login to the first time.Go to `http://IP_ADRESS:9000` to access the prometheus.
## Configuration
To update grafana configuration, you can update `grafana/grafana.ini` file.
To update prometheus configuration, you can update `prometheus/prometheus.yaml`
file.To apply the update, rerun the following command:
ansible-playbook provision.yaml
This will update existing droplet with the same `digitalocean.droplet_name`.