Skip to content
Snippets Groups Projects
Select Git revision
  • 9ecca240ba912bdf6bd9db6edb730f3e2556765d
  • master default protected
  • Legacy_Php7
3 results

index.php

Blame
  • index.php 1.02 KiB
    <?php
    
    require_once('appmonitor-client.class.php');
    $oMonitor = new appmonitor();
    
    $oMonitor->addCheck(
            array(
                "name" => "simple",
                "description" => "Very simple test",
                "check" => array(
                    "function" => "Simple",
                    "params" => array(
                        "result" => RESULT_OK,
                        "value" => "The appmonitor client is reachable.",
                    ),
                ),
            )
    );
    
    
    require_once '../../config/inc_projects_config.php';
    $sSqlitefile=$aConfig['dataDir'].'/database/logs.db';
    $oMonitor->addCheck(
        array(
            "name" => "Sqlite DB for action logs",
            "description" => "Connect sqlite db ". basename($sSqlitefile),
            "check" => array(
                "function" => "SqliteConnect",
                "params" => array(
                    "db"=>$sSqlitefile
                ),
            ),
        )
    );
    
    
    // Gesamt-Ergebnis - ohne Param=aut. max. Wert nehmen
    $oMonitor->setResult();
    
    // Ausgabe
    $oMonitor->render();