Beispiel #1
0
    }
    $alt = "{$risk} " . _("metric/threshold");
    return array($img, $alt);
}
$conf_threshold = $conf->get_conf('threshold');
if ($date_range != null) {
    $date_from = $date_range['date_from'];
    $date_to = preg_match("/^\\d+\\-\\d+\\-\\d+\$/", $date_to) ? $date_to . " 23:59:59" : $date_to;
    $date_range['date_to'] = $date_to;
} else {
    $date_from = $date_range['date_from'] = strftime("%Y-%m-%d %H:%M:%S", time() - 24 * 60 * 60);
    $date_to = $date_range['date_to'] = strftime("%Y-%m-%d %H:%M:%S", time());
}
// Get service LEVEL
list($level, $levelgr) = html_service_level($conn, $host, $date_range);
list($score, $alt) = global_score($conn, $host);
?>

<script type="text/javascript">$("#pbar").progressBar(30);$("#progressText").html('<?php 
echo _("Loading");
?>
 <strong><?php 
echo _("SIEM Events");
?>
</strong>...');</script>

<?php 
ob_flush();
flush();
usleep(500000);
// Get SIM Events
Beispiel #2
0
    //$incident_list = Incident::get_list($conn, "ORDER BY priority DESC");
    $incident_list = Incident::search($conn, array("status" => "Open"), "priority", "DESC", 1, 1);
    $incident_max_priority = $incident_list[0] ? $incident_list[0]->get_priority() : "-";
    $incident_max_priority_id = $incident_list[0] ? $incident_list[0]->get_id() : "0";
    // Get unresolved ALARMS
    $unresolved_alarms = Alarm::get_count($conn);
    list($alarm_date, $alarm_date_id) = Alarm::get_max_byfield($conn, "timestamp");
    list($alarm_max_risk, $alarm_max_risk_id) = Alarm::get_max_byfield($conn, "risk");
    if ($alarm_max_risk_id == "") {
        $alarm_max_risk_id = 0;
        $alarm_max_risk = "-";
    }
    // Get service LEVEL
    //global $conn, $conf, $user, $range, $rrd_start;
    list($level, $levelgr) = html_service_level($conn);
    list($score, $alt) = global_score($conn);
    //
    list($siem, $events) = get_siem_events($conn, date("Y-m-d"));
    $i = 0;
    foreach ($siem as $p) {
        $plot .= "[" . $i++ . "," . $p["num_events"] . "],";
    }
    $i = 0;
    foreach ($siem as $p) {
        $legend .= "[" . $i++ . ",'" . ($i % 2 == 0 ? $p["intervalo"] . "h" : "") . "'],";
    }
    $data_pie = top_siem_events($conn, $NUM_HOSTS);
    ?>
<table cellpadding='0' cellspacing='0' border='0' align="center" width='99%'>
<tr>
<td class="canvas">