[
  {
    "path": ".dockerignore",
    "content": "examples/\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "github: [tiredofit]\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: If something isn't working right..\ntitle: ''\nlabels: bug\nassignees: ''\n\n---\n\n### Summary\n\n<!-- Summarize the bug encountered -->\n\n\n### Steps to reproduce\n\n<!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. -->\n\n\n### What is the expected *correct* behavior?\n\n<!-- Describe what should be seen instead. -->\n\n\n### Relevant logs and/or screenshots\n\n<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's tough to read otherwise. -->\n\n### Environment\n<!--Your Configuration (please complete the following information): -->\n\n- Image version / tag:\n- Host OS:\n\n<details>\n<summary>Any logs | compose.yml</summary>\n</details>\n\n<!-- Include anything additional -->\n\n### Possible fixes\n<!-- If you can, provide details to the root cause that might be responsible for the problem. -->\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea or feature\ntitle: ''\nlabels: enhancement\nassignees: ''\n\n---\n\n---\nname: Feature Request\nabout: Suggest an idea for this project\n\n---\n\n**Description of the feature**\n<!-- A clear description of the feature you'd like implemented  -->\n\n**Benefits of feature**\n<!-- Explain the measurable benefits this feature would achieve. -->\n\n**Additional context**\n<!--Add any other context or screenshots about the feature request here. -->\n"
  },
  {
    "path": ".github/config.yml",
    "content": "blank_issues_enabled: false\n"
  },
  {
    "path": ".github/workflows/build_manual.yml",
    "content": "name: \"MANUAL - Build all images\"\n\non:\n  workflow_dispatch:\n    inputs:\n      Manual Build:\n        description: 'Manual Build'\n        required: false\n\njobs:\n  prepare:\n    uses: nfrastack/gha/.github/workflows/artifacts-encrypt.yml@main\n    secrets: inherit\n  build:\n    needs: prepare\n    uses: ./.github/workflows/image_build.yml\n    secrets: inherit\n  cleanup:\n    needs: [build]\n    uses: nfrastack/gha/.github/workflows/artifacts-remove.yml@main\n    secrets: inherit\n\n"
  },
  {
    "path": ".github/workflows/build_push.yml",
    "content": "name: \"PUSH - Build on repository Push\"\non:\n  push:\n    paths:\n      - '**'\n      - '!/CHANGELOG.md'\n      - '!/examples/*'\n      - '!LICENSE'\n      - '!README.md'\n      - '!/zabbix_templates/*'\njobs:\n  prepare:\n    uses: nfrastack/gha/.github/workflows/artifacts-encrypt.yml@main\n    secrets: inherit\n  build:\n    needs: prepare\n    uses: ./.github/workflows/image_build.yml\n    secrets: inherit\n  cleanup:\n    needs: [build]\n    uses: nfrastack/gha/.github/workflows/artifacts-remove.yml@main\n    secrets: inherit\n\n"
  },
  {
    "path": ".github/workflows/image_build.yml",
    "content": "name: build\n\non:\n  workflow_call\n\njobs:\n  build:\n    strategy:\n      fail-fast: false\n      matrix:\n        build:\n          - { php_version: \"8.5\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.23\", latest: \"true\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.4\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.23\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.4\", php_version_latest: \"false\", distro: \"alpine\", distro_variant: \"3.22\", latest: \"false\", distro_latest: \"false\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.3\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.23\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.3\", php_version_latest: \"false\", distro: \"alpine\", distro_variant: \"3.22\", latest: \"false\", distro_latest: \"false\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.2\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.22\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.1\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.19\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.0\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.16\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64\" }\n          - { php_version: \"7.4\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.15\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"7.3\", php_version_latest: \"true\", distro: \"alpine\", distro_variant: \"3.12\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64\" }\n          - { php_version: \"8.5\", php_version_latest: \"false\", distro: \"debian\", distro_variant: \"trixie\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.4\", php_version_latest: \"false\", distro: \"debian\", distro_variant: \"trixie\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.4\", php_version_latest: \"false\", distro: \"debian\", distro_variant: \"bookworm\", latest: \"false\", distro_latest: \"false\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.3\", php_version_latest: \"false\", distro: \"debian\", distro_variant: \"trixie\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.3\", php_version_latest: \"false\", distro: \"debian\", distro_variant: \"bookworm\", latest: \"false\", distro_latest: \"false\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.2\", php_version_latest: \"false\", distro: \"debian\", distro_variant: \"trixie\", latest: \"false\", distro_latest: \"true\", arch: \"linux/amd64,linux/arm64\" }\n          - { php_version: \"8.2\", php_version_latest: \"false\", distro: \"debian\", distro_variant: \"bookworm\", latest: \"false\", distro_latest: \"false\", arch: \"linux/amd64,linux/arm64\" }\n        image_variant:\n          - core\n          - faflopza\n          - faflopzaze\n    uses: nfrastack/gha/.github/workflows/container-build_phpfpm.yml@main\n    with:\n      base_image: \"ghcr.io/nfrastack/container-nginx\"\n      base_image_version: ${{ matrix.build.base_image_version || '' }}\n      php_version: ${{ matrix.build.php_version }}\n      php_version_latest: ${{ matrix.build.php_version_latest }}\n      distro: ${{ matrix.build.distro }}\n      distro_variant: ${{ matrix.build.distro_variant }}\n      image_variant: ${{ matrix.image_variant }}\n      latest: ${{ matrix.build.latest || 'false' }}\n      distro_latest: ${{ matrix.build.distro_latest || 'false' }}\n      platforms: ${{ matrix.build.arch || 'linux/amd64,linux/arm64' }}\n    secrets: inherit\n"
  },
  {
    "path": ".gitignore",
    "content": "/build-assets/*\n!/build-assets/.empty\n\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "## 8.1.0 2026-05-11 <code at nfrastack dot com>\n\n   ### Added\n      - Add PHPFPM_POOL_<NAME>_INCLUDES to add external include configuration\n      - Add ..._LISTEN_TYPE=both support spawning shadow pools with -tcp suffix\n\n   ### Changed\n      - Migrate to write_file for remaining tee commands\n\n\n## 8.0.6 2026-05-10 <code at nfrastack dot com>\n\n   ### Changed\n      - Add --remove destination to limit downstream image configurations destroying source of truth\n\n\n## 8.0.5 2026-04-22 <code at nfastack dot com>\n\n   ### Changed\n      - Fix abliity to use downstream images with 8.0.4\n\n\n## 8.0.4 2026-04-22 <code at nfastack dot com>\n\n   ### Changed\n      - Fix sisues with Zabbix monitoring (ping/php-fpm_status) URLs\n      - Rework Opcache Monitoring scripts to be dynamically created in /usr/share/zabbix/php-opcache instead of zabbix permission locked config folder\n\n\n## 8.0.3 2026-04-20 <code at nfastack dot com>\n\n   ### Changed\n      - Tag to support changes in nfrastack/containre-nginx:8.0.7\n\n\n## 8.0.2 2026-03-26 <code at nfastack dot com>\n\n   ### Added\n      - Support BUILD_ENV\n\n   ### Changed\n      - Rewrite php-ext operations\n      - Repair monitoring configuration routines\n      - Support upstream base image features better\n\n\n## 8.0.1 2026-02-24 <code at nfastack dot com>\n\n   ### Changed\n      - Upstream and index placeholder repairs\n\n\n## 8.0.0 2026-02-23 <code at nfastack dot com>\n\n   ### Added\n      - Supporting PHP 8.5 and Alpine 3.23\n      - Multiple Pool Support\n      - Many differnet customization options\n      - Dynamic configuration of PHP location block\n      - Uses nfrastack/container-nginx:8.x.x as base image\n\n\n## 7.7.20 2025-08-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change php8.1-alpine to use alpine 3.18 base with prebuilt images\n\n\n## 7.7.19 2025-04-27 <dave at tiredofit dot ca>\n\n   ### Added\n      - Pin to tiredofit/nginx:6.5.18\n\n\n## 7.7.18 2025-04-25 <dave at tiredofit dot ca>\n\n   ### Added\n      - Pin to tiredofit/nginx:6.5.17\n\n\n## 7.7.17 2024-12-19 <dave at tiredofit dot ca>\n\n   ### Reverted\n      - Remove php84-spell component to support building under Alpine\n\n\n## 7.7.16 2024-12-12 <dave at tiredofit dot ca>\n\n   ### Added\n      - Pin to tiredofit/nginx:6.5.10\n\n\n## 7.7.15 2024-12-09 <dave at tiredofit dot ca>\n\n   ### Added\n      - Alpine pin to tiredofit/nginx:6.5.8\n\n\n## 7.7.14 2024-12-07 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add PHP 8.4 Support\n\n   ### Changed\n      - Switch PHP 8.3 and PHP 8.2 to use Alpine 3.21 as base\n\n\n## 7.7.13 2024-10-22 <dave at tiredofit dot ca>\n\n   ### Added\n      - Pin to tiredofit/nginx:6.5.4\n\n\n## 7.7.12 2024-10-04 <dave at tiredofit dot ca>\n\n   ### Added\n      - Pin to tiredofit/alpine:6.5.3\n\n\n## 7.7.11 2024-09-26 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Cleanup php-ext script\n      - Pin to tiredofit/nginx:6.5.2\n\n\n## 7.7.10 2024-09-25 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add php-ext disable reset statement to refresh environments\n\n\n## 7.7.9 2024-09-25 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Remove stray cat command in Dockerfile\n\n## 7.7.8 2024-05-01 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change sury.org GPG key for Debian installations\n\n\n## 7.7.7 2024-04-16 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add php83 extensions: ds,event,grpc,imagick,opentelemetry,pcov,rdkafka,smblient,ssh2\n      - Add php82 extensions: decimal,ds,event,grpc,mailparse,mcrypt,opentelemetry,pcov,rdkafka,smbclient,ssh2,timezonedb,vips,xlswriter\n      - Add php81 extensions: decimal,ds,luasandbox,mcrypt,opentelemetry,pcov,smbclient\n\n\n## 7.7.6 2024-02-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Remove Suhosin from hp5.6 variant\n\n\n## 7.7.5 2024-01-26 <dave at tiredofit dot ca>\n\n   ### Reverted\n      - Remove lz4 extension from Debian variant\n\n\n## 7.7.4 2023-12-08 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Add alpine:3.19\n\n\n## 7.7.3 2023-12-05 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change build for Alpine PHP 8.3 to not include 4 PECL extensions\n\n\n## 7.7.2 2023-11-28 <dave at tiredofit dot ca>\n\n   ### Reverted\n      - Drop php-lua extension\n\n\n## 7.7.1 2023-11-28 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Remove `BOTH` Option for PHP_FPM_LISTEN_TYPE\n\n\n## 7.7.0 2023-11-25 <dave at tiredofit dot ca>\n\n   ### Added\n      - Allow listening on Unix Socket or TCP Socket (default Unix Socket)\n      - Add host/ip restrictions for TCP listening\n      - Add PHP_FPM_USER and PHP_FPM_GROUP variables to create isolation from upstream image (default NGINX_ or UNIT_ USER|GROUP)\n\n\n## 7.6.16 2023-11-22 <dave at tiredofit dot ca>\n\n   ### Added\n      - Introduce PHP 8.3 support\n\n\n## 7.6.15 2023-09-13 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix PHP_TIMEOUT not affecting php-cli operations causing unnecessary Signal 15s in some cases\n\n\n## 7.6.14 2023-09-05 <fermion2020@github>\n\n   ### Changed\n      - Fixed not working LLNG handler authentification\n      - Fixed creating a default index page\n\n## 7.6.13 2023-07-28 <dave at tiredofit dot ca>\n\n   ### Reverted\n      - Remove php-decimal extension from Debian variant\n\n\n## 7.6.12 2023-07-28 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add support for Debian Bookworm\n\n   ### Changed\n      - Cleanup some PHP directories that shouldn't exist on Debian variants\n\n\n## 7.6.11 2023-07-25 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change environment variable case\n\n\n## 7.6.10 2023-07-06 <dave at tiredofit dot ca>\n\n   ### Added\n      - Source defaults from upstream nginx container to avoid having to use NGINX_ENABLE_APPLICATION_CONFIGURATION=TRUE variable\n\n\n## 7.6.9 2023-06-21 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix case introduced with 7.6.8 where authentication takes over default settings\n\n\n## 7.6.8 2023-06-20 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Restructure authentication routines when no NGINX_SITE_ENABLED being used to properly allow NGINX_AUTHENTICATION_TYPE=LLNG to be used.\n\n\n## 7.6.6 2023-06-19 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Stop building gnupg extension for <PHP 8.1\n\n\n## 7.6.5 2023-05-30 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Drop requirement of gnu-libiconv for < PHP 8.0 on alpine\n\n\n## 7.6.4 2023-05-12 <dave at tiredofit dot ca>\n\n   ### Reverted\n      - Remove php82-pecl-phalcon for Alpine 3.18\n\n\n## 7.6.3 2023-05-12 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Strip pecl packages that no longer exist in Arch 3.18 repository for PHP 8.2\n\n\n## 7.6.2 2023-05-10 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change PHP 8.2 to build with Alpine 3.18 Base\n      - Change PHP 8.1 to build with Alpine 3.18 Base\n      - Drop PHP 3.17 base variant\n\n\n## 7.6.1 2023-04-04 <dave at tiredofit dot ca>\n\n   ### Reverted\n      - Remove spx extension from PHP 8.2 alpine\n\n\n## 7.6.0 2023-03-24 <dave at tiredofit dot ca>\n\n   ### Added\n      - Added dozens of extra modules for Alpine PHP 8.0, 8.1, 8.2 variants\n\n\n## 7.5.6 2023-03-23 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Load MSGPACK when loading Redis module\n\n\n## 7.5.5 2023-03-23 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add more OPCache options and fix broken options\n\n\n## 7.5.4 2023-03-23 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add testing repository for PHP 8.2-alpine\n\n\n## 7.5.3 2023-03-23 <dave at tiredofit dot ca>\n\n   ### Added\n      - Introduce PHP_HIDE_X_POWERED_BY variable\n\n\n## 7.5.2 2023-03-20 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add gnu-libconv package\n\n\n## 7.5.1 2023-03-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change log_errors_max_len to 0 in php.ini from 1024\n\n   ### Reverted\n      - Strip php_admin_value[log_errors_max_len] from fpm config\n\n\n## 7.5.0 2023-03-15 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Quiet down output when loading defaults (xxx is already loaded! warnings)\n      - Rework initialization\n      - Fix a weird opcache issue\n\n\n## 7.4.2 2023-02-21 <radarsymphony@github>\n\n   ### Changed\n      - Fix for LLNG_AUTHENTICATION_TYPE not reading variables properly\n\n\n## 7.4.1 2023-01-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for 7.4.0\n\n\n## 7.4.0 2023-01-15 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add JIT Compilation support by means of PHP_OPCACHE_JIT_MODE and PHP_OPCACHE_BUFFER_SIZE variables (8.x only)\n\n   ### Changed\n      - Minor formatting fixes\n\n\n## 7.3.4 2023-01-11 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Convert alias to function in php-ext for non interactive sessions\n\n\n## 7.3.3 2023-01-10 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for `php-ext` not reading modules with underscores properly (credit timoschwarzer@github)\n\n\n## 7.3.2 2022-12-14 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix PHP_BASE issue with modules not loading introduced with 7.3.0\n\n\n## 7.3.1 2022-12-13 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Patchup for 8.2.x on Alpine systems\n\n\n## 7.3.0 2022-12-11 <dave at tiredofit dot ca>\n\n   ### Added\n      - Introduce PHP 8.2 Support\n\n   ### Changed\n      - Rework Dockerfiles\n\n\n## 7.2.1 2022-11-23 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Switch PHP 8.1 base to Alpine 3.17\n\n\n## 7.2.0 2022-10-13 <dave at tiredofit dot ca>\n\n   ### Added\n      - Introduce customizable Opcache and APC environment variables\n\n\n## 7.1.1 2022-10-05 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Remvoe /var/log entries in Dockerfile build\n\n\n## 7.1.0 2022-10-01 <dave at tiredofit dot ca>\n\n   ### Added\n      - Convert to using update_template functions when configuring\n\n   ### Changed\n      - Fix an error where sample php file wasn't being created properly\n\n\n## 7.0.11 2022-09-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change the way PHP_DISPLAY_ERRORS works in code - True / False actually works\n\n\n## 7.0.10 2022-08-17 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Switch to using exec to have process take over pid\n\n\n## 7.0.9 2022-08-08 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Additional fixes to 7.0.8\n\n\n## 7.0.8 2022-08-08 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for Kitchen Sink mode showing pathnames on print_notice command\n      - Stop using log_length parameter for < PHP-FPM 7.3\n\n\n## 7.0.7 2022-07-18 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for keepalives in upstream\n\n\n## 7.0.6 2022-07-09 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Escape document_root for FastCGI default scripts\n\n\n## 7.0.5 2022-07-06 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for blank configuration not passing proper fastcgi_params\n      - Stop throwing an error for openssl if it doesn't exist in the slightest\n\n\n## 7.0.4 2022-07-06 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Debian: Switch to PHP_BASE versioned msgpack module\n\n\n## 7.0.3 2022-07-05 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Add ARG for easier build argument shifting with CI and command line\n\n\n## 7.0.2 2022-07-04 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Bugfix when there is no default.conf file available\n\n\n## 7.0.1 2022-07-03 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add PHP_FPM_OUTPUT_BUFFER_SIZE environment variable\n\n\n## 7.0.0 2022-06-23 <dave at tiredofit dot ca>\n\n   ### Added\n      - Rewrote entire image and split into functions to be reused in descendent images\n      - Rework to support tiredofit/nginx:6.0.0 and its changes\n\n   ### Changed\n      - Rename CONTAINER_MODE variable\n      - Quiet down output on extension loading/unloading\n\n\n## 6.4.10 2022-05-24 <dave at tiredofit dot ca>\n\n   ### Added\n      - Alpine: Switch PHP 8 and 8.1 to Alpine 3.16 base\n\n\n## 6.4.9 2022-04-12 <unlink@github>\n\n   ### Changed\n      - Add support for debugging with PHPStorm\n\n## 6.4.8 2022-04-11 <unlink@github>\n\n   ### Changed\n      - Fix for open brace in if statement\n      - Revamp Xdebug options for PHP 7.2 and higher\n\n\n## 6.4.7 2022-04-06 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Adjust defaults to use proper if statements as opposed to shortcuts\n\n\n## 6.4.6 2022-03-18 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for Debian images not including redis extension\n\n\n## 6.4.5 2022-03-11 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Sanity checks to be able to survive \"warm\" restarts\n\n\n## 6.4.4 2022-03-08 <dave at tiredofit dot ca>\n\n   ### Added\n      - Remove php74-embed\n\n\n## 6.4.3 2022-03-04 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change the way that upstream blocks are being added - stop relying on default.conf, instead put them in nginx.conf\n\n\n## 6.4.2 2022-03-03 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Patchup for 6.4.1\n\n\n## 6.4.1 2022-03-02 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add PHP_FPM_POST_INIT_SCRIPT variable to execute scripts before php-fpm process starts\n      - Add PHP_FPM_POST_INIT_COMMAND variable to execute command before php-fpm-process starts\n\n\n## 6.4.0 2022-02-23 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add multiple PHP upstream hosts by default\n      - Update LLNG Authentication to use Upstream Hosts\n\n   ### Changed\n      - Code Cleanup, refactoring\n\n\n## 6.3.7 2022-02-22 <dave at tiredofit dot ca>\n\n   ### Added\n      - Patchup Alpine Mono Dockerfile to properly build PHP 8.1 variants\n\n\n## 6.3.6 2022-02-09 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fixes for builds showing up as PHP 8.1 instead of what they should be\n      - Base image updates\n\n   ### Reverted\n\n\n## 6.3.5 2021-12-28 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fixup for LibTidy throwing errors\n\n\n## 6.3.4 2021-12-27 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for Zabbix Opcache monitoring\n\n\n## 6.3.3 2021-12-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Cleanup some of the autodiscover routines should Nginx or PHP-FPM be running in 'standalone' mode\n\n\n## 6.3.2 2021-12-14 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for Docker Mono repo for PHP < 7.3 failing\n\n\n## 6.3.1 2021-12-10 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for 6.3.0 Zabbix Templates and switch to User Parameters\n\n\n## 6.3.0 2021-12-07 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Rework Zabbix Monitoring scripts and templates\n\n\n## 6.2.15 2021-12-01 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Stop OpenSSL warning in PHP 8.1\n\n\n## 6.2.14 2021-11-24 <dave at tiredofit dot ca>\n\n   ### Added\n      - Change PHP 7.4 and 8.0 to use Alpine 3.15 as base\n\n\n## 6.2.13 2021-11-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for Zabbix PHP-FPM Metrics not functioning when AUTHENTICATION_TYPE=LLNG\n\n\n## 6.2.12 2021-11-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for XDebug Log Path\n\n\n## 6.2.11 2021-11-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Adjustment to Log Level integer\n\n\n## 6.2.10 2021-11-10 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change the way that access logs are being configured on startup for those who don't stop and destroy a container completely\n\n\n## 6.2.9 2021-10-28 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Debian: Fix for pulling in MariaDB repository\n\n\n## 6.2.8 2021-10-28 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix with pulling in MariaDB Repository\n\n\n## 6.2.7 2021-10-20 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add mariadb-connector-c to fix SHA2 problems with connecting to MariaDB 8.0 systems\n\n\n## 6.2.6 2021-10-19 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add PHP_LOG_LIMIT environment variable to ensure single line log levels in access/error.log\n\n\n## 6.2.5 2021-09-04 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Redo how logrotate files were created\n\n\n## 6.2.4 2021-09-04 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Opcache key removal for Zabbix monitoring\n\n\n## 6.2.3 2021-09-04 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for monitoring PHP-FPM\n\n\n## 6.2.2 2021-09-01 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for logformats\n\n\n## 6.2.1 2021-09-01 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for msmtp not working due to a change in upstream base images\n\n\n## 6.2.0 2021-08-29 <dave at tiredofit dot ca>\n\n   ### Added\n      - Added Access Log support with standard/default string output or json output\n      - Fluent-Bit Log Parsing support\n\n\n## 6.1.21 2021-08-19 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change the way dependent modules are loaded in defaults\n\n\n## 6.1.20 2021-08-18 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change to PECL http package\n\n\n## 6.1.19 2021-08-18 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change to PHP Memcached plugin for debian\n\n\n## 6.1.18 2021-08-05 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add another value for socket timeout\n      - Cleanup some opcache console annoyances\n\n\n## 6.1.17 2021-07-12 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Move around some LLNG Authentication blocks\n\n\n## 6.1.16 2021-07-05 <dave at tiredofit dot ca>\n\n   ### Added\n      - Support upstream image changes\n\n## 6.1.15 2021-06-08 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add Hook to load IGBINARY when PHP_ENABLE_MEMCACHED=TRUE\n\n\n## 6.1.14 2021-06-04 <dave at tiredofit dot ca>\n\n   ### Added\n      - Enable APC Caching for CLI\n\n\n## 6.1.13 2021-05-29 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Final permissions fix for MSMTP\n\n\n## 6.1.12 2021-05-25 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Additional checks for msmtp usage - If ENABLE_SMTP=FALSE then don't execute permissions settings\n\n\n## 6.1.11 2021-05-25 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change the way that LLNG authentication gets loaded\n\n\n## 6.1.10 2021-05-24 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for 6.1.9 permissions\n\n\n## 6.1.9 2021-05-24 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Update msmtprc file with nginx user/group permissions to allow php-fpm to send\n      - Shuffle XDebug environment variables and configuraiton around\n\n\n## 6.1.8 2021-05-19 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add gpgme package (Alpine)\n\n   ### Changed\n      - Fix for php-ext enable script to stop loading json if PHP > 8\n      - GPG extension loading fix\n\n\n## 6.1.7 2021-05-05 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Force OPENSSL extension to be activated by default to fix composer errors\n\n\n## 6.1.6 2021-05-04 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for opcache being loaded twice in some scenarios\n\n\n## 6.1.5 2021-05-03 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for enabling json warning under php8\n\n\n## 6.1.4 2021-05-03 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for JSON for <php7\n\n\n## 6.1.3 2021-05-03 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Add PHP_ENABLE_SESSION=TRUE to defaults\n      - Set PHP_ENABLE_IGBINARY=TRUE when PHP_ENABLE_REDIS=TRUE\n\n\n## 6.1.2 2021-05-01 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fixes to php extension script specifically under Alpine\n\n\n## 6.1.1 2021-05-01 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for determining PHP version on runtime\n\n\n## 6.1.0 2021-04-22 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Unified Script for Alpine and Debian\n      - Merged all changes up to 6.xx into Alpine build\n\n## 6.0.1 2021-04-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix PHP Extension script\n      - Opcache seems to want to load twice for some reason, dirty hack enabled\n      - Composer wasn't installing properly\n\n\n## 6.0.0 2021-04-16 <dave at tiredofit dot ca>\n\n   ### Added\n      - Merged Debian branches into one - Use Build Argument of PHP_BASE to build `7.3` `7.4` or `8.0`\n      - Composer 2.x\n      - Massively revamped module loading. Try `php-env` from the command line to enable, disable, see modules available per version\n      - Building for Stretch and Buster, ready for Bullseye\n      - Building and amd64, arm7, arm64\n\n## 5.6.0 2020-10-26 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add composer version declaration (pinning to 1.10.16)\n\n\n## 5.5.3 2020-08-29 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add ENABLE_PHP_FPM environment variable\n\n\n## 5.5.2 2020-08-10 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix to regex for LLNG Authentication\n\n\n## 5.5.1 2020-07-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix logrotate for PHP-FPM\n\n\n## 5.5.0 2020-06-09 <dave at tiredofit dot ca>\n\n   ### Added\n      - Update to support tiredofit/debian 5.0.0 base image\n\n\n## 5.4.1 2020-06-05 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Move /etc/s6/services to /etc/services.d\n\n\n## 5.4.0 2020-05-13 <dave at tiredofit dot ca>\n\n   ### Added\n      - PHP 7.3 - Debian Buster Variant\n\n\n## 5.3.7 2020-04-21 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Remove extra logrotate.d file added by packages\n\n\n## 5.3.6 2020-04-21 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fix for PHP Plugins not enabling correctly\n\n\n## 5.3.5 2020-04-18 <dave at tiredofit dot ca>\n\n   ### Added\n      - Update to support tiredofit/alpine 4.5.1 base image\n\n\n## 5.3.4 2020-03-16 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change msmtp configuration\n\n\n## 5.3.3 2020-03-04 <dave at tiredofit dot ca>\n\n   ### Added\n      - Update image to support new tiredofit/alpine:4.4.0 base image\n\n## 5.3.1 2020-01-20 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change the way PHP XDebug is being called\n\n\n## 5.3.0 2020-01-04 <dave at tiredofit dot ca>\n\n   ### Added\n      - Add new `CONTAINER_MODE` environment variable to allow standalone operation for load balancing\n      - Add new `PHP_WEBROOT` environment variable when `CONTAINER_MODE` set to `php-fpm`\n\n\n## 5.2.2 2020-01-03 <dave at tiredofit dot ca>\n\n   ### Added\n      - ADD PHP_POST_MAX_SIZE environment variable\n\n   ### Changed\n      - Cleanup with LLNG Authentication\n      - Properly assign PHP_UPLOAD_MAX_SIZE and PHP_POST_MAX_SIZE variables\n\n\n## 5.2.0 2019-12-31 <dave at tiredofit dot ca>\n\n   ### Added\n      - Move defaults to /assets/functions files\n\n   ### Changed\n      - Change warnings to notices\n\n\n## 5.1.0 2019-12-29 <dave at tiredofit dot ca>\n\n   ### Added\n      - Update to support new tiredofit/alpine base image\n\n\n## 5.0.4 2019-12-19 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change to LLNG Authentication Auto Configuration Routines\n\n\n## 5.0.3 2019-12-18 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Fixed error with display errors configuration\n\n## 5.0.2 2019-12-18 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Change to support dynamic webserver user/group\n\n\n## 5.0.1 2019-12-04 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Make MySQL Default Enabled\n\n\n## 5.0.0 2019-12-04 <dave at tiredofit dot ca>\n\n   ### Added\n      - Reworked entire image\n      - Added many new variables\n      - Basing off of tiredofit/nginx\n      - Code Cleanup\n\n\n## 4.4.2 2019-11-18 <dave at tiredofit dot ca>\n\n   ### Changed\n      - Update Nginx proxy temp location\n\n\n## 4.4.1 2019-07-08 <dave at tiredofit dot ca>\n\n* Add tmp folder during startup to avoid bootloop\n\n## 4.4 2019-06-19 <dave at tiredofit dot ca>\n\n* PHP 7.3\n* Alpine 3.10\n\n## 4.3 2019-03-03 <dave at tiredofit dot ca>\n\n* Move Alpine base to 3.9\n\n## 4.2 2018-12-17 <dave at tiredofit dot ca>\n\n* Add Nginx tmp cache directory\n\n## 4.1 2018-11-28 <dave at tiredofit dot ca>\n\n* Fix Timezone setting for php.ini\n\n## 4.0.1 2018-11-19 <dave at tiredofit dot ca>\n\n* Update further LLNG\n\n## 4.0 2018-04-28 <dave at tiredofit dot ca>\n\n* Ability to protect service via basic authentication or using LemonLDAP:NG Handlers\n\n\n## 3.7 2018-04-22 <dave at tiredofit dot ca>\n\n* Tweak SMTP to always route through msmtp based on new Base Image Changes\n\n## 3.6 2018-04-02 <dave at tiredofit dot ca>\n\n* Added MAINTENANCE environment variable to move system to maintenance mode. Also maintenance script (off/on/sleep 60) inside container.\n\n## 2018-03-18 3.5 <dave at tiredofit dot ca>\n\n* Add `STAGE` variable to be passed to PHP for Development/Production Purposes\n\n## 2018-02-20 3.4 <dave at tiredofit dot ca>\n\n* Add Reverse Proxy Detection\n\n## 2018-02-14 3.3 <dave at tiredofit dot ca>\n\n* Remove Redundant Entrypoint\n* Fix Paths for enabled php modules\n\n## 2018-02-01 3.2 <dave at tiredofit dot ca>\n\n* Fix PHP Timezone Issue\n* Add Zabbix Scripts\n\n## 2017-11-30 edge-3.1 <dave at tiredofit dot ca>\n\n* Switched to Edge Base\n\n\n## 2017-09-17 3.1 <dave at tiredofit dot ca>\n\n* Fix Issue with PHP XDebug\n* Added Imagick Extension\n\n## 2017-08-27 3.0 <dave at tiredofit dot ca>\n\n* Big change (in image size) due to adding all available PHP Extensions\n* Debug Mode via XDebug set via Environment Variables\n* All PHP Extensions able to be enabled of disabled via Environment Variables\n\n## 2017-07-12 2.6 <dave at tiredofit dot ca>\n\n* Added Checking to wait to start services in sequence\n\n## 2017-07-12 2.5 <dave at tiredofit dot ca>\n\n* Added Composer, memcached, and sqlite extensions\n\n## 2017-07-06 2.4 <dave at tiredofit dot ca>\n\n* Added proper logging for php-fpm\n\n## 2017-07-06 2.3 <dave at tiredofit dot ca>\n\n* Add PHP_TIMEOUT\n\n## 2017-07-03 2.2 <dave at tiredofit dot ca>\n\n* Added Logrotate\n\n## 2017-07-01 2.1 <dave at tiredofit dot ca>\n\n* Sanity Check and write initialization state to /tmp/.container/*service name\n* Added MSMTP to take place of sendmail\n\n\n## 2017-06-23 2.0 <dave at tiredofit dot ca>\n\n* s6.d Process Seperation\n* PHP-FPM run as NGINX\n* Nginx Zabbix Checks set to port 73\n* Nginx Uses conf.d file for Loading Site\n\n\n## 2017-05-29 1.3 <dave at tiredofit dot ca>\n\n* Tracking Alpine 3.4\n* PHP 5.6\n\n## 2017-04-07 1.2 <dave at tiredofit dot ca>\n\n* Rebase\n\n## 2017-02-08 1.1 <dave at tiredofit dot ca>\n\n* Added mariadb-client\n\n## 2017-02-08 1.0 <dave at tiredofit dot ca>\n\n* Initial Release\n* Alpine:edge\n* PHP7\n* Zabbix\n\n"
  },
  {
    "path": "Containerfile",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nARG BASE_IMAGE\n\nFROM ${BASE_IMAGE}\n\nLABEL \\\n        org.opencontainers.image.title=\"Nginx PHP-FPM\" \\\n        org.opencontainers.image.description=\"PHP Interpreter w/Web server\" \\\n        org.opencontainers.image.url=\"https://hub.docker.com/r/nfrastack/nginx-php-fpm\" \\\n        org.opencontainers.image.documentation=\"https://github.com/nfrastack/container-nginx-php-fpm/blob/main/README.md\" \\\n        org.opencontainers.image.source=\"https://github.com/nfrastack/container-nginx-php-fpm.git\" \\\n        org.opencontainers.image.authors=\"Nfrastack <code@nfrastack.com>\" \\\n        org.opencontainers.image.vendor=\"Nfrastack <https://www.nfrastack.com>\" \\\n        org.opencontainers.image.licenses=\"MIT\"\n\nARG \\\n    PHP_BASE\n\nENV \\\n    CONTAINER_ENABLE_MESSAGING=TRUE \\\n    IMAGE_NAME=\"nfrastack/nginx-php-fpm\" \\\n    IMAGE_REPO_URL=\"https://github.com/nfrastack/container-nginx-php-fpm/\"\n\nCOPY CHANGELOG.md /usr/src/container/CHANGELOG.md\nCOPY LICENSE /usr/src/container/LICENSE\nCOPY README.md /usr/src/container/README.md\n\nRUN echo \"\" && \\\n    BUILD_ENV=\" \\\n                10-nginx/NGINX_CREATE_SAMPLE_HTML=FALSE \\\n                10-nginx/NGINX_INDEX_FILE=index.php \\\n                20-php-fpm/PHP_MODULE_ENABLE_APCU=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_BCMATH=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_BZ2=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_CTYPE=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_CURL=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_DOM=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_EXIF=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_FILEINFO=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_GD=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_ICONV=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_IMAP=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_INTL=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_MBSTRING=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_MYSQLI=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_MYSQLND=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_OPCACHE=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_OPENSSL=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_PDO=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_PDO_MYSQL=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_PGSQL=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_PHAR=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_SESSION=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_SIMPLEXML=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_TOKENIZER=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_XML=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_XMLREADER=TRUE \\\n                20-php-fpm/PHP_MODULE_ENABLE_XMLWRITER=TRUE \\\n                20-php-fpm/PHPFPM_USER=[env:NGINX_USER] \\\n                20-php-fpm/PHPFPM_GROUP=[env:NGINX_GROUP] \\\n                \" \\\n                && \\\n    PHP_BUILD_DEPS_ALPINE=\"  \\\n                                build-base \\\n                                php${PHP_BASE/./}-dev \\\n                                \" \\\n                                && \\\n    PHP_BUILD_DEPS_DEBIAN=\"  \\\n                          \" \\\n                          && \\\n    PHP_RUN_DEPS_ALPINE=\"  \\\n                            mariadb-client \\\n                            mariadb-connector-c \\\n                            postgresql-client \\\n                        \" \\\n                        && \\\n    PHP_8_5_RUN_DEPS_ALPINE=\" \\\n                                gnu-libiconv \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n    PHP_8_4_RUN_DEPS_ALPINE=\" \\\n                                gnu-libiconv \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n    PHP_8_3_RUN_DEPS_ALPINE=\" \\\n                                gnu-libiconv \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n    PHP_8_2_RUN_DEPS_ALPINE=\" \\\n                                gnu-libiconv \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n     PHP_8_1_RUN_DEPS_ALPINE=\" \\\n                                gnu-libiconv \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n    PHP_8_0_RUN_DEPS_ALPINE=\" \\\n                                gnu-libiconv \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n    PHP_7_4_RUN_DEPS_ALPINE=\" \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n    PHP_7_3_RUN_DEPS_ALPINE=\" \\\n                                mariadb-connector-c \\\n                            \" && \\\n    \\\n    PHP_7_2_RUN_DEPS_ALPINE=\" \\\n                            \" && \\\n    \\\n    PHP_7_1_RUN_DEPS_ALPINE=\" \\\n                            \" && \\\n    \\\n    PHP_7_0_RUN_DEPS_ALPINE=\" \\\n                            \" && \\\n    \\\n    PHP_5_6_RUN_DEPS_ALPINE=\" \\\n                            \" && \\\n    \\\n    PHP_RUN_DEPS_DEBIAN=\" \\\n                            ca-certificates \\\n                            git \\\n                            mariadb-client \\\n                            php-pear \\\n                            postgresql-client \\\n                        \" \\\n    PHP_8_5_RUN_DEPS_DEBIAN=\" \\\n                            \" && \\\n    \\\n    PHP_8_4_RUN_DEPS_DEBIAN=\" \\\n                            \" && \\\n    \\\n    PHP_8_3_RUN_DEPS_DEBIAN=\" \\\n                            \" && \\\n    \\\n    PHP_8_2_RUN_DEPS_DEBIAN=\" \\\n                            \" && \\\n    \\\n    PHP_8_1_RUN_DEPS=_DEBIAN\" \\\n                            \" && \\\n    \\\n    PHP_8_0_RUN_DEPS_DEBIAN=\" \\\n                            \" && \\\n    \\\n    PHP_7_4_RUN_DEPS_DEBIAN=\" \\\n                            \" && \\\n    \\\n    PHP_7_3_RUN_DEPS_DEBIAN=\" \\\n                            \" && \\\n    \\\n    source /container/base/functions/container/build && \\\n    container_build_log image && \\\n    create_user php 9000 www-data && \\\n    add_user_group php www-data && \\\n    case \"$(container_info distro)\" in \\\n        \"alpine\" ) \\\n            case \"${PHP_BASE}\" in \\\n                8.[1-9] ) \\\n                        export _php_folder=\"/etc/php${PHP_BASE/./}\" ; \\\n                        export _php_version=\"${PHP_BASE/./}\" ; \\\n                        export build_gnupg=true ; \\\n                    ;; \\\n                8.0 | *  ) \\\n                        export _php_folder=\"/etc/php${PHP_BASE:0:1}\" ; \\\n                        export _php_version=\"${PHP_BASE:0:1}\" ; \\\n                        export build_gnupg=false ; \\\n                    ;; \\\n            esac \\\n        ;; \\\n        \"debian\" ) \\\n            export _php_version=\"${PHP_BASE}\" ; \\\n            export _php_folder=\"/etc/php/${PHP_BASE}\" ; \\\n            package repo add mariadb ; \\\n            package repo add postgres ; \\\n            package repo key https://packages.sury.org/php/apt.gpg suryphp.gpg ; \\\n            package repo add suryphp \"https://packages.sury.org/php/ $(cat /etc/os-release |grep \"VERSION=\" | awk 'NR>1{print $1}' RS='(' FS=')') main\" suryphp.gpg ; \\\n        ;; \\\n    esac ; \\\n    package update && \\\n    package upgrade && \\\n    package install \\\n                    PHP_BUILD_DEPS \\\n                    PHP_${PHP_BASE/./_}_BUILD_DEPS \\\n                    PHP_RUN_DEPS \\\n                    PHP_${PHP_BASE/./_}_RUN_DEPS \\\n                    && \\\n    \\\n    case \"$(container_info distro)\" in \\\n        \"alpine\" ) \\\n            package install $(apk search -q php${_php_version} | grep \"^php${_php_version}\" | sed -e \"/-cgi/d\" -e \"/-apache2/d\" -e \"/-doc/d\" -e \"/-dbg/d\") ; \\\n            sed -i \"s|;cgi.fix_pathinfo=1|cgi.fix_pathinfo=0|g\" ${_php_folder}/php.ini ; \\\n        ;; \\\n        \"debian\" ) \\\n            package install $(apt-cache search php${_php_version} | awk '{print $1}' | sed -e \"/-cgi/d\" -e \"/-dbgsym/d\" -e \"/-dev/d\" -e \"/-gmagick/d\"  -e \"/libapache2-mod/d\" -e \"/-libvirt/d\" -e \"/-yac/d\") ; \\\n            sed -i \"s|;cgi.fix_pathinfo=1|cgi.fix_pathinfo=0|g\" ${_php_folder}/cli/php.ini ; \\\n        ;; \\\n    esac ; \\\n    \\\n    if [ -f /usr/sbin/php-fpm\"${_php_version}\" ] ; then ln -sf /usr/sbin/php-fpm\"${_php_version}\" /usr/sbin/php-fpm ; fi ; \\\n    if [ -f /usr/sbin/php-fpm\"${PHP_BASE}\" ] ; then ln -sf /usr/sbin/php-fpm\"${PHP_BASE}\" /usr/sbin/php-fpm ; fi ; \\\n    if [ -f /usr/bin/pecl\"${_php_version}\" ] ; then ln -sf /usr/bin/pecl\"${_php_version}\" /usr/sbin/pecl; fi ; \\\n    if [ -f /usr/bin/php\"${_php_version}\" ] ; then ln -sf /usr/bin/php\"${_php_version}\" /usr/sbin/php ; fi ; \\\n    if [ -f /usr/bin/phpize\"${_php_version}\" ] ; then ln -sf /usr/bin/phpize\"${_php_version}\" /usr/sbin/phpize ; fi ; \\\n    curl -sSLk https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \\\n    \\\n    rm -rf \\\n            \"${_php_folder}\"/environment/* \\\n            \"${_php_folder}\"/php-fpm.d/* \\\n            \"${_php_folder}\"/pools.d/* \\\n            && \\\n    \\\n    if [ \"${_php_version}\" = \"5\" ] ; then echo \"suhosin.executor.include.whitelist = phar\" >> \"${_php_folder}\"/php.ini ; fi ;  \\\n    \\\n    case \"$(container_info distro)\" in \\\n        \"alpine\" ) \\\n            #### Disabling any but core extensions - When using this image as a base for other images, you'll want to turn turn them on before running composer with the inverse of phpdisomd (phpenmod) to keep things clean\n            mkdir -p \"${_php_folder}\"/conf.available/ && \\\n            for module in \"${_php_folder}\"/conf.d/*.ini; do \\\n                if [ ! -L \"${module}\" ] ; then \\\n                    if [ \"$(echo $(basename $module) | grep -c '^[0-9][0-9].*')\" = \"0\" ] ; then \\\n                        mv \"${module}\" \"$(dirname ${module})/20_$(basename ${module})\" ; \\\n                        module=\"$(dirname ${module})/20_$(basename ${module})\"; \\\n                    fi ; \\\n                    if ! grep -w -i -q \";priority\" \"$module\"; then \\\n                        echo \";priority=$(basename $module .ini | cut -d _ -f1)\" >> $module ; \\\n                        mv \"${module}\" \"${_php_folder}\"/conf.available/$(basename \"${module}\" .ini | cut -c 4-).ini; \\\n                    fi; \\\n                fi; \\\n            done; \\\n            rm -rf \"${_php_folder}\"/conf.d/* ; \\\n            sed -i \"s|;priority=00|;priority=10|g\" \"${_php_folder}\"/conf.available/opcache.ini ; \\\n            php_env_modules_enabled=\"$(set -o posix; set | sort | grep \"^PHP_MODULE_ENABLE_.*=\" | grep -i TRUE | cut -d _ -f 4 | cut -d = -f 1 |  tr [A-Z] [a-z])\" ; \\\n            for module in $php_env_modules_enabled ; do \\\n                if [ -f \"${_php_folder}\"/conf.available/\"${module}\".ini ] ; then \\\n                    priority=$(cat \"${_php_folder}\"/conf.available/\"${module}\".ini | grep \";priority\" | cut -d = -f2) ; \\\n                    ln -sf \"${_php_folder}\"/conf.available/\"${module}\".ini \"${_php_folder}\"/conf.d/\"${priority}\"-\"${module}\".ini ; \\\n                fi ; \\\n            done ; \\\n            if [ \"${_php_version}\" != \"8\" ] ; then \\\n                if [ -f \"${_php_folder}\"/conf.available/json.ini ] ; then \\\n                          priority=$(cat \"${_php_folder}\"/conf.available/json.ini | grep \";priority\" | cut -d = -f2) ; \\\n                    ln -sf \"${_php_folder}\"/conf.available/json.ini \"${_php_folder}\"/conf.d/\"${priority}\"-json.ini ; \\\n                fi ; \\\n            fi ; \\\n        ;; \\\n        \"debian\" ) \\\n            update-alternatives --set php /usr/bin/php${PHP_BASE} ; \\\n            for f in /etc/php/${PHP_BASE}/mods-available/*.ini; do phpdismod $(basename $f .ini); done; \\\n            php_env_modules_enabled=\"$(set -o posix; set | sort | grep \"^PHP_MODULE_ENABLE_.*=\" | grep -i TRUE | cut -d _ -f 4 | cut -d = -f 1 |  tr A-Z a-z)\" ; \\\n            for module in $php_env_modules_enabled ; do phpenmod ${module} ; done ; \\\n            if [ \"${PHP_BASE}\" = \"7.3\" ] || [ \"${PHP_BASE}\" = \"7.4\" ]; then phpenmod json ; fi ; \\\n            find /etc/php/ -mindepth 1 -maxdepth 1 -type d -not -name ${PHP_BASE} -exec rm -rf '{}' \\; 2>/dev/null ; \\\n        ;; \\\n    esac ; \\\n    \\\n    package remove \\\n                    PHP_BUILD_DEPS \\\n                    PHP_${PHP_BASE/./_}_BUILD_DEPS \\\n                    && \\\n    package cleanup && \\\n    rm -rf \\\n            /root/.composer\n\nCOPY rootfs /\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2026 Nfrastack\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# nfrastack/container-nginx-php-fpm\n\n## About\n\nThis repository will build a [Nginx](https://www.nginx.org) w/[PHP-FPM](https://php.net) container image, suitable for serving PHP scripts, or utilizing as a base image for installing additional software.\n\n* Tracking PHP 5.3-8.5\n* Easily enable / disable extensions based on your use case\n* Automatic Log rotation\n* Composer Included\n* XDebug capability\n* Caching via APC, opcache\n* Includes client libraries for [MariaDB](https://www.mariadb.org) and [Postgresql](https://www.postgresql.org)\n* Multiple pool support\n\n## Maintainer\n\n* [Nfrastack](https://www.nfrastack.com)\n\n## Table of Contents\n\n* [About](#about)\n* [Maintainer](#maintainer)\n* [Table of Contents](#table-of-contents)\n* [Installation](#installation)\n  * [Prebuilt Images](#prebuilt-images)\n  * [Quick Start](#quick-start)\n  * [Persistent Storage](#persistent-storage)\n* [Configuration](#configuration)\n  * [Environment Variables](#environment-variables)\n    * [Base Images used](#base-images-used)\n    * [Core Configuration](#core-configuration)\n  * [Users and Groups](#users-and-groups)\n  * [Networking](#networking)\n* [Maintenance](#maintenance)\n  * [Shell Access](#shell-access)\n* [Support & Maintenance](#support--maintenance)\n* [License](#license)\n* [References](#references)\n\n## Installation\n\n### Prebuilt Images\n\nFeature limited builds of the image are available on the [Github Container Registry](https://github.com/nfrastack/container-nginx-php-fpm/pkgs/container/container-nginx-php-fpm) and [Docker Hub](https://hub.docker.com/r/nfrastack/nginx-php-fpm).\n\nTo unlock advanced features, one must provide a code to be able to change specific environment variables from defaults. Support the development to gain access to a code.\n\nTo get access to the image use your container orchestrator to pull from the following locations:\n\n```\nghcr.io/nfrastack/container-nginx-php-fpm:(image_tag)\ndocker.io/nfrastack/nginx-php-fpm:(image_tag)\n```\n\nImage tag syntax is:\n\n`<image>:<optional tag>-<optional phpversion>-<optional distro>-<optional distro_variant>`\n\nExample:\n\n`ghcr.io/nfrastack/container-nginx-php-fpm:latest` or\n\n`ghcr.io/nfrastack/container-nginx-php-fpm:1.0-8.4-debian_trixie`\n\n* `latest` will be the most recent commit\n\n* An optional `tag` may exist that matches the [CHANGELOG](CHANGELOG.md) - These are the safest\n\n| PHP version | Alpine Base | Tag            | Debian Base | Tag                    |\n| ----------- | ----------- | -------------- | ----------- | ---------------------- |\n| latest      | edge        | `:alpine-edge` |             |                        |\n| 8.5.x       | 3.23        | `:8.5-alpine`  |             |                        |\n| 8.4.x       | 3.23        | `:8.4-alpine`  | Trixie      | `:8.4-debian`          |\n|             |             |                | Bookworm    | `:8.4-debian_bookworm` |\n| 8.3.x       | 3.23        | `:8.3-alpine`  | Bookworm    | `:8.3-debian_trixie`   |\n|             |             |                | Trixie      | `:8.3-debian`          |\n| 8.2.x       | 3.22        | `:8.2-alpine`  | Trixie      | `:8.2-debian`          |\n|             |             |                | Bookworm    | `:8.2-debian_bookworm` |\n| 8.1.x       | 3.19        | `:8.1-alpine`  |             |                        |\n| 8.0.x       | 3.16        | `:8.0-alpine`  |             |                        |\n\n\nHave a look at the container registries and see what tags are available.\n\n#### Multi-Architecture Support\n\nImages are built for `amd64` by default, with optional support for `arm64` and other architectures.\n\n### Quick Start\n\n* The quickest way to get started is using [docker-compose](https://docs.docker.com/compose/). See the examples folder for a working [compose.yml](examples/compose.yml) that can be modified for your use.\n\n* Map [persistent storage](#persistent-storage) for access to configuration and data files for backup.\n* Set various [environment variables](#environment-variables) to understand the capabilities of this image.\n\nRefer to the nginx upstream readme for configuration. If you do not create any configuration files for the sites, a default PHP location block will be added to your site\n\n```nginx\nlocation ~ [^/]\\.php(/|$) {\n    try_files $fastcgi_script_name =404; # Fail if script missing\n    {{php_upstream}};\n    fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n    fastcgi_index {{php_index_file}};\n    {{fastcgi_params}};\n}\n```\n\n{{php_upstream}} will get replaced on container start with your PHP POOL value, and {{fastcgi_params}} will get replaced with the location of your nginx fastcgi_params.\n\n### Persistent Storage\n\nThe following directories/files should be mapped for persistent storage in order to utilize the container effectively.\n\n| Directory       | Description                |\n| --------------- | -------------------------- |\n| `/www/html`     | Root Directory             |\n| `/logs/php-fpm` | Nginx and php-fpm logfiles |\n\n### Environment Variables\n\n#### Base Images used\n\nThis image relies on a customized base image in order to work.\nBe sure to view the following repositories to understand all the customizable options:\n\n| Image                                                   | Description     |\n| ------------------------------------------------------- | --------------- |\n| [OS Base](https://github.com/nfrastack/container-base/) | Base Image      |\n| [Nginx](https://github.com/nfrastack/container-nginx/)  | Nginx Webserver |\n\nBelow is the complete list of available options that can be used to customize your installation.\n\n* Variables showing an 'x' under the `Advanced` column can only be set if the containers advanced functionality is enabled.\n\n#### Core Configuration\n\n| Variable                | Description                         | Default                             |\n| ----------------------- | ----------------------------------- | ----------------------------------- |\n| `ENABLE_PHP_FPM`        | Enable PHP-FPM container mode       | `TRUE`                              |\n| `PHPFPM_CONTAINER_MODE` | Container mode for PHP-FPM          | `nginx-php-fpm`                     |\n| `PHP_CREATE_SAMPLE_PHP` | Create a sample PHP page on startup | `TRUE`                              |\n| `PHP_HIDE_X_POWERED_BY` | Hide X-Powered-By header            | `TRUE`                              |\n| `PHP_KITCHENSINK`       | Enable all PHP extensions           | `FALSE`                             |\n| `PHP_MEMORY_LIMIT`      | PHP memory limit                    | `128M`                              |\n| `PHP_POST_MAX_SIZE`     | Maximum POST size                   | `2G`                                |\n| `PHP_TIMEOUT`           | Script execution timeout            | `180`                               |\n| `PHP_UPLOAD_MAX_SIZE`   | Maximum upload size                 | `2G`                                |\n| `PHP_WEBROOT`           | Webroot directory                   | `/www/html` (or `${NGINX_WEBROOT}`) |\n\n#### PHP Environment\n\n| Variable            | Description              | Default                                                        |\n| ------------------- | ------------------------ | -------------------------------------------------------------- |\n| `PHPFPM_ENV_TEMP`   | PHP-FPM temp directory   | `/tmp`                                                         |\n| `PHPFPM_ENV_TMP`    | PHP-FPM tmp directory    | `/tmp`                                                         |\n| `PHPFPM_ENV_TMPDIR` | PHP-FPM tmpdir           | `/tmp`                                                         |\n| `PHPFPM_ENV_PATH`   | PHP-FPM PATH environment | `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` |\n\n#### PHP Pools\n\nYou can define multiple PHP-FPM pools using environment variables. The default pool uses variables prefixed with `PHPFPM_POOL_DEFAULT_`. To add additional pools, use the pattern:\n\n`PHPFPM_POOL_<POOLNAME>_<SETTING>`\n\nFor example, to add a pool named `api`:\n\n```env\nPHPFPM_POOL_API_LISTEN_TYPE=tcp\nPHPFPM_POOL_API_LISTEN_TCP_PORT=9001\nPHPFPM_POOL_API_USER=www-data\nPHPFPM_POOL_API_GROUP=www-data\n```\n\nEach pool will be configured in `/etc/php.../pools.d/<poolname>.conf` inside the container.\n\nIf no pool is defined then a default `www` pool will be created with the following default settings\n\nDefault pool settings:\n\n| Variable                                      | Description                                     | Default                             |\n| --------------------------------------------- | ----------------------------------------------- | ----------------------------------- |\n| `PHPFPM_POOL_DEFAULT_LISTEN_UNIX_GROUP`       | Default UNIX group for pool                     | `${NGINX_GROUP}`                    |\n| `PHPFPM_POOL_DEFAULT_LISTEN_UNIX_USER`        | Default UNIX user for pool                      | `${NGINX_USER}`                     |\n| `PHPFPM_POOL_DEFAULT_USER`                    | Default pool user                               | `${NGINX_USER}`                     |\n| `PHPFPM_POOL_DEFAULT_GROUP`                   | Default pool group                              | `${NGINX_GROUP}`                    |\n| `PHPFPM_POOL_DEFAULT_CATCH_WORKERS_OUTPUT`    | Catch workers output                            | `true`                              |\n| `PHPFPM_POOL_DEFAULT_ENABLE_LOG`              | Enable pool logging                             | `TRUE`                              |\n| `PHPFPM_POOL_DEFAULT_PING_PATH`               | Pool ping path                                  | `/ping`                             |\n| `PHPFPM_POOL_DEFAULT_DISPLAY_ERRORS`          | Display errors                                  | `TRUE`                              |\n| `PHPFPM_POOL_DEFAULT_LISTEN_IP`               | Pool listen IP                                  | `0.0.0.0`                           |\n| `PHPFPM_POOL_DEFAULT_LISTEN_TYPE`             | Pool listen type `unix` `tcp` `both` - See note | `unix`                              |\n| `PHPFPM_POOL_DEFAULT_LISTEN_PORT`             | Pool listen port                                | `9000`                              |\n| `PHPFPM_POOL_DEFAULT_LISTEN_TCP_IP`           | Pool listen TCP IP                              | `0.0.0.0`                           |\n| `PHPFPM_POOL_DEFAULT_LISTEN_TCP_IP_ALLOWED`   | Allowed TCP IPs                                 | `127.0.0.1`                         |\n| `PHPFPM_POOL_DEFAULT_LISTEN_TCP_PORT`         | Pool listen TCP port                            | `9000`                              |\n| `PHPFPM_POOL_DEFAULT_LISTEN_UNIX_SOCKET`      | Pool UNIX socket                                | `/var/lib/php-fpm/run/default.sock` |\n| `PHPFPM_POOL_DEFAULT_ENV`                     | Default pool environment variables              | `PATH,TEMP,TMP,TMPDIR`              |\n| `PHPFPM_POOL_DEFAULT_LOG_ACCESS_FILE`         | Pool access log file                            | `default-access.log`                |\n| `PHPFPM_POOL_DEFAULT_LOG_ACCESS_FORMAT`       | Pool access log format                          | `default`                           |\n| `PHPFPM_POOL_DEFAULT_LOG_PATH`                | Pool log path                                   | `/logs/php-fpm/`                    |\n| `PHPFPM_POOL_DEFAULT_MAX_CHILDREN`            | Max children                                    | `75`                                |\n| `PHPFPM_POOL_DEFAULT_MAX_INPUT_NESTING_LEVEL` | Max input nesting level                         | `256`                               |\n| `PHPFPM_POOL_DEFAULT_MAX_INPUT_VARS`          | Max input vars                                  | `10000`                             |\n| `PHPFPM_POOL_DEFAULT_MAX_REQUESTS`            | Max requests                                    | `0`                                 |\n| `PHPFPM_POOL_DEFAULT_MAX_SPARE_SERVERS`       | Max spare servers                               | `3`                                 |\n| `PHPFPM_POOL_DEFAULT_MEMORY_LIMIT`            | Pool memory limit                               | `${PHP_MEMORY_LIMIT}`               |\n| `PHPFPM_POOL_DEFAULT_MIN_SPARE_SERVERS`       | Min spare servers                               | `1`                                 |\n| `PHPFPM_POOL_DEFAULT_OUTPUT_BUFFER_SIZE`      | Output buffer size                              | `0`                                 |\n| `PHPFPM_POOL_DEFAULT_POST_MAX_SIZE`           | Pool POST max size                              | `${PHP_POST_MAX_SIZE}`              |\n| `PHPFPM_POOL_DEFAULT_PROCESS_IDLE_TIMEOUT`    | Process idle timeout                            | `10s`                               |\n| `PHPFPM_POOL_DEFAULT_PROCESS_MANAGER`         | Process manager                                 | `dynamic`                           |\n| `PHPFPM_POOL_DEFAULT_START_SERVERS`           | Start servers                                   | `2`                                 |\n| `PHPFPM_POOL_DEFAULT_STATUS_PATH`             | Status path                                     | `/php-fpm_status`                   |\n| `PHPFPM_POOL_DEFAULT_TIMEOUT`                 | Pool timeout                                    | `${PHP_TIMEOUT}`                    |\n| `PHPFPM_POOL_DEFAULT_UPLOAD_MAX_SIZE`         | Pool upload max size                            | `${PHP_UPLOAD_MAX_SIZE}`            |\n\n#### Listening on both Unix socket and TCP at once\n\nPHP-FPM does not allow multiple `listen` directives in a single pool — each pool owns exactly one endpoint. To accept FastCGI on both a Unix socket and a TCP port simultaneously, set:\n\n```yaml\n- PHPFPM_POOL_<NAME>_LISTEN_TYPE=both\n```\n\nThe image then writes two pool configs:\n\n* Primary pool `[<NAME>]` — listens on the Unix socket (using `PHPFPM_POOL_<NAME>_LISTEN_UNIX_*` variables). This is the pool the image's nginx upstream is wired to.\n* Shadow pool `[<NAME>-tcp]` — listens on TCP (using `PHPFPM_POOL_<NAME>_LISTEN_TCP_*` variables). Inherits the same process-manager, log, environment, override, and includes settings as the primary.\n\n#### Logging\n\n| Variable                | Description    | Default             |\n| ----------------------- | -------------- | ------------------- |\n| `PHPFPM_LOG_ERROR_FILE` | Error log file | `error.log`         |\n| `PHPFPM_LOG_ERROR_PATH` | Error log path | `/var/log/php-fpm/` |\n| `PHPFPM_LOG_LEVEL`      | Log level      | `notice`            |\n| `PHPFPM_LOG_LIMIT`      | Log limit      | `3072`              |\n\n### Modules\n\n#### Enabling / Disabling Specific Modules\n\nEnable extensions by using the PHP extension name ie redis as `PHP_MODULE_ENABLE_REDIS=TRUE`. Core extensions are enabled by default are:\n\n| Parameter                     | Default |\n| ----------------------------- | ------- |\n| `PHP_MODULE_ENABLE_APCU`      | `TRUE`  |\n| `PHP_MODULE_ENABLE_BCMATH`    | `TRUE`  |\n| `PHP_MODULE_ENABLE_BZ2`       | `TRUE`  |\n| `PHP_MODULE_ENABLE_CTYPE`     | `TRUE`  |\n| `PHP_MODULE_ENABLE_CURL`      | `TRUE`  |\n| `PHP_MODULE_ENABLE_DOM`       | `TRUE`  |\n| `PHP_MODULE_ENABLE_EXIF`      | `TRUE`  |\n| `PHP_MODULE_ENABLE_FILEINFO`  | `TRUE`  |\n| `PHP_MODULE_ENABLE_GD`        | `TRUE`  |\n| `PHP_MODULE_ENABLE_ICONV`     | `TRUE`  |\n| `PHP_MODULE_ENABLE_IMAP`      | `TRUE`  |\n| `PHP_MODULE_ENABLE_INTL`      | `TRUE`  |\n| `PHP_MODULE_ENABLE_JSON`      | `TRUE`  |\n| `PHP_MODULE_ENABLE_MBSTRING`  | `TRUE`  |\n| `PHP_MODULE_ENABLE_MYSQLI`    | `TRUE`  |\n| `PHP_MODULE_ENABLE_MYSQLND`   | `TRUE`  |\n| `PHP_MODULE_ENABLE_OPCACHE`   | `TRUE`  |\n| `PHP_MODULE_ENABLE_OPENSSL`   | `TRUE`  |\n| `PHP_MODULE_ENABLE_PDO`       | `TRUE`  |\n| `PHP_MODULE_ENABLE_PDO_MYSQL` | `TRUE`  |\n| `PHP_MODULE_ENABLE_PGSQL`     | `TRUE`  |\n| `PHP_MODULE_ENABLE_PHAR`      | `TRUE`  |\n| `PHP_MODULE_ENABLE_SESSION`   | `TRUE`  |\n| `PHP_MODULE_ENABLE_SIMPLEXML` | `TRUE`  |\n| `PHP_MODULE_ENABLE_TOKENIZER` | `TRUE`  |\n| `PHP_MODULE_ENABLE_XML`       | `TRUE`  |\n| `PHP_MODULE_ENABLE_XMLREADER` | `TRUE`  |\n| `PHP_MODULE_ENABLE_XMLWRITER` | `TRUE`  |\n\nTo enable all modules in image use `PHP_KITCHENSINK=TRUE`. Head inside the image and see what extensions are available by typing `php-ext list all`\n\n###### APCu Options\n\n| Variable                  | Description             | Default |\n| ------------------------- | ----------------------- | ------- |\n| `PHP_MODULE_APC_SHM_SIZE` | APCu shared memory size | `128M`  |\n| `PHP_MODULE_APC_TTL`      | APCu time to live       | `7200`  |\n\n###### OPCache Options\n\n| Variable                                     | Description                     | Default     |\n| -------------------------------------------- | ------------------------------- | ----------- |\n| `PHP_MODULE_OPCACHE_MEM_SIZE`                | Opcache memory size             | `128`       |\n| `PHP_MODULE_OPCACHE_INTERNED_STRINGS_BUFFER` | Opcache interned strings buffer | `8`         |\n| `PHP_MODULE_OPCACHE_JIT_BUFFER_SIZE`         | Opcache JIT buffer size         | `50M`       |\n| `PHP_MODULE_OPCACHE_JIT_MODE`                | Opcache JIT mode                | `1255`      |\n| `PHP_MODULE_OPCACHE_MAX_ACCELERATED_FILES`   | Opcache max accelerated files   | `10000`     |\n| `PHP_MODULE_OPCACHE_MAX_FILE_SIZE`           | Opcache max file size           | `0`         |\n| `PHP_MODULE_OPCACHE_MAX_WASTED_PERCENTAGE`   | Opcache max wasted percentage   | `5`         |\n| `PHP_MODULE_OPCACHE_OPTIMIZATION_LEVEL`      | Opcache optimization level      | `0x7FFFBFF` |\n| `PHP_MODULE_OPCACHE_REVALIDATE_FREQ`         | Opcache revalidate frequency    | `2`         |\n| `PHP_MODULE_OPCACHE_SAVE_COMMENTS`           | Opcache save comments           | `1`         |\n| `PHP_MODULE_OPCACHE_VALIDATE_TIMESTAMPS`     | Opcache validate timestamps     | `1`         |\n\n###### XDebug Options\n\nTo enable XDebug set `PHP_MODULE_ENABLE_XDEBUG=TRUE`. Visit the [PHP XDebug Documentation](https://xdebug.org/docs/all_settings#remote_connect_back) to understand what these options mean.\nIf you debug a PHP project in PHPStorm, you need to set server name using `PHP_IDE_CONFIG` to the same value as set in PHPStorm. Usual value is localhost, i.e. `PHP_IDE_CONFIG=\"serverName=localhost\"`.\n\nFor Xdebug 2 (php <= 7.1) you should set:\n| Parameter                                   | Description                                | Default         |\n| ------------------------------------------- | ------------------------------------------ | --------------- |\n| `PHP_MODULE_XDEBUG_PROFILER_PATH`           | Xdebug profiler path                       | `/logs/xdebug/` |\n| `PHP_MODULE_XDEBUG_PROFILER_ENABLE`         | Enable Profiler                            | `0`             |\n| `PHP_MODULE_XDEBUG_PROFILER_ENABLE_TRIGGER` | Enable Profiler Trigger                    | `0`             |\n| `PHP_MODULE_XDEBUG_REMOTE_AUTOSTART`        | Enable Autostarting as opposed to GET/POST | `1`             |\n| `PHP_MODULE_XDEBUG_REMOTE_CONNECT_BACK`     | Enbable Connection Back                    | `0`             |\n| `PHP_MODULE_XDEBUG_REMOTE_ENABLE`           | Enable Remote Debugging                    | `1`             |\n| `PHP_MODULE_XDEBUG_REMOTE_HANDLER`          | XDebug Remote Handler                      | `dbgp`          |\n| `PHP_MODULE_XDEBUG_REMOTE_HOST`             | Set this to your IP Address                | `127.0.0.1`     |\n| `PHP_MODULE_XDEBUG_REMOTE_PORT`             | XDebug Remote Port                         | `9090`          |\n\n* * *\n\nFor Xdebug 3 (php >= 7.2) you should set:\n| Parameter                                | Description                                                          | Default         |\n| ---------------------------------------- | -------------------------------------------------------------------- | --------------- |\n| `PHP_MODULE_XDEBUG_PROFILER_PATH`        | Xdebug profiler path                                                 | `/logs/xdebug/` |\n| `PHP_MODULE_XDEBUG_MODE`                 | This setting controls which Xdebug features are enabled.             | `develop`       |\n| `PHP_MODULE_XDEBUG_START_WITH_REQUEST`   | Enable Autostarting as opposed to GET/POST                           | `default`       |\n| `PHP_MODULE_XDEBUG_DISCOVER_CLIENT_HOST` | Xdebug will try to connect to the client that made the HTTP request. | `1`             |\n| `PHP_MODULE_XDEBUG_CLIENT_HOST`          | Set this to your IP Address                                          | `127.0.0.1`     |\n| `PHP_MODULE_XDEBUG_CLIENT_PORT`          | XDebug Remote Port                                                   | `9003`          |\n\n###### Including operator-supplied config files\n\n| Parameter                     | Description                                                                       | Default |\n| ----------------------------- | --------------------------------------------------------------------------------- | ------- |\n| `PHPFPM_POOL_<NAME>_INCLUDES` | Comma-separated paths appended as `include = <path>` lines to the pool's `.conf`. |         |\n\n#### Routing an nginx site to a specific PHP pool\n\nWhen configuring a site, the image picks which PHP pool to wire it to via this resolution chain:\n\n1. `NGINX_SITE_<SITENAME>_PHP_UPSTREAM` - per-site override (highest priority)\n2. `NGINX_PHP_UPSTREAM` - global default for all sites\n3. `www` - hardcoded fallback if neither is set\n\nThe value is the pool name (e.g. `www`, `api` (or `www-tcp` to target the shadow generated by `LISTEN_TYPE=both`).\n\n| Parameter                            | Description                                                  | Default |\n| ------------------------------------ | ------------------------------------------------------------ | ------- |\n| `NGINX_SITE_<SITENAME>_PHP_UPSTREAM` | Pool name this site's nginx config should `fastcgi_pass` to. | `www`   |\n| `NGINX_PHP_UPSTREAM`                 | Default pool name used when no per-site override is set.     | `www`   |\n\n## Users and Groups\n\n| Type  | Name       | ID     |\n| ----- | ---------- | ------ |\n| User  | `php`      | `9000` |\n| Group | `php`      | `9000` |\n| Group | `www-data` | `82`   |\n\n### Networking\n\n| Port   | Protocol | Description |\n| ------ | -------- | ----------- |\n| `9000` | tcp      | PHP-FPM     |\n\n* * *\n\n## Maintenance\n\n### Shell Access\n\nFor debugging and maintenance, `bash` and `sh` are available in the container.\n\n## Support & Maintenance\n\n* For community help, tips, and community discussions, visit the [Discussions board](/discussions).\n* For personalized support or a support agreement, see [Nfrastack Support](https://nfrastack.com/).\n* To report bugs, submit a [Bug Report](issues/new). Usage questions will be closed as not-a-bug.\n* Feature requests are welcome, but not guaranteed. For prioritized development, consider a support agreement.\n* Updates are best-effort, with priority given to active production use and support agreements.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n"
  },
  {
    "path": "examples/.gitignore",
    "content": "!compose.yml\n"
  },
  {
    "path": "examples/.gitkeep",
    "content": ""
  },
  {
    "path": "examples/compose.yml",
    "content": "services:\n  npf-app:\n    image: docker.io/nfrastack/nginx-php-fpm/8.5-alpine\n    container_name: npf-app\n    labels:\n      - traefik.enable=true\n      - traefik.http.routers.npf.rule=Host(`npf.example.com`)\n      - traefik.http.services.npf.loadbalancer.server.port=80\n    volumes:\n      - ./data/:/www/html\n      - ./logs/:/logs\n    environment:\n      - TIMEZONE=America/Vancouver\n    networks:\n      - services\n      - proxy\n    restart: always\n\nnetworks:\n  proxy:\n    external: true\n  services:\n    external: true\n\n"
  },
  {
    "path": "rootfs/container/data/nginx/templates/server/http-fastcgi_hide_header_xpowered.template",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nfastcgi_hide_header X-Powered-By;\n"
  },
  {
    "path": "rootfs/container/data/nginx/templates/site/location-php-block.template",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nlocation ~ [^/]\\.php(/|$) {\n    try_files $fastcgi_script_name =404; # Fail if script missing\n    {{php_upstream}};\n    fastcgi_split_path_info ^(.+\\.php)(/.+)$;\n    fastcgi_index {{php_index_file}};\n    {{fastcgi_params}};\n}"
  },
  {
    "path": "rootfs/container/data/php-fpm/cli/php.ini",
    "content": "; SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n;\n; SPDX-License-Identifier: MIT\n\n[PHP]\nengine = On\nallow_url_fopen = On\nallow_url_include = Off\nasp_tags = Off\nauto_append_file =\nauto_globals_jit = On\nauto_prepend_file =\ncgi.discard_path = 1\ncgi.fix_pathinfo=0\ndefault_charset = \"UTF-8\"\ndefault_mimetype = \"text/html\"\ndefault_socket_timeout = 180\ndisable_classes =\ndisable_functions =\ndisplay_errors = Off\ndisplay_startup_errors = Off\ndoc_root =\nenable_dl = Off\nerror_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT\nexpose_php = On\nfile_uploads = On\nhtml_errors = On\nignore_repeated_errors = Off\nignore_repeated_source = Off\nimplicit_flush = Off\nlog_errors = On\nlog_errors_max_len = 0\nmax_execution_time = 30\nmax_file_uploads = 20\nmax_input_time = 180\nmemory_limit = 128M\noutput_buffering = 4096\npost_max_size = 2G\nprecision = 14\nregister_argc_argv = Off\nreport_memleaks = On\nrequest_order = \"GP\"\nserialize_precision = 17\nshort_open_tag = Off\ntrack_errors = Off\nunserialize_callback_func =\nupload_max_filesize = 2G\nuser_dir =\nvariables_order = \"GPCS\"\nzend.enable_gc = On\nzlib.output_compression = Off\n\n[CLI Server]\ncli_server.color = On\n\n[Date]\ndate.timezone = UTC\n\n[filter]\n\n[iconv]\n\n[intl]\n\n[sqlite3]\n\n[Pcre]\n\n[Pdo]\n\n[Pdo_mysql]\npdo_mysql.cache_size = 2000\npdo_mysql.default_socket=\n\n[Phar]\n\n[mail function]\nSMTP = localhost\nsmtp_port = 25\n;sendmail_path =\nmail.add_x_header = On\n\n[SQL]\nsql.safe_mode = Off\n\n[ODBC]\nodbc.allow_persistent = On\nodbc.check_persistent = On\nodbc.max_persistent = -1\nodbc.max_links = -1\nodbc.defaultlrl = 4096\nodbc.defaultbinmode = 1\n\n\n[Interbase]\nibase.allow_persistent = 1\nibase.max_persistent = -1\nibase.max_links = -1\nibase.timestampformat = \"%Y-%m-%d %H:%M:%S\"\nibase.dateformat = \"%Y-%m-%d\"\nibase.timeformat = \"%H:%M:%S\"\n\n[MySQL]\nmysql.allow_local_infile = On\nmysql.allow_persistent = On\nmysql.cache_size = 2000\nmysql.max_persistent = -1\nmysql.max_links = -1\nmysql.default_port =\nmysql.default_socket =\nmysql.default_host =\nmysql.default_user =\nmysql.default_password =\nmysql.connect_timeout = 60\nmysql.trace_mode = Off\n\n[MySQLi]\nmysqli.max_persistent = -1\nmysqli.allow_persistent = On\nmysqli.max_links = -1\nmysqli.cache_size = 2000\nmysqli.default_port = 3306\nmysqli.default_socket =\nmysqli.default_host =\nmysqli.default_user =\nmysqli.default_pw =\nmysqli.reconnect = Off\n\n[mysqlnd]\nmysqlnd.collect_statistics = On\nmysqlnd.collect_memory_statistics = Off\n\n[OCI8]\n\n[PostgreSQL]\npgsql.allow_persistent = On\npgsql.auto_reset_persistent = Off\npgsql.max_persistent = -1\npgsql.max_links = -1\npgsql.ignore_notice = 0\npgsql.log_notice = 0\n\n[Sybase-CT]\nsybct.allow_persistent = On\nsybct.max_persistent = -1\nsybct.max_links = -1\nsybct.min_server_severity = 10\nsybct.min_client_severity = 10\n\n[bcmath]\nbcmath.scale = 0\n\n[browscap]\n\n[Session]\nsession.save_handler = files\nsession.use_strict_mode = 0\nsession.use_cookies = 1\nsession.use_only_cookies = 1\nsession.name = PHPSESSID\nsession.auto_start = 0\nsession.cookie_lifetime = 0\nsession.cookie_path = /\nsession.cookie_domain =\nsession.cookie_httponly =\nsession.serialize_handler = php\nsession.gc_probability = 1\nsession.gc_divisor = 1000\nsession.gc_maxlifetime = 1440\nsession.referer_check =\nsession.cache_limiter = nocache\nsession.cache_expire = 180\nsession.use_trans_sid = 0\nsession.hash_function = 0\nsession.hash_bits_per_character = 5\nurl_rewriter.tags = \"a=href,area=href,frame=src,input=src,form=fakeentry\"\n\n[MSSQL]\nmssql.allow_persistent = On\nmssql.max_persistent = -1\nmssql.max_links = -1\nmssql.min_error_severity = 10\nmssql.min_message_severity = 10\nmssql.compatibility_mode = Off\nmssql.secure_connection = Off\n\n[Assertion]\n\n[COM]\n\n[mbstring]\n\n[gd]\n\n[exif]\n\n[Tidy]\ntidy.clean_output = Off\n\n[soap]\nsoap.wsdl_cache_enabled=1\nsoap.wsdl_cache_dir=\"/tmp\"\nsoap.wsdl_cache_ttl=86400\nsoap.wsdl_cache_limit = 5\n\n[sysvshm]\n\n[ldap]\nldap.max_links = -1\n\n[mcrypt]\n\n[dba]\n\n[opcache]\n\n[curl]\n\n[openssl]\n\n"
  },
  {
    "path": "rootfs/container/data/php-fpm/conf.available/apcu.ini",
    "content": "; SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n;\n; SPDX-License-Identifier: MIT\n\nextension=apcu.so\napc.enabled=1\napc.shm_size=128M\napc.ttl=7200\napc.enable_cli=1\n;priority=20\n"
  },
  {
    "path": "rootfs/container/data/php-fpm/conf.available/opcache.ini",
    "content": "; SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n;\n; SPDX-License-Identifier: MIT\n\nzend_extension=opcache.so\nopcache.enable=1\nopcache.enable_cli=1\nopcache.memory_consumption=128\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.max_wasted_percentage=5\nopcache.validate_timestamps=1\nopcache.revalidate_freq=2\nopcache.save_comments=1\nopcache.optimization_level=0x7FFFBFFF\nopcache.max_file_size=0\nopcache.jit_buffer_size=0\nopcache.jit=1255\n;priority=10"
  },
  {
    "path": "rootfs/container/data/php-fpm/fpm/default.logformat",
    "content": "; SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n;\n; SPDX-License-Identifier: MIT\n\naccess.format='%{%Y-%m-%dT%H:%M:%S%z}T %{HTTP_X_FORWARDED_FOR}e %R %u %s %m \"%{REQUEST_URI}e\" %{HTTP_X_REQUEST_ID}e %{SERVER_PROTOCOL}e %l \"%{HTTP_REFERER}e\" \"%{HTTP_USER_AGENT}e\" %M %C %d'"
  },
  {
    "path": "rootfs/container/data/php-fpm/fpm/json.logformat",
    "content": "; SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n;\n; SPDX-License-Identifier: MIT\n\naccess.format='{\"time\":\"%{%Y-%m-%dT%H:%M:%S%z}T\",\"remote_addr\":\"%{HTTP_X_FORWARDED_FOR}\",\"client_ip\":\"%R\",\"remote_user\":\"%u\",\"status\":\"%s\",\"request_method\":\"%m\",\"request_uri\":\"%{REQUEST_URI}e\",\"request_id\":\"%{HTTP_X_REQUEST_ID}e\",\"server_protocol\":\"%{SERVER_PROTOCOL}e\",\"body_bytes_sent\":\"%l\",\"http_referrer\":\"%{HTTP_REFERER}e\",\"http_user_agent\":\"%{HTTP_USER_AGENT}e\",\"memory_usage\":\"%M\",\"cpu_usage\":\"%C\",\"duration\":\"%d\"}'"
  },
  {
    "path": "rootfs/container/data/php-fpm/fpm/php.ini",
    "content": "; SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n;\n; SPDX-License-Identifier: MIT\n\n[PHP]\nengine = On\nallow_url_fopen = On\nallow_url_include = Off\nasp_tags = Off\nauto_append_file =\nauto_globals_jit = On\nauto_prepend_file =\ncgi.discard_path = 1\ncgi.fix_pathinfo=0\ndefault_charset = \"UTF-8\"\ndefault_mimetype = \"text/html\"\ndefault_socket_timeout = 180\ndisable_classes =\ndisable_functions =\ndisplay_errors = Off\ndisplay_startup_errors = Off\ndoc_root =\nenable_dl = Off\nerror_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT\nexpose_php = On\nfile_uploads = On\nhtml_errors = On\nignore_repeated_errors = Off\nignore_repeated_source = Off\nimplicit_flush = Off\nlog_errors = On\nlog_errors_max_len = 1024\nmax_execution_time = 30\nmax_file_uploads = 20\nmax_input_time = 180\nmemory_limit = 128M\noutput_buffering = 4096\npost_max_size = 2G\nprecision = 14\nregister_argc_argv = Off\nreport_memleaks = On\nrequest_order = \"GP\"\nserialize_precision = 17\nshort_open_tag = Off\ntrack_errors = Off\nunserialize_callback_func =\nupload_max_filesize = 2G\nuser_dir =\nvariables_order = \"GPCS\"\nzend.enable_gc = On\nzlib.output_compression = Off\n\n[CLI Server]\ncli_server.color = On\n\n[Date]\ndate.timezone = UTC\n\n[filter]\n\n[iconv]\n\n[intl]\n\n[sqlite3]\n\n[Pcre]\n\n[Pdo]\n\n[Pdo_mysql]\npdo_mysql.cache_size = 2000\npdo_mysql.default_socket=\n\n[Phar]\n\n[mail function]\nSMTP = localhost\nsmtp_port = 25\n\n;sendmail_path =\n\nmail.add_x_header = On\n\n[SQL]\nsql.safe_mode = Off\n\n[ODBC]\nodbc.allow_persistent = On\nodbc.check_persistent = On\nodbc.max_persistent = -1\nodbc.max_links = -1\nodbc.defaultlrl = 4096\nodbc.defaultbinmode = 1\n\n\n[Interbase]\nibase.allow_persistent = 1\nibase.max_persistent = -1\nibase.max_links = -1\nibase.timestampformat = \"%Y-%m-%d %H:%M:%S\"\nibase.dateformat = \"%Y-%m-%d\"\nibase.timeformat = \"%H:%M:%S\"\n\n[MySQL]\nmysql.allow_local_infile = On\nmysql.allow_persistent = On\nmysql.cache_size = 2000\nmysql.max_persistent = -1\nmysql.max_links = -1\nmysql.default_port =\nmysql.default_socket =\nmysql.default_host =\nmysql.default_user =\nmysql.default_password =\nmysql.connect_timeout = 60\nmysql.trace_mode = Off\n\n[MySQLi]\nmysqli.max_persistent = -1\nmysqli.allow_persistent = On\nmysqli.max_links = -1\nmysqli.cache_size = 2000\nmysqli.default_port = 3306\nmysqli.default_socket =\nmysqli.default_host =\nmysqli.default_user =\nmysqli.default_pw =\nmysqli.reconnect = Off\n\n[mysqlnd]\nmysqlnd.collect_statistics = On\nmysqlnd.collect_memory_statistics = Off\n\n[OCI8]\n\n[PostgreSQL]\npgsql.allow_persistent = On\npgsql.auto_reset_persistent = Off\npgsql.max_persistent = -1\npgsql.max_links = -1\npgsql.ignore_notice = 0\npgsql.log_notice = 0\n\n[Sybase-CT]\nsybct.allow_persistent = On\nsybct.max_persistent = -1\nsybct.max_links = -1\nsybct.min_server_severity = 10\nsybct.min_client_severity = 10\n\n[bcmath]\nbcmath.scale = 0\n\n[browscap]\n\n[Session]\nsession.save_handler = files\nsession.use_strict_mode = 0\nsession.use_cookies = 1\nsession.use_only_cookies = 1\nsession.name = PHPSESSID\nsession.auto_start = 0\nsession.cookie_lifetime = 0\nsession.cookie_path = /\nsession.cookie_domain =\nsession.cookie_httponly =\nsession.serialize_handler = php\nsession.gc_probability = 1\nsession.gc_divisor = 1000\nsession.gc_maxlifetime = 1440\nsession.referer_check =\nsession.cache_limiter = nocache\nsession.cache_expire = 180\nsession.use_trans_sid = 0\nsession.hash_function = 0\nsession.hash_bits_per_character = 5\nurl_rewriter.tags = \"a=href,area=href,frame=src,input=src,form=fakeentry\"\n\n[MSSQL]\nmssql.allow_persistent = On\nmssql.max_persistent = -1\nmssql.max_links = -1\nmssql.min_error_severity = 10\nmssql.min_message_severity = 10\nmssql.compatibility_mode = Off\nmssql.secure_connection = Off\n\n[Assertion]\n\n[COM]\n\n[mbstring]\n\n[gd]\n\n[exif]\n\n[Tidy]\ntidy.clean_output = Off\n\n[soap]\nsoap.wsdl_cache_enabled=1\nsoap.wsdl_cache_dir=\"/tmp\"\nsoap.wsdl_cache_ttl=86400\nsoap.wsdl_cache_limit = 5\n\n[sysvshm]\n\n[ldap]\nldap.max_links = -1\n\n[mcrypt]\n\n[dba]\n\n[opcache]\n\n[curl]\n\n[openssl]\n\n"
  },
  {
    "path": "rootfs/container/data/php-fpm/opcache/opcache-settings.php",
    "content": "<?php\n    $configuration = opcache_get_configuration();\n    echo \"opcache.enable: \" ; print ($configuration['directives']['opcache.enable']); echo \"\\n\" ;\n    echo \"opcache.enable_cli: \" ; print ($configuration['directives']['opcache.enable_cli']); echo \"\\n\" ;\n    echo \"opcache.use_cwd: \" ; print ($configuration['directives']['opcache.use_cwd']); echo \"\\n\" ;\n    echo \"opcache.validate_timestamps: \" ; print ($configuration['directives']['opcache.validate_timestamps']); echo \"\\n\" ;\n    echo \"opcache.validate_permission: \" ; print ($configuration['directives']['opcache.validate_permission']); echo \"\\n\" ;\n    echo \"opcache.validate_root: \" ; print ($configuration['directives']['opcache.validate_root']); echo \"\\n\" ;\n    echo \"opcache.dups_fix: \" ; print ($configuration['directives']['opcache.dups_fix']); echo \"\\n\" ;\n    echo \"opcache.revalidate_path: \" ; print ($configuration['directives']['opcache.revalidate_path']); echo \"\\n\" ;\n    echo \"opcache.log_verbosity_level: \" ; print ($configuration['directives']['opcache.log_verbosity_level']); echo \"\\n\" ;\n    echo \"opcache.memory_consumption: \" ; print ($configuration['directives']['opcache.memory_consumption']); echo \"\\n\" ;\n    echo \"opcache.interned_strings_buffer: \" ; print ($configuration['directives']['opcache.interned_strings_buffer']); echo \"\\n\" ;\n    echo \"opcache.max_accelerated_files: \" ; print ($configuration['directives']['opcache.max_accelerated_files']); echo \"\\n\" ;\n    echo \"opcache.max_wasted_percentage: \" ; print ($configuration['directives']['opcache.max_wasted_percentage']); echo \"\\n\" ;\n    echo \"opcache.consistency_checks: \" ; print ($configuration['directives']['opcache.consistency_checks']); echo \"\\n\" ;\n    echo \"opcache.force_restart_timeout: \" ; print ($configuration['directives']['opcache.force_restart_timeout']); echo \"\\n\" ;\n    echo \"opcache.revalidate_freq: \" ; print ($configuration['directives']['opcache.revalidate_freq']); echo \"\\n\" ;\n    echo \"opcache.preferred_memory_model: \" ; print ($configuration['directives']['opcache.preferred_memory_model']); echo \"\\n\" ;\n    echo \"opcache.blacklist_filename: \" ; print ($configuration['directives']['opcache.blacklist_filename']); echo \"\\n\" ;\n    echo \"opcache.max_file_size: \" ; print ($configuration['directives']['opcache.max_file_size']); echo \"\\n\" ;\n    echo \"opcache.error_log: \" ; print ($configuration['directives']['opcache.error_log']); echo \"\\n\" ;\n    echo \"opcache.protect_memory: \" ; print ($configuration['directives']['opcache.protect_memory']); echo \"\\n\" ;\n    echo \"opcache.save_comments: \" ; print ($configuration['directives']['opcache.save_comments']); echo \"\\n\" ;\n    echo \"opcache.record_warnings: \" ; print ($configuration['directives']['opcache.record_warnings']); echo \"\\n\" ;\n    echo \"opcache.enable_file_override: \" ; print ($configuration['directives']['opcache.enable_file_override']); echo \"\\n\" ;\n    echo \"opcache.optimization_level: \" ; print ($configuration['directives']['opcache.optimization_level']); echo \"\\n\" ;\n    echo \"opcache.lockfile_path: \" ; print ($configuration['directives']['opcache.lockfile_path']); echo \"\\n\" ;\n    echo \"opcache.file_cache: \" ; print ($configuration['directives']['opcache.file_cache']); echo \"\\n\" ;\n    echo \"opcache.file_cache_only: \" ; print ($configuration['directives']['opcache.file_cache_only']); echo \"\\n\" ;\n    echo \"opcache.file_cache_consistency_checks: \" ; print ($configuration['directives']['opcache.file_cache_consistency_checks']); echo \"\\n\" ;\n    echo \"opcache.file_update_protection: \" ; print ($configuration['directives']['opcache.file_update_protection']); echo \"\\n\" ;\n    echo \"opcache.opt_debug_level: \" ; print ($configuration['directives']['opcache.opt_debug_level']); echo \"\\n\" ;\n    echo \"opcache.restrict_api: \" ; print ($configuration['directives']['opcache.restrict_api']); echo \"\\n\" ;\n    echo \"opcache.huge_code_pages: \" ; print ($configuration['directives']['opcache.huge_code_pages']); echo \"\\n\" ;\n    echo \"opcache.preload: \" ; print ($configuration['directives']['opcache.preload']); echo \"\\n\" ;\n    echo \"opcache.preload_user: \" ; print ($configuration['directives']['opcache.preload_user']); echo \"\\n\" ;\n    echo \"opcache.jit: \" ; print ($configuration['directives']['opcache.jit']); echo \"\\n\" ;\n    echo \"opcache.jit_buffer_size: \" ; print ($configuration['directives']['opcache.jit_buffer_size']); echo \"\\n\" ;\n    echo \"opcache.jit_debug: \" ; print ($configuration['directives']['opcache.jit_debug']); echo \"\\n\" ;\n    echo \"opcache.jit_bisect_limit: \" ; print ($configuration['directives']['opcache.jit_bisect_limit']); echo \"\\n\" ;\n    echo \"opcache.jit_blacklist_root_trace: \" ; print ($configuration['directives']['opcache.jit_blacklist_root_trace']); echo \"\\n\" ;\n    echo \"opcache.jit_blacklist_side_trace: \" ; print ($configuration['directives']['opcache.jit_blacklist_side_trace']); echo \"\\n\" ;\n    echo \"opcache.jit_hot_func: \" ; print ($configuration['directives']['opcache.jit_hot_func']); echo \"\\n\" ;\n    echo \"opcache.jit_hot_loop: \" ; print ($configuration['directives']['opcache.jit_hot_loop']); echo \"\\n\" ;\n    echo \"opcache.jit_hot_return: \" ; print ($configuration['directives']['opcache.jit_hot_return']); echo \"\\n\" ;\n    echo \"opcache.jit_hot_side_exit: \" ; print ($configuration['directives']['opcache.jit_hot_side_exit']); echo \"\\n\" ;\n    echo \"opcache.jit_max_exit_counters: \" ; print ($configuration['directives']['opcache.jit_max_exit_counters']); echo \"\\n\" ;\n    echo \"opcache.jit_max_loop_unrolls: \" ; print ($configuration['directives']['opcache.jit_max_loop_unrolls']); echo \"\\n\" ;\n    echo \"opcache.jit_max_polymorphic_calls: \" ; print ($configuration['directives']['opcache.jit_max_polymorphic_calls']); echo \"\\n\" ;\n    echo \"opcache.jit_max_recursive_calls: \" ; print ($configuration['directives']['opcache.jit_max_recursive_calls']); echo \"\\n\" ;\n    echo \"opcache.jit_max_recursive_returns: \" ; print ($configuration['directives']['opcache.jit_max_recursive_returns']); echo \"\\n\" ;\n    echo \"opcache.jit_max_root_traces: \" ; print ($configuration['directives']['opcache.jit_max_root_traces']); echo \"\\n\" ;\n    echo \"opcache.jit_max_side_traces: \" ; print ($configuration['directives']['opcache.jit_max_side_traces']); echo \"\\n\" ;\n    echo \"opcache.jit_prof_threshold: \" ; print ($configuration['directives']['opcache.jit_prof_threshold']); echo \"\\n\" ;\n?>"
  },
  {
    "path": "rootfs/container/data/php-fpm/opcache/opcache-status.php",
    "content": "<?php\n  $status = opcache_get_status(false);\n  echo json_encode($status);\n  echo \"\\n\";\n?>"
  },
  {
    "path": "rootfs/container/defaults/20-php-fpm",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nENABLE_PHP_FPM=${ENABLE_PHP_FPM:-\"TRUE\"}\nPHPFPM_CONTAINER_MODE=${PHPFPM_CONTAINER_MODE:-\"nginx-php-fpm\"}\nPHP_VERSION=\"$(php -v 2>/dev/null | grep \"^PHP \" | head -n 1 | awk '{print $2}')\"\nPHP_BASE=\"${PHP_VERSION%.*}\"\n\nPHP_ENABLE_CREATE_SAMPLE_PHP=${PHP_ENABLE_CREATE_SAMPLE_PHP:-\"TRUE\"}\nPHP_HIDE_X_POWERED_BY=${PHP_HIDE_X_POWERED_BY:-\"TRUE\"}\nPHP_KITCHENSINK=${PHP_KITCHENSINK:-\"FALSE\"}\nPHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-\"128M\"}\n\nPHP_MODULE_APC_SHM_SIZE=${PHP_MODULE_APC_SHM_SIZE:-\"128M\"}\nPHP_MODULE_APC_TTL=${PHP_MODULE_APC_TTL:-\"7200\"}\nPHP_MODULE_OPCACHE_INTERNED_STRINGS_BUFFER=${PHP_MODULE_OPCACHE_INTERNED_STRINGS_BUFFER:-\"8\"}\nPHP_MODULE_OPCACHE_JIT_BUFFER_SIZE=${PHP_MODULE_OPCACHE_JIT_BUFFER_SIZE:-\"50M\"}\nPHP_MODULE_OPCACHE_JIT_MODE=${PHP_MODULE_OPCACHE_JIT_MODE:-\"1255\"}\nPHP_MODULE_OPCACHE_MAX_ACCELERATED_FILES=${PHP_MODULE_OPCACHE_MAX_ACCELERATED_FILES:-\"10000\"}\nPHP_MODULE_OPCACHE_MAX_FILE_SIZE=${PHP_MODULE_OPCACHE_MAX_FILE_SIZE:-\"0\"}\nPHP_MODULE_OPCACHE_MAX_WASTED_PERCENTAGE=${PHP_MODULE_OPCACHE_MAX_WASTED_PERCENTAGE:-\"5\"}\nPHP_MODULE_OPCACHE_MEM_SIZE=${PHP_MODULE_OPCACHE_MEM_SIZE:-\"128\"}\nPHP_MODULE_OPCACHE_OPTIMIZATION_LEVEL=${PHP_MODULE_OPCACHE_OPTIMIZATION_LEVEL:-\"0x7FFFBFF\"}\nPHP_MODULE_OPCACHE_REVALIDATE_FREQ=${PHP_MODULE_OPCACHE_REVALIDATE_FREQ:-\"2\"}\nPHP_MODULE_OPCACHE_SAVE_COMMENTS=${PHP_MODULE_OPCACHE_SAVE_COMMENTS:-\"1\"}\nPHP_MODULE_OPCACHE_VALIDATE_TIMESTAMPS=${PHP_MODULE_OPCACHE_VALIDATE_TIMESTAMPS:-\"1\"}\n\n#Xdebug 2\nPHP_MODULE_XDEBUG_PROFILER_PATH=${PHP_MODULE_XDEBUG_PROFILER_PATH:-\"/logs/xdebug/\"}\nPHP_MODULE_XDEBUG_PROFILER_ENABLE=${PHP_MODULE_XDEBUG_PROFILER_ENABLE:-\"0\"}\nPHP_MODULE_XDEBUG_PROFILER_ENABLE_TRIGGER=${PHP_MODULE_XDEBUG_PROFILER_ENABLE_TRIGGER:-\"0\"}\nPHP_MODULE_XDEBUG_REMOTE_AUTOSTART=${PHP_MODULE_XDEBUG_REMOTE_AUTOSTART:-\"1\"}\nPHP_MODULE_XDEBUG_REMOTE_CONNECT_BACK=${PHP_MODULE_XDEBUG_REMOTE_CONNECT_BACK:-\"0\"}\nPHP_MODULE_XDEBUG_REMOTE_ENABLE=${PHP_MODULE_XDEBUG_REMOTE_ENABLE:-\"1\"}\nPHP_MODULE_XDEBUG_REMOTE_HANDLER=${PHP_MODULE_XDEBUG_REMOTE_HANDLER:-\"dbgp\"}\nPHP_MODULE_XDEBUG_REMOTE_HOST=${PHP_MODULE_XDEBUG_REMOTE_HOST:-\"127.0.0.1\"}\nPHP_MODULE_XDEBUG_REMOTE_PORT=${PHP_MODULE_XDEBUG_REMOTE_PORT:-\"9090\"}\n\n#Xdebug 3\nPHP_MODULE_XDEBUG_MODE=${PHP_MODULE_XDEBUG_MODE:-\"develop\"}\nPHP_MODULE_XDEBUG_START_WITH_REQUEST=${PHP_MODULE_XDEBUG_START_WITH_REQUEST:-\"default\"}\nPHP_MODULE_XDEBUG_DISCOVER_CLIENT_HOST=${PHP_MODULE_XDEBUG_DISCOVER_CLIENT_HOST:-\"default\"}\nPHP_MODULE_XDEBUG_CLIENT_HOST=${PHP_MODULE_XDEBUG_CLIENT_HOST:-\"127.0.0.1\"}\nPHP_MODULE_XDEBUG_CLIENT_PORT=${PHP_MODULE_XDEBUG_CLIENT_PORT:-\"9003\"}\n\nif [ \"${PHP_BASE:0:1}\" != \"8\" ] ; then\n    PHP_MODULE_ENABLE_JSON=TRUE\nfi\n\nif var_true \"${PHP_MODULE_ENABLE_MEMCACHED}\" || var_true \"${PHP_MODULE_ENABLE_REDIS}\"; then\n    PHP_MODULE_ENABLE_IGBINARY=TRUE\n    PHP_MODULE_ENABLE_MSGPACK=TRUE\nfi\n\nPHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-\"2G\"}\nPHP_TIMEOUT=${PHP_TIMEOUT:-\"180\"}\nPHP_UPLOAD_MAX_SIZE=${PHP_UPLOAD_MAX_SIZE:-\"2G\"}\n\nif [ -f \"/usr/sbin/unitd\" ] ; then\n    PHP_WEBROOT=${PHP_WEBROOT:-\"${UNIT_WEBROOT}\"}\n    PHPFPM_POOL_DEFAULT_USER=${PHPFPM_POOL_DEFAULT_USER:-\"${UNIT_USER}\"}\n    PHPFPM_POOL_DEFAULT_GROUP=${PHPFPM_POOL_DEFAULT_GROUP:-\"${UNIT_GROUP}\"}\n    PHPFPM_POOL_DEFAULT_LISTEN_UNIX_GROUP=${PHPFPM_POOL_DEFAULT_LISTEN_UNIX_GROUP:-\"${PHPFPM_GROUP}\"}\n    PHPFPM_POOL_DEFAULT_LISTEN_UNIX_USER=${PHPFPM_POOL_DEFAULT_LISTEN_UNIX_USER:-\"${PHPFPM_USER}\"}\nfi\n\nif [ -f \"/usr/sbin/nginx\" ] ; then\n    PHP_WEBROOT=${PHP_WEBROOT:-\"${NGINX_WEBROOT}\"}\n    PHPFPM_USER=${PHPFPM_USER:-\"php\"}\n    PHPFPM_GROUP=${PHPFPM_GROUP:-\"www-data\"}\n    PHPFPM_POOL_DEFAULT_LISTEN_UNIX_GROUP=${PHPFPM_POOL_DEFAULT_LISTEN_UNIX_GROUP:-\"${PHPFPM_GROUP}\"}\n    PHPFPM_POOL_DEFAULT_LISTEN_UNIX_USER=${PHPFPM_POOL_DEFAULT_LISTEN_UNIX_USER:-\"${PHPFPM_USER}\"}\n    #PHPFPM_USER=${PHPFPM_USER:-\"${NGINX_USER}\"}\n    #PHPFPM_GROUP=${PHPFPM_GROUP:-\"${NGINX_GROUP}\"}\nfi\n\nPHPFPM_ENV_TEMP=${PHPFPM_ENV_TEMP:-\"/tmp\"}\nPHPFPM_ENV_TMP=${PHPFPM_ENV_TMP:-\"/tmp\"}\nPHPFPM_ENV_TMPDIR=${PHPFPM_ENV_TMPDIR:-\"/tmp\"}\nPHPFPM_ENV_PATH=${PHPFPM_ENV_PATH:-\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"}\nPHPFPM_LOG_ERROR_FILE=${PHPFPM_LOG_ERROR_FILE:-\"error.log\"}\nPHPFPM_LOG_ERROR_PATH=${PHPFPM_LOG_ERROR_PATH:-\"/var/log/php-fpm/\"}\nPHPFPM_LOG_LEVEL=${PHPFPM_LOG_LEVEL:-\"notice\"}\nPHPFPM_LOG_LIMIT=${PHPFPM_LOG_LIMIT:-\"3072\"}\nPHPFPM_POOL_DEFAULT_CATCH_WORKERS_OUTPUT=${PHPFPM_POOL_DEFAULT_CATCH_WORKERS_OUTPUT-\"true\"}\nPHPFPM_POOL_DEFAULT_ENABLE_LOG=${PHPFPM_POOL_DEFAULT_ENABLE_LOG:-\"TRUE\"}\nPHPFPM_POOL_DEFAULT_PING_PATH=${PHPFPM_POOL_DEFAULT_PING_PATH-\"/ping\"}\nPHPFPM_POOL_DEFAULT_DISPLAY_ERRORS=${PHPFPM_POOL_DEFAULT_DISPLAY_ERRORS-\"TRUE\"}\nPHPFPM_POOL_DEFAULT_LISTEN_IP=${PHPFPM_POOL_DEFAULT_LISTEN_IP:-\"0.0.0.0\"}\nPHPFPM_POOL_DEFAULT_LISTEN_TYPE=${PHPFPM_POOL_DEFAULT_LISTEN_TYPE:-\"unix\"}\nPHPFPM_POOL_DEFAULT_LISTEN_PORT=${PHPFPM_POOL_DEFAULT_LISTEN_PORT:-\"9000\"}\nPHPFPM_POOL_DEFAULT_LISTEN_TCP_IP=${PHPFPM_POOL_DEFAULT_LISTEN_TCP_IP:-\"${PHPFPM_POOL_DEFAULT_LISTEN_IP}\"}\nPHPFPM_POOL_DEFAULT_LISTEN_TCP_IP_ALLOWED=${PHPFPM_POOL_DEFAULT_LISTEN_TCP_IP_ALLOWED:-\"127.0.0.1\"}\nPHPFPM_POOL_DEFAULT_LISTEN_TCP_PORT=${PHPFPM_POOL_DEFAULT_LISTEN_TCP_PORT:-\"${PHPFPM_POOL_DEFAULT_LISTEN_PORT}\"}\nPHPFPM_POOL_DEFAULT_LISTEN_UNIX_SOCKET=${PHPFPM_POOL_DEFAULT_LISTEN_UNIX_SOCKET:-\"/var/lib/php-fpm/run/default.sock\"}\nPHPFPM_POOL_DEFAULT_ENV=${PHPFPM_POOL_DEFAULT_ENV:-\"PATH,TEMP,TMP,TMPDIR\"}\nPHPFPM_POOL_DEFAULT_LOG_ACCESS_FILE=${PHPFPM_POOL_DEFAULT_LOG_ACCESS_FILE:-\"default-access.log\"}\nPHPFPM_POOL_DEFAULT_LOG_ACCESS_FORMAT=${PHPFPM_POOL_DEFAULT_LOG_ACCESS_FORMAT:-\"default\"}\nPHPFPM_POOL_DEFAULT_LOG_PATH=${PHPFPM_POOL_DEFAULT_LOG_PATH:-\"/logs/php-fpm/\"}\nPHPFPM_POOL_DEFAULT_MAX_CHILDREN=${PHPFPM_MAX_CHILDREN:-\"75\"}\nPHPFPM_POOL_DEFAULT_MAX_INPUT_NESTING_LEVEL=${PHPFPM_MAX_INPUT_NESTING_LEVEL:-\"256\"}\nPHPFPM_POOL_DEFAULT_MAX_INPUT_VARS=${PHPFPM_MAX_INPUT_VARS:-\"10000\"}\nPHPFPM_POOL_DEFAULT_MAX_REQUESTS=${PHPFPM_MAX_REQUESTS:-\"0\"}\nPHPFPM_POOL_DEFAULT_MAX_SPARE_SERVERS=${PHPFPM_MAX_SPARE_SERVERS:-\"3\"}\nPHPFPM_POOL_DEFAULT_MEMORY_LIMIT=${PHPFPM_MEMORY_LIMIT:-\"${PHP_MEMORY_LIMIT}\"}\nPHPFPM_POOL_DEFAULT_MIN_SPARE_SERVERS=${PHPFPM_MIN_SPARE_SERVERS:-\"1\"}\nPHPFPM_POOL_DEFAULT_OUTPUT_BUFFER_SIZE=${PHPFPM_OUTPUT_BUFFER_SIZE:-\"0\"}\nPHPFPM_POOL_DEFAULT_POST_MAX_SIZE=${PHPFPM_POOL_POST_MAX_SIZE:-\"${PHP_POST_MAX_SIZE}\"}\nPHPFPM_POOL_DEFAULT_PROCESS_IDLE_TIMEOUT=${PHPFPM_PROCESS_IDLE_TIMEOUT:-\"10s\"}\nPHPFPM_POOL_DEFAULT_PROCESS_MANAGER=${PHPFPM_PROCESS_MANAGER:-\"dynamic\"}\nPHPFPM_POOL_DEFAULT_START_SERVERS=${PHPFPM_START_SERVERS:-\"2\"}\nPHPFPM_POOL_DEFAULT_STATUS_PATH=${PHPFPM_STATUS_PATH:-\"/php-fpm_status\"}\nPHPFPM_POOL_DEFAULT_TIMEOUT=${PHPFPM_TIMEOUT:-\"${PHP_TIMEOUT}\"}\nPHPFPM_POOL_DEFAULT_UPLOAD_MAX_SIZE=${PHPFPM_UPLOAD_MAX_SIZE:-\"${PHP_UPLOAD_MAX_SIZE}\"}\n\nget_defaults_advanced"
  },
  {
    "path": "rootfs/container/defaults/_20-php-fpm/20-php-fpm",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\n"
  },
  {
    "path": "rootfs/container/defaults/_20-php-fpm/20-php-fpm.advanced",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n"
  },
  {
    "path": "rootfs/container/functions/20-php-fpm",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nphpfpm_bootstrap() {\n    case \"$(container_info distro)\" in\n        alpine )\n            case \"${PHP_BASE}\" in\n                8*)\n                    php_prefix=\"/etc/php${PHP_BASE/./}/\"\n                ;;\n                * )\n                    php_prefix=\"/etc/php${PHP_VERSION%%.*}/\"\n                ;;\n            esac\n        ;;\n        \"debian\" )\n            php_root=\"/etc/php/${PHP_BASE}/\"\n            php_prefix=\"/etc/php/${PHP_BASE}/fpm/\"\n        ;;\n    esac\n}\n\nphpfpm_nginx_create_location_block() {\n    if [ -z \"${1:-}\" ]; then return 1; fi\n    local _sitename=\"${1}\"\n    local _site_path=\"${2:-}\"\n\n    if [ -z \"${_site_path}\" ]; then\n        if [ -f \"${NGINX_CONFIG_PATH%/}/sites.enabled/${_sitename}.conf\" ]; then\n            _site_path=\"${NGINX_CONFIG_PATH%/}/sites.enabled/${_sitename}.conf\"\n        fi\n    fi\n\n    if [ -z \"${_site_path}\" ]; then\n        print_debug \"[create_location_block/${_sitename}] No site path available, skipping\"\n        return 0\n    fi\n\n    local site_location=\"${_site_path%.*}/location\"\n    local template_src=\"/container/data/nginx/templates/site/location-php-block.template\"\n\n        if [ ! -d \"${site_location}\" ] || dir_empty \"${site_location}\" || ! grep -qRniE '^[[:space:]]*location[[:space:]]+[^{}]*php[^{}]*[[:space:]]*\\{' \"${site_location}\" 2>/dev/null ; then\n        if [ -f \"${template_src}\" ]; then\n            print_debug \"[create_location_block/${_sitename}] Installing php location block into ${site_location}\"\n            mkdir -p \"${site_location}\"\n            cp -a --remove-destination \"${template_src}\" \"${site_location}/20-php_block.conf\"\n        else\n            print_warn \"[create_location_block/${_sitename}] Template ${template_src} not found\"\n        fi\n    else\n        print_debug \"[create_location_block/${_sitename}] Existing PHP location block found, skipping\"\n    fi\n}\n\nphpfpm_nginx_server_configure_upstream() {\n    if [ -n \"${1}\" ]; then\n        local _upstream=\"${1}\"\n        local _upstream_file=\"${NGINX_CONFIG_PATH%/}\"/\"${NGINX_CONFIG_FILE}\".d/php-fpm/${_upstream,,}.conf\n        create_folder \"$(dirname \"${_upstream_file}\")\" \"${NGINX_USER}:${NGINX_GROUP}\" 755\n        write_file \"${_upstream_file}\":644 <<EOF\nfastcgi_pass            phpfpm-${_upstream,,}-upstream;\nfastcgi_read_timeout    ${_pool_max_execution_time};\nfastcgi_send_timeout    ${_pool_max_execution_time};\nproxy_http_version      1.1;\nproxy_set_header        Connection \"\";\nEOF\n\n        if var_true \"${CONTAINER_ENABLE_MONITORING}\" ; then\n            local metrics_conf=\"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/http/metrics.conf\"\n            sed -i \\\n                        -e '/^}/d;}' \\\n                    \"${metrics_conf}\"\n\n            if [ \"${_upstream,,}\" != \"www\" ]; then\n                local _poolsuffix=\"_${_upstream,,}\"\n            else\n                local _poolsuffix=\"\\$\"\n            fi\n\n            write_file -a \"${metrics_conf}\":644 <<EOF\n\n    location ~ ^/(php-fpm_status|ping)${_poolsuffix} {\n        access_log off;\n        allow 127.0.0.1;\n        deny all;\n        include ${_upstream_file};\n        fastcgi_param REQUEST_METHOD \\$request_method;\n        fastcgi_param SCRIPT_NAME \\$uri;\n        fastcgi_param SCRIPT_FILENAME \\$document_root\\$uri;\n    }\nEOF\n\n            if var_true \"${PHP_MODULE_ENABLE_OPCACHE}\" ; then\n                case \"${CONTAINER_MONITORING_BACKEND,,}\" in\n                    \"zabbix\" )\n                        local zbx_opcache_module=\"${ZABBIX_CONFIG_PATH%/}/${ZABBIX_CONFIG_FILE%/}.d/nfrastack-php_module_opcache.conf\"\n                        local zbx_opcache_scripts=\"$(dirname \"${zbx_opcache_module%/}\")/scripts/php-${_upstream,,}/\"\n                        if [ !  -f \"${zbx_opcache_module}\" ]; then\n                            write_file \"${zbx_opcache_module}\":644 <<EOF\n# Zabbix PHP Opcache Configuration - Automatically Generated\n# Find Companion Zabbix Server Templates at https://github.com/nfrastack/container-nginx-php-fpm\n# Autoregister=opcache\n\nEOF\n                        fi\n\n                        write_file -a \"${zbx_opcache_module}\":644 <<EOF\nUserParameter=php.opcache.get_status,sudo -Eu zabbix php ${zbx_opcache_scripts%/}/opcache-status.php\nUserParameter=php.opcache.get_settings,sudo -Eu zabbix php ${zbx_opcache_scripts%/}/opcache-settings.php\nEOF\n\n                        write_file -a \"${metrics_conf}\":644 <<EOF\n\n    location ~ ^/${_upstream,,}/(.+\\.php)(/.*)?\\$ {\n        rewrite ^/${_upstream,,}/(.+)\\$ /\\$1 break;\n        root ${zbx_opcache_scripts%/};\n        access_log off;\n        allow 127.0.0.1;\n        deny all;\n        fastcgi_split_path_info ^(.+?\\.php)(/.+)\\$;\n        fastcgi_param PATH_INFO \\$fastcgi_path_info;\n        include ${_upstream_file};\n        fastcgi_param SCRIPT_FILENAME \\$document_root\\$fastcgi_script_name;\n        fastcgi_param SCRIPT_NAME     \\$fastcgi_script_name;\n        fastcgi_param PATH_INFO       \\$fastcgi_path_info;\n    }\nEOF\n                    ;;\n                esac\n\n                create_folder \"${zbx_opcache_scripts%/}\" \"zabbix:${NGINX_GROUP}\" 755\n                cp -a /container/data/php-fpm/opcache/* \"${zbx_opcache_scripts%/}\"\n                chown -R zabbix:${NGINX_GROUP} \"${zbx_opcache_scripts%/}\"\n                chmod -R 0755 \"${zbx_opcache_scripts%/}\"\n            fi\n\n            echo \"}\" | write_file -a \"${metrics_conf}\"\n        fi\n\n        local _phpfpm_host\n## TODO old\n        if var_true \"${NGINX_ENABLE_UPSTREAM_KEEPALIVE}\" ; then\n            upstream_keepalive=\"keepalive ${NGINX_UPSTREAM_KEEPALIVE};\"\n        fi\n\n        if [ -v NGINX_UPSTREAM_\"${_upstream^^}\"_HOST ]; then\n            _phpfpm_host=$(set -o posix ; set | grep -oE \"^NGINX_UPSTREAM_${_upstream^^}_HOST=\" | cut -d = -f2-)\n        else\n            case \"${_pool_listen_type,,}\" in\n                \"tcp\" )\n                    _phpfpm_host=\"127.0.0.1:${_pool_listen_tcp_port}\"\n            ;;\n                \"unix\" | \"both\" )\n                    # phpfpm_server_pool_shadow_tcp.\n                    _phpfpm_host=\"${_pool_listen_unix_socket}\"\n            ;;\n            esac\n        fi\n\n        create_folder \"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/upstream/\" \"${NGINX_USER}:${NGINX_GROUP}\" 755\n        local _upstream_conf=\"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/upstream/upstream-phpfpm-${_upstream,,}.conf\"\n\n        {\n            echo \"upstream phpfpm-${_upstream,,}-upstream {\"\n            if [ -n \"${upstream_keepalive}\" ]; then\n                echo \"    ${upstream_keepalive}\"\n            fi\n\n            IFS=',' read -r -a _hosts <<< \"${_phpfpm_host}\"\n            for _php_fpm_upstream in \"${_hosts[@]}\"; do\n                _php_fpm_upstream_host_socket_prefix=\"\"\n                if [[ \"${_php_fpm_upstream}\" != *\":\"* ]]; then\n                    _php_fpm_upstream_host_socket_prefix=\"unix://\"\n                fi\n\n                _opts=\"$(set -o posix ; set | grep -E \"^PHPFPM_UPSTREAM_${_upstream^^}_OPTIONS=\" | cut -d '=' -f2-)\"\n                echo \"    server ${_php_fpm_upstream_host_socket_prefix}${_php_fpm_upstream} ${_opts};\"\n            done\n\n            echo \"}\"\n        } | write_file \"${_upstream_conf}\"\n    fi\n}\n\nphpfpm_nginx_server_hide_header() {\n    local dest=\"${NGINX_CONFIG_PATH%/}\"/\"${NGINX_CONFIG_FILE%/}\".d/http/headers-php.conf\n    if var_true \"${PHP_HIDE_X_POWERED_BY}\" ; then\n        cp -a /container/data/nginx/templates/server/http-fastcgi_hide_header_xpowered.template \"${dest}\"\n    else\n        rm -f \"${dest}\"\n    fi\n}\n\nphpfpm_post_init() {\n    case \"$(container_info distro)\" in\n        \"alpine\" )\n            cp -aR /container/data/php-fpm/cli/php.ini \"${php_prefix%/}\"/\n            cp -aR /container/data/php-fpm/conf.available/* \"${php_prefix%/}\"/conf.available/\n        ;;\n        \"debian\" )\n            cp -aR /container/data/php-fpm/cli/php.ini \"${php_root%/}\"/\n            cp -aR /container/data/php-fpm/cli/php.ini \"${php_prefix%/}\"/\n        ;;\n    esac\n\n    case \"$(container_info distro)\" in\n        \"alpine\" )\n            ### Weird Opcache issue\n            if [ -f \"${php_prefix%/}/conf.d/10-opcache.ini\" ] && [ -f \"${php_prefix%/}/conf.d/00-opcache.ini\" ] ; then\n                rm -rf \"${php_prefix%/}\"/conf.d/00-opcache.ini\n            fi\n        ;;\n        \"debian\" )\n            ### Weird Opcache issue\n            if [ -f \"${php_prefix%/}/conf.d/10-opcache.ini\" ] && [ -f \"${php_prefix%/}/fpm/conf.d/00-opcache.ini\" ] ; then\n                rm -rf /etc/php/\"${PHP_BASE}\"/*/conf.d/00-opcache.ini\n            fi\n        ;;\n    esac\n\n    if var_false \"${PHP_KITCHENSINK}\" ; then\n        silent php-ext enable core\n        print_debug \"PHP-FPM Preparing to start with the following modules enabled: $(set -o posix; set | sort | grep \"^PHP_MODULE_ENABLE_.*=\" | grep -i TRUE |sed -e 's|PHP_MODULE_ENABLE_||g' -e 's|=TRUE||g' | awk -vRS=\"\" -vOFS=', ' '$1=$1' | tr '[A-Z]' '[a-z]')\"\n    else\n        print_warn \"Enabling Kitchen Sink mode and allowing all modules to be active\"\n        silent php-ext enable all\n    fi\n\n    chmod -R 0750 \"${php_prefix}\"\n    chown -R root:\"${PHPFPM_GROUP}\" \"${php_prefix}\"\n}\n\nphpfpm_server_configure() {\n    echo \"include = ${php_prefix%/}/php-fpm.d/logging.conf\" | write_file \"${php_prefix%/}\"/php-fpm.conf\n\n    for pools_to_include in \"${php_prefix%/}\"/pools.d/*.conf ; do\n        echo \"include = ${pools_to_include}\" | write_file -a \"${php_prefix%/}\"/php-fpm.conf\n    done\n\n    if [ -d /override/data/php-fpm/fpm/ ]; then\n        for config_to_include in /override/data/php-fpm/fpm/* \"${php_prefix%/}\"/pools.d/*.conf ; do\n            echo \"include = ${config_to_include}\" | write_file -a \"${php_prefix%/}\"/php-fpm.conf\n        done\n    fi\n\n    update_template \"${NGINX_CONFIG_PATH%/}\"/\"${NGINX_CONFIG_FILE}\".d/php-fpm/php-fpm.conf PHPFPM_TIMEOUT\n\n    sed -i \\\n                -e \"s#memory_limit = .*#memory_limit = ${PHP_MEMORY_LIMIT}#g\" \\\n                -e \"s#max_execution_time = .*#max_execution_time = ${PHP_TIMEOUT}#g\" \\\n                -e \"s#max_input_time = .*#max_input_time = ${PHP_TIMEOUT}#g\" \\\n                -e \"s#default_socket_timeout = .*#default_socket_timeout = ${PHP_TIMEOUT}#g\" \\\n                -e \"s#post_max_size = .*#post_max_size = ${PHP_UPLOAD_MAX_SIZE}#g\" \\\n                -e \"s#upload_max_filesize = .*#upload_max_filesize = ${PHP_UPLOAD_MAX_SIZE}#g\" \\\n           /container/data/php-fpm/cli/php.ini\n\n    call phpfpm_server_configure_smtp\n    call phpfpm_server_configure_timezone\n}\n\nphpfpm_server_configure_environment_variables() {\n    mkdir -p \"${php_prefix%/}\"/environment/\n    for phpfpm_env_pair in $(set -o posix ; set | sort | grep \"^PHPFPM_ENV_.*=\" | sed \"s|^PHPFPM_ENV_||g\") ; do\n        local phpfpm_env_var\n        local phpfpm_env_value\n        phpfpm_env_var=$(echo \"${phpfpm_env_pair}\" | cut -d = -f1)\n        phpfpm_env_value=$(echo \"${phpfpm_env_pair}\" | cut -d = -f2-)\n        echo \"env[${phpfpm_env_var}] = ${phpfpm_env_value}\" | write_file \"${php_prefix%/}\"/environment/\"${phpfpm_env_var}\"\n    done\n}\n\nphpfpm_server_configure_logging() {\n    mkdir -p \\\n                \"${php_prefix%/}\"/php-fpm.d/ \\\n                \"${PHPFPM_LOG_ERROR_PATH}\"\n    touch \"${PHPFPM_LOG_ERROR_PATH%/}\"/\"${PHPFPM_LOG_ERROR_FILE}\"\n    chown -R \"${PHPFPM_USER}\":\"${PHPFPM_GROUP}\" \"${PHPFPM_LOG_ERROR_PATH%/}\"\n    create_logrotate phpfpm-error \"${PHPFPM_LOG_ERROR_PATH%/}\"/\"${PHPFPM_LOG_ERROR_FILE}\" phpfpm-error \"${PHPFPM_USER}\" \"${PHPFPM_GROUP}\"\n\n    configure_server_logging=\"$(cat <<EOF\n                                    error_log = ${PHPFPM_LOG_ERROR_PATH%/}/${PHPFPM_LOG_ERROR_FILE}\n                                    log_level = ${PHPFPM_LOG_LEVEL}\n                                    log_limit = ${PHPFPM_LOG_LIMIT}\nEOF\n                               )\"\n\n    echo \"${configure_server_logging}\" | sed -e \"s|^[ \\t]*||\" | write_file \"${php_prefix%/}\"/php-fpm.d/logging.conf\n\n    case \"${PHP_BASE}\" in\n        \"5.6\" | 7[0-2] )\n            sed -i \\\n                        -e \"/^log_limit =/d\" \\\n                    \"${php_prefix%/}\"/php-fpm.d/logging.conf\n        ;;\n    esac\n}\n\nphpfpm_server_configure_modules() {\n    call phpfpm_server_module_apc\n    call phpfpm_server_module_opcache\n    call phpfpm_server_module_xdebug\n}\n\nphpfpm_server_configure_pools() {\n    local _phpfpm_pools\n    local _phpfpm_pool_vars\n    local _phpfpm_pool_prefix\n\n    _transform_phpfpmpool_variable() {\n        local _val\n        if grep -q -m1 \"^PHPFPM_POOL_${1}_${2}=\" \"${_php_fpm_pool_vars}\" && [ \"$(grep -m1 \"^PHPFPM_POOL_${1}_${2}=\" \"${_php_fpm_pool_vars}\" | cut -d = -f2-)\" != \"unset\" ]; then\n            _val=$(grep -m1 \"^PHPFPM_POOL_${1}_${2}=\" \"${_php_fpm_pool_vars}\" | cut -d = -f2- | sed \"s/^['\\\"]//; s/['\\\"]$//\")\n            export \"$3\"=\"${_val}\"\n            transform_var env \"$3\"\n        elif grep -q -m1 \"^PHP_FPM_${2}=\" \"${_php_fpm_pool_vars}\" && [ \"$(grep -m1 \"^PHP_FPM_${2}=\" \"${_php_fpm_pool_vars}\" | cut -d = -f2-)\" != \"unset\" ]; then\n            _val=$(grep -m1 \"^PHP_FPM_${2}=\" \"${_php_fpm_pool_vars}\" | cut -d = -f2- | sed \"s/^['\\\"]//; s/['\\\"]$//\")\n            export \"$3\"=\"${_val}\"\n            transform_var env \"$3\"\n        elif grep -q -m1 \"^PHPFPM_POOL_DEFAULT_${2}=\" \"${_php_fpm_pool_vars}\" && [ \"$(grep -m1 \"^PHPFPM_POOL_DEFAULT_${2}=\" \"${_php_fpm_pool_vars}\" | cut -d = -f2-)\" != \"unset\" ]; then\n            _val=$(grep -m1 \"^PHPFPM_POOL_DEFAULT_${2}=\" \"${_php_fpm_pool_vars}\" | cut -d = -f2- | sed \"s/^['\\\"]//; s/['\\\"]$//\")\n            export \"$3\"=\"${_val}\"\n            transform_var env \"$3\"\n        fi\n    }\n\n    if [ \"$(set -o posix ; set | sort | grep \"^PHPFPM_POOL_.*\" | sed -n \"s/^PHPFPM_POOL_\\([^_]*\\)_.*$/\\1/p\" | uniq | wc -l)\" -eq 1 ] ; then\n        export PHPFPM_POOL_WWW_LISTEN_TYPE=\"${PHPFPM_POOL_DEFAULT_LISTEN_TYPE}\"\n    fi\n\n    phpfpm_pool_list=$(set -o posix ; set | sort | grep \"^PHPFPM_POOL_.*_LISTEN_TYPE\" | sed -n 's/^PHPFPM_POOL_\\([^_]*\\)_.*$/\\1/p' | grep -v -E '^DEFAULT$' | tr '\\n' ' ')\n    for phpfpm_pool in ${phpfpm_pool_list}; do\n        _php_fpm_pool_vars=\"$(mktemp)\"\n        set -o posix ; set | grep -E \"^PHPFPM_POOL_${phpfpm_pool}_|^PHPFPM_POOL_DEFAULT_\" | tr \" \" \"\\n\" | write_file \"${_php_fpm_pool_vars}\"\n        _phpfpm_pool_prefix=\"${php_prefix%/}/pools.d/${phpfpm_pool,,}\"\n        mkdir -p \"${_phpfpm_pool_prefix}\"\n        echo \"[${phpfpm_pool,,}]\" | write_file \"${_phpfpm_pool_prefix}\".conf\n        call phpfpm_server_pool_listener \"${phpfpm_pool}\"\n        call phpfpm_server_pool_log \"${phpfpm_pool}\"\n        call phpfpm_server_pool_processmanagement \"${phpfpm_pool}\"\n        call phpfpm_server_pool_settings \"${phpfpm_pool}\"\n        call phpfpm_server_pool_environment \"${phpfpm_pool}\"\n        call phpfpm_server_pool_override \"${phpfpm_pool}\"\n        call phpfpm_server_pool_includes \"${phpfpm_pool}\"\n        call phpfpm_nginx_server_configure_upstream \"${phpfpm_pool}\"\n        call phpfpm_server_pool_shadow_tcp \"${phpfpm_pool}\"\n        rm \"${_php_fpm_pool_vars}\"\n    done\n}\n\nphpfpm_server_configure_smtp() {\n    if var_true \"${CONTAINER_ENABLE_MESSAGING}\" || [ \"${CONTAINER_MESSAGING_BACKEND}\" = \"msmtp\" ] ; then\n        case \"$(container_info distro)\" in\n            \"alpine\" )\n                  if var_true \"${CONTAINER_ENABLE_MESSAGING}\" || [ \"${CONTAINER_MESSAGING_BACKEND}\" = \"msmtp\" ] ; then\n                      echo 'sendmail_path=\"/usr/bin/msmtp -C /etc/msmtprc -t \"' | write_file \"${php_prefix%/}\"/conf.d/99-smtp.ini\n                  fi\n              ;;\n            \"debian\" )\n                if var_true \"${ENABLE_SMTP}\" || var_true \"${CONTAINER_ENABLE_MESSAGING}\" ; then\n                    echo 'sendmail_path=\"/usr/bin/msmtp -C /etc/msmtprc -t \"' | write_file \"${php_root%/}\"/cli/conf.d/99-smtp.ini \"${php_prefix%/}\"/conf.d/99-smtp.ini\n                fi\n            ;;\n        esac\n\n        if [ -f /etc/msmtprc ]; then\n            chown \"${PHPFPM_USER}\":\"${PHPFPM_GROUP}\" /etc/msmtprc\n            chmod 0600 /etc/msmtprc\n        fi\n    fi\n}\n\nphpfpm_server_configure_socket() {\n    :\n}\n\nphpfpm_server_configure_timezone() {\n     sed -i \\\n                -e \"s#date.timezone = .*#date.timezone = $(cat /etc/timezone)#g\" \\\n            /container/data/php-fpm/cli/php.ini \\\n            /container/data/php-fpm/fpm/php.ini\n\n    case \"$(container_info distro)\" in\n        \"alpine\" )\n            echo \"date.timezone=$(cat /etc/timezone)\" | write_file \"${php_prefix%/}\"/conf.d/99-timezone.ini\n        ;;\n        \"debian\" )\n            echo \"date.timezone=$(cat /etc/timezone)\" | write_file \"${php_root%/}\"/cli/conf.d/99-timezone.ini  \"${php_prefix%/}\"/conf.d/99-timezone.ini\n        ;;\n    esac\n}\n\nphpfpm_server_module_apc() {\n    if [ \"${PHP_MODULE_APC_SHM_SIZE}\" = \"0\" ]; then\n        sed -i -e \"s#apc.enabled=1#apc.enabled=0#g\" /container/data/php-fpm/conf.available/acpu.ini\n    fi\n\n    sed -i \\\n            -e \"s#apc.shm_size=.*#apc.shm_size=${PHP_MODULE_APC_SHM_SIZE}#g\" \\\n            -e \"s#apc.ttl=.*#apc.ttl=${PHP_MODULE_APC_TTL}#g\" \\\n        /container/data/php-fpm/conf.available/apcu.ini\n}\n\nphpfpm_server_module_opcache() {\n    if [ \"${PHP_MODULE_OPCACHE_MEM_SIZE}\" = \"0\" ] || var_false \"${PHP_MODULE_ENABLE_OPCACHE}\" ; then\n        sed -i \\\n                    -e \"s|opcache.enable=1|opcache.enable=0|g\" \\\n                    -e \"s|opcache.enable_ci=1|opcache.enable_cli=0|g\" \\\n                /container/data/php-fpm/conf.available/opcache.ini\n    else\n        sed -i \\\n                -e \"s#opcache.interned_strings_buffer=.*#opcache.interned_strings_buffer=${PHP_MODULE_OPCACHE_INTERNED_STRINGS_BUFFER}#g\" \\\n                -e \"s#opcache.max_accelerated_files=.*#opcache.max_accelerated_files=${PHP_MODULE_OPCACHE_MAX_ACCELERATED_FILES}#g\" \\\n                -e \"s#opcache.max_file_size=.*#opcache.max_file_size=${PHP_MODULE_OPCACHE_MAX_FILE_SIZE}#g\" \\\n                -e \"s#opcache.max_wasted_percentage=.*#opcache.max_wasted_percentage=${PHP_MODULE_OPCACHE_MAX_WASTED_PERCENTAGE}#g\" \\\n                -e \"s#opcache.memory_consumption=.*#opcache.memory_consumption=${PHP_MODULE_OPCACHE_MEM_SIZE}#g\" \\\n                -e \"s#opcache.optimization_level=.*#opcache.optimization_level=${PHP_MODULE_OPCACHE_OPTIMIZATION_LEVEL}#g\" \\\n                -e \"s#opcache.reavalidate_freq=.*#opcache.revalidate_freq=${PHP_MODULE_OPCACHE_REVALIDATE_FREQ}#g\" \\\n                -e \"s#opcache.revalidate_freq=.*#opcache.revalidate_freq=${PHP_MODULE_OPCACHE_REVALIDATE_FREQ}#g\" \\\n                -e \"s#opcache.save_comments=.*#opcache.save_comments=${PHP_MODULE_OPCACHE_SAVE_COMMENTS}#g\" \\\n                -e \"s#opcache.validate_timestamps=.*#opcache.validate_timestamps=${PHP_MODULE_OPCACHE_VALIDATE_TIMESTAMPS}#g\" \\\n            /container/data/php-fpm/conf.available/opcache.ini\n\n        if [ \"${PHP_BASE:0:1}\" = \"7\" ] ; then\n            sed -i \"/opcache.jit/d\" /container/data/php-fpm/conf.available/opcache.ini\n        else\n            sed -i \\\n                        -e \"s#opcache.jit_buffer_size=.*#opcache.jit_buffer_size=${PHP_MODULE_OPCACHE_JIT_BUFFER_SIZE}#g\" \\\n                        -e \"s#opcache.jit=.*#opcache.jit=${PHP_MODULE_OPCACHE_JIT_MODE}#g\" \\\n                    /container/data/php-fpm/conf.available/opcache.ini\n        fi\n    fi\n}\n\nphpfpm_server_module_xdebug() {\n    if var_true \"${PHP_MODULE_ENABLE_XDEBUG}\" ; then\n        mkdir \"${PHP_MODULE_XDEBUG_PROFILER_PATH}\"\n        chown -R \"${PHPFPM_USER}\":\"${PHPFPM_GROUP}\" \"${PHP_MODULE_XDEBUG_PROFILER_PATH}\"\n        if [ \"${PHP_BASE:0:1}\" = \"5\" ] || [ \"${PHP_BASE:0:3}\" = \"7.0\" ] || [ \"${PHP_BASE:0:3}\" = \"7.1\" ] ; then\n            write_file -a \"${php_prefix}\"conf.available/xdebug.ini:644 <<EOF\nzend_extension=xdebug.so\nxdebug.default_enable = 1\nxdebug.profiler_enable= ${PHP_MODULE_XDEBUG_PROFILER_ENABLE}\nxdebug.profiler_enable_trigger= ${PHP_MODULE_XDEBUG_PROFILER_ENABLE_TRIGGER}\nxdebug.profiler_output_dir='${PHP_MODULE_XDEBUG_PROFILER_DIR}'\nxdebug.remote_autostart = ${PHP_MODULE_XDEBUG_REMOTE_AUTOSTART}\nxdebug.remote_connect_back = ${PHP_MODULE_XDEBUG_REMOTE_CONNECT_BACK}\nxdebug.remote_enable = ${PHP_MODULE_XDEBUG_REMOTE_ENABLE}\nxdebug.remote_handler = ${PHP_MODULE_XDEBUG_REMOTE_HANDLER}\nxdebug.remote_host = ${PHP_MODULE_XDEBUG_REMOTE_HOST}\nxdebug.remote_port = ${PHP_MODULE_XDEBUG_REMOTE_PORT}\nEOF\n    \telse\n\t    \twrite_file -a \"${php_prefix}\"conf.available/xdebug.ini:644 <<EOF\nzend_extension=xdebug.so\nxdebug.default_enable = 1\nxdebug.output_dir = ${PHP_MODULE_XDEBUG_OUTPUT_DIR}\nxdebug.mode = ${PHP_MODULE_XDEBUG_MODE}\nxdebug.start_with_request = ${PHP_MODULE_XDEBUG_START_WITH_REQUEST}\nxdebug.discover_client_host = ${PHP_MODULE_XDEBUG_DISCOVER_CLIENT_HOST}\nxdebug.client_host = ${PHP_MODULE_XDEBUG_CLIENT_HOST}\nxdebug.client_port = ${PHP_MODULE_XDEBUG_CLIENT_PORT}\nEOF\n    \tfi\n        PHP_LOG_LEVEL=debug\n        print_notice \"DEBUGGING MODE ACTIVATED: Please use your IDE to connect to: ${PHP_MODULE_XDEBUG_REMOTE_HOST}:${PHP_MODULE_XDEBUG_REMOTE_PORT}\"\n        if [ \"${PHP_MODULE_XDEBUG_PROFILER_ENABLE}\" = \"1\" ] || [ \"${PHP_MODULE_XDEBUG_MODE,,}\" = \"trace\" ]; then\n            print_notice \"PROFILING MODE ACTIVATED: Please find the profiler logs at: ${PHP_MODULE_XDEBUG_PROFILER_PATH}\"\n            mkdir -p \"${PHP_MODULE_XDEBUG_PROFILER_PATH}\"\n            chown -R \"${PHPFPM_USER}\":\"${PHPFPM_GROUP}\" \"${PHP_MODULE_XDEBUG_PROFILER_PATH}\"\n        fi\n    fi\n}\n\nphpfpm_server_pool_environment() {\n    _transform_phpfpmpool_variable \"${1^^}\" ENV _pool_env\n    for pool_env in $(echo \"${_pool_env}\" | tr \",\" \"\\n\" | uniq); do\n        if [ -f \"${php_prefix%/}\"/environment/\"${pool_env}\" ]; then\n            echo \"include = ${php_prefix%/}/environment/${pool_env}\" | write_file -a \"${_phpfpm_pool_prefix}\".conf\n        fi\n    done\n}\n\nphpfpm_server_pool_listener() {\n    _transform_phpfpmpool_variable \"${1^^}\" LISTEN_TYPE _pool_listen_type\n\n    case \"${_pool_listen_type}\" in\n        \"tcp\" )\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_IP _pool_listen_ip\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_PORT _pool_listen_port\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_TCP_IP _pool_listen_tcp_ip\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_TCP_IP_ALLOWED _pool_listen_tcp_ip_allowed\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_TCP_PORT _pool_listen_tcp_port\n            configure_pool=\"$(cat <<EOF\n                                listen                          = ${_pool_listen_tcp_ip}:${_pool_listen_tcp_port}\n                                listen.allowed_clients          = ${_pool_listen_tcp_ip_allowed}\nEOF\n                            )\"\n        ;;\n        \"unix\" | \"both\" )\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_UNIX_SOCKET _pool_listen_unix_socket\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_UNIX_GROUP _pool_listen_unix_group\n            _transform_phpfpmpool_variable \"${phpfpm_pool^^}\" LISTEN_UNIX_USER _pool_listen_unix_user\n\n            if [ ! -d \"$(dirname \"${_pool_listen_unix_socket}\")\" ]; then\n                mkdir -p \"$(dirname \"${_pool_listen_unix_socket}\")\"\n                chown -R \"${_pool_listen_unix_user}\":\"${_pool_listen_unix_group}\" \"$(dirname \"${_pool_listen_unix_socket}\")\"\n            fi\n\n            if [ \"$(basename \"${_pool_listen_unix_socket}\")\" = \"default.sock\" ] ; then\n                _pool_listen_unix_socket=\"$(dirname \"${_pool_listen_unix_socket}\")/${1,,}.sock\"\n            fi\n\n            configure_pool=\"$(cat <<EOF\n                                listen                              = ${_pool_listen_unix_socket}\n                                listen.owner                        = ${_pool_listen_unix_user}\n                                listen.group                        = ${_pool_listen_unix_group}\nEOF\n                            )\"\n        ;;\n    esac\n    echo \"${configure_pool}\" | sed -e \"s|^[ \\t]*||\" | write_file \"${_phpfpm_pool_prefix}\"/\"${1,,}-listener.conf\"\n    echo \"include = ${_phpfpm_pool_prefix}/${1,,}-listener.conf\" | write_file -a \"${_phpfpm_pool_prefix}\".conf\n}\n\nphpfpm_server_pool_includes() {\n    _transform_phpfpmpool_variable \"${1^^}\" INCLUDES _pool_includes\n    if [ -z \"${_pool_includes}\" ]; then\n        return\n    fi\n    local _inc\n    IFS=',' read -ra _pool_includes_arr <<< \"${_pool_includes}\"\n    for _inc in \"${_pool_includes_arr[@]}\"; do\n        _inc=$(echo \"${_inc}\" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')\n        if [ -n \"${_inc}\" ]; then\n            print_debug \"[pool_includes/${1,,}] include = ${_inc}\"\n            echo \"include = ${_inc}\" | write_file -a \"${_phpfpm_pool_prefix}\".conf\n        fi\n    done\n}\n\nphpfpm_server_pool_shadow_tcp() {\n    # Create shadow pool when PHPFPM_POOL_<NAME>_LISTEN_TYPE=both\n    # Create <NAME>-tcp pool sharing all other options pm/log/env/override/inclues\n\n    _transform_phpfpmpool_variable \"${1^^}\" LISTEN_TYPE _pool_listen_type\n    if [ \"${_pool_listen_type,,}\" != \"both\" ]; then\n        return\n    fi\n\n    local _pool_lower=\"${1,,}\"\n    local _primary_conf=\"${_phpfpm_pool_prefix}.conf\"\n    local _shadow_conf=\"${php_prefix%/}/pools.d/${_pool_lower}-tcp.conf\"\n\n    if [ ! -f \"${_primary_conf}\" ]; then\n        print_warn \"[pool_shadow_tcp/${_pool_lower}] Primary pool .conf not found at '${_primary_conf}' - skipping shadow\"\n        return\n    fi\n\n    # refuse to clobber an user created <pool>-tcp pool\n    if echo \" ${phpfpm_pool_list} \" | grep -qi -- \" ${_pool_lower}-tcp \" 2>/dev/null; then\n        print_warn \"[pool_shadow_tcp/${_pool_lower}] An operator-defined '${_pool_lower}-tcp' pool exists - skipping shadow generation\"\n        return\n    fi\n\n    _transform_phpfpmpool_variable \"${1^^}\" LISTEN_TCP_IP _shadow_tcp_ip\n    _transform_phpfpmpool_variable \"${1^^}\" LISTEN_TCP_PORT _shadow_tcp_port\n    _transform_phpfpmpool_variable \"${1^^}\" LISTEN_TCP_IP_ALLOWED _shadow_tcp_allowed\n\n    : \"${_shadow_tcp_ip:=127.0.0.1}\"\n    : \"${_shadow_tcp_port:=9000}\"\n    : \"${_shadow_tcp_allowed:=127.0.0.1}\"\n\n    local _shadow_pool=\"${_pool_lower}-tcp\"\n\n    print_notice \"[pool_shadow_tcp/${_pool_lower}] Spawning shadow pool '${_shadow_pool}' listening on ${_shadow_tcp_ip}:${_shadow_tcp_port}\"\n\n    sed \\\n        -e \"s|^\\[${_pool_lower}\\]|[${_shadow_pool}]|\" \\\n        -e \"\\|^include[[:space:]]*=.*${_pool_lower}-listener\\.conf$|d\" \\\n        \"${_primary_conf}\" > \"${_shadow_conf}\"\n\n    {\n        echo \"listen                          = ${_shadow_tcp_ip}:${_shadow_tcp_port}\"\n        echo \"listen.allowed_clients          = ${_shadow_tcp_allowed}\"\n    } >> \"${_shadow_conf}\"\n\n    local _shadow_upstream_file=\"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/php-fpm/${_shadow_pool}.conf\"\n    create_folder \"$(dirname \"${_shadow_upstream_file}\")\" \"${NGINX_USER}:${NGINX_GROUP}\" 755\n    write_file \"${_shadow_upstream_file}\":644 <<EOF\nfastcgi_pass            phpfpm-${_shadow_pool}-upstream;\nfastcgi_read_timeout    ${_pool_max_execution_time};\nfastcgi_send_timeout    ${_pool_max_execution_time};\nproxy_http_version      1.1;\nproxy_set_header        Connection \"\";\nEOF\n\n    local _shadow_upstream_conf=\"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/upstream/upstream-phpfpm-${_shadow_pool}.conf\"\n    create_folder \"$(dirname \"${_shadow_upstream_conf}\")\" \"${NGINX_USER}:${NGINX_GROUP}\" 755\n    local _shadow_keepalive=\"\"\n    if var_true \"${NGINX_ENABLE_UPSTREAM_KEEPALIVE}\" ; then\n        _shadow_keepalive=\"    keepalive ${NGINX_UPSTREAM_KEEPALIVE};\"\n    fi\n    {\n        echo \"upstream phpfpm-${_shadow_pool}-upstream {\"\n        if [ -n \"${_shadow_keepalive}\" ]; then\n            echo \"${_shadow_keepalive}\"\n        fi\n        echo \"    server ${_shadow_tcp_ip}:${_shadow_tcp_port};\"\n        echo \"}\"\n    } | write_file \"${_shadow_upstream_conf}\"\n}\n\nphpfpm_server_pool_log() {\n    _transform_phpfpmpool_variable \"${1^^}\" ENABLE_LOG _pool_enable_log\n\n    if var_true \"${_pool_enable_log}\" ; then\n        _transform_phpfpmpool_variable \"${1^^}\" LOG_PATH _pool_log_path\n        _transform_phpfpmpool_variable \"${1^^}\" LOG_ACCESS_FILE _pool_log_access_file\n        _transform_phpfpmpool_variable \"${1^^}\" LOG_ACCESS_FORMAT _pool_log_access_format\n\n        create_folder \"${_pool_log_path}\" \"${PHPFPM_USER}:${PHPFPM_GROUP}\" 755\n        if [ \"${_pool_log_access_file}\" = \"default-access.log\" ] ; then _pool_log_access_file=\"${1,,}-access.log\" ; fi\n        sudo -u \"${PHPFPM_USER}\" touch \"${_pool_log_path%/}\"/\"${_pool_log_access_file}\"\n        chown -R \"${PHPFPM_USER}\":\"${PHPFPM_GROUP}\" \"${_pool_log_path%/}\"\n        create_logrotate phpfpm-${1,,}-access \"${_pool_log_path%/}\"/\"${_pool_log_access_file}\" phpfpm \"${PHPFPM_USER}\":\"${PHPFPM_GROUP}\"\n\n        if [ \"${_pool_log_access_format,,}\" = \"standard\" ] ; then\n            _pool_log_access_format=default\n        fi\n\n        configure_pool=\"$(cat <<EOF\n\n                            access.log                          = ${_pool_log_path%/}/${_pool_log_access_file}\n                            include                             = /container/data/php-fpm/fpm/${_pool_log_access_format,,}.logformat\nEOF\n                        )\"\n\n        echo \"${configure_pool}\" | sed -e \"s|^[ \\t]*||\" | write_file \"${_phpfpm_pool_prefix}\"/\"${1,,}-log.conf\"\n        echo \"include = ${_phpfpm_pool_prefix}/${1,,}-log.conf\" | write_file -a \"${_phpfpm_pool_prefix}\".conf\n    fi\n}\n\nphpfpm_server_pool_override() {\n    if [ -d /override/php-fpm/pool/\"${1,,}\" ]; then\n        echo \"include = /override/php-fpm/pool/${1}/*.conf\" | write_file \"${_phpfpm_pool_prefix}\"/\"${1,,}-override.conf\"\n        echo \"include = ${_phpfpm_pool_prefix}/${1,,}-override.conf\" | write_file -a \"${_phpfpm_pool_prefix}\".conf\n    fi\n}\n\nphpfpm_server_pool_processmanagement() {\n    _transform_phpfpmpool_variable \"${1^^}\" MAX_CHILDREN _pool_pm_max_children\n    _transform_phpfpmpool_variable \"${1^^}\" MAX_REQUESTS _pool_pm_max_requests\n    _transform_phpfpmpool_variable \"${1^^}\" MAX_SPARE_SERVERS _pool_pm_max_spare_servers\n    _transform_phpfpmpool_variable \"${1^^}\" MIN_SPARE_SERVERS _pool_pm_min_spare_servers\n    _transform_phpfpmpool_variable \"${1^^}\" PROCESS_MANAGER _pool_pm_process_manager\n    _transform_phpfpmpool_variable \"${1^^}\" START_SERVERS _pool_pm_start_servers\n    _transform_phpfpmpool_variable \"${1^^}\" STATUS_PATH _pool_pm_status_path\n    _transform_phpfpmpool_variable \"${1^^}\" PROCESS_IDLE_TIMEOUT _pool_pm_process_idle_timeout\n\n    configure_pool=\"$(cat <<EOF\n\n                        pm                                          = ${_pool_pm_process_manager}\n                        pm.max_children                             = ${_pool_pm_max_children}\n                        pm.max_requests                             = ${_pool_pm_max_requests}\n                        pm.max_spare_servers                        = ${_pool_pm_max_spare_servers}\n                        pm.min_spare_servers                        = ${_pool_pm_min_spare_servers}\n                        pm.process_idle_timeout                     = ${_pool_pm_process_idle_timeout}\n                        pm.start_servers                            = ${_pool_pm_start_servers}\n                        pm.status_path                              = ${_pool_pm_status_path}\n\nEOF\n                    )\"\n\n    echo \"${configure_pool}\" | sed -e \"s|^[ \\t]*||\" | write_file \"${_phpfpm_pool_prefix}\"/\"${1,,}-pm.conf\"\n    echo \"include = ${_phpfpm_pool_prefix}/${1,,}-pm.conf\" | write_file -a \"${_phpfpm_pool_prefix}\".conf\n}\n\nphpfpm_server_pool_settings() {\n    _transform_phpfpmpool_variable \"${1^^}\" OUTPUT_BUFFER_SIZE _pool_output_buffer_size\n    _transform_phpfpmpool_variable \"${1^^}\" TIMEOUT _pool_max_execution_time\n    _transform_phpfpmpool_variable \"${1^^}\" MAX_INPUT_NESTING_LEVEL _pool_max_input_nesting_level\n    _transform_phpfpmpool_variable \"${1^^}\" MAX_INPUT_VARS _pool_max_input_vars\n    _transform_phpfpmpool_variable \"${1^^}\" MEMORY_LIMIT _pool_memory_limit\n    _transform_phpfpmpool_variable \"${1^^}\" POST_MAX_SIZE _pool_post_max_size\n    _transform_phpfpmpool_variable \"${1^^}\" UPLOAD_MAX_SIZE _pool_upload_max_size\n    _transform_phpfpmpool_variable \"${1^^}\" CATCH_WORKERS_OUTPUT _pool_catch_workers_output\n    _transform_phpfpmpool_variable \"${1^^}\" DISPLAY_ERRORS _pool_display_errors\n    _transform_phpfpmpool_variable \"${1^^}\" PING_PATH _pool_ping_path\n\n    configure_pool=\"$(cat <<EOF\n\n                        php_admin_value[max_execution_time]         = ${_pool_max_execution_time}\n                        php_admin_value[max_input_nesting_level]    = ${_pool_max_input_nesting_level}\n                        php_admin_value[max_input_vars]             = ${_pool_max_input_vars}\n                        php_admin_value[memory_limit]               = ${_pool_memory_limit}\n                        php_admin_value[openssl.cafile]             = /etc/ssl/certs/ca-certificates.crt\n                        php_admin_value[openssl.capath]             = /etc/ssl/certs\n                        php_admin_value[output_buffering]           = ${_pool_output_buffer_size}\n                        php_admin_value[post_max_size]              = ${_pool_post_max_size}\n                        php_admin_value[upload_max_filesize]        = ${_pool_upload_max_size}\n                        php_flag[display_errors]                    = ${_pool_display_errors,,}\n\n                        catch_workers_output                        = ${_pool_catch_workers_output,,}\n                        ping.path                                   = ${_pool_ping_path}\n\nEOF\n                    )\"\n\n    echo \"${configure_pool}\" | sed -e \"s|^[ \\t]*||\" | write_file \"${_phpfpm_pool_prefix}\"/\"${1,,}-settings.conf\"\n    echo \"include = ${_phpfpm_pool_prefix}/${1,,}-settings.conf\" | write_file -a \"${_phpfpm_pool_prefix}\".conf\n}\n\nphpfpm_site_create_default_page() {\n    if [ -n \"${1}\" ] ; then\n        local _sitename=\"${1}\"\n        local _webroot=\"${2}\"\n        local _index=\"${3}\"\n        local enable_phpsample_var=\"PHP_SITE_${_sitename^^}_CREATE_SAMPLE_PHP\"\n        local enable_phpsample_val\n        enable_phpsample_val=\"$(resolve_site_var \"${enable_phpsample_var}\" \"${PHP_CREATE_SAMPLE_PHP:-${PHP_ENABLE_CREATE_SAMPLE_PHP:-}}\" \"${allow_defaults}\")\"\n        if [ -z \"${enable_phpsample_val}\" ] ; then enable_phpsample_val=\"false\"; fi\n\n        if var_true \"${enable_phpsample_val}\" && [ ! -f \"${_index}\" ]; then\n            print_notice \"[configure_site/${_sitename}] [php_create_default_page] Creating sample ${_index} for site at ${_webroot}\"\n            create_folder \"${_webroot}\" \"${NGINX_USER}:${NGINX_GROUP}\" 750\n            write_file \"${NGINX_USER}\":\"${NGINX_GROUP}\" \"${_webroot%/}\"/\"${_index}\":644 <<EOF\n<html>\n<title>Default Page</title>\n<h2>Container is working</h2>\nCongratulations! Your ${IMAGE_NAME} $(container_info distro) $(container_info variant) PHP-FPM image is working. You are seeing this because you don't have an index.php file in your ${PHP_WEBROOT} directory.<br />\nFor more info visit <a href=\"https://www.nfrastack.com/?ref=container-nginx-php-fpm\">https://www.nfrastack.com</a><p>\n<?php phpinfo();?>\n</html>\nEOF\n        fi\n    fi\n}\n\n\nphpfpm_nginx_site_configure() {\n    if var_true \"${NGINX_ENABLE_APPLICATION_CONFIGURATION}\"; then\n        if [ -z \"${NGINX_SITE_ENABLED}\" ] || [ \"${NGINX_SITE_ENABLED,,}\" = \"null\" ] ; then\n            NGINX_SITE_ENABLED=default\n        fi\n\n        if [ -n \"${NGINX_SITE_ENABLED}\" ] && [ \"${NGINX_SITE_ENABLED,,}\" != \"null\" ] ; then\n            sites_to_enable=\"\"\n            for site_list in $(echo \"${NGINX_SITE_ENABLED}\" | tr \",\" \"\\n\"); do\n                case \"${site_list}\" in\n                    \"all\")\n                        site_filelist=$(find \"${NGINX_CONFIG_PATH%/}\"/\"${NGINX_CONFIG_FILE}\".d/sites.available/*.conf /container/data/nginx/sites.available/*.conf /override/sites.available/*.conf -type f ! -name *.enc* -maxdepth 1 2>/dev/null || true)\n                        for site_path in ${site_filelist}; do\n                            sites_to_enable=\"${sites_to_enable} $(basename \"${site_path%.*}\")\"\n                        done\n                    ;;\n                    *)\n                        sites_to_enable=\"${sites_to_enable} ${site_list}\"\n                    ;;\n                esac\n            done\n\n            sites_to_enable=$(echo \"${sites_to_enable}\" | tr ' ' '\\n' | sed '/^$/d' | awk '!seen[$0]++' | tr '\\n' ' ')\n            for site in ${sites_to_enable}; do\n                print_notice \"[configure_site/${site}] Configuring PHP settings\"\n                site_path=\"\"\n                for enable_candidate in \"${NGINX_CONFIG_PATH%/}/sites.enabled/${site}.conf\"; do\n                    if [ -f \"${enable_candidate}\" ]; then\n                        site_path=\"${enable_candidate}\"\n                        break\n                    fi\n                done\n                local allow_defaults_var_site=\"NGINX_SITE_${site^^}_ALLOW_DEFAULTS\"\n                local allow_defaults=\"${!allow_defaults_var_site}\"\n                if [ -z \"${allow_defaults}\" ]; then allow_defaults=\"${NGINX_ALLOW_DEFAULTS}\"; fi\n                if [ -z \"${allow_defaults}\" ]; then allow_defaults=true; fi\n                call phpfpm_nginx_site_configure_php \"${site}\" \"${site_path}\" \"${allow_defaults,,}\"\n            done\n        fi\n    else\n        print_notice \"[application_configuration] Disabled automated PHP site configuration routines\"\n    fi\n\n    call phpfpm_nginx_server_hide_header\n}\n\nphpfpm_nginx_site_configure_php() {\n    if [ -n \"${1}\" ]; then\n        local _sitename=\"${1:-}\"\n        local site_path=\"${2:-}\"\n        local allow_defaults=\"${3:-true}\"\n\n        local _nginxphpupvar=\"NGINX_SITE_${_sitename^^}_PHP_UPSTREAM\"\n        local _nginxphpconf=\"\"\n        if [ -n \"${!_nginxphpupvar:-}\" ]; then\n            _nginxphpconf=\"${!_nginxphpupvar}\"\n        else\n            if [ \"${allow_defaults,,}\" = \"true\" ] && [ -n \"${NGINX_PHP_UPSTREAM:-}\" ]; then\n                _nginxphpconf=\"${NGINX_PHP_UPSTREAM}\"\n            else\n                _nginxphpconf=www\n            fi\n        fi\n\n        create_folder \"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/php-fpm\" \"${NGINX_USER}:${NGINX_GROUP}\" 755\n        ln -sf \"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/php-fpm/${_nginxphpconf}.conf\" \"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/php-fpm/php-fpm.conf\"\n\n        local php_index_file=\"\"\n        local _site_index_var=\"NGINX_SITE_${_sitename^^}_INDEX_FILE\"\n        if [ -n \"${!_site_index_var:-}\" ]; then\n            _site_index_val=\"${!_site_index_var}\"\n            IFS=$', ' read -ra _idx_arr <<< \"${_site_index_val}\"\n            php_index_file=\"${_idx_arr[0]}\"\n        else\n            if [ \"${allow_defaults,,}\" = \"true\" ] && [ -n \"${NGINX_INDEX_FILE}\" ]; then\n                IFS=$', ' read -ra _idx_arr <<< \"${NGINX_INDEX_FILE}\"\n                php_index_file=\"${_idx_arr[0]}\"\n            else\n                php_index_file=\"index.php\"\n            fi\n        fi\n        local nginx_index_file=\"${php_index_file}\"\n        local site_index=\"${php_index_file}\"\n        render_template \\\n                            /container/data/nginx/templates/site/server-index.template \\\n                            \"${NGINX_CONFIG_PATH%/}\"/sites.enabled/\"${_sitename}\"/server-begin/21-index.conf \\\n                        site_index\n        local php_upstream=\"include ${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/php-fpm/${_nginxphpconf}.conf\"\n        if [ -n \"${site_path}\" ] && [ -f \"${site_path}\" ] && [ -f \"${NGINX_CONFIG_PATH%/}/${NGINX_CONFIG_FILE}.d/php-fpm/${_nginxphpconf}.conf\" ]; then\n            while IFS= read -r -d '' _file; do\n                if grep -q '{{[[:space:]]*php_[A-Za-z0-9_]*[[:space:]]*}}' \"${_file}\"; then\n                    placeholders=$(grep -oE '{{[[:space:]]*php_[A-Za-z0-9_]*[[:space:]]*}}' \"${_file}\" \\\n                        | sed -e 's/^{{[[:space:]]*//' -e 's/[[:space:]]*}}$//' \\\n                        | awk '{$1=$1;print}' \\\n                        | sort -u \\\n                        | tr '\\n' ' ')\n\n                    if [ -n \"${placeholders}\" ]; then\n                        print_debug \"[configure_site/${_sitename}] [configure_nginx_php] Updating template ${_file} with placeholders: ${placeholders}\"\n                        set -- ${placeholders}\n                        update_template \"${_file}\" \"$@\"\n                        set --\n                    fi\n                fi\n            done < <( { [ -f \"${site_path}\" ] && printf '%s\\0' \"${site_path}\"; find -L \"$(dirname \"${site_path}\")\" -type f -print0 2>/dev/null; } )\n        fi\n    fi\n}\n"
  },
  {
    "path": "rootfs/container/functions/20-php-fpm.advanced",
    "content": "# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\n"
  },
  {
    "path": "rootfs/container/init/init.d/20-php-fpm",
    "content": "#!/command/with-contenv bash\n# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nsource /container/base/functions/container/init\nprepare_service *-nginx single\nprepare_service 20-php-fpm single\nSERVICE_NAME=\"php-fpm\"\n\nif var_false \"${ENABLE_PHPFPM}\" ; then\n    print_debug \"Disabling PHP-FPM Functionality\"\n    service_stop 20-php-fpm\n    rm -rf \\\n            /container/logrotate/php-fpm* \\\n            /etc/logrotate.d/php-fpm* \\\n            /etc/fluent-bit/conf.d/php* \\\n            /etc/zabbix/*/php*.conf\n    liftoff\n    exit 0\nfi\n\ncase \"${PHPFPM_CONTAINER_MODE,,}\" in\n      \"nginx\")\n            print_warn \"Setting Container to operate in Nginx standalone mode\"\n            if [ \"${PHP_FPM_HOST}\" = \"127.0.0.1\" ] || [ \"${PHP_FPM_HOST}\" = \"localhost\" ] ; then\n              print_error \"Your PHP_FPM_HOST variable is still set to 'localhost' Please change it to something else\"\n              exit 1\n            fi\n            service_stop \"$(basename \"$0\")\"\n            rm -rf /etc/zabbix/zabbix_agent.conf.d/php-fpm.conf\n            liftoff\n            exit 0\n      ;;\n      \"php-fpm\")\n            print_warn \"Setting Container to operate in PHP-FPM standalone mode - You will need a seperate container for Nginx or another webserver to serve content\"\n            mod_service_stop 10-nginx\n            print_notice \"Setting PHP-FPM to serve from ${PHP_WEBROOT}\"\n            sed -i \"/[www]#/achdir = ${PHP_WEBROOT}\" /container/data/php-fpm/fpm/php-fpm.conf\n            rm -rf /etc/zabbix/zabbix_agent.conf.d/nginx.conf\n      ;;\nesac\n\nif check_container_restarted; then\n    if var_true \"${CONTAINER_ENABLE_MONITORING}\" ; then source /container/base/defaults/*-monitoring; fi\n    phpfpm_bootstrap\n    phpfpm_server_configure_logging\n    phpfpm_server_configure_environment_variables\n    phpfpm_server_configure_modules\n    phpfpm_server_configure_pools\n    phpfpm_server_configure\n    if [[ \"${PHPFPM_CONTAINER_MODE,,}\" == *\"nginx\"* ]] ; then phpfpm_nginx_site_configure ; fi\n    phpfpm_post_init\nfi\nliftoff"
  },
  {
    "path": "rootfs/container/run/available/20-php-fpm/run",
    "content": "#!/command/with-contenv bash\n# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nsource /container/base/functions/container/init\nprepare_service defaults *-nginx\nprepare_service single\nSERVICE_NAME=\"php-fpm\"\n\ncheck_container_initialized\ncheck_service_initialized init\nliftoff\n\nprint_start \"Starting php-fpm ${PHP_VERSION}\"\nsilent exec s6-setuidgid ${PHPFPM_USER} php-fpm -F;"
  },
  {
    "path": "rootfs/etc/fluent-bit/parsers.d/phpfpm.conf",
    "content": "[PARSER]\n    Name   phpfpm\n    Format regex\n    Regex ^(?<time>[^ ]*) (?<remote_addr>[^ ]*) (?<host>[^ ]*) (?<remote_user>[^ ]*) (?<status>[^ ]*) (?<request_method>\\S+) \"(?<request_uri>[^\\\"]*)\" (?<request_id>[^ ]*) (?<server_protocol>[^ ]*) (?<body_bytes_sent>[^ ]*)(?: \"(?<referer>[^\\\"]*)\" \"(?<agent>[^\\\"]*)\") (?<memory_usage>[^ ]*) (?<cpu_usage>[^ ]*) (?<duration>[^ ]*)$\n    Time_Key time\n    Time_Format %Y-%m-%dT%H:%M:%S%z\n\n[PARSER]\n    Name   phpfpm-error\n    Format regex\n    Regex ^\\[(?<time>[^\\]]*)\\] (?<severity>[^ ]*): (?<message>.*)\n    Time_Key time\n    Time_Format %d-%b-%Y %H:%M:%S\n"
  },
  {
    "path": "rootfs/etc/zabbix/zabbix_agentd.conf.d/php-fpm.conf",
    "content": "# PHP-FPM checking for Zabbix Agent 5.4+\n# All data metric collection is handled by the template\n# Get the template at https://github.com/nfrastack/container-nginx-php-fpm/\n# Autoregister=phpfpm\n"
  },
  {
    "path": "rootfs/usr/local/bin/php-ext",
    "content": "#!/command/with-contenv bash\n# SPDX-FileCopyrightText: © 2026 Nfrastack <code@nfrastack.com>\n#\n# SPDX-License-Identifier: MIT\n\nsource /container/base/functions/container/init\n_container_build_env_import silent $(basename $(dirname \"$0\"))\n_container_run_env_import silent $(basename $(dirname \"$0\"))\n\nphp_version=$(php -v 2>/dev/null | grep \"^PHP \" | head -n 1 | awk '{print $2}')\nphp_base=${php_version:0:3}\n\nos=$(grep -o '^ID=.*' /etc/os-release | cut -d = -f2)\n\ncase \"${os}\" in\n    \"alpine\" )\n        case \"${php_version:0:3}\" in\n            8*)\n                php_prefix=\"/etc/php${php_base/./}/\"\n            ;;\n            * )\n                php_prefix=\"/etc/php${php_version:0:1}/\"\n            ;;\n        esac\n        modules_available=\"${php_prefix}/conf.available/\"\n    ;;\n    \"debian\" )\n        php_prefix=\"/etc/php/${php_base}/\"\n        modules_available=\"${php_prefix}/mods-available/\"\n    ;;\nesac\n\ndisable_module() {\n    if [ -n \"$1\" ]; then\n        case \"$1\" in\n            \"all\" )\n                echo \"**Disabling All Modules\"\n                for module in \"${modules_available}\"/*.ini ; do\n                    case \"${os}\" in\n                        \"alpine\" )\n                            rm -f \"${php_prefix}\"/conf.d/$(cat ${module} | grep \";priority\" | cut -d = -f 2)-$(basename ${module})\n                        ;;\n                        \"debian\" )\n                            silent phpdismod $(basename $module .ini)\n                        ;;\n                    esac\n                done\n            ;;\n            \"core\" )\n                php_env_modules_enabled=$(get_php_env_modules_enabled)\n                for module in $php_env_modules_enabled ; do\n                    if [ -f \"${modules_available}/${module}.ini\" ]; then\n                        echo \"Disabling ${module}\"\n                        case \"${os}\" in\n                            \"alpine\" )\n                                rm -f ${php_prefix}/conf.d/$(cat ${modules_available}/${module}.ini | grep \";priority\" | cut -d = -f 2)-${module}.ini\n                            ;;\n                            \"debian\" )\n                                silent phpdismod $(basename ${module} .ini)\n                                if [ \"${php_major_version}\" != \"8\" ] ; then phpdismod json ; fi\n                                if [[ \"$( ls -l ${php_prefix}/fpm/conf.d/*-opcache.ini |  wc -l )\" -ge 1 ]] ; then\n                                    rm -f \"$(ls ${php_prefix}/fpm/conf.d/*-opcache.ini | tail -1 )\"\n                                fi\n                                if [[ \"$( ls -l ${php_prefix}/cli/conf.d/*-opcache.ini |  wc -l )\" -ge 1 ]] ; then\n                                    rm -f \"$(ls ${php_prefix}/cli/conf.d/*-opcache.ini | tail -1 )\"\n                                fi\n                            ;;\n                        esac\n                        php_script_modules_disabled=\"${php_actual_modules_disabled} $(basename ${module} .ini)\"\n                    else\n                        echo \"[php-ext] WARN Requested disabling ${module} however it doesn't exist!\"\n                    fi\n                done\n            ;;\n            \"optional\" )\n                php_env_modules_enabled=$(get_php_env_modules_enabled)\n                echo \"** Disabling Optional Modules\"\n                for module in ${modules_available}/*.ini; do\n                    MATCH=0\n                    for plugin in $php_env_modules_enabled ; do\n                        if [ \"$(basename ${module} .ini)\" = \"${plugin}\" ] ; then\n                            (( MATCH+=1 ))\n                        fi\n                    done\n\n                    if [[ \"$MATCH\" -lt 1 ]] ; then\n                        echo \"Disabling $(basename $module .ini)\"\n                        case \"${os}\" in\n                            \"alpine\" )\n                                rm -f \"${php_prefix}\"conf.d/$(cat ${module} | grep \";priority\" | cut -d = -f 2)-$(basename ${module})\n                            ;;\n                            \"debian\" )\n                                silent phpdismod $(basename ${module} .ini)\n                            ;;\n                        esac\n                    fi\n                done\n            ;;\n            reset )\n                case \"${os}\" in\n                    \"alpine\" )\n                        rm -rf ${php_prefix}conf.d/*\n                    ;;\n                    \"debian\" )\n                        rm -rf ${php_prefix}/*/conf.d/*\n                    ;;\n                esac\n            ;;\n            * )\n                if [ -f \"${modules_available}/${1}.ini\" ]; then\n                    echo \"Disabling ${1}\"\n                        case \"${os}\" in\n                            \"alpine\" )\n                                rm -f ${php_prefix}conf.d/$(cat ${modules_available}/${1}.ini | grep \";priority\" | cut -d = -f 2)-$1.ini\n                            ;;\n                            \"debian\" )\n                                silent phpdismod ${1}\n                            ;;\n                        esac\n                else\n                    echo \"[php-ext] WARN Requested disabling '$1' module however it doesn't exist!\"\n                fi\n            ;;\n        esac\n    else\n       echo \"** Disable Module\"\n       echo \"Commands: all | core | optional | (modulename)\"\n    fi\n}\n\nenable_module () {\n    if [ -n \"${1}\" ]; then\n        case \"${1}\" in\n                \"all\" )\n                    echo \"[php-ext] Enabling All Modules\"\n                    for module in \"${modules_available}\"/*.ini; do\n                        echo \"[php-ext] Enabling ${module}\"\n                        case \"${os}\" in\n                            \"alpine\" )\n                                ln -sf \"${module}\" \"${php_prefix}\"/conf.d/$(cat \"${module}\" | grep \";priority\" | cut -d = -f 2)-$(basename \"${module}\")\n                            ;;\n                            \"debian\" )\n                                silent phpenmod $(basename \"${module}\" .ini)\n                            ;;\n                        esac\n                    done\n                ;;\n                \"core\" )\n                    php_env_modules_enabled=$(get_php_env_modules_enabled | sed \"/^json/d\")\n                    for module in ${php_env_modules_enabled} ; do\n                        if [ -f \"${modules_available}\"/\"${module}\".ini ]; then\n                            echo \"[php-ext] Enabling '$(basename \"${module}\" .ini)' module\"\n                            case \"${os}\" in\n                                \"alpine\" )\n                                    ln -sf \"${modules_available}/${module}.ini\" ${php_prefix}/conf.d/$(cat ${modules_available}/${module}.ini | grep \";priority\" | cut -d = -f 2)-${module}.ini\n                                    if [ \"${php_major_version}\" != \"8\" ] ; then\n                                        if [ -f \"${modules_available}/json.ini\" ]; then\n                                            ln -sf \"${modules_available}/json.ini\" ${php_prefix}/conf.d/$(cat ${modules_available}/json.ini | grep \";priority\" | cut -d = -f 2)-json.ini\n                                        fi\n                                    fi\n                                ;;\n                                \"debian\" )\n                                    silent phpenmod $(basename $module .ini)\n                                    if [ \"${php_major_version}\" != \"8\" ] ; then silent phpenmod json ; fi\n                                    if [[ \"$( ls -l ${php_prefix}/fpm/conf.d/*-opcache.ini |  wc -l )\" -gt 1 ]] ; then\n                                       rm -f \"$(ls ${php_prefix}/fpm/conf.d/*-opcache.ini | tail -1 )\"\n                                    fi\n                                    if [[ \"$( ls -l ${php_prefix}/cli/conf.d/*-opcache.ini |  wc -l )\" -gt 1 ]] ; then\n                                       rm -f \"$(ls ${php_prefix}/cli/conf.d/*-opcache.ini | tail -1 )\"\n                                    fi\n                                ;;\n                            esac\n                            php_script_modules_enabled=\"${php_actual_modules_enabled} $(basename $module .ini)\"\n                        else\n                            echo \"[php-ext] ERROR Requested enabling '$(basename $module .ini)' module however it doesn't exist!\"\n                        fi\n                    done\n                ;;\n                \"optional\" )\n                    php_env_modules_enabled=$(get_php_env_modules_enabled)\n                    echo \"** Activating Optional Modules\"\n                    for module in \"${modules_available}\"/*.ini; do\n                        if ! grep -w -i -q \"$(basename ${module} .ini)\" \"${php_env_modules_enabled}\"; then\n                            echo \"[php-ext] Enabling $(basename ${module} .ini)\"\n                            case \"${os}\" in\n                                \"alpine\" )\n                                    ln -sf \"${module}\" ${php_prefix}conf.d/$(cat ${module} | grep \";priority\" | cut -d = -f 2)-$(basename ${module})\n                                ;;\n                                \"debian\" )\n                                    silent phpenmod $(basename ${module} .ini)\n                                ;;\n                            esac\n                            php_script_modules_enabled=\"${php_actual_modules_enabled} $(basename ${module} .ini)\"\n                        fi\n                    done\n\n                php_env_modules_enabled=$(get_php_env_modules_enabled)\n                    echo \"** Activating Optional Modules\"\n                    for module in \"${modules_available}\"/*.ini; do\n                        MATCH=0\n                        for plugin in $php_env_modules_enabled ; do\n                            if [ \"$(basename ${module} .ini)\" = \"${plugin}\" ] ; then\n                                (( MATCH+=1 ))\n                            fi\n                        done\n\n                        if [[ \"$MATCH\" -lt 1 ]] ; then\n                            echo \"[php-ext] Enabling $(basename ${module} .ini)\"\n                            case \"${os}\" in\n                                \"alpine\" )\n                                    ln -sf \"${module}\" ${php_prefix}conf.d/$(cat ${module} | grep \";priority\" | cut -d = -f 2)-$(basename ${module})\n                                ;;\n                                \"debian\" )\n                                    silent phpdismod $(basename ${module} .ini)\n                                ;;\n                            esac\n                        fi\n                    done\n                ;;\n                * )\n                    if [ -f \"${modules_available}/$1.ini\" ]; then\n                        echo \"Enabling $1\"\n                        case \"${os}\" in\n                                \"alpine\" )\n                                    ln -sf \"${modules_available}/$1.ini\" ${php_prefix}conf.d/$(cat ${modules_available}/${1}.ini | grep \";priority\" | cut -d = -f 2)-$1.ini\n                                ;;\n                                \"debian\" )\n                                    silent phpenmod \"$1\"\n                                ;;\n                        esac\n\n                    else\n                        echo \"[php-ext] ERROR Requested enabling '${1}' module however it doesn't exist!\"\n                    fi\n                ;;\n        esac\n    else\n       echo \"** Enable Module\"\n       echo \"Commands: all | core | optional | (modulename)\"\n    fi\n}\n\ninfo() {\n    if [ -n \"${1}\" ]; then\n        case \"${1,,}\" in\n            \"base\" )\n                echo \"${php_base}\"\n            ;;\n            \"base_alt\" )\n                echo \"${php_base/./}\"\n            ;;\n            \"help\" )\n                echo \"Commands: base | modules_path | prefix | version\"\n            ;;\n            \"modules_path\" )\n                echo \"${modules_available}\"\n            ;;\n            \"prefix\" )\n                echo \"${php_prefix}\"\n            ;;\n            \"version\" )\n                echo \"${php_version}\"\n            ;;\n        esac\n    else\n        echo \"** Info\"\n        echo \"Commands: base | modules_path | prefix | version\"\n    fi\n}\n\nlist_module() {\n    if [ -n \"${1}\" ]; then\n        case \"${1,,}\" in\n            \"all\" )\n                echo \"[php-ext] Listing All Modules\"\n                for module in ${modules_available}/*.ini; do\n                    echo \"$(basename $module .ini)\"\n                done\n            ;;\n            \"core\"  )\n                echo \"[php-ext] Listing Core Modules\"\n                php_env_modules_enabled=$(get_php_env_modules_enabled)\n                for module in $php_env_modules_enabled ; do\n                    if [ -f \"${modules_available}/${module}.ini\" ]; then\n                        echo \"${module}\"\n                    else\n                        echo \"** ERROR: '${module}' module enabled but doesn't exist\"\n                    fi\n                done\n            ;;\n            \"optional\" )\n                echo \"[php-ext] Listing Optional Modules\"\n                php_env_modules_enabled=$(get_php_env_modules_enabled)\n\n                for module in ${modules_available}/*.ini; do\n                    MATCH=0\n                    for plugin in $php_env_modules_enabled ; do\n                        if [ \"$(basename ${module} .ini)\" = \"${plugin}\" ] ; then\n                            (( MATCH+=1 ))\n                        fi\n                    done\n\n                    if [[ \"$MATCH\" -lt 1 ]] ; then\n                        echo \"$(basename $module .ini)\"\n                    fi\n                done\n            ;;\n        esac\n    else\n       echo \"** List Modules\"\n       echo \"Commands: all | core | optional\"\n    fi\n}\n\ndisplay_help() {\n    cat <<EOF\n\n    PHP Module Tool - Use this to\n    Syntax: $(basename $0) <command> <argument>\n\n    Command: enable | disable | list | help\n       enable - Enable a module for usage\n       disable - Disable a mdule for usage\n       info - Get information about the PHP install\n       list - List available modules\n       help - This is it\n\n    Argument: all | core | optional | <module_name>\n       all - Every Module\n       core - Modules set via environment variable PHP_MODULE_ENABLE_*=TRUE\n       optional - All other modules not explicitly set with PHP_MODULE_ENABLE_*=TRUE\n       module_name - The PHP Extension name ie 'zip'\nEOF\n}\n\nprepare() {\n    case \"${os}\" in\n        \"alpine\" )\n            mkdir -p ${modules_available}\n            for module in ${php_prefix}/conf.d/*.ini; do\n                if [ ! -L \"${module}\" ] ; then\n                    ## Assign Priority 20 to filenames without prefix\n                    if ! [[ \"$(basename $module .ini)\" =~  ^[0-9][0-9] ]] ; then\n                        mv \"${module}\" \"$(dirname ${module})/20_$(basename ${module})\"\n                        module=\"$(dirname ${module})/20_$(basename ${module})\"\n                    fi\n                    ## Add Priority Comment into file for later use\n                    if ! grep -w -i -q \";priority\" \"$module\"; then\n                        echo \";priority=$(basename $module .ini | cut -d _ -f1)\" >> $module\n                        mv \"${module}\" \"${modules_available}\"/$(basename ${module} .ini | cut -c 4-).ini\n                    fi\n                fi\n            done\n        ;;\n    esac\n}\n\nget_php_env_modules_enabled() {\n    set -o posix; set | sort | grep \"^PHP_MODULE_ENABLE_.*=\" | grep -i TRUE | cut -d _ -f 4- | cut -d = -f 1 | tr A-Z a-z\n}\n\nsilent() {\n    ## Quiet down output\n    if [ \"${DEBUG_MODE}\" = \"true\" ] || [ \"${SHOW_OUTPUT,,}\" = \"true\" ] || [ \"${CONTAINER_LOG_LEVEL,,}\" = \"debug\" ] ;  then\n        \"$@\"\n    else\n        \"$@\" > /dev/null 2>&1\n    fi\n}\n\nif [ \"${PHP_MODULE_ENABLE_OPENSSL,,}\" = \"true\" ] && [ ! -f \"${modules_available}\"/openssl.ini ]; then\n    export PHP_MODULE_ENABLE_OPENSSL=FALSE\nfi\n\nif [ -n \"$1\" ] ; then\n    case \"${1,,}\" in\n        \"enable\" )\n            enable_module \"$2\"\n            if [[ \"$(pgrep -f 'php-fpm: master process')\" -ge \"1\" ]] ; then\n                pkill php-fpm\n            fi\n        ;;\n        \"disable\" )\n            disable_module \"$2\"\n            if [[ \"$(pgrep -f 'php-fpm: master process')\" -ge \"1\" ]] ; then\n                pkill php-fpm\n            fi\n        ;;\n        \"info\" )\n            info \"$2\"\n        ;;\n        \"list\" )\n            list_module \"$2\"\n        ;;\n        \"prepare\" )\n            prepare\n        ;;\n        \"help\" )\n            display_help \"$2\"\n        ;;\n    esac\nelse\n    echo \"PHP Module Tool\"\n    echo \"Commands: enable | disable | list | info | help\"\nfi\n"
  },
  {
    "path": "zabbix_templates/app-php_fpm.json",
    "content": "{\n    \"zabbix_export\": {\n        \"version\": \"5.4\",\n        \"date\": \"2021-12-09T00:36:45Z\",\n        \"groups\": [\n            {\n                \"uuid\": \"a571c0d144b14fd4a87a9d9b2aa9fcd6\",\n                \"name\": \"Templates/Applications\"\n            }\n        ],\n        \"templates\": [\n            {\n                \"uuid\": \"1cbda0970410425684135884d0cb7090\",\n                \"template\": \"PHP FPM\",\n                \"name\": \"PHP FPM\",\n                \"description\": \"Get PHP-FPM metrics using Zabbix agent running on Linux.\\n\\nThis template is meant to be used with https://github.com/nfrastack/container-nginx-php-fpm\",\n                \"groups\": [\n                    {\n                        \"name\": \"Templates/Applications\"\n                    }\n                ],\n                \"items\": [\n                    {\n                        \"uuid\": \"9ae9e2a8203a48a7a482ef6d6ae9886c\",\n                        \"name\": \"PHP-FPM: Accepted connections per second\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.conn_accepted.rate\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"description\": \"The number of accepted requests per second.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['accepted conn']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"CHANGE_PER_SECOND\",\n                                \"parameters\": [\n                                    \"\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"edc6b68194fe429facfb6b22425ff0d4\",\n                        \"name\": \"PHP-FPM: Listen queue\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.listen_queue\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The current number of connections that have been initiated, but not yet accepted.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['listen queue']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2ff9f072b06a4b56afb0e0f44b2c83a4\",\n                        \"name\": \"PHP-FPM: Listen queue, len\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.listen_queue_len\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"Size of the socket queue of pending connections.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['listen queue len']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2e0a543bee5a46c88085b2aba2f4976f\",\n                        \"name\": \"PHP-FPM: Listen queue, max\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.listen_queue_max\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The maximum number of requests in the queue of pending connections since this FPM pool has started.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['max listen queue']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2fabcd55c13449c29a48b70fdce77674\",\n                        \"name\": \"PHP-FPM: Queue usage\",\n                        \"type\": \"CALCULATED\",\n                        \"key\": \"php-fpm.listen_queue_usage\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"units\": \"%\",\n                        \"params\": \"last(//php-fpm.listen_queue)/(last(//php-fpm.listen_queue_len)+(last(//php-fpm.listen_queue_len)=0))*100\",\n                        \"description\": \"Queue utilization\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"412264f0e1174b7fb81b457dad1a745f\",\n                                \"expression\": \"min(/PHP FPM/php-fpm.listen_queue_usage,15m)  > {$PHP_FPM.QUEUE.WARN.MAX}\",\n                                \"name\": \"PHP-FPM: Queue utilization is high (over {$PHP_FPM.QUEUE.WARN.MAX}% for 15m)\",\n                                \"priority\": \"WARNING\",\n                                \"description\": \"The queue for this pool reached {$PHP_FPM.QUEUE.WARN.MAX}% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted.\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e9d89669cf53492a9d5ef7ff997e1a40\",\n                        \"name\": \"PHP-FPM: Max children reached\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.max_children\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The number of times that pm.max_children has been reached since the php-fpm pool started\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['max children reached']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"SIMPLE_CHANGE\",\n                                \"parameters\": [\n                                    \"\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"830e04be30f03e50ac0fa4783ecdc677\",\n                        \"name\": \"PHP-FPM: Pool name\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.name\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"CHAR\",\n                        \"description\": \"The name of current pool.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.pool\"\n                                ]\n                            },\n                            {\n                                \"type\": \"DISCARD_UNCHANGED_HEARTBEAT\",\n                                \"parameters\": [\n                                    \"3h\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"8ebee5fc8c853a96b34ed743e3dd0154\",\n                        \"name\": \"PHP-FPM: Processes, active\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_active\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The total number of active processes.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['active processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"11cfd028325232a58d61d9e83aee640b\",\n                        \"name\": \"PHP-FPM: Processes, idle\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_idle\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The total number of idle processes.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['idle processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3858218f90683bb19cbe27fc9aedf404\",\n                        \"name\": \"PHP-FPM: Processes, max active\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_max_active\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The highest value that 'active processes' has reached since the php-fpm server started.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['max active processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a79af6cf38ec35518055c64aa7f1f5a2\",\n                        \"name\": \"PHP-FPM: Processes, total\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_total\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The total number of server processes currently running.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['total processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5ab12fc9f4ef39e5bbf7b2c6a840879e\",\n                        \"name\": \"PHP-FPM: Process manager\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.process_manager\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"CHAR\",\n                        \"description\": \"The method used by the process manager to control the number of child processes for this pool.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['process manager']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"DISCARD_UNCHANGED_HEARTBEAT\",\n                                \"parameters\": [\n                                    \"3h\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"231e03bfb6e94f34b790576766244602\",\n                                \"expression\": \"last(/PHP FPM/php-fpm.process_manager,#1)<>last(/PHP FPM/php-fpm.process_manager,#2)\",\n                                \"name\": \"PHP-FPM: Manager  changed (new value received: {ITEM.VALUE})\",\n                                \"priority\": \"INFO\",\n                                \"description\": \"PHP-FPM manager changed. Ack to close.\",\n                                \"manual_close\": \"YES\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4d17b6d89ac93d0880eac6962ebf7347\",\n                        \"name\": \"PHP-FPM: Slow requests\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.slow_requests\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The number of requests that exceeded your request_slowlog_timeout value.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['slow requests']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"SIMPLE_CHANGE\",\n                                \"parameters\": [\n                                    \"\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"f30143d8e92f48aa8fedc2d28b8d7c70\",\n                                \"expression\": \"min(/PHP FPM/php-fpm.slow_requests,#3)>0\",\n                                \"name\": \"PHP-FPM: Detected slow requests\",\n                                \"priority\": \"WARNING\",\n                                \"description\": \"PHP-FPM detected slow request. A slow request means that it took more time to execute than expected (defined in the configuration of your pool).\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4e4d6eda8fbb4d32ba7f48fba5723473\",\n                        \"name\": \"PHP-FPM: Start time\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.start_time\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"unixtime\",\n                        \"description\": \"The time when this pool was started.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['start time']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2a19b306712a47939e70d3ec30e39b05\",\n                        \"name\": \"PHP-FPM: Uptime\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.uptime\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"s\",\n                        \"description\": \"How long has this pool been running.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['start since']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"bdf9962a3e2049a8aec000b037b94d60\",\n                                \"expression\": \"nodata(/PHP FPM/php-fpm.uptime,30m)=1\",\n                                \"name\": \"PHP-FPM: Failed to fetch info data (or no data for 30m)\",\n                                \"priority\": \"INFO\",\n                                \"description\": \"Zabbix has not received data for items for the last 30 minutes\",\n                                \"manual_close\": \"YES\",\n                                \"dependencies\": [\n                                    {\n                                        \"name\": \"PHP-FPM: Process is not running\",\n                                        \"expression\": \"last(/PHP FPM/proc.num[\\\"{$PHP_FPM.SERVICE_NAME}\\\"])=0\"\n                                    }\n                                ]\n                            },\n                            {\n                                \"uuid\": \"c6966a6c33f0452ab4fd112c9299e624\",\n                                \"expression\": \"last(/PHP FPM/php-fpm.uptime)<10m\",\n                                \"name\": \"PHP-FPM: has been restarted (uptime < 10m)\",\n                                \"priority\": \"INFO\",\n                                \"description\": \"Uptime is less than 10 minutes\",\n                                \"manual_close\": \"YES\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a709eaae52ad4128a139c618db6525d2\",\n                        \"name\": \"PHP-FPM: CPU utilization\",\n                        \"type\": \"ZABBIX_ACTIVE\",\n                        \"key\": \"proc.cpu.util[\\\"{$PHP_FPM.SERVICE_NAME}\\\"]\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"units\": \"%\",\n                        \"description\": \"Process CPU utilization percentage.\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ef771994ec9e482babf372d9f867d500\",\n                        \"name\": \"PHP-FPM: Memory usage, %\",\n                        \"type\": \"ZABBIX_ACTIVE\",\n                        \"key\": \"proc.mem[\\\"{$PHP_FPM.SERVICE_NAME}\\\",,,,pmem]\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"units\": \"%\",\n                        \"description\": \"Memory used percentage relative to total memory available.\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"f55a5ef29f864d0a8c1a325df2372f7c\",\n                        \"name\": \"PHP-FPM: Memory usage (rss)\",\n                        \"type\": \"ZABBIX_ACTIVE\",\n                        \"key\": \"proc.mem[\\\"{$PHP_FPM.SERVICE_NAME}\\\",,,,rss]\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"description\": \"Resident set size memory used by process in bytes.\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ab8dc0d1ce344fe8ae6a23716a168fbd\",\n                        \"name\": \"PHP-FPM: Number of processes running\",\n                        \"type\": \"ZABBIX_ACTIVE\",\n                        \"key\": \"proc.num[\\\"{$PHP_FPM.SERVICE_NAME}\\\"]\",\n                        \"history\": \"7d\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"21a03d0ada634632ae9089a2cf3b4d70\",\n                                \"expression\": \"last(/PHP FPM/proc.num[\\\"{$PHP_FPM.SERVICE_NAME}\\\"])=0\",\n                                \"name\": \"PHP-FPM: Process is not running\",\n                                \"priority\": \"HIGH\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"09ec73291f21417ab8f19f53fda3331f\",\n                        \"name\": \"PHP-FPM: Get status page\",\n                        \"type\": \"ZABBIX_ACTIVE\",\n                        \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\",\n                        \"history\": \"0\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"^[.\\\\s\\\\S]*({.+})\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"Zabbix raw items\"\n                            }\n                        ]\n                    }\n                ],\n                \"macros\": [\n                    {\n                        \"macro\": \"{$PHP_FPM.HOST}\",\n                        \"value\": \"localhost\",\n                        \"description\": \"Hostname or IP of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.PORT}\",\n                        \"value\": \"73\",\n                        \"description\": \"The port of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.SERVICE_NAME}\",\n                        \"value\": \"php-fpm\",\n                        \"description\": \"PHP-FPM process name\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.QUEUE.WARN.MAX}\",\n                        \"value\": \"80\",\n                        \"description\": \"The maximum PHP-FPM queue usage percent for trigger expression.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.STATUS.PAGE}\",\n                        \"value\": \"php-fpm_status\",\n                        \"description\": \"The path of PHP-FPM status page.\"\n                    }\n                ],\n                \"dashboards\": [\n                    {\n                        \"uuid\": \"aa710e8b45a14da582a2e8853a944b23\",\n                        \"name\": \"PHP-FPM\",\n                        \"pages\": [\n                            {\n                                \"widgets\": [\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Accepted Connections per second\",\n                                        \"y\": \"5\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Accepted Connections per second\",\n                                                    \"host\": \"PHP FPM\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"CPU Utilization\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: CPU Utilization\",\n                                                    \"host\": \"PHP FPM\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Memory Utilization\",\n                                        \"x\": \"12\",\n                                        \"width\": \"11\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Memory Utilization\",\n                                                    \"host\": \"PHP FPM\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Processes\",\n                                        \"x\": \"12\",\n                                        \"y\": \"5\",\n                                        \"width\": \"11\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Process\",\n                                                    \"host\": \"PHP FPM\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Queue\",\n                                        \"y\": \"10\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Queue\",\n                                                    \"host\": \"PHP FPM\"\n                                                }\n                                            }\n                                        ]\n                                    }\n                                ]\n                            }\n                        ]\n                    }\n                ],\n                \"valuemaps\": [\n                    {\n                        \"uuid\": \"1caa1e7c41e14c7492ab8112f33ea068\",\n                        \"name\": \"Service state\",\n                        \"mappings\": [\n                            {\n                                \"value\": \"0\",\n                                \"newvalue\": \"Down\"\n                            },\n                            {\n                                \"value\": \"1\",\n                                \"newvalue\": \"Up\"\n                            }\n                        ]\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"1cbda0970410435684135884d0cb7090\",\n                \"template\": \"PHP FPM - Passive\",\n                \"name\": \"PHP FPM - Passive\",\n                \"description\": \"Get PHP-FPM metrics using Zabbix agent running on Linux.\\n\\nThis template is meant to be used with https://github.com/tiredofit/docker-nginx-php-fpm\",\n                \"groups\": [\n                    {\n                        \"name\": \"Templates/Applications\"\n                    }\n                ],\n                \"items\": [\n                    {\n                        \"uuid\": \"9ae9e2a8003a48a7a482ef6d6ae9886c\",\n                        \"name\": \"PHP-FPM: Accepted connections per second\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.conn_accepted.rate\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"description\": \"The number of accepted requests per second.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['accepted conn']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"CHANGE_PER_SECOND\",\n                                \"parameters\": [\n                                    \"\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"edc6b68194fe499facfb6b22425ff0d4\",\n                        \"name\": \"PHP-FPM: Listen queue\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.listen_queue\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The current number of connections that have been initiated, but not yet accepted.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['listen queue']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"aff9f072b06a4b56afb0e0f44b2c83a4\",\n                        \"name\": \"PHP-FPM: Listen queue, len\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.listen_queue_len\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"Size of the socket queue of pending connections.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['listen queue len']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"de0a543bee5a46c88085b2aba2f4976f\",\n                        \"name\": \"PHP-FPM: Listen queue, max\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.listen_queue_max\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The maximum number of requests in the queue of pending connections since this FPM pool has started.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['max listen queue']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"dfabcd55c13449c29a48b70fdce77674\",\n                        \"name\": \"PHP-FPM: Queue usage\",\n                        \"type\": \"CALCULATED\",\n                        \"key\": \"php-fpm.listen_queue_usage\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"units\": \"%\",\n                        \"params\": \"last(//php-fpm.listen_queue)/(last(//php-fpm.listen_queue_len)+(last(//php-fpm.listen_queue_len)=0))*100\",\n                        \"description\": \"Queue utilization\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"a11264f0e1174b7fb81b457dad1a745f\",\n                                \"expression\": \"min(/PHP FPM - Passive/php-fpm.listen_queue_usage,15m)  > {$PHP_FPM.QUEUE.WARN.MAX}\",\n                                \"name\": \"PHP-FPM: Queue utilization is high (over {$PHP_FPM.QUEUE.WARN.MAX}% for 15m)\",\n                                \"priority\": \"WARNING\",\n                                \"description\": \"The queue for this pool reached {$PHP_FPM.QUEUE.WARN.MAX}% of its maximum capacity. Items in queue represent the current number of connections that have been initiated on this pool, but not yet accepted.\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e9d49669cf58492a9d5ef7ff997e1a40\",\n                        \"name\": \"PHP-FPM: Max children reached\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.max_children\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The number of times that pm.max_children has been reached since the php-fpm pool started\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['max children reached']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"SIMPLE_CHANGE\",\n                                \"parameters\": [\n                                    \"\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"830e04be30f04e50ac0fa4783ecdc677\",\n                        \"name\": \"PHP-FPM: Pool name\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.name\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"CHAR\",\n                        \"description\": \"The name of current pool.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.pool\"\n                                ]\n                            },\n                            {\n                                \"type\": \"DISCARD_UNCHANGED_HEARTBEAT\",\n                                \"parameters\": [\n                                    \"3h\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"8ebee5fc8c854a96b34ed743e3dd0154\",\n                        \"name\": \"PHP-FPM: Processes, active\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_active\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The total number of active processes.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['active processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"11cfd028325242a58d61d9e83aee640b\",\n                        \"name\": \"PHP-FPM: Processes, idle\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_idle\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The total number of idle processes.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['idle processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3858218f90684bb19cbe27fc9aedf404\",\n                        \"name\": \"PHP-FPM: Processes, max active\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_max_active\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The highest value that 'active processes' has reached since the php-fpm server started.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['max active processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a79af6cf38ec45518055c64aa7f1f5a2\",\n                        \"name\": \"PHP-FPM: Processes, total\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.processes_total\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The total number of server processes currently running.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['total processes']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5ab12fc9f4ef49e5bbf7b2c6a840879e\",\n                        \"name\": \"PHP-FPM: Process manager\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.process_manager\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"CHAR\",\n                        \"description\": \"The method used by the process manager to control the number of child processes for this pool.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['process manager']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"DISCARD_UNCHANGED_HEARTBEAT\",\n                                \"parameters\": [\n                                    \"3h\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"231e0fbfb6e94f34b790576766244602\",\n                                \"expression\": \"last(/PHP FPM - Passive/php-fpm.process_manager,#1)<>last(/PHP FPM - Passive/php-fpm.process_manager,#2)\",\n                                \"name\": \"PHP-FPM: Manager  changed (new value received: {ITEM.VALUE})\",\n                                \"priority\": \"INFO\",\n                                \"description\": \"PHP-FPM manager changed. Ack to close.\",\n                                \"manual_close\": \"YES\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4d17b6d89ac94d0880eac6962ebf7347\",\n                        \"name\": \"PHP-FPM: Slow requests\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.slow_requests\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"description\": \"The number of requests that exceeded your request_slowlog_timeout value.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['slow requests']\"\n                                ]\n                            },\n                            {\n                                \"type\": \"SIMPLE_CHANGE\",\n                                \"parameters\": [\n                                    \"\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"f30147d8e92f48aa8fedc2d28b8d7c70\",\n                                \"expression\": \"min(/PHP FPM - Passive/php-fpm.slow_requests,#3)>0\",\n                                \"name\": \"PHP-FPM: Detected slow requests\",\n                                \"priority\": \"WARNING\",\n                                \"description\": \"PHP-FPM detected slow request. A slow request means that it took more time to execute than expected (defined in the configuration of your pool).\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4e4d6eda8fbb4dd2ba7f48fba5723473\",\n                        \"name\": \"PHP-FPM: Start time\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.start_time\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"unixtime\",\n                        \"description\": \"The time when this pool was started.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['start time']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2a19b306712a47999e70d3ec30e39b05\",\n                        \"name\": \"PHP-FPM: Uptime\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php-fpm.uptime\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"s\",\n                        \"description\": \"How long has this pool been running.\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.['start since']\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"bdf9962aee2049a8aec000b037b94d60\",\n                                \"expression\": \"nodata(/PHP FPM - Passive/php-fpm.uptime,30m)=1\",\n                                \"name\": \"PHP-FPM: Failed to fetch info data (or no data for 30m)\",\n                                \"priority\": \"INFO\",\n                                \"description\": \"Zabbix has not received data for items for the last 30 minutes\",\n                                \"manual_close\": \"YES\",\n                                \"dependencies\": [\n                                    {\n                                        \"name\": \"PHP-FPM: Process is not running\",\n                                        \"expression\": \"last(/PHP FPM - Passive/proc.num[\\\"{$PHP_FPM.SERVICE_NAME}\\\"])=0\"\n                                    }\n                                ]\n                            },\n                            {\n                                \"uuid\": \"c6966a6c3ff0452ab4fd112c9299e624\",\n                                \"expression\": \"last(/PHP FPM - Passive/php-fpm.uptime)<10m\",\n                                \"name\": \"PHP-FPM: has been restarted (uptime < 10m)\",\n                                \"priority\": \"INFO\",\n                                \"description\": \"Uptime is less than 10 minutes\",\n                                \"manual_close\": \"YES\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a709eaae52ad4128a129c618db6525d2\",\n                        \"name\": \"PHP-FPM: CPU utilization\",\n                        \"key\": \"proc.cpu.util[\\\"{$PHP_FPM.SERVICE_NAME}\\\"]\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"units\": \"%\",\n                        \"description\": \"Process CPU utilization percentage.\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ef771994ec9e482babf872d9f867d500\",\n                        \"name\": \"PHP-FPM: Memory usage, %\",\n                        \"key\": \"proc.mem[\\\"{$PHP_FPM.SERVICE_NAME}\\\",,,,pmem]\",\n                        \"history\": \"7d\",\n                        \"value_type\": \"FLOAT\",\n                        \"units\": \"%\",\n                        \"description\": \"Memory used percentage relative to total memory available.\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"f55a5ef29f864d0a8c1af25df2372f7c\",\n                        \"name\": \"PHP-FPM: Memory usage (rss)\",\n                        \"key\": \"proc.mem[\\\"{$PHP_FPM.SERVICE_NAME}\\\",,,,rss]\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"description\": \"Resident set size memory used by process in bytes.\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ab8dc0d1ce344fe8ae6a22716a168fbd\",\n                        \"name\": \"PHP-FPM: Number of processes running\",\n                        \"key\": \"proc.num[\\\"{$PHP_FPM.SERVICE_NAME}\\\"]\",\n                        \"history\": \"7d\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP-FPM\"\n                            }\n                        ],\n                        \"triggers\": [\n                            {\n                                \"uuid\": \"21a03d0ada634602ae9089a2cf3b4d70\",\n                                \"expression\": \"last(/PHP FPM - Passive/proc.num[\\\"{$PHP_FPM.SERVICE_NAME}\\\"])=0\",\n                                \"name\": \"PHP-FPM: Process is not running\",\n                                \"priority\": \"HIGH\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"09ec73291f21417ab8f19f56fda3331f\",\n                        \"name\": \"PHP-FPM: Get status page\",\n                        \"key\": \"web.page.get[\\\"{$PHP_FPM.HOST}\\\",\\\"{$PHP_FPM.STATUS.PAGE}?json\\\",\\\"{$PHP_FPM.PORT}\\\"]\",\n                        \"history\": \"0\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"^[.\\\\s\\\\S]*({.+})\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"Zabbix raw items\"\n                            }\n                        ]\n                    }\n                ],\n                \"macros\": [\n                    {\n                        \"macro\": \"{$PHP_FPM.HOST}\",\n                        \"value\": \"localhost\",\n                        \"description\": \"Hostname or IP of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.PORT}\",\n                        \"value\": \"73\",\n                        \"description\": \"The port of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.SERVICE_NAME}\",\n                        \"value\": \"php-fpm\",\n                        \"description\": \"PHP-FPM process name\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.QUEUE.WARN.MAX}\",\n                        \"value\": \"80\",\n                        \"description\": \"The maximum PHP-FPM queue usage percent for trigger expression.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_FPM.STATUS.PAGE}\",\n                        \"value\": \"php-fpm_status\",\n                        \"description\": \"The path of PHP-FPM status page.\"\n                    }\n                ],\n                \"dashboards\": [\n                    {\n                        \"uuid\": \"aa710e8b45a14da582a2e8858a944b23\",\n                        \"name\": \"PHP-FPM\",\n                        \"pages\": [\n                            {\n                                \"widgets\": [\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Accepted Connections per second\",\n                                        \"y\": \"5\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Accepted Connections per second\",\n                                                    \"host\": \"PHP FPM - Passive\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"CPU Utilization\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: CPU Utilization\",\n                                                    \"host\": \"PHP FPM - Passive\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Memory Utilization\",\n                                        \"x\": \"12\",\n                                        \"width\": \"11\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Memory Utilization\",\n                                                    \"host\": \"PHP FPM - Passive\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Processes\",\n                                        \"x\": \"12\",\n                                        \"y\": \"5\",\n                                        \"width\": \"11\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Process\",\n                                                    \"host\": \"PHP FPM - Passive\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Queue\",\n                                        \"y\": \"10\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP-FPM: Queue\",\n                                                    \"host\": \"PHP FPM - Passive\"\n                                                }\n                                            }\n                                        ]\n                                    }\n                                ]\n                            }\n                        ]\n                    }\n                ],\n                \"valuemaps\": [\n                    {\n                        \"uuid\": \"1caa1e7c41e14c7492ab8112f93ea068\",\n                        \"name\": \"Service state\",\n                        \"mappings\": [\n                            {\n                                \"value\": \"0\",\n                                \"newvalue\": \"Down\"\n                            },\n                            {\n                                \"value\": \"1\",\n                                \"newvalue\": \"Up\"\n                            }\n                        ]\n                    }\n                ]\n            }\n        ],\n        \"graphs\": [\n            {\n                \"uuid\": \"aa8e71c9651440f9a516fec76a093506\",\n                \"name\": \"PHP-FPM: Accepted Connections per second\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.conn_accepted.rate\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"aa8e71c9651440f9a516fec76a093306\",\n                \"name\": \"PHP-FPM: Accepted Connections per second\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.conn_accepted.rate\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"61fba7cba7224337bfda7e4e0a9dc20c\",\n                \"name\": \"PHP-FPM: CPU Utilization\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"proc.cpu.util[\\\"{$PHP_FPM.SERVICE_NAME}\\\"]\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"61fba7cba7224337bfda7e4e0a9dc23c\",\n                \"name\": \"PHP-FPM: CPU Utilization\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"proc.cpu.util[\\\"{$PHP_FPM.SERVICE_NAME}\\\"]\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"217387d8e81747a2a1c01a3e04e742bc\",\n                \"name\": \"PHP-FPM: Memory Utilization\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"proc.mem[\\\"{$PHP_FPM.SERVICE_NAME}\\\",,,,rss]\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"217387d8e81747a2a1c01a3e04e742b3\",\n                \"name\": \"PHP-FPM: Memory Utilization\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"proc.mem[\\\"{$PHP_FPM.SERVICE_NAME}\\\",,,,rss]\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"36cd028132d94585877ad5726f0f9e3d\",\n                \"name\": \"PHP-FPM: Process\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.processes_max_active\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.processes_idle\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"3\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.processes_total\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"4\",\n                        \"color\": \"A54F10\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.processes_active\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"36cd028132d94585877ad5726f0f9e33\",\n                \"name\": \"PHP-FPM: Process\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.processes_max_active\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.processes_idle\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"3\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.processes_total\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"4\",\n                        \"color\": \"A54F10\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.processes_active\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"768a3e8aaa4741239887b55be5842f4a\",\n                \"name\": \"PHP-FPM: Queue\",\n                \"graph_items\": [\n                    {\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.listen_queue_len\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.listen_queue\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP FPM - Passive\",\n                            \"key\": \"php-fpm.listen_queue_max\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"768a3e8aaa4741239887b55be5842f43\",\n                \"name\": \"PHP-FPM: Queue\",\n                \"graph_items\": [\n                    {\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.listen_queue_len\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.listen_queue\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP FPM\",\n                            \"key\": \"php-fpm.listen_queue_max\"\n                        }\n                    }\n                ]\n            }\n        ]\n    }\n}"
  },
  {
    "path": "zabbix_templates/app-php_opcache.json",
    "content": "{\n    \"zabbix_export\": {\n        \"version\": \"5.4\",\n        \"date\": \"2021-12-11T00:34:20Z\",\n        \"groups\": [\n            {\n                \"uuid\": \"a571c0d144b14fd4a87a9d9b2aa9fcd6\",\n                \"name\": \"Templates/Applications\"\n            }\n        ],\n        \"templates\": [\n            {\n                \"uuid\": \"107256c64b64492cbf2fa9dfe4fd1f5b\",\n                \"template\": \"PHP OPcache\",\n                \"name\": \"PHP OPcache\",\n                \"description\": \"Get metrics from PHP OPcache\\n\\nThis is template has two external scripts that are required for data collection and this template is meant to be used specifically with https://github.com/nfrastack/container-nginx-php-fpm/\",\n                \"groups\": [\n                    {\n                        \"name\": \"Templates/Applications\"\n                    }\n                ],\n                \"items\": [\n                    {\n                        \"uuid\": \"e055c0039ead4794891fb0209f2280d1\",\n                        \"name\": \"PHP OPCache: Cache Full\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.cache_full\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.cache_full\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2740818a3960459ca0d520c5b0d4c0ec\",\n                        \"name\": \"PHP OPCache: Enabled\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.enable\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_enabled\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4291d9d5856a49d08c6f3b32d1bd74f7\",\n                        \"name\": \"PHP OPCache: Get Settings page\",\n                        \"type\": \"ZABBIX_ACTIVE\",\n                        \"key\": \"php.opcache.get_settings\",\n                        \"delay\": \"60m\",\n                        \"history\": \"1h\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"41a78d0f44ce4452a743118c4e8c2d75\",\n                        \"name\": \"PHP OPCache: Get Status page\",\n                        \"type\": \"ZABBIX_ACTIVE\",\n                        \"key\": \"php.opcache.get_status\",\n                        \"history\": \"1h\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"9a197a56d21d45c4871a170c37831262\",\n                        \"name\": \"PHP OPcache: Strings - Buffer Size\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.buffer_size\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.buffer_size\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e833494b18bb42079b76a6a86a552488\",\n                        \"name\": \"PHP OPcache: Strings - Free Memory\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.free_memory\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.free_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"0a6c4dc410014f138ff7e0cd8fc93ea0\",\n                        \"name\": \"PHP OPcache: Strings - Number of Strings\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.number_of_strings\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.number_of_strings\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3b6894702b6f49d4a2e1bd658d5f9b86\",\n                        \"name\": \"PHP OPcache: Strings - Used Memory\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.used_memory\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.used_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"30e0edc8ef9f4b02959c265c9a1a3829\",\n                        \"name\": \"PHP OPcache: JIT - Active\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.active\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.on\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"c0dc09d1dc0548dc8f95a988d1c921ad\",\n                        \"name\": \"PHP OPcache: JIT - Buffer Free\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.buffer_free\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.buffer_free\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e8b518a7a1694c208691051e721b7cbe\",\n                        \"name\": \"PHP OPcache: JIT - Buffer Size\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.buffer_size\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.buffer_size\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5598fcabe98e43dab8d4d46ab31f3a29\",\n                        \"name\": \"PHP OPcache: JIT - Enabled\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.enabled\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.enabled\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ef1cc6fafcf94f3687888aa7df83e618\",\n                        \"name\": \"PHP OPcache: JIT - Kind\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.kind\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.kind\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5132d763f3b846a2a024d9ecbe8828bc\",\n                        \"name\": \"PHP OPcache: JIT - Opt Flags\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.opt_flags\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.opt_flags\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"da33ec05038b4d9d80c7fe2bf43b819c\",\n                        \"name\": \"PHP OPcache: JIT - Opt Level\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.opt_level\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.opt_level\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a80b17f0bede47fba27dbf1d38ca87a2\",\n                        \"name\": \"PHP OPcache: Memory - Current Wasted Percentage\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.current_wasted_percentage\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"%\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.current_wasted_percentage\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"75bc757454b6421398b02e267b9e1e4c\",\n                        \"name\": \"PHP OPcache: Memory - Free\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.free\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.free_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"aea82eb0cb3d466881dd12910608b6c0\",\n                        \"name\": \"PHP OPcache: Memory - Used\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.used\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.used_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"8d9cef063e0743d9bc82c83c4342ef9d\",\n                        \"name\": \"PHP OPcache: Memory - Wasted\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.wasted\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.wasted_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"38f5af5d9ba341eeb5d9c6a92bb6bd5c\",\n                        \"name\": \"PHP OPCache: Restart in Progress\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.restart_in_progress\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.restart_in_progress\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"cb803e654d61482080b38285d74ed967\",\n                        \"name\": \"PHP OPCache: Restart Pending\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.restart_pending\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.restart_pending\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"61c7207bd8ef4b83ab1db49ad3ee2583\",\n                        \"name\": \"PHP OPcache: Settings - Force restart timeout\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.force_restart_timeout\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.force_restart_timeout: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4370a7da5c464999aafd7658ce6bfca3\",\n                        \"name\": \"PHP OPcache: Settings - Interned Strings Buffer\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.interned_strings_buffer\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.interned_strings_buffer: ([0-9]+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"36c6f1354c0545979e086ba48b794cfe\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Bisect limit\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.bisect_limit\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_bisect_limit: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5d8a690b083448a9b21a85139950f07a\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Blacklist root trace\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.blacklist_root_trace\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_blacllist_root_trace: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"8257da9363a64c8aa3d8a0b8156bcfe6\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Blacklist side trace\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.blacklist_side_trace\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_blacllist_side_trace: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"6851f74479664a9dba95dd10e18c71f9\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Buffer Size\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.buffer_size\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_buffer_size: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e3d61597950d4748aa0c64ec43114504\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Debug\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.debug\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_debug: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e80e6046c79440ffa7daecc1e01c632c\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Function\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_func\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_func: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"de3884cfc0dc429ab76fb49184998e19\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Loop\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_loop\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_loop: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"44a87776da8243d5b5b4b4afb404df12\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Return\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_return\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_return: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e7833e59e7cf4c1c867d234423afa600\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Side exit\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_side_exit\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_side_exit: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"b4c50903e3424582aea54630e91b2ed3\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max exit counters\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_exit_counters\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_exit_counters: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3557b329424a4f819216b1e73a8c4ea3\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max polymorphic calls\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_polymorphic_calls\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_polymorphic_calls: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"d2176e3749f5479089f66f1b5d12b5ae\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max recursive calls\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_recursive_calls\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_recursive_calls: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"083fad5c4ead448696236f898e4d251d\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max recursive returns\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_recursive_returns\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_recursive_returns: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"f1d4c8971788478481e0d9971fc4e69b\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max root traces\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_root_traces\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_root_traces: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"0fdd61819f3d43bcaff714c05f3b5a5f\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max side traces\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_side_traces\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_side_traces: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5d241ad9d87946f2ac72b446549fba20\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Prof thereshold\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.prof_threshold\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_prof_threshold: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"df6ae62d5114424cb19ca08b820efd60\",\n                        \"name\": \"PHP OPcache: Settings - Max Accelerated Files\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.max_accelerated_files\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.max_accelerated_files: ([0-9]+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"cc44a6d3dfcb45b1a98a39fad9ba5b15\",\n                        \"name\": \"PHP OPcache: Settings - Max Wasted Percentage\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.max_wasted_percentage\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"units\": \"%\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.max_wasted_percentage: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"7d1176c0035e4327ae2e94328d59d24a\",\n                        \"name\": \"PHP OPcache: Settings - Max Memory Consumption\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.memory_concumption\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.memoryconsumption: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"8288e49e710d4e4fb6f6d5dbfa4e5009\",\n                        \"name\": \"PHP OPcache: Settings - Optimization Level\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.optimization_level\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.optimization_level: ([0-9])\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"0abb97d92c8846489f94190217d8da74\",\n                        \"name\": \"PHP OPcache: Statistics - Blacklist - Misses\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.blacklist.misses\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.blacklist_misses\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"d2ca3078f7e34d0fb2e7af7a014daf1e\",\n                        \"name\": \"PHP OPcache: Statistics - Blacklist - Miss Ratio\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.blacklist.miss_ratio\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.blacklist_miss_ratio\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"87deb7ad46cd49f7903b0fe3af0360ea\",\n                        \"name\": \"PHP OPcache: Statistics - Hits\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.hits\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.hits\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"34da066361b446788e4996d02f76260a\",\n                        \"name\": \"PHP OPcache: Statistics - Last restart time\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.last_restart_time\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.last_restart_time\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"c72b08e3417b44fea8731a126f6f71ce\",\n                        \"name\": \"PHP OPcache: Statistics - Max Cached Keys\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.max_cached_keys\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.max_cached_keys\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"dd819ba8e03446cb9de5b2b5ff19538f\",\n                        \"name\": \"PHP OPcache: Statistics - Misses\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.misses\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.misses\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4bba5d178df4446883799cb6482dbbfb\",\n                        \"name\": \"PHP OPcache: Statistics - Cached Keys\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.num_cached_keys\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.num_cached_keys\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3d68ae85ae7b409f8cedecefad539657\",\n                        \"name\": \"PHP OPcache: Statistics - Cached Scripts\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.num_cached_scripts\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.num_cached_scripts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ba50648234914b388e092dd9aaf3d55b\",\n                        \"name\": \"PHP OPcache: Statistics - Hit Rate\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.opcache_hit_rate\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"%\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.opcache_hit_rate\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3dfe91ac4a5346008d23b17ee4d60ceb\",\n                        \"name\": \"PHP OPcache: Statistics - Restarts Hash\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.restarts.hash\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.hash_restarts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"97b6513c52dd46d0829b52926f7f7da9\",\n                        \"name\": \"PHP OPcache: Statistics - Restarts Manual\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.restarts.manual\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.manual_restarts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ed45c38fe00a4d6f9b0fd275563e371f\",\n                        \"name\": \"PHP OPcache: Statistics - Restarts OOM\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.restarts.oom\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.oom_restarts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2168fada222d4cfc970a33cc33c839c0\",\n                        \"name\": \"PHP OPcache: Statistics - Start Time\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.start_time\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"unixtime\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.start_time\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    }\n                ],\n                \"macros\": [\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.HOST}\",\n                        \"value\": \"localhost\",\n                        \"description\": \"Hostname or IP of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.PORT}\",\n                        \"value\": \"73\",\n                        \"description\": \"The port of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.SETTINGS.PAGE}\",\n                        \"value\": \"opcache-settings.php\",\n                        \"description\": \"The path of PHP Opcache settings page.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.STATUS.PAGE}\",\n                        \"value\": \"opcache-status.php\",\n                        \"description\": \"The path of PHP Opcache status page.\"\n                    }\n                ],\n                \"dashboards\": [\n                    {\n                        \"uuid\": \"d202fde7fb8b48a49be848448be9cb99\",\n                        \"name\": \"PHP OPcache\",\n                        \"pages\": [\n                            {\n                                \"widgets\": [\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Cache Performance\",\n                                        \"y\": \"5\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP OPcache: Cache Performance\",\n                                                    \"host\": \"PHP OPcache\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Memory Usage\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP OPcache: Memory usage\",\n                                                    \"host\": \"PHP OPcache\"\n                                                }\n                                            }\n                                        ]\n                                    }\n                                ]\n                            }\n                        ]\n                    }\n                ],\n                \"valuemaps\": [\n                    {\n                        \"uuid\": \"9c2f3a4faf85471b81bcbda493053fd7\",\n                        \"name\": \"Service state\",\n                        \"mappings\": [\n                            {\n                                \"value\": \"0\",\n                                \"newvalue\": \"Down\"\n                            },\n                            {\n                                \"value\": \"1\",\n                                \"newvalue\": \"Up\"\n                            }\n                        ]\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"cb967e0e98f84355918a6224f5b76a92\",\n                \"template\": \"PHP OPcache - Passive\",\n                \"name\": \"PHP OPcache - Passive\",\n                \"description\": \"Get metrics from PHP OPcache\\n\\nThis is template has two external scripts that are required for data collection and this template is meant to be used specifically with https://github.com/tiredofit/docker-nginx-php-fpm/\",\n                \"groups\": [\n                    {\n                        \"name\": \"Templates/Applications\"\n                    }\n                ],\n                \"items\": [\n                    {\n                        \"uuid\": \"354721b532cf4da9973b6140d32cb81c\",\n                        \"name\": \"PHP OPCache: Cache Full\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.cache_full\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.cache_full\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"55746db194794a81b725c0471f11dc5d\",\n                        \"name\": \"PHP OPCache: Enabled\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.enable\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_enabled\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"f71915f8aad444fc8f6e797762c6b0f6\",\n                        \"name\": \"PHP OPCache: Get Settings page\",\n                        \"key\": \"php.opcache.get_settings\",\n                        \"delay\": \"60m\",\n                        \"history\": \"1h\",\n                        \"trends\": \"0\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4b1859df5c064f8da6a158cc4ec9be85\",\n                        \"name\": \"PHP OPCache: Get Status page\",\n                        \"key\": \"php.opcache.get_status\",\n                        \"history\": \"1h\",\n                        \"trends\": \"0\",\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application\",\n                                \"value\": \"PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"687bebf7bd2c4ef1af569e69f7674830\",\n                        \"name\": \"PHP OPcache: Strings - Buffer Size\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.buffer_size\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.buffer_size\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"6d51956cf63b4e00a55a5ef39b3746e0\",\n                        \"name\": \"PHP OPcache: Strings - Free Memory\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.free_memory\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.free_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"b0cc779385c542a19ea069730d43f5a1\",\n                        \"name\": \"PHP OPcache: Strings - Number of Strings\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.number_of_strings\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.number_of_strings\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2a24e2f21b1d463b94f9f512549a14d4\",\n                        \"name\": \"PHP OPcache: Strings - Used Memory\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.interned_strings_usage.used_memory\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.interned_strings_usage.used_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4a09fe5de1684310bb133afb49c6339b\",\n                        \"name\": \"PHP OPcache: JIT - Active\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.active\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.on\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"21cfd80599b248eba2d133f24137cf3d\",\n                        \"name\": \"PHP OPcache: JIT - Buffer Free\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.buffer_free\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.buffer_free\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5fe61e41d22b4d289e74c8eaa062b401\",\n                        \"name\": \"PHP OPcache: JIT - Buffer Size\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.buffer_size\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.buffer_size\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"11c3efaa867a472487794eb4208d57d0\",\n                        \"name\": \"PHP OPcache: JIT - Enabled\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.enabled\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.enabled\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"d3bba88d62ca4d35a530fbbce502b0a7\",\n                        \"name\": \"PHP OPcache: JIT - Kind\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.kind\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.kind\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"93ed558dab494619bc0c34144677c94b\",\n                        \"name\": \"PHP OPcache: JIT - Opt Flags\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.opt_flags\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.opt_flags\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"d406c4f76c7e4f21916b3927eb84cea8\",\n                        \"name\": \"PHP OPcache: JIT - Opt Level\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.jit.opt_level\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.jit.opt_level\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"b5a4d449321e4681a8516e3b6b823819\",\n                        \"name\": \"PHP OPcache: Memory - Current Wasted Percentage\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.current_wasted_percentage\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"%\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.current_wasted_percentage\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"95ca2ae607f94e849c9bf46812f03e04\",\n                        \"name\": \"PHP OPcache: Memory - Free\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.free\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.free_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"05b466a2020d4dcca7a35948178057e8\",\n                        \"name\": \"PHP OPcache: Memory - Used\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.used\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.used_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2dd5014dd601478ab82a635d58260ba0\",\n                        \"name\": \"PHP OPcache: Memory - Wasted\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.memory.wasted\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.memory_usage.wasted_memory\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"d1c938c0ac6e4cdab59acbef45709555\",\n                        \"name\": \"PHP OPCache: Restart in Progress\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.restart_in_progress\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.restart_in_progress\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"8dfde828b514485baddadcb2e85f5f23\",\n                        \"name\": \"PHP OPCache: Restart Pending\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.restart_pending\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"trends\": \"0\",\n                        \"value_type\": \"TEXT\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.restart_pending\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"432df6cebf7c4374a953f9ac65ad3a79\",\n                        \"name\": \"PHP OPcache: Settings - Force restart timeout\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.force_restart_timeout\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.force_restart_timeout: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"24becfd2d8404460a66bee690249a111\",\n                        \"name\": \"PHP OPcache: Settings - Interned Strings Buffer\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.interned_strings_buffer\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.interned_strings_buffer: ([0-9]+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3d919cc3a13a4d06a5e391e2b0c45a80\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Bisect limit\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.bisect_limit\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_bisect_limit: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ce426544efed4070b761556a25cc7a2e\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Blacklist root trace\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.blacklist_root_trace\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_blacllist_root_trace: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ff15ed0448304c0f96412831f85909fe\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Blacklist side trace\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.blacklist_side_trace\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_blacllist_side_trace: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e0bd68d32295412fb48a14f9b23f5775\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Buffer Size\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.buffer_size\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_buffer_size: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"68e8178707c74d17b4c9b6208c6adf96\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Debug\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.debug\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_debug: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"ffb8fded19a34ec1a164c06a8871c0a0\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Function\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_func\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_func: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a54d683475cd459bab92da57b28ada68\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Loop\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_loop\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_loop: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"4946b7bfb0844746b5f2a995b85615d9\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Return\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_return\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_return: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"30258b27a6ad4530997df08571799e18\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Hot Side exit\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.hot_side_exit\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_hot_side_exit: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"2bc1f73679754c17b00038991ab32ec8\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max exit counters\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_exit_counters\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_exit_counters: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"40a99b2a744a456daa363954371b7d66\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max polymorphic calls\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_polymorphic_calls\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_polymorphic_calls: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"7cb16ac70cb84b1eb7c6caef507d6ee4\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max recursive calls\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_recursive_calls\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_recursive_calls: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"6c2d3caf26024c44b8d3484cffb4d86b\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max recursive returns\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_recursive_returns\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_recursive_returns: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a7a5ad99b6ae408481828dd67ddf1f29\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max root traces\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_root_traces\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_root_traces: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"e664cada78e04a78be8dc035de0284a1\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Max side traces\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.max_side_traces\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_max_side_traces: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"dd9958dfcf914d69b7acd125482ae3cc\",\n                        \"name\": \"PHP OPcache: Settings - JIT - Prof thereshold\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.jit.prof_threshold\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.jit_prof_threshold: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"c0b04afc02a948f3a2fe24833021c133\",\n                        \"name\": \"PHP OPcache: Settings - Max Accelerated Files\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.max_accelerated_files\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.max_accelerated_files: ([0-9]+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"25b17612c3bf476eb4347fc14841b60d\",\n                        \"name\": \"PHP OPcache: Settings - Max Wasted Percentage\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.max_wasted_percentage\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"units\": \"%\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.max_wasted_percentage: ([0-9].[0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"559242c796af4abd8a509135b9b74065\",\n                        \"name\": \"PHP OPcache: Settings - Max Memory Consumption\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.memory_concumption\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.memoryconsumption: ([0-9]+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"d1e7079ce01249b0ab705c3023957f21\",\n                        \"name\": \"PHP OPcache: Settings - Optimization Level\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.settings.optimization_level\",\n                        \"delay\": \"0\",\n                        \"history\": \"1d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"REGEX\",\n                                \"parameters\": [\n                                    \"opcache.optimization_level: ([0-9].+)\",\n                                    \"\\\\1\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_settings\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"fcefbd45acae4fa7a32cafc0df6895e4\",\n                        \"name\": \"PHP OPcache: Statistics - Blacklist - Misses\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.blacklist.misses\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.blacklist_misses\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"875a93fb9d8a476b97f6c39b8efd83a7\",\n                        \"name\": \"PHP OPcache: Statistics - Blacklist - Miss Ratio\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.blacklist.miss_ratio\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.blacklist_miss_ratio\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"41261e3fab904359b020ede9aa2abcc4\",\n                        \"name\": \"PHP OPcache: Statistics - Hits\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.hits\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.hits\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"0e3b89a9f3224130ae04a2fddb696b0d\",\n                        \"name\": \"PHP OPcache: Statistics - Last restart time\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.last_restart_time\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"B\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.last_restart_time\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"a3baefe6e47646f388de5fb9da44ac4a\",\n                        \"name\": \"PHP OPcache: Statistics - Max Cached Keys\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.max_cached_keys\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.max_cached_keys\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3eb42b18772f4883b9e4f1f9266dbdf2\",\n                        \"name\": \"PHP OPcache: Statistics - Misses\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.misses\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.misses\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"3810587a948c46779a40dd07e5f61903\",\n                        \"name\": \"PHP OPcache: Statistics - Cached Keys\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.num_cached_keys\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.num_cached_keys\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"7e43e4c690d44167a730a1ce4843ec82\",\n                        \"name\": \"PHP OPcache: Statistics - Cached Scripts\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.num_cached_scripts\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.num_cached_scripts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"0d7a23990dc14761836d45d842fe491f\",\n                        \"name\": \"PHP OPcache: Statistics - Hit Rate\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.opcache_hit_rate\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"%\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.opcache_hit_rate\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"884f7711fbe74d939e8e16b6adcae82b\",\n                        \"name\": \"PHP OPcache: Statistics - Restarts Hash\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.restarts.hash\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.hash_restarts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"faf7398988a047a5b4cb453e76f6fc12\",\n                        \"name\": \"PHP OPcache: Statistics - Restarts Manual\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.restarts.manual\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.manual_restarts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"5d650a9f967041879b1fdced081ca84d\",\n                        \"name\": \"PHP OPcache: Statistics - Restarts OOM\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.restarts.oom\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.oom_restarts\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    },\n                    {\n                        \"uuid\": \"16993fbdddfa47d6a7ec6613835997ec\",\n                        \"name\": \"PHP OPcache: Statistics - Start Time\",\n                        \"type\": \"DEPENDENT\",\n                        \"key\": \"php.opcache.statistics.start_time\",\n                        \"delay\": \"0\",\n                        \"history\": \"7d\",\n                        \"units\": \"unixtime\",\n                        \"preprocessing\": [\n                            {\n                                \"type\": \"JSONPATH\",\n                                \"parameters\": [\n                                    \"$.opcache_statistics.start_time\"\n                                ]\n                            }\n                        ],\n                        \"master_item\": {\n                            \"key\": \"php.opcache.get_status\"\n                        },\n                        \"tags\": [\n                            {\n                                \"tag\": \"Application: PHP OPcache\"\n                            }\n                        ]\n                    }\n                ],\n                \"macros\": [\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.HOST}\",\n                        \"value\": \"localhost\",\n                        \"description\": \"Hostname or IP of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.PORT}\",\n                        \"value\": \"73\",\n                        \"description\": \"The port of PHP-FPM status host or container.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.SETTINGS.PAGE}\",\n                        \"value\": \"opcache-settings.php\",\n                        \"description\": \"The path of PHP Opcache settings page.\"\n                    },\n                    {\n                        \"macro\": \"{$PHP_OPCACHE.STATUS.PAGE}\",\n                        \"value\": \"opcache-status.php\",\n                        \"description\": \"The path of PHP Opcache status page.\"\n                    }\n                ],\n                \"dashboards\": [\n                    {\n                        \"uuid\": \"a2d71f90369344f0ac3cb5e7eceeaf51\",\n                        \"name\": \"PHP OPcache\",\n                        \"pages\": [\n                            {\n                                \"widgets\": [\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Cache Performance\",\n                                        \"y\": \"5\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP OPcache: Cache Performance\",\n                                                    \"host\": \"PHP OPcache - Passive\"\n                                                }\n                                            }\n                                        ]\n                                    },\n                                    {\n                                        \"type\": \"GRAPH_CLASSIC\",\n                                        \"name\": \"Memory Usage\",\n                                        \"width\": \"12\",\n                                        \"height\": \"5\",\n                                        \"fields\": [\n                                            {\n                                                \"type\": \"GRAPH\",\n                                                \"name\": \"graphid\",\n                                                \"value\": {\n                                                    \"name\": \"PHP OPcache: Memory usage\",\n                                                    \"host\": \"PHP OPcache - Passive\"\n                                                }\n                                            }\n                                        ]\n                                    }\n                                ]\n                            }\n                        ]\n                    }\n                ],\n                \"valuemaps\": [\n                    {\n                        \"uuid\": \"1fd0f90d70ea47088d23aa0ac39e2864\",\n                        \"name\": \"Service state\",\n                        \"mappings\": [\n                            {\n                                \"value\": \"0\",\n                                \"newvalue\": \"Down\"\n                            },\n                            {\n                                \"value\": \"1\",\n                                \"newvalue\": \"Up\"\n                            }\n                        ]\n                    }\n                ]\n            }\n        ],\n        \"graphs\": [\n            {\n                \"uuid\": \"b20ded0f89b245a6948e3cf1b001a174\",\n                \"name\": \"PHP OPcache: Cached Values\",\n                \"show_work_period\": \"NO\",\n                \"show_triggers\": \"NO\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.statistics.num_cached_keys\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.statistics.num_cached_scripts\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"1973283a9b17455bb522ce2a0f3b649b\",\n                \"name\": \"PHP OPcache: Cached Values\",\n                \"show_work_period\": \"NO\",\n                \"show_triggers\": \"NO\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.statistics.num_cached_keys\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.statistics.num_cached_scripts\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"4adaefc51f5b43c79e297659004b0993\",\n                \"name\": \"PHP OPcache: Cache Performance\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.statistics.hits\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.statistics.opcache_hit_rate\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"3\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.statistics.misses\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"a271aa732bb0444b96ab88428e2a3270\",\n                \"name\": \"PHP OPcache: Cache Performance\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.statistics.hits\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"1A7C11\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.statistics.opcache_hit_rate\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"3\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.statistics.misses\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"2a26f27c44c54e3287eb82efc045c5e5\",\n                \"name\": \"PHP OPcache: Memory usage\",\n                \"type\": \"STACKED\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.memory.wasted\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.memory.used\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"3\",\n                        \"drawtype\": \"GRADIENT_LINE\",\n                        \"color\": \"00C800\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache\",\n                            \"key\": \"php.opcache.memory.free\"\n                        }\n                    }\n                ]\n            },\n            {\n                \"uuid\": \"4565f05f2d5e4e44a403d074dfcefb43\",\n                \"name\": \"PHP OPcache: Memory usage\",\n                \"type\": \"STACKED\",\n                \"graph_items\": [\n                    {\n                        \"sortorder\": \"1\",\n                        \"color\": \"2774A4\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.memory.wasted\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"2\",\n                        \"color\": \"F63100\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.memory.used\"\n                        }\n                    },\n                    {\n                        \"sortorder\": \"3\",\n                        \"drawtype\": \"GRADIENT_LINE\",\n                        \"color\": \"00C800\",\n                        \"item\": {\n                            \"host\": \"PHP OPcache - Passive\",\n                            \"key\": \"php.opcache.memory.free\"\n                        }\n                    }\n                ]\n            }\n        ]\n    }\n}"
  }
]