You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that this folder is at the following location:
6
-
`${GOPATH}/github.com/kozlice`
5
+
The [Beat](https://www.elastic.co/products/beats) for PHP-FPM monitoring.
7
6
8
-
## Getting Started with Phpfpmbeat
7
+
As Go currently doesn't provide possibility to connect directly to FPM via FastCGI as a client, PHP-FPM must be configured to show its status via some webserver. Example for Nginx can be found [here](https://easyengine.io/tutorials/php/fpm-status-page/).
8
+
9
+
Feel free to fork, create merge requests and open issues. I had no experience with Go language previously, so there should be a lot of things to improve.
9
10
10
11
### Requirements
11
12
12
13
*[Golang](https://golang.org/dl/) 1.7
13
14
14
-
### Init Project
15
-
To get running with Phpfpmbeat and also install the
16
-
dependencies, run the following command:
17
15
18
-
```
19
-
make setup
20
-
```
16
+
### Exported fields
21
17
22
-
It will create a clean git history for each major step. Note that you can always rewrite the history if you wish before pushing your changes.
18
+
Phpfpmbeat exports all pool information fields provided by PHP-FPM, except FPM start time. To make `slow_requests` counter work, [enable `request_slow_log` feature](https://easyengine.io/tutorials/php/fpm-slow-log/) in you FPM config.
23
19
24
-
To push Phpfpmbeat in the git repository, run the following commands:
For further development, check out the [beat developer guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html).
47
+
There is no support for per-process info for now.
32
48
33
-
### Build
34
49
35
-
To build the binary for Phpfpmbeat run the command below. This will generate a binary
36
-
in the same directory with the name phpfpmbeat.
50
+
### Usage
51
+
52
+
To build the binary for Phpfpmbeat run the command below. This will generate a binary in the same directory with the name phpfpmbeat.
37
53
38
54
```
39
55
make
40
56
```
41
57
42
-
43
-
### Run
44
-
45
58
To run Phpfpmbeat with debugging output enabled, run:
46
59
47
60
```
48
61
./phpfpmbeat -c phpfpmbeat.yml -e -d "*"
49
62
```
50
63
51
-
52
-
### Test
53
-
54
64
To test Phpfpmbeat, run the following command:
55
65
56
66
```
@@ -67,53 +77,14 @@ make coverage-report
67
77
68
78
The test coverage is reported in the folder `./build/coverage/`
69
79
70
-
### Update
71
-
72
-
Each beat has a template for the mapping in elasticsearch and a documentation for the fields
73
-
which is automatically generated based on `etc/fields.yml`.
74
-
To generate etc/phpfpmbeat.template.json and etc/phpfpmbeat.asciidoc
75
-
76
-
```
77
-
make update
78
-
```
79
-
80
-
81
-
### Cleanup
82
-
83
-
To clean Phpfpmbeat source code, run the following commands:
84
-
85
-
```
86
-
make fmt
87
-
make simplify
88
-
```
89
-
90
80
To clean up the build directory and generated artifacts, run:
91
81
92
82
```
93
83
make clean
94
84
```
95
85
96
86
97
-
### Clone
98
-
99
-
To clone Phpfpmbeat from the git repository, run the following commands:
100
-
101
-
```
102
-
mkdir -p ${GOPATH}/github.com/kozlice
103
-
cd ${GOPATH}/github.com/kozlice
104
-
git clone https://github.com/kozlice/phpfpmbeat
105
-
```
106
-
107
-
108
-
For further development, check out the [beat developer guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html).
109
-
110
-
111
-
## Packaging
112
-
113
-
The beat frameworks provides tools to crosscompile and package your beat for different platforms. This requires [docker](https://www.docker.com/) and vendoring as described above. To build packages of your beat, run the following command:
114
-
115
-
```
116
-
make package
117
-
```
87
+
### Thanks to
118
88
119
-
This will fetch and create all images required for the build process. The hole process to finish can take several minutes.
89
+
- Elastic for their Beat creation tutorial
90
+
-[mrkschan](https://github.com/mrkschan) for his [nginxbeat](https://github.com/mrkschan/nginxbeat), which I used as a prototype
0 commit comments