add support to monitor nginx
This commit is contained in:
parent
fb90bb6cad
commit
c19f5fa226
4 changed files with 29 additions and 0 deletions
8
files/monitoring
Normal file
8
files/monitoring
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
server {
|
||||
listen 127.0.0.1:5234;
|
||||
|
||||
location /nginx_status {
|
||||
stub_status on;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- { role: monitoring }
|
||||
- { role: pki-server }
|
||||
|
|
|
|||
|
|
@ -32,3 +32,19 @@
|
|||
|
||||
- name: delete nginx default config
|
||||
file: path=/etc/nginx/sites-enabled/default state=absent
|
||||
|
||||
- name: copy nginx status config
|
||||
copy:
|
||||
src: monitoring
|
||||
dest: /etc/nginx/sites-available/monitoring
|
||||
mode: 0755
|
||||
notify:
|
||||
- restart nginx
|
||||
|
||||
- name: activate nginx status config
|
||||
file:
|
||||
path: /etc/nginx/sites-enabled/monitoring
|
||||
src: /etc/nginx/sites-available/monitoring
|
||||
state: link
|
||||
notify:
|
||||
- restart nginx
|
||||
|
|
|
|||
4
vars/main.yml
Normal file
4
vars/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
monitoring:
|
||||
checks:
|
||||
local:
|
||||
nginx_status: {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue