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:
43
diagnose_vm.yml
Normal file
43
diagnose_vm.yml
Normal 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
|
||||
Reference in New Issue
Block a user