add phpfpm exporter
This commit is contained in:
@ -74,3 +74,14 @@ scrape_configs:
|
||||
- {{ target }}:9187
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_phpfpm_exporter_targets is defined %}
|
||||
- job_name: phpfpm
|
||||
scrape_interval: 30s
|
||||
scrape_timeout: 10s
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for target in prometheus_phpfpm_exporter_targets %}
|
||||
- {{ target }}:9253
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
/usr/local/bin/prometheus-phpfpm-exporter $(ls -1 {{ prometheus_phpfpm_sockets_directory }} | awk '{print "--phpfpm.socket-paths {{ prometheus_phpfpm_sockets_directory }}" $1}' |head -c -1)
|
@ -4,7 +4,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/prometheus-phpfpm-exporter
|
||||
ExecStart=/bin/bash /usr/local/bin/prometheus-phpfpm-exporter-script.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Reference in New Issue
Block a user