Skip to content

Commit 30f3c8d

Browse files
[O11y][PHP-FPM] Update README to use documentation guidelines (#9069)
* Update README to use documentation guidelines
1 parent 619da24 commit 30f3c8d

File tree

4 files changed

+54
-193
lines changed

4 files changed

+54
-193
lines changed

packages/php_fpm/_dev/build/docs/README.md

Lines changed: 27 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@
44

55
PHP-FPM (FastCGI Process Manager) is a web tool used to speed up the performance of a website. It is much faster than traditional CGI based methods and has the ability to handle tremendous loads simultaneously.
66

7+
Use the PHP-FPM integration to:
8+
9+
- Collect metrics related to the pool and process.
10+
- Create visualizations to monitor, measure, and analyze usage trends and key data, deriving business insights.
11+
- Create alerts to reduce the MTTD and MTTR by referencing relevant logs when troubleshooting an issue.
12+
713
## Data streams
814

915
The PHP-FPM integration collects metrics data.
1016

11-
Metrics give you insight into the statistics of the PHP-FPM. Metrics data streams collected by the PHP-FPM integration include [pool](https://www.php.net/manual/en/fpm.status.php#:~:text=Basic%20information%20%2D%20Always%20displayed%20on%20the%20status%20page) and [process](https://www.php.net/manual/en/fpm.status.php#:~:text=Per%2Dprocess%20information%20%2D%20only%20displayed%20in%20full%20output%20mode) so that the user can monitor and troubleshoot the performance of the PHP-FPM instances.
17+
Metrics provide insight into the statistics of the PHP-FPM. The Metrics data streams collected by the PHP-FPM integration include [pool](https://www.php.net/manual/en/fpm.status.php#:~:text=Basic%20information%20%2D%20Always%20displayed%20on%20the%20status%20page) and [process](https://www.php.net/manual/en/fpm.status.php#:~:text=Per%2Dprocess%20information%20%2D%20only%20displayed%20in%20full%20output%20mode) so that the user can monitor and troubleshoot the performance of the PHP-FPM instances.
18+
19+
Data streams:
20+
- `pool`: Collects information related to the connection handling, queue metrics, process manager configuration, process activity and performance indicators.
21+
- `process`: Collects information related to the request metrics, the latest CPU and memory usage and the current running state.
1222

1323
Note:
14-
- Users can monitor and see the metrics inside the ingested documents for PHP-FPM in the logs-* index pattern from `Discover`.
24+
- Users can monitor and view the metrics inside the ingested documents for PHP-FPM in the `logs-*` index pattern in `Discover`.
1525

1626
## Compatibility
1727

@@ -29,115 +39,33 @@ Example host configuration: `http://localhost:8080`
2939

3040
Status path configuration format: `/path`
3141

32-
Example Status path configuration: `/status`
33-
34-
### Troubleshooting
35-
36-
If host.ip is shown conflicted under ``logs-*`` data view, then this issue can be solved by reindexing the ``Pool`` and ``Process`` data stream's indices.
37-
To reindex the data, the following steps must be performed.
38-
39-
1. Stop the data stream by going to `Integrations -> PHP-FPM -> Integration policies` open the configuration of PHP-FPM and disable the `Collect PHP-FPM metrics` toggle to reindex metrics data stream and save the integration.
40-
41-
2. Copy data into the temporary index and delete the existing data stream and index template by performing the following steps in the Dev tools.
42-
43-
```
44-
POST _reindex
45-
{
46-
"source": {
47-
"index": "<index_name>"
48-
},
49-
"dest": {
50-
"index": "temp_index"
51-
}
52-
}
53-
```
54-
Example:
55-
```
56-
POST _reindex
57-
{
58-
"source": {
59-
"index": "logs-php_fpm.pool-default"
60-
},
61-
"dest": {
62-
"index": "temp_index"
63-
}
64-
}
65-
```
66-
67-
```
68-
DELETE /_data_stream/<data_stream>
69-
```
70-
Example:
71-
```
72-
DELETE /_data_stream/logs-php_fpm.pool-default
73-
```
74-
75-
```
76-
DELETE _index_template/<index_template>
77-
```
78-
Example:
79-
```
80-
DELETE _index_template/logs-php_fpm.pool
81-
```
82-
3. Go to `Integrations -> PHP-FPM -> Settings` and click on `Reinstall PHP-FPM`.
83-
84-
4. Copy data from temporary index to new index by performing the following steps in the Dev tools.
85-
86-
```
87-
POST _reindex
88-
{
89-
"conflicts": "proceed",
90-
"source": {
91-
"index": "temp_index"
92-
},
93-
"dest": {
94-
"index": "<index_name>",
95-
"op_type": "create"
96-
97-
}
98-
}
99-
```
100-
Example:
101-
```
102-
POST _reindex
103-
{
104-
"conflicts": "proceed",
105-
"source": {
106-
"index": "temp_index"
107-
},
108-
"dest": {
109-
"index": "logs-php_fpm.pool-default",
110-
"op_type": "create"
111-
112-
}
113-
}
114-
```
115-
116-
5. Verify data is reindexed completely.
117-
118-
6. Start the data stream by going to the `Integrations -> PHP-FPM -> Integration policies` and open configuration of integration and enable the `Collect PHP-FPM metrics` toggle and save the integration.
119-
120-
7. Delete temporary index by performing the following step in the Dev tools.
121-
122-
```
123-
DELETE temp_index
124-
```
125-
126-
More details about reindexing can be found [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html).
42+
Example Status path configuration: `/status`
43+
44+
## Setup
45+
46+
For step-by-step instructions on how to set up an integration, see the [Getting Started](https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-observability.html) guide.
47+
48+
## Validation
49+
50+
After successfully configuring the integration, click on the *Assets* tab of the PHP-FPM integration to display the available dashboards. Select the dashboard for your configured data stream, which should be populated with the required data.
51+
52+
## Troubleshooting
53+
54+
If `host.ip` appears conflicted under the ``logs-*`` data view, this issue can be resolved by [reindexing](https://www.elastic.co/guide/en/elasticsearch/reference/current/use-a-data-stream.html#reindex-with-a-data-stream) the indices of the ``Pool`` and ``Process`` data streams.
12755

12856
## Metrics reference
12957

13058
### Pool
13159

132-
This is the `pool` data stream. `pool` data stream collects metrics related to the setup and contents of the FPM status page.
60+
The `pool` data stream collects metrics related to the setup and contents of the FPM status page.
13361

13462
{{event "pool"}}
13563

13664
{{fields "pool"}}
13765

13866
### Process
13967

140-
This is the `process` data stream. `process` data stream collects metrics like request duration, content length, process state, etc.
68+
The `process` data stream collects metrics related to the request duration, content length, process state, etc.
14169

14270
{{event "process"}}
14371

packages/php_fpm/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.2.1"
3+
changes:
4+
- description: Update README to follow documentation guidelines.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/9069
27
- version: "1.2.0"
38
changes:
49
- description: Limit request tracer log count to five.

packages/php_fpm/docs/README.md

Lines changed: 21 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@
44

55
PHP-FPM (FastCGI Process Manager) is a web tool used to speed up the performance of a website. It is much faster than traditional CGI based methods and has the ability to handle tremendous loads simultaneously.
66

7+
Use the PHP-FPM integration to:
8+
9+
- Collect metrics related to the pool and process.
10+
- Create visualizations to monitor, measure, and analyze usage trends and key data, deriving business insights.
11+
- Create alerts to reduce the MTTD and MTTR by referencing relevant logs when troubleshooting an issue.
12+
713
## Data streams
814

915
The PHP-FPM integration collects metrics data.
1016

11-
Metrics give you insight into the statistics of the PHP-FPM. Metrics data streams collected by the PHP-FPM integration include [pool](https://www.php.net/manual/en/fpm.status.php#:~:text=Basic%20information%20%2D%20Always%20displayed%20on%20the%20status%20page) and [process](https://www.php.net/manual/en/fpm.status.php#:~:text=Per%2Dprocess%20information%20%2D%20only%20displayed%20in%20full%20output%20mode) so that the user can monitor and troubleshoot the performance of the PHP-FPM instances.
17+
Metrics provide insight into the statistics of the PHP-FPM. The Metrics data streams collected by the PHP-FPM integration include [pool](https://www.php.net/manual/en/fpm.status.php#:~:text=Basic%20information%20%2D%20Always%20displayed%20on%20the%20status%20page) and [process](https://www.php.net/manual/en/fpm.status.php#:~:text=Per%2Dprocess%20information%20%2D%20only%20displayed%20in%20full%20output%20mode) so that the user can monitor and troubleshoot the performance of the PHP-FPM instances.
18+
19+
Data streams:
20+
- `pool`: Collects information related to the connection handling, queue metrics, process manager configuration, process activity and performance indicators.
21+
- `process`: Collects information related to the request metrics, the latest CPU and memory usage and the current running state.
1222

1323
Note:
14-
- Users can monitor and see the metrics inside the ingested documents for PHP-FPM in the logs-* index pattern from `Discover`.
24+
- Users can monitor and view the metrics inside the ingested documents for PHP-FPM in the `logs-*` index pattern in `Discover`.
1525

1626
## Compatibility
1727

@@ -29,107 +39,25 @@ Example host configuration: `http://localhost:8080`
2939

3040
Status path configuration format: `/path`
3141

32-
Example Status path configuration: `/status`
33-
34-
### Troubleshooting
42+
Example Status path configuration: `/status`
3543

36-
If host.ip is shown conflicted under ``logs-*`` data view, then this issue can be solved by reindexing the ``Pool`` and ``Process`` data stream's indices.
37-
To reindex the data, the following steps must be performed.
44+
## Setup
3845

39-
1. Stop the data stream by going to `Integrations -> PHP-FPM -> Integration policies` open the configuration of PHP-FPM and disable the `Collect PHP-FPM metrics` toggle to reindex metrics data stream and save the integration.
46+
For step-by-step instructions on how to set up an integration, see the [Getting Started](https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-observability.html) guide.
4047

41-
2. Copy data into the temporary index and delete the existing data stream and index template by performing the following steps in the Dev tools.
48+
## Validation
4249

43-
```
44-
POST _reindex
45-
{
46-
"source": {
47-
"index": "<index_name>"
48-
},
49-
"dest": {
50-
"index": "temp_index"
51-
}
52-
}
53-
```
54-
Example:
55-
```
56-
POST _reindex
57-
{
58-
"source": {
59-
"index": "logs-php_fpm.pool-default"
60-
},
61-
"dest": {
62-
"index": "temp_index"
63-
}
64-
}
65-
```
50+
After successfully configuring the integration, click on the *Assets* tab of the PHP-FPM integration to display the available dashboards. Select the dashboard for your configured data stream, which should be populated with the required data.
6651

67-
```
68-
DELETE /_data_stream/<data_stream>
69-
```
70-
Example:
71-
```
72-
DELETE /_data_stream/logs-php_fpm.pool-default
73-
```
74-
75-
```
76-
DELETE _index_template/<index_template>
77-
```
78-
Example:
79-
```
80-
DELETE _index_template/logs-php_fpm.pool
81-
```
82-
3. Go to `Integrations -> PHP-FPM -> Settings` and click on `Reinstall PHP-FPM`.
83-
84-
4. Copy data from temporary index to new index by performing the following steps in the Dev tools.
85-
86-
```
87-
POST _reindex
88-
{
89-
"conflicts": "proceed",
90-
"source": {
91-
"index": "temp_index"
92-
},
93-
"dest": {
94-
"index": "<index_name>",
95-
"op_type": "create"
96-
97-
}
98-
}
99-
```
100-
Example:
101-
```
102-
POST _reindex
103-
{
104-
"conflicts": "proceed",
105-
"source": {
106-
"index": "temp_index"
107-
},
108-
"dest": {
109-
"index": "logs-php_fpm.pool-default",
110-
"op_type": "create"
111-
112-
}
113-
}
114-
```
115-
116-
5. Verify data is reindexed completely.
117-
118-
6. Start the data stream by going to the `Integrations -> PHP-FPM -> Integration policies` and open configuration of integration and enable the `Collect PHP-FPM metrics` toggle and save the integration.
119-
120-
7. Delete temporary index by performing the following step in the Dev tools.
121-
122-
```
123-
DELETE temp_index
124-
```
52+
## Troubleshooting
12553

126-
More details about reindexing can be found [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html).
54+
If `host.ip` appears conflicted under the ``logs-*`` data view, this issue can be resolved by [reindexing](https://www.elastic.co/guide/en/elasticsearch/reference/current/use-a-data-stream.html#reindex-with-a-data-stream) the indices of the ``Pool`` and ``Process`` data streams.
12755

12856
## Metrics reference
12957

13058
### Pool
13159

132-
This is the `pool` data stream. `pool` data stream collects metrics related to the setup and contents of the FPM status page.
60+
The `pool` data stream collects metrics related to the setup and contents of the FPM status page.
13361

13462
An example event for `pool` looks as following:
13563

@@ -255,7 +183,7 @@ An example event for `pool` looks as following:
255183

256184
### Process
257185

258-
This is the `process` data stream. `process` data stream collects metrics like request duration, content length, process state, etc.
186+
The `process` data stream collects metrics related to the request duration, content length, process state, etc.
259187

260188
An example event for `process` looks as following:
261189

packages/php_fpm/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.0"
22
name: php_fpm
33
title: PHP-FPM
4-
version: "1.2.0"
4+
version: "1.2.1"
55
description: This Elastic integration collects metrics from PHP-FPM.
66
type: integration
77
categories:

0 commit comments

Comments
 (0)