PHPackages                             akondas/symfony-actuator-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. akondas/symfony-actuator-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

akondas/symfony-actuator-bundle
===============================

Production-ready features for your Symfony application

0.1.0(5y ago)65.8k1[2 PRs](https://github.com/akondas/symfony-actuator-bundle/pulls)MITPHPPHP ^7.4 || ^8.0

Since Jan 31Pushed 3y ago2 watchersCompare

[ Source](https://github.com/akondas/symfony-actuator-bundle)[ Packagist](https://packagist.org/packages/akondas/symfony-actuator-bundle)[ RSS](/packages/akondas-symfony-actuator-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

SymfonyActuatorBundle
=====================

[](#symfonyactuatorbundle)

[![Minimum PHP Version](https://camo.githubusercontent.com/0e9ac047546796cfdbe1423d1f4d91c8f37d2fbb11614a7900bb7686aaa5401f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e342d3838393242462e737667)](https://php.net/)

Production-ready features for your Symfony application. Actuator endpoints let you monitor and interact with your application

Features
--------

[](#features)

- REST API endpoints (`/api/actuator`)
- UI console (not implemented)

Endpoints
---------

[](#endpoints)

- **/health** (`components` in progress)

    ```
    {
      "status": "up"
    }
    ```
- **/info**

    ```
    {
      "git": {
        "branch": "actuator",
        "commit": "6c01dce07274c6fddfd58610cf5fe14964689edd"
      },
      "php": {
        "version": "7.4.3",
        "architecture": 64,
        "intlLocale": "en",
        "timezone": "Europe/Berlin",
        "xdebugEnabled": false,
        "apcuEnabled": false,
        "opCacheEnabled": true
      },
      "symfony": {
        "version": "5.2.2",
        "lts": false,
        "environment": "dev",
        "endOfMaintenance": "July 2021",
        "endOfLife": "July 2021",
        "bundles": {
          "FrameworkBundle": "Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle",
          "SensioFrameworkExtraBundle": "Sensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle",
          "TwigBundle": "Symfony\\Bundle\\TwigBundle\\TwigBundle",
          "MonologBundle": "Symfony\\Bundle\\MonologBundle\\MonologBundle",
          "DoctrineBundle": "Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle",
          "DoctrineMigrationsBundle": "Doctrine\\Bundle\\MigrationsBundle\\DoctrineMigrationsBundle",
          "SecurityBundle": "Symfony\\Bundle\\SecurityBundle\\SecurityBundle",
          "ActuatorBundle": "Akondas\\ActuatorBundle\\ActuatorBundle"
        }
      },
      "database": {
        "default": {
          "type": "stgreSQL100",
          "database": "app",
          "driver": "Symfony\\Bridge\\Doctrine\\Middleware\\Debug\\Driver"
        }
      }
    }
    ```

Install
-------

[](#install)

```
composer require akondas/symfony-actuator-bundle
```

Add `ActuatorBundle` to `config/bundles.php`

```
Akondas\ActuatorBundle\ActuatorBundle::class => ['all' => true]
```

Add `actuator.yaml` to `config/routes` directory (you can change prefix):

```
web_profiler_wdt:
  resource: '@ActuatorBundle/Resources/config/routing.yaml'
  prefix: /api/actuator
```

Security
--------

[](#security)

⚠️Be aware that this bundle provides information and functionalities that may be potentially dangerous for your application.

Use the built-in [symfony/security](https://symfony.com/doc/current/security.html) component to secure api.

Example configuration (`security.yaml`) for Basic Authentication:

```
security:
    providers:
        in_memory:
            memory:
                users:
                    admin:
                        password: 'password'
                        roles: 'ROLE_ACTUATOR'
    firewalls:
        actuator:
            http_basic: ~
    access_control:
        - { path: ^/api/actuator, roles: ROLE_ACTUATOR }
    encoders:
        Symfony\Component\Security\Core\User\User: plaintext
```

Extending
---------

[](#extending)

### Health indicator

[](#health-indicator)

You can write your own health indicator and implement your own logic to determine the state of your application. To do so, you have to implement the interface `HealthIndicator` and tag your service with the tag `akondas.health_indicator`.

So for example, add following class under `src/Health/CustomHealthIndicator.php`:

```
