Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Create a tagged `pimcore.monitoring.check` service and implement the `CheckInter

## Available Checks
- Pimcore version and revision
- PHP (version, memory_limit and more)
- Kernel (environment, debug)
- Installed Bundles
- Installed AreaBricks
- Available Users
Expand Down
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Upgrade Notes

## 4.2.0
- [FEATURE] New Check Service: PHP Version / Some runtime configuration flags
- [FEATURE] New Check Service: Kernel Environment and Debug state

## 4.1.0
- [LICENSE] Dual-License with GPL and Dachcom Commercial License (DCL) added

Expand Down
36 changes: 36 additions & 0 deletions src/Check/KernelCheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace MonitoringBundle\Check;

use Symfony\Component\HttpKernel\KernelInterface;

class KernelCheck implements CheckInterface
{
public function __construct(protected KernelInterface $kernel)
{
}

public function getCheckReportIdentifier(): string
{
return 'kernel';
}

public function getCheckReport(): array
{
return [
'environment' => $this->kernel->getEnvironment(),
'debug' => $this->kernel->isDebug(),
];
}
}
33 changes: 33 additions & 0 deletions src/Check/PhpCheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/*
* This source file is available under two different licenses:
* - GNU General Public License version 3 (GPLv3)
* - DACHCOM Commercial License (DCL)
* Full copyright and license information is available in
* LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) DACHCOM.DIGITAL AG (https://www.dachcom-digital.com)
* @license GPLv3 and DCL
*/

namespace MonitoringBundle\Check;

class PhpCheck implements CheckInterface
{
public function getCheckReportIdentifier(): string
{
return 'php';
}

public function getCheckReport(): array
{
return [
'version' => PHP_VERSION,
'memory_limit' => ini_get('memory_limit'),
'max_execution_time' => ini_get('max_execution_time'),
'upload_max_filesize' => ini_get('upload_max_filesize'),
'post_max_size' => ini_get('post_max_size'),
];
}
}