Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Reference/
  3. Ingestion tools/
  4. Elastic integrations

PHP-FPM Integration

Version1.6.0 (View all)
Subscription level
What's this?
Basic
Developed by
What's this?
Elastic
Ingestion method(s)API
Minimum Kibana version(s)9.0.0
8.13.0

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.

Use the PHP-FPM integration to:

  • Collect metrics related to the pool and process.
  • Create visualizations to monitor, measure, and analyze usage trends and key data, deriving business insights.
  • Create alerts to reduce the MTTD and MTTR by referencing relevant logs when troubleshooting an issue.

The PHP-FPM integration collects metrics data.

Metrics provide insight into the statistics of the PHP-FPM. The Metrics data streams collected by the PHP-FPM integration includepool andprocess so that the user can monitor and troubleshoot the performance of the PHP-FPM instances.

Data streams:

  • pool: Collects information related to the connection handling, queue metrics, process manager configuration, process activity and performance indicators.
  • process: Collects information related to the request metrics, the latest CPU and memory usage and the current running state.

Note:

  • Users can monitor and view the metrics inside the ingested documents for PHP-FPM in thelogs-* index pattern inDiscover.

This integration has been tested againstv8.2 andv8.1 standalone versions of PHP-FPM.

You need Elasticsearch for storing and searching your data and Kibana for visualizing and managing it. You can use our hosted Elasticsearch Service on Elastic Cloud, which is recommended, or self-manage the Elastic Stack on your own hardware.

In order to ingest data from PHP-FPM, you must know the host(s) and status path of the PHP-FPM instance.

Host configuration format:http[s]://host[:port]

Example host configuration:http://localhost:8080

Status path configuration format:/path

Example Status path configuration:/status

For step-by-step instructions on how to set up an integration, see theGetting Started guide.

After successfully configuring the integration, click on theAssets 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.

Ifhost.ip appears conflicted under thelogs-* data view, this issue can be resolved byreindexing the indices of thePool andProcess data streams.

Thepool data stream collects metrics related to the setup and contents of the FPM status page.

Example
{    "@timestamp": "2023-07-28T10:10:15.918Z",    "agent": {        "ephemeral_id": "9581f949-002c-4a1f-8939-abae313a3e55",        "id": "79efec86-f67c-4ca6-8a2e-a8900f9ae3ac",        "name": "docker-fleet-agent",        "type": "filebeat",        "version": "8.7.1"    },    "data_stream": {        "dataset": "php_fpm.pool",        "namespace": "ep",        "type": "logs"    },    "ecs": {        "version": "8.11.0"    },    "elastic_agent": {        "id": "79efec86-f67c-4ca6-8a2e-a8900f9ae3ac",        "snapshot": false,        "version": "8.7.1"    },    "event": {        "agent_id_status": "verified",        "category": [            "web",            "configuration",            "process"        ],        "created": "2023-07-28T10:10:15.918Z",        "dataset": "php_fpm.pool",        "ingested": "2023-07-28T10:10:19Z",        "kind": "event",        "module": "php_fpm",        "type": [            "info"        ]    },    "input": {        "type": "httpjson"    },    "php_fpm": {        "pool": {            "connections": {                "accepted": 1,                "listen_queue": {                    "max_size": 128,                    "requests": {                        "max": 0                    }                },                "queued": 0            },            "name": "www",            "process_manager": {                "type": "ondemand"            },            "processes": {                "active": {                    "count": 1,                    "max": 1                },                "children_reached": {                    "max": 0                },                "count": 1,                "idle": 0            },            "slow_requests": 0,            "start_since": 17,            "start_time": 1690538998        }    },    "service": {        "address": "http://elastic-package-service_php_fpm_1"    },    "tags": [        "php_fpm-pool",        "forwarded"    ]}

ECS Field Reference

Please refer to the followingdocument for detailed information on ECS fields.

Exported fields
FieldDescriptionTypeUnitMetric Type
@timestampEvent timestamp.date
data_stream.datasetData stream dataset.constant_keyword
data_stream.namespaceData stream namespace.constant_keyword
data_stream.typeData stream type.constant_keyword
input.typeType of Filebeat input.keyword
php_fpm.pool.connections.acceptedThe total number of accepted connections.longcounter
php_fpm.pool.connections.listen_queue.max_sizeThe maximum allowed size of the listen queue.longgauge
php_fpm.pool.connections.listen_queue.requests.maxThe maximum number of requests seen in the listen queue at any one time.longgauge
php_fpm.pool.connections.queuedThe number of requests (backlog) currently waiting for a free process.longgauge
php_fpm.pool.nameThe name of the FPM process pool.keyword
php_fpm.pool.process_manager.typeThe process manager type - static, dynamic or ondemand.keyword
php_fpm.pool.processes.active.countThe number of processes that are currently processing requests.longgauge
php_fpm.pool.processes.active.maxThe maximum number of concurrently active processes.longgauge
php_fpm.pool.processes.children_reached.maxHas the maximum number of processes ever been reached? If so the displayed value is 1 otherwise the value is 0.longgauge
php_fpm.pool.processes.countThe current total number of processes.longgauge
php_fpm.pool.processes.idleThe number of processes that are currently idle (waiting for requests).longgauge
php_fpm.pool.slow_requestsThe total number of requests that have hit the configured request_slowlog_timeout.longcounter
php_fpm.pool.start_sinceThe time in seconds since the process pool was last started.longscounter
php_fpm.pool.start_timeThe date/time that the process pool was last started.long

Theprocess data stream collects metrics related to the request duration, content length, process state, etc.

Example
{    "@timestamp": "2023-07-28T10:11:12.080Z",    "agent": {        "ephemeral_id": "0f5589f7-327f-468e-b368-00ada3a96721",        "id": "79efec86-f67c-4ca6-8a2e-a8900f9ae3ac",        "name": "docker-fleet-agent",        "type": "filebeat",        "version": "8.7.1"    },    "data_stream": {        "dataset": "php_fpm.process",        "namespace": "ep",        "type": "logs"    },    "ecs": {        "version": "8.11.0"    },    "elastic_agent": {        "id": "79efec86-f67c-4ca6-8a2e-a8900f9ae3ac",        "snapshot": false,        "version": "8.7.1"    },    "event": {        "agent_id_status": "verified",        "category": [            "web",            "configuration",            "process"        ],        "created": "2023-07-28T10:11:12.080Z",        "dataset": "php_fpm.process",        "ingested": "2023-07-28T10:11:15Z",        "kind": "event",        "module": "php_fpm",        "type": [            "info"        ]    },    "http": {        "request": {            "body": {                "bytes": 0            },            "method": "GET"        }    },    "input": {        "type": "httpjson"    },    "php_fpm": {        "process": {            "pool": {                "name": "www"            },            "request": {                "count": 1,                "duration": 581,                "last": {                    "cpu": {                        "pct": 0                    },                    "memory": 0                }            },            "script": "-",            "start_since": 0,            "start_time": 1690539072,            "state": "Running"        }    },    "process": {        "pid": 33    },    "service": {        "address": "http://elastic-package-service_php_fpm_1"    },    "tags": [        "php_fpm-process",        "forwarded"    ],    "url": {        "original": "/status?json&full"    },    "user": {        "name": "-"    }}

ECS Field Reference

Please refer to the followingdocument for detailed information on ECS fields.

Exported fields
FieldDescriptionTypeUnitMetric Type
@timestampEvent timestamp.date
data_stream.datasetData stream dataset.constant_keyword
data_stream.namespaceData stream namespace.constant_keyword
data_stream.typeData stream type.constant_keyword
input.typeType of Filebeat input.keyword
php_fpm.process.pool.nameThe name of the FPM process pool.keyword
php_fpm.process.request.countThe total number of requests served.longcounter
php_fpm.process.request.durationThe duration in microseconds of the requests.longmicrosgauge
php_fpm.process.request.last.cpu.pctThe %cpu of the last request. This will be 0 if the process is not Idle because the calculation is done when the request processing is complete.longpercentgauge
php_fpm.process.request.last.memoryThe maximum amount of memory consumed by the last request. This will be 0 if the process is not Idle because the calculation is done when the request processing is complete.longbytegauge
php_fpm.process.scriptThe full path of the script executed by the last request. This will be '-' if not applicable (eg. status page requests).keyword
php_fpm.process.start_sinceThe number of seconds since the process started.longscounter
php_fpm.process.start_timeThe date/time at which the process started.long
php_fpm.process.stateThe state of the process.keyword

This integration includes one or more Kibana dashboards that visualizes the data collected by the integration. The screenshots below illustrate how the ingested data is displayed.

PHP-FPM Pool dashboard
PHP-FPM Process dashboard
Changelog
VersionDetailsMinimum Kibana version
1.6.0Enhancement (View pull request)
Allow @custom pipeline access to event.original without setting preserve_original_event.
9.0.0
8.13.0
1.5.1Bug fix (View pull request)
Added description to ssl nodes including links to documentation.
9.0.0
8.13.0
1.5.0Enhancement (View pull request)
Add support for Kibana9.0.0.
9.0.0
8.13.0
1.4.1Bug fix (View pull request)
Update links to getting started docs
8.13.0
1.4.0Enhancement (View pull request)
ECS version updated to 8.11.0. Update the kibana constraint to ^8.13.0. Modified the field definitions to remove ECS fields made redundant by the ecs@mappings component template.
8.13.0
1.3.0Enhancement (View pull request)
Add global filter on data_stream.dataset to improve performance.
8.7.1
1.2.1Enhancement (View pull request)
Update README to follow documentation guidelines.
8.7.1
1.2.0Enhancement (View pull request)
Limit request tracer log count to five.
8.7.1
1.1.0Enhancement (View pull request)
Update the package format_version to 3.0.0.
8.7.1
1.0.0Enhancement (View pull request)
Make PHP-FPM GA.
8.7.1
0.6.2Bug fix (View pull request)
Add null check and ignore_missing check to the rename processor
8.7.1
0.6.1Enhancement (View pull request)
Add metric_type for pool and process data streams.
8.7.1
0.6.0Enhancement (View pull request)
Add service.address field and update dashboard.
8.7.1
0.5.1Bug fix (View pull request)
Resolve the conflict in host.ip field
8.7.1
0.5.0Enhancement (View pull request)
Rename ownership from obs-service-integrations to obs-infraobs-integrations
8.7.1
0.4.0Enhancement (View pull request)
Add a new flag to enable request tracing
8.7.1
0.3.0Enhancement (View pull request)
Migrate visualizations to lens.
8.4.0
0.2.2Enhancement (View pull request)
Added categories and/or subcategories.
8.4.0
0.2.1Bug fix (View pull request)
PHP-FPM Process data stream update field description
8.4.0
0.2.0Enhancement (View pull request)
PHP-FPM integration package with "Process" data stream.
8.4.0
0.1.0Enhancement (View pull request)
PHP-FPM integration package with "Pool" data stream.
8.4.0

[8]ページ先頭

©2009-2026 Movatter.jp