add opcache
This commit is contained in:
4
templates/conf/prometheus-php-opcache-exporter.j2
Normal file
4
templates/conf/prometheus-php-opcache-exporter.j2
Normal file
@ -0,0 +1,4 @@
|
||||
# {{ ansible_managed }}
|
||||
{% if (prometheus_php-opcache_exporter_fcgi-uri is defined) %}
|
||||
ARGS='"--opcache.fcgi-uri="{{ prometheus_php-opcache_exporter_fcgi-uri }}"'
|
||||
{% endif %}
|
@ -124,6 +124,18 @@ scrape_configs:
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_php-opcache_exporter_targets is defined %}
|
||||
# PHP-FPM exporter #
|
||||
- job_name: php-opcache
|
||||
scrape_interval: 30s
|
||||
scrape_timeout: 10s
|
||||
static_configs:
|
||||
- targets:
|
||||
{% for target in prometheus_php-opcache_exporter_targets %}
|
||||
- {{ target }}:9101
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if prometheus_apache_exporter_targets is defined %}
|
||||
# apache exporter #
|
||||
- job_name: apache
|
||||
|
11
templates/systemd/prometheus-php-opcache-exporter.service.j2
Normal file
11
templates/systemd/prometheus-php-opcache-exporter.service.j2
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Prometheus PHP Opcache Exporter
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/prometheus-php-opcache-exporter
|
||||
EnvironmentFile=/etc/default/prometheus-php-opcache-exporter
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user