Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 19 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,31 @@

Ansible collection to deploy a monitoring stack on top of a [TDP](https://github.com/TOSIT-IO/TDP) cluster.

## Download binaries

Binaries must be present inside `files` directory located next to launched playbooks. They can be found here:

- Prometheus: https://github.com/prometheus/prometheus/releases

## Using in tdp-getting-started

```sh
cd /path/to/tdp-getting-started
# Make sure you are in TDP lib venv
source ./venv/bin/activate

# Install collection (SSH example)
git clone git@github.com:TOSIT-IO/tdp-observability.git \
ansible_collections/tosit/tdp_observability \
--recurse-submodules
## Available Roles

# Setup collection
## Destructive setup: this will reset tdp-lib database
./ansible_collections/tosit/tdp_observability/scripts/setup.sh -c
- tosit.alloy.agent
- tosit.exporter.node
- tosit.grafana.server
- tosit.loki.server
- tosit.prometheus.alertmanager
- tosit.prometheus.server

# Configure deployment plan for Prometheus and grafana
tdp plan dag --target prometheus_init --target grafana_init
## Prerequisites

# Deploy Prometheus and grafana
tdp deploy
A python requirements files is provided with the collection. Install it on your venv with the following command
```
pip install -r requirements.txt
```

Optional non-destructive option for the setup:
## Download binaries

```sh
# Setup collection
## Non destructive: Manually add extra tdp_cluster variables to tdp_vars
## ON FIRST INSTALL ONLY
cat ansible_collections/tosit/tdp_observability/tdp_vars_defaults/tdp_cluster/tdp_cluster.yml |
grep -vP '^[#-]' | grep -P '^\w+' >> inventory/tdp_vars/tdp_cluster/tdp_cluster.yml
cd inventory/tdp_vars/tdp_cluster && git commit -a -m 'feat: add tdp_observability vars' && cd -
./ansible_collections/tosit/tdp_monitoring/scripts/setup.sh
```
Binaries must be present inside `files` directory located next to launched playbooks. They can be found here:

- Grafana : https://github.com/grafana/grafana/releases
- Prometheus: https://github.com/prometheus/prometheus/releases
- Loki : https://github.com/grafana/loki/releases/latest
- Node exporter : https://github.com/prometheus/node_exporter/releases
- Alloy : https://github.com/grafana/alloy/releases

## Web UI links

Expand All @@ -54,7 +39,3 @@ cd inventory/tdp_vars/tdp_cluster && git commit -a -m 'feat: add tdp_observabili
- Username: `admin`
- Password: `GrafanaAdmin123`

## Roadmap

- Grafana:
- [ ] Use cluster PostgreSQL as back-end database