Добавлена конфигурация мониторинга Nginx и финальные правки для app1
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Deploy Nginx on App1
|
||||
- name: Deploy Nginx with load testing features on App1
|
||||
hosts: 192.168.0.110
|
||||
become: yes
|
||||
gather_facts: yes
|
||||
@ -19,19 +19,31 @@
|
||||
delay: 5
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Verify Nginx status endpoint
|
||||
- name: Test API endpoints
|
||||
uri:
|
||||
url: "http://{{ ansible_default_ipv4.address }}/status"
|
||||
url: "http://{{ ansible_default_ipv4.address }}{{ item }}"
|
||||
status_code: 200
|
||||
timeout: 5
|
||||
register: status_check
|
||||
loop:
|
||||
- /api/test
|
||||
- /api/metrics
|
||||
register: api_test
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Display deployment result
|
||||
debug:
|
||||
msg: |
|
||||
✅ Nginx successfully deployed on {{ inventory_hostname }}!
|
||||
🌐 Access at: http://{{ ansible_default_ipv4.address }}
|
||||
✅ Nginx with load testing deployed on {{ inventory_hostname }}!
|
||||
🌐 Main page: http://{{ ansible_default_ipv4.address }}
|
||||
📊 Status page: http://{{ ansible_default_ipv4.address }}/status
|
||||
📈 Nginx metrics: http://{{ ansible_default_ipv4.address }}/nginx_status
|
||||
🖥️ Node metrics: http://{{ ansible_default_ipv4.address }}:9100/metrics
|
||||
🔧 Test APIs:
|
||||
- http://{{ ansible_default_ipv4.address }}/api/test
|
||||
- http://{{ ansible_default_ipv4.address }}/api/slow
|
||||
- http://{{ ansible_default_ipv4.address }}/api/error
|
||||
- http://{{ ansible_default_ipv4.address }}/api/metrics
|
||||
📈 Monitoring:
|
||||
- Node metrics: http://{{ ansible_default_ipv4.address }}:9100/metrics
|
||||
- Prometheus: http://192.168.0.105:9090
|
||||
- Grafana: http://192.168.0.106:3000
|
||||
|
||||
🎯 Load testing interface ready with JavaScript controls!
|
||||
|
||||
Reference in New Issue
Block a user