prometheus exporter for PHP OPcache stats, written in python.
integration for discovery a send prometheus metrics to zabbix
Data is fetched from opcache_get_status() function.
FastCGi variant was tested on CentOS 7 with php-fpm 7.1.
scprape-uri varianta tested with docker and owncloud docker stack.
You can just use "--scrape_uri" for scraping from URL/URI or use fast-cgi client
Help on flags:
usage: php_opcache_exporter.py [-h] [-p port] [--scrape_uri SCRAPE_URI] [--fhost FHOST] [--phpfile phpfile] [--phpcontent phpcontent] [--phpcode phpcode] [--fport FPORT] php_opcache_exporter args optional arguments: -h, --help show this help message and exit -p port, --port port Listen to this port --scrape_uri SCRAPE_URI URL for scraping, such as http://127.0.0.1/opcache- status.php --fhost FHOST Target FastCGI host, such as 127.0.0.1 --phpfile phpfile A php file absolute path, such as /usr/local/lib/php/System.php --phpcontent phpcontent http get params, such as name=john&address=beijing --phpcode phpcode code for execution over fastcgi client --fport FPORT FastCGI port
- Patrik Majer (@czhujer) [email protected]