Esempio n. 1
0
                                    <td class='<?php 
            echo $td_class;
            ?>
 td_swap'>
                                        <?php 
            echo Avc_utilities::create_vprogress_bar('swap_used_vpbar_' . $system_id, '', '17px', '35px', $vp_percent, $vp_class);
            ?>
                                    </td>

                                    <td class='<?php 
            echo $td_class;
            ?>
 td_cpu'>
                                        <?php 
            echo Avc_utilities::create_vprogress_bar('cpu_vpbar_' . $system_id, '', '17px', '35px', $vp_percent, $vp_class);
            ?>
                                    </td>
                                    
                                    <td class='<?php 
            echo $td_class;
            ?>
 td_su'>  --  </td>
                                    
                                    <td class='<?php 
            echo $td_class;
            ?>
 td_mi'>
                                        
                                        <a class='more_info' class='disabled' title='<?php 
            echo _('System Detail');
Esempio n. 2
0
                </span>
            </td>
        </tr>
        
        <tr>
            <td class='_label'><?php 
echo _('Current sessions');
?>
</td>
            <td class='_data' id='rc_data'><?php 
echo $current_sessions;
?>
</td>
            <td class='td_pbar'>  
                <?php 
echo Avc_utilities::create_progress_bar('cpu_pbar', '', '200px', $cpu_load, 'progress-green');
?>
            </td>
            <td class='td_spark_line'>
                <div id='cpu_spark_line' class='div_spark_line' style='position: relative; bottom:0px;'></div>
            </td>
        </tr>
        
    </tbody>
</table>

<script type='text/javascript'>
    
    <?php 
if (!empty($mounted_disks)) {
    $disk = key($mounted_disks);
Esempio n. 3
0
*
* You should have received a copy of the GNU General Public License
* along with this package; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
* MA  02110-1301  USA
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
//Only admin can access
Avc_utilities::check_access();
$sections['alienvault_center'] = array('path' => 'index.php', 'name' => _('Alienvault Center'), 'bc' => 'alienvault_center');
$sections['home'] = array('path' => 'sections/home/home.php', 'name' => _('Home'), 'bc' => 'alienvault_center###home');
$sections['system_status'] = array('path' => 'sections/system_status/st_detail.php', 'name' => _('System Status'), 'bc' => 'alienvault_center###home###system_status');
$sections['alienvault_status'] = array('path' => 'sections/alienvault_status/av_detail.php', 'name' => _('Alienvault Status'), 'bc' => 'alienvault_center###home###alienvault_status');
$sections['network'] = array('path' => 'sections/network/network_detail.php', 'name' => _('Network'), 'bc' => 'alienvault_center###home###network');
//Software
$sections['sw_pkg_installed'] = array('path' => 'sections/software/sw_pkg_installed.php', 'name' => _('Software - Packages installed'), 'bc' => 'alienvault_center###home###sw_pkg_installed');
$sections['sw_pkg_pending'] = array('path' => 'sections/software/sw_pkg_pending.php', 'name' => _('Software - Packages pending updates'), 'bc' => 'alienvault_center###home###sw_pkg_pending');
$sections['sw_pkg_checking'] = array('path' => 'sections/software/sw_pkg_pending.php', 'name' => _('Software - Packages pending updates'), 'bc' => 'alienvault_center###home###sw_pkg_pending');
$sections['sw_pkg_installing'] = array('path' => 'sections/software/sw_pkg_installing.php', 'name' => _('Software - Installing Packages'), 'bc' => 'alienvault_center###home###sw_pkg_installing');
//Configuration
$sections['cnf_general'] = array('path' => 'sections/configuration/general/index.php', 'name' => _('Configuration - General'), 'bc' => 'alienvault_center###home###cnf_general');
$sections['cnf_network'] = array('path' => 'sections/configuration/network/index.php', 'name' => _('Configuration - Network'), 'bc' => 'alienvault_center###home###cnf_network');
$sections['cnf_sensor'] = array('path' => 'sections/configuration/sensor/index.php', 'name' => _('Configuration - Sensors'), 'bc' => 'alienvault_center###home###cnf_sensor');
//Logs
    $id = POST('id');
    $title = POST('title');
    $width = POST('width');
    $height = POST('height');
    $progress = POST('progress');
    $style = POST('style');
    ossim_valid($id, OSS_ALPHA, OSS_PUNC, OSS_SPACE, '-', 'illegal:' . _('ID'));
    ossim_valid($title, OSS_ALPHA, OSS_PUNC, OSS_SPACE, OSS_NULLABLE, 'illegal:' . _('Title'));
    ossim_valid($width, OSS_DIGIT, 'illegal:' . _('Width'));
    ossim_valid($height, OSS_DIGIT, 'illegal:' . _('Height'));
    ossim_valid($progress, OSS_DIGIT, 'illegal:' . _('Progress'));
    ossim_valid($style, OSS_LETTER, '-', 'illegal:' . _('Style'));
    $width = $width . "px";
    $height = $height . "px";
    if (!ossim_error()) {
        echo Avc_utilities::create_vprogress_bar($id, $title, $width, $height, $progress, $style);
    } else {
        $config_nt = array('content' => ossim_error(), 'options' => array('type' => 'nf_error', 'cancel_button' => FALSE), 'style' => 'margin: auto; width: 90%; text-align: center;');
        $nt = new Notification('nt_1', $config_nt);
        $nt->show();
    }
} elseif (POST('action') == 'get_system_info') {
    $system_id = POST('system_id');
    ossim_valid($system_id, OSS_DIGIT, OSS_LETTER, '-', 'illegal:' . _('System ID'));
    if (ossim_error()) {
        $data['status'] = 'error';
        $data['data'] = ossim_get_error();
        echo json_encode($data);
        exit;
    }
    $db = new ossim_db();
Esempio n. 5
0
    <?php 
$i_role_names = array('disabled' => _('Not in Use'), 'admin' => _('Management'), 'monitoring' => _('Network Monitoring'), 'log_management' => _('Log Collection & Scanning'));
//Reorder interfaces
$i_lo = array('lo' => $st['interfaces']['lo']);
unset($st['interfaces']['lo']);
$st['interfaces'] = array_merge($i_lo, $st['interfaces']);
foreach ($st['interfaces'] as $i_name => $i_data) {
    if ('up' === $i_data['status']) {
        $text_color = 'green';
        $if_image = 'port_animado.gif';
    } else {
        $text_color = 'red';
        $if_image = 'no_animado.gif';
    }
    $i_data['rx_bytes'] = Avc_utilities::bytesToSize($i_data['rx_bytes'], 2);
    $i_data['tx_bytes'] = Avc_utilities::bytesToSize($i_data['tx_bytes'], 2);
    $i_data['role'] = $i_name == 'lo' ? ' - ' : $i_role_names[$i_data['role']];
    ?>

        <tr>
            <td rowspan='2' class='_label td_iface_name'><?php 
    echo $i_name;
    ?>
</td>
            <td rowspan='2' id='<?php 
    echo $i_name . '_status';
    ?>
' class='td_iface_status'>
                <div id='container_iface_st'>
                    <img src="<?php 
    echo AVC_PIXMAPS_DIR . '/' . $if_image;
}
/*************************************************************
******************  Alienvault Status Data *******************
**************************************************************/
$profiles = array();
//Sensor profile
if (is_array($st['sensor']) && !empty($st['sensor'])) {
    $plugins_enabled = $st['sensor']['plugins_enabled'];
    $sniffing_interfaces = empty($st['sensor']['sniffing_interfaces']) ? "<img src='" . AVC_PIXMAPS_DIR . "/cross.png' alt='" . _('No') . "'/>" : str_replace(',', ', ', $st['sensor']['sniffing_interfaces']);
    $network_monitored = $st['sensor']['network_monitored'];
    $netflow = $st['sensor']['sensor_netflow'] == 'yes' ? 'tick.png' : 'cross.png';
    $profiles['Sensor'] = array(array('label' => _('Plugins enabled'), 'data' => $plugins_enabled), array('label' => _('Sniffing Interfaces'), 'data' => $sniffing_interfaces), array('label' => _('Netflow'), 'data' => "<img src='" . AVC_PIXMAPS_DIR . '/' . $netflow . "' alt='{$netflow}'/>"), array('label' => _('Network monitored'), 'data' => str_replace(',', ', ', $network_monitored)));
}
//Database profile
if (is_array($st['database']) && !empty($st['database'])) {
    $profiles['Database'] = array(array('label' => 'Alienvault', 'data' => Avc_utilities::bytesToSize($st['database']['alienvault']['size'])), array('label' => 'Alienvault SIEM', 'data' => Avc_utilities::bytesToSize($st['database']['alienvault_siem']['size'])), array('label' => 'Inventory', 'data' => Avc_utilities::bytesToSize($st['database']['ocsweb']['size'])));
}
//Server profile
if (is_array($st['server']) && !empty($st['server'])) {
    $entity_total = $st['server']['directives']['entities']['total'];
    $entity_enabled = $st['server']['directives']['entities']['enabled'];
    $total_directives = $st['server']['directives']['total'];
    $categories = $entity_total . "<span class='cursive'> (" . $entity_enabled . "<span class='green'> " . _('enabled') . "</span>)</span>";
    $ip_reputation = 'yes' === $st['server']['ip_reputation'] ? 'tick.png' : 'cross.png';
    $img_reputation = "<img src='" . AVC_PIXMAPS_DIR . '/' . $ip_reputation . "' alt='{$ip_reputation}'/>";
    $local_system = Util::get_default_uuid();
    if ($system_id == $local_system) {
        // Show with EPS graph
        $profiles['Server'] = array(array('label' => _('Total Directives'), 'data' => $total_directives), array('label' => _('Categories'), 'data' => $categories), array('label' => _('IP Reputation'), 'data' => $img_reputation), array('label' => _('EPS'), 'data' => "<a class='grbox' id='lnk_vt' title='" . _('EPS Trend') . "' href='/ossim/control_panel/eps_trend.php?range=day'>" . _('View Trend') . "</a>"));
    } else {
        $profiles['Server'] = array(array('label' => _('Total Directives'), 'data' => $total_directives), array('label' => _('Categories'), 'data' => $categories), array('label' => _('IP Reputation'), 'data' => $img_reputation));