change webserver exporting memes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
58d0700520
commit
ecbabfe165
14
roles/webserver/files/prometheus-nginx-exporter
Normal file
14
roles/webserver/files/prometheus-nginx-exporter
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
ARGS="-nginx.scrape-uri http://127.0.0.1:8888/stub_status"
|
||||||
|
|
||||||
|
# Prometheus-nginx-exporter supports the following options:
|
||||||
|
# -nginx.plus
|
||||||
|
# Start the exporter for NGINX Plus. By default, the exporter is started
|
||||||
|
# for NGINX.
|
||||||
|
# -nginx.scrape-uri string
|
||||||
|
# A URI for scraping NGINX or NGINX Plus metrics.
|
||||||
|
# For NGINX, the stub_status page must be available through the URI.
|
||||||
|
# For NGINX Plus -- the API. (default "http://127.0.0.1:8080/stub_status")
|
||||||
|
# -web.listen-address string
|
||||||
|
# An address to listen on for web interface and telemetry. (default ":9113")
|
||||||
|
# -web.telemetry-path string
|
||||||
|
# A path under which to expose metrics. (default "/metrics"
|
@ -47,6 +47,14 @@
|
|||||||
proto: tcp
|
proto: tcp
|
||||||
src: 192.168.69.0/24
|
src: 192.168.69.0/24
|
||||||
|
|
||||||
|
- name: Copy default nginx config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: prometheus-nginx-exporter
|
||||||
|
dest: /etc/default/prometheus-nginx-exporter
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
- name: Enable and restart exporter daemon
|
- name: Enable and restart exporter daemon
|
||||||
service:
|
service:
|
||||||
name: prometheus-nginx-exporter
|
name: prometheus-nginx-exporter
|
||||||
|
@ -84,7 +84,7 @@ http {
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8080;
|
listen 8888;
|
||||||
|
|
||||||
location /stub_status {
|
location /stub_status {
|
||||||
stub_status;
|
stub_status;
|
||||||
|
Loading…
Reference in New Issue
Block a user