mackerel-plugin-php-opcache

command
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

README

mackerel-plugin-php-opcache

Get PHP OPcache metrics for Mackerel and Sensu.

Usage (for Apache)

Build this program

Next, build this program.

go get github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-php-opcache
cd $GO_HOME/src/github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-php-opcache
go test
go build
cp -a mackerel-plugin-php-opcache /usr/local/bin/
mkdir DOCUMENT_ROOT/mackerel/
cp -a php-opcache.php DOCUMENT_ROOT/mackerel/
Set up your apache server

You should enable to execute PHP program (e.g. mod_php).

Add apache config

Edit your apache config file to access metric from localhost only. For example is below.

<Directory "HTTP_HOME/mackerel/">
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1 ::1
</Directory>

And, reload apache configuration.

sudo service httpd configtest
sudo service httpd reload
Execute this plugin

And, you can execute this program :-)

./mackerel-plugin-php-opcache
Add mackerel-agent.conf

Finally, if you want to get php-opcache metrics via Mackerel, please edit mackerel-agent.conf. For example is below.

[plugin.metrics.php-opcache]
command = "/path/to/mackerel-plugin-php-opcache"
type = "metric"

For more information

Please execute 'mackerel-plugin-php-opcache -h' and you can get command line options.

Author

Yuichiro Mukai

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL