alliance-boreale/infrastructure/icinga2-ansible-noc/docs/RUNBOOK.md
2026-05-14 08:54:41 -04:00

50 lines
881 B
Markdown

# Runbook
## Premier déploiement
```bash
ansible-galaxy collection install -r requirements.yml
cp ansible/inventory.example ansible/inventory
cp ansible/group_vars/all.yml.example ansible/group_vars/all.yml
$EDITOR ansible/inventory
$EDITOR ansible/group_vars/all.yml
make bootstrap
```
## Validation
```bash
make validate-icinga
make check
```
## Ajouter un hôte
Modifier `ansible/group_vars/all.yml` :
```yaml
infrastructure_hosts:
- name: nouveau-serveur
address: 192.168.12.99
groups: [linux]
checks:
- name: ping4
command: hostalive
- name: ssh
command: ssh
```
Puis :
```bash
make deploy
```
## Dépannage rapide
```bash
sudo systemctl status icinga2 icingadb icingadb-redis mariadb apache2 --no-pager
sudo icinga2 daemon -C
sudo journalctl -u icinga2 -n 100 --no-pager
sudo journalctl -u icingadb -n 100 --no-pager
```