Download the PHP package worlddirect/healthcheck without Composer

On this page you can find all versions of the php package worlddirect/healthcheck. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package healthcheck

TYPO3 Extension: Healthcheck

TYPO3

A comprehensive health monitoring extension for TYPO3 CMS that provides automated system checks and monitoring capabilities.

Table of Contents

Features

Requirements

Installation

Via Composer (recommended)

Activation

After installation, activate the extension in the TYPO3 Extension Manager or via CLI:

Configuration

Extension Configuration

Configure the extension through the TYPO3 Extension Manager or by editing your site's configuration.

Security Settings

Setting Description Default Required
pathSegment The URL path segment used to access the healthcheck (e.g., "healthcheck") healthcheck Yes
trustedHostsPattern Regular expression pattern defining which hosts can access the healthcheck. Use .* to allow all hosts or ^(localhost\|monitoring\.example\.com)$ (empty) Yes
allowedIps Comma-separated list of IP addresses allowed to access. Use * to allow all IPs * No

Access Token (optional)

If your installation is not protected by an internal-only ingress, you can additionally require a secret to be passed as GET parameter. The protection is opt-in: it is only active when accessToken is not empty. Once a token is configured it is mandatory for /{pathSegment}, /{pathSegment}-pause/ and /{pathSegment}-play/. Requests without a valid token receive an empty 404 Not Found, which hides the existence of the endpoint from scanners.

Setting Description Default
accessToken The secret required to access the healthcheck. Empty value disables the token protection (empty)
accessTokenParam Name of the GET parameter carrying the token token
accessTokenMaxAttempts Failed attempts per IP address before it is locked out. Set to 0 to disable the rate limiting 5
accessTokenLockoutPeriod Seconds an IP address stays locked out after too many failed attempts 900

Usage:

The trailing slash is optional, https://example.com/healthcheck?token=<secret> and https://example.com/healthcheck/json?token=<secret> work as well.

Generate a token:

Keep the secret out of Git by setting it from an environment variable in config/system/additional.php (TYPO3 v12+) respectively AdditionalConfiguration.php:

Warning: GET parameters end up in webserver access logs, proxy logs and possibly Referer headers. Consider excluding the healthcheck path from access logging or masking the query string.

Note: The rate limiting uses the cache healthcheck_tokenattempts, backed by the database so that the counter is shared across all containers/pods. Run the database analyzer in the Install Tool after enabling the feature so the table cache_healthcheck_tokenattempts gets created (cf_healthcheck_tokenattempts before TYPO3 v14), or on the CLI:

If the cache is unavailable the rate limiting is silently skipped, but the token itself is still enforced.

Note: The counter is keyed by the client IP address. Behind a reverse proxy make sure $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'] and reverseProxyHeaderMultiValue are configured, otherwise all requests share one counter and a single attacker could lock out your monitoring. Set accessTokenMaxAttempts = 0 if you cannot resolve real client IPs.

Verifying the rate limiting
  1. Call /healthcheck?token=<wrong> as often as configured in accessTokenMaxAttempts. Every request answers with an empty 404.
  2. Call /healthcheck?token=<secret> with the correct token — it now also answers with an empty 404, because the client is locked out.
  3. Clear the lockout with vendor/bin/typo3 cache:flush --group system (or Flush system caches in the backend), or wait for accessTokenLockoutPeriod seconds.

Use a private/incognito window, otherwise the browser may serve the cached 404 instead of sending a new request.

Display Settings

Setting Description Default
logoImage Path to the logo image displayed in HTML output EXT:healthcheck/Resources/Public/Icons/healthreport.png
backgroundImage Path to the background image for HTML output EXT:healthcheck/Resources/Public/Images/background.png
enableBuildinfo Show build information (requires buildinfo extension) 1 (enabled)
enableAdditionalInfo Show additional information like IP address and timestamp 1 (enabled)
enableDebug Enable debug mode to show detailed error messages 0 (disabled)

Probe-Specific Settings

Setting Description Default
schedulerMaxMinutesLate Maximum minutes a scheduler task can be late before failing 10
solrMaxErrorCount Maximum number of Solr indexing errors before probe fails 50

TypoScript Configuration

Additional settings can be configured via TypoScript:

Probes

Probes are the heart of the healthcheck system. Each probe checks a specific aspect of your TYPO3 installation and reports whether it's functioning correctly.

Core Probes

These probes are always available and check fundamental TYPO3 system components.

Database Connection

Class: DatabaseProbe
Title: Database Connection
Always Active: Yes

Checks if the TYPO3 application can connect to all configured databases.

What it checks:

Fails when:


Cache System

Class: CacheProbe
Title: Cache System
Always Active: Yes (except in Development context)

Verifies that all configured caches are writable and functioning correctly.

What it checks:

Fails when:

Note: This probe is automatically disabled in Development context as development systems often have caching disabled.


Extension-Specific Probes

These probes require specific TYPO3 extensions to be installed and activated.

Scheduler Tasks

Class: SchedulerProbe
Title: Scheduler Tasks
Requires: EXT:scheduler

Monitors TYPO3 scheduler tasks for failures and delays.

What it checks:

Fails when:

Configuration: Set schedulerMaxMinutesLate in extension configuration to adjust delay tolerance (default: 10 minutes).


Solr Core Connectivity

Class: SolrCoreProbe
Title: Solr Core Connectivity
Requires: EXT:solr

Tests connectivity to all configured Solr cores across all site languages.

What it checks:

Fails when:

Configuration: Reads Solr configuration from site configuration (host, port, path, core, scheme).


Solr Index Errors

Class: SolrIndexErrorProbe
Title: Solr Index Errors
Requires: EXT:solr

Monitors the Solr indexing queue for errors that prevent content from being indexed.

What it checks:

Fails when:

Configuration: Set solrMaxErrorCount in extension configuration to adjust error tolerance (default: 50 errors).


External Import

Class: ExternalImportProbe
Title: External Import
Requires: EXT:external_import

Checks the status of the latest External Import extension log entry to detect import failures.

What it checks:

Fails when:


Mailjet Email Delivery

Class: MailjetDeliveryProbe
Title: Mailjet Delivery Success Rate
Requires: EXT:mailjet

Monitors email delivery success rate from the Mailjet extension, analyzing emails sent in the last 24 hours.

What it checks:

Behavior:

Fails when:

Database: Queries tx_mailjet_domain_model_emaillog table for delivery statistics.

Thresholds:


SAML Metadata Expiration

Class: SamlMetadataExpirationProbe
Title: SAML Metadata Expiration Probe
Requires: SimpleSAMLphp with metarefresh module

Checks SimpleSAMLphp SAML metadata expiration to ensure federation metadata remains valid.

What it checks:

Fails when:

Configuration:

Requirements:

Note: This probe automatically activates only if SimpleSAMLphp metarefresh configuration is detected with a valid expiration timestamp.


Creating Custom Probes

You can easily create your own probes to check specific aspects of your TYPO3 installation.

Step 1: Implement the ProbeInterface

Create a new PHP class that implements the ProbeInterface:

Step 2: Register Your Probe

Register your custom probe in Configuration/Services.yaml:

Required Methods

Your probe must implement these three methods:

  1. useProbe(): bool - Returns whether this probe should be executed. Use this to check dependencies like required extensions.

  2. getTitle(): string - Returns a human-readable title for display in the HTML output.

  3. run(): void - Contains the actual probe logic. Always call parent::start() at the beginning and parent::stop() at the end.

Important Guidelines

Output Formats

The healthcheck can return results in different formats depending on your needs.

HTML Output

Access: /healthcheck/html or /healthcheck/
Content-Type: text/html

A beautiful, responsive HTML interface built with Bootstrap 5 that provides:

Perfect for:


JSON Output

Access: /healthcheck/json
Content-Type: application/json

Returns a structured JSON representation of all probe results.

Example Response:

Perfect for:

Example Response:


Creating Custom Outputs

You can create custom output formats for specialized needs.

Step 1: Implement the OutputInterface

Step 2: Register Your Output

Register in Configuration/Services.yaml:

Step 3: Access Your Output

Access via: /healthcheck/custom (using the lowercase class name without "Output" suffix)


Accessing the Healthcheck

The healthcheck is accessed through a special URL structure that uses TYPO3 middleware.

URL Structure

Components:

  1. pathSegment: The base path configured in extension settings (default: healthcheck)
  2. output: The output format to use (optional, defaults to html)

Examples

URL Description
https://example.com/healthcheck/ HTML output (default)
https://example.com/healthcheck HTML output, trailing slash is optional
https://example.com/healthcheck/html/ HTML output (explicit)
https://example.com/healthcheck/json/ JSON output
https://example.com/mycheck/html/ HTML output with custom pathSegment
https://example.com/healthcheck/json/?token=<secret> JSON output with configured access token
https://example.com/healthcheck?token=<secret> HTML output with configured access token

Security Configuration

Before accessing the healthcheck, ensure proper configuration:

  1. trustedHostsPattern: Set to .* for all hosts or a specific pattern like ^(localhost|monitoring\.example\.com)$
  2. allowedIps: Configure if you want to restrict by IP address (default: * allows all)
  3. accessToken: Optional secret required as GET parameter, see Access Token

Important: Without proper configuration, access will be denied with error messages indicating the issue.

Pausing Probes

During maintenance or when dealing with known issues, temporarily pause individual probes to prevent false alerts.

How Pausing Works

When a probe is paused:

Pause Controls

HTML Interface

Each probe has pause/play buttons:

Visual indicators show probe status:

API Endpoints

Pause/play probes programmatically. When an accessToken is configured it has to be appended to these URLs as well (e.g. &token=<secret>).

Pause a probe:

Resume a probe:

Response:

Use Cases

Technical Details: Paused probes are stored in tx_healthcheck_domain_model_probe_pause table with probe class name and timestamp.

HTTP Status Codes

The healthcheck uses HTTP status codes to indicate system health, making it easy for monitoring tools to detect issues.

Status Code Meaning When Returned
200 OK System healthy All probes passed successfully
503 Service Unavailable System has issues At least one probe failed
403 Forbidden Access denied IP or host not allowed
404 Not Found Invalid output Requested output format doesn't exist

Monitoring Integration Examples

PRTG

Use HTTP sensor checking for status code 200

Nagios

Uptime Robot

Configure HTTP(s) monitoring with keyword checking

Custom Script

Troubleshooting

Access Denied (403 Forbidden)

Problem: Cannot access healthcheck endpoint

Solutions:

Empty 404 Not Found

Problem: The healthcheck endpoint returns an empty 404 although the path segment is correct

Solutions:

Rate Limiting Has No Effect

Problem: A client is never locked out, no matter how many wrong tokens are sent

Solutions:

Probe Always Failing

Problem: A specific probe consistently fails

Solutions:

JSON Output Not Working

Problem: JSON endpoint returns 404

Solutions:

Probes Not Running

Problem: No probes appear in output

Solutions:

Tests

The extension ships with a PHPUnit test suite (unit + functional tests via typo3/testing-framework). See documentation/tests.md for a full description of what is tested and how to run the tests.

Support

License

This extension is licensed under GPL-2.0-only. See LICENSE file for details.

Credits

Developed and maintained by Klaus Hörmann-Engl at World-Direct eBusiness solutions GmbH.

Inspiration

Icons and Images


Happy Monitoring! 🏥✨


All versions of healthcheck with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1 || ^8.2 || ^8.3 || ^8.4
typo3/cms-core Version ^11.5 || ^12 || ^13 || ^14
typo3/cms-fluid Version ^11.5 || ^12 || ^13 || ^14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package worlddirect/healthcheck contains the following files

Loading the files please wait ...