Initial commit: Ansible configuration for monitoring stack

Contains:
- Production inventory (inventories/production/hosts)
- VictoriaMetrics installation (playbooks/monitoring/install_victoriametrics.yml)
- Vault setup and secrets management (playbooks/vault/)
- Base system configuration (playbooks/infrastructure/)
- Directory structure for monitoring components
This commit is contained in:
Freazzzing
2026-02-02 11:22:24 +00:00
commit 30d35bc401
12 changed files with 548 additions and 0 deletions

43
diagnose_vm.yml Normal file
View File

@ -0,0 +1,43 @@
---
- name: Diagnose VictoriaMetrics installation
hosts: 192.168.0.104
become: yes
tasks:
- name: Check VictoriaMetrics service status
shell: |
systemctl status victoria-metrics --no-pager
journalctl -u victoria-metrics --no-pager -n 20
register: service_info
- name: Show service status
debug:
var: service_info.stdout_lines
- name: Check if port is listening
shell: |
netstat -tlnp | grep :8428 || ss -tlnp | grep :8428 || echo "Port 8428 not listening"
ps aux | grep victoria-metrics | grep -v grep || echo "VictoriaMetrics process not found"
register: port_check
- name: Show port check
debug:
var: port_check.stdout_lines
- name: Check binary exists and is executable
stat:
path: /usr/local/bin/victoria-metrics-prod
register: binary_stat
- name: Show binary info
debug:
var: binary_stat
- name: Try to run VictoriaMetrics manually
shell: |
timeout 5 /usr/local/bin/victoria-metrics-prod --help || echo "Binary help not working"
register: manual_test
- name: Show manual test result
debug:
var: manual_test.stdout_lines