add nginx exporter
This commit is contained in:
parent
159bb4137e
commit
fb191f27d6
@ -17,6 +17,7 @@ prometheus_repo_blackbox: prometheus
|
||||
prometheus_repo_memcached: prometheus
|
||||
prometheus_repo_mongodb: percona
|
||||
prometheus_repo_mysqld: prometheus
|
||||
prometheus_repo_nginx: tchivert
|
||||
prometheus_repo_node: prometheus
|
||||
prometheus_repo_opcache: tchivert
|
||||
prometheus_repo_phpfpm: Lusitaniae
|
||||
@ -49,6 +50,8 @@ prometheus_mongodb_exporter_database: "admin"
|
||||
prometheus_mongodb_exporter_host: "localhost"
|
||||
prometheus_mongodb_exporter_port: 27017
|
||||
|
||||
prometheus_nginx_scrape_uri: "http://localhost/stub_status"
|
||||
|
||||
prometheus_opcache_exporter_fcgi_uri: "unix:///var/run/www.sock"
|
||||
|
||||
prometheus_phpfpm_sockets_directory: "/run/php/"
|
||||
|
3
tasks/exporter/nginx.yml
Normal file
3
tasks/exporter/nginx.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
- include_tasks: _common.yml
|
||||
tags: ['prometheus_nginx_exporter']
|
@ -39,5 +39,6 @@
|
||||
- prometheus_opcache_exporter
|
||||
- prometheus_blackbox_exporter
|
||||
- prometheus_kong_exporter
|
||||
- prometheus_nginx_exporter
|
||||
with_items:
|
||||
- "{{ prometheus_exporter_packages }}"
|
||||
|
12
templates/systemd/prometheus-nginx-exporter.service.j2
Normal file
12
templates/systemd/prometheus-nginx-exporter.service.j2
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=Prometheus Nginx Exporter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/prometheus-nginx-exporter \
|
||||
-nginx.scrape-uri {{ prometheus_nginx_scrape_uri }} \
|
||||
-web.listen-address=0.0.0.0:9113
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
x
Reference in New Issue
Block a user