Skip to content

czhujer/php_opcache_exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP OPcache exporter

Overview

prometheus exporter for PHP OPcache stats, written in python.

integration for discovery a send prometheus metrics to zabbix

Description

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.

Usage

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

Author(s)

Docs

About

prometheus exporter for php opcache

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •