github.com/mackerelio/mackerel-agent-plugins@v0.89.3/mackerel-plugin-apache2/README.md (about) 1 mackerel-plugin-apache2 2 ==== 3 4 ## Description 5 6 Get apache "server-status" metrics for Mackerel and Sensu. 7 8 ## Usage 9 10 ### Set up your apache server 11 12 First, you should enabled mod_status module, and configure apache config file. For example is below. 13 14 ``` 15 ExtendedStatus On 16 <VirtualHost 127.0.0.1:1080> 17 <Location /server-status> 18 SetHandler server-status 19 Order deny,allow 20 Deny from all 21 Allow from localhost 22 </Location> 23 </VirtualHost> 24 ``` 25 26 ### Build this program 27 28 Next, build this program. 29 30 ``` 31 go get github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-apache2 32 cd $GO_HOME/src/github.com/mackerelio/mackerel-agent-plugins/mackerel-plugin-apache2 33 go test 34 go build 35 ``` 36 37 ### Execute this plugin 38 39 And, you can execute this program :-) 40 41 ``` 42 ./mackerel-plugin-apache2 -p 1080 43 ``` 44 45 ### Add mackerel-agent.conf 46 47 Finally, if you want to get apache2 metrics via Mackerel, please edit mackerel-agent.conf. For example is below. 48 49 ``` 50 [plugin.metrics.apache2] 51 command = "/path/to/mackerel-plugin-apache2 -p 1080" 52 type = "metric" 53 ``` 54 55 ## For more information 56 57 Please execute 'mackerel-plugin-apache2 -h' and you can get command line options. 58 59 ## References 60 61 This program to use as reference from [Percona Monitoring Plugins for Cacti](http://www.percona.com/doc/percona-monitoring-plugins/). 62 63 ## Author 64 65 [Yuichiro Saito](https://github.com/koemu)