PHP code example of vendic / magento2-oh-dear-checks

1. Go to this page and download the library: Download vendic/magento2-oh-dear-checks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vendic / magento2-oh-dear-checks example snippets


    'ohdear' => [
        \Vendic\OhDear\Checks\Diskspace::class => [
            'max_percentage_used' => '86'
        ],
        \Vendic\OhDear\Checks\CpuLoad::class => [
            'max_load_last_minute' => 10,
            'max_load_last_five_minutes' => 8,
            'max_load_last_fifteen_minutes' => 6
        ],
        \Vendic\OhDear\Checks\DatabaseConnectionCount::class => [
            'failed_treshold' => 100,
            'warning_treshold' => 80
        ],
        \Vendic\OhDear\Checks\PhpFpmCount::class => [
            'failed_treshold' => 100,
            'warning_treshold' => 80
        ],
    ]

    'ohdear' => [
        'Vendic\\OhDear\\Checks\\CpuLoad' => [
            'enabled' => false
        ],
        'Vendic\\OhDear\\Checks\\Diskspace' => [
            'enabled' => false
        ],
        'Vendic\\OhDear\\Checks\\TwoFactorAuthentication' => [
             'enabled' => false
        ]
    ],

    'ohdear' => [
        \Vendic\OhDear\Checks\StoreFronts::class => [
            'enabled' => false,
            'excluded_stores' => ['store_code_one', 'store_code_two']
        ],
    ]
xml
    <type name="Vendic\OhDear\Api\CheckListInterface">
        <arguments>
            <argument name="checks" xsi:type="array">
                ...
                <item name="your_new_check" xsi:type="object">Vendic\OhDear\Checks\YourNewCheck</item>
                ...
            </argument>
        </arguments>
    </type>