예제 #1
0
<?php

$addonId = monitisGetInt('addonid');
$result = MonitisHookClass::createAddonsMonitorById($addonId);
$addonName = '';
if ($result && count($result) > 0) {
    $addonName = $result[0]['name'];
}
?>
<style>
.datatable .msg{
	font-weight:bold;
	color:#000000;
}
</style>

<div class="dialogTitle"><?php 
if ($addonName != '') {
    echo "Addon: <b>" . $addonName . "</b>";
}
?>
</div>
<div style="text-align: right;" class="monitis_link_result">
	<a href="<?php 
echo MONITIS_APP_URL;
?>
&monitis_page=tabclient&sub=addons">&#8592; Back to addons list</a>
</div>
<br />
<table class="datatable" width="100%" border="0" cellspacing="1" cellpadding="3" style="text-align: left;">
    <thead>
예제 #2
0
<?php

define('MONITIS_CPU_MONITOR_PROPS_TPL', '{
	"LINUX":{"usedMax":"n","kernelMax":"n","idleMin":"n","ioWaitMax":"n","niceMax":"n"},
	"WINDOWS":{"usedMax":"n","kernelMax":"n"},
	"OPENSOLARIS":{"usedMax":"n","kernelMax":"n"}
}');
define('MONITIS_MEMORY_MONITOR_PROPS_TPL', '{
	"LINUX":{"freeLimit":"n","freeSwapLimit":"n","bufferedLimit":"n","cachedLimit":"n"},
	"WINDOWS":{"freeLimit":"n","freeSwapLimit":"n","freeVirtualLimit":"n"},
	"OPENSOLARIS":{"freeLimit":"n","freeSwapLimit":"n"}
}');
$isNewAcc = monitisGetInt('isNewAcc');
$locations = MonitisConf::$locations;
$newAgentPlatform = MonitisConf::$newAgentPlatform;
$old_ping = MonitisConf::$settings['ping'];
$old_cpu = MonitisConf::$settings['cpu'][$newAgentPlatform];
$old_memory = MonitisConf::$settings['memory'][$newAgentPlatform];
$old_drive = MonitisConf::$settings['drive'];
$locationIds = $old_ping['locationIds'];
$action_type = monitisPost('action_type');
if ($action_type == 'saveConfig') {
    if (isset($_POST['locationIDs']) && !empty($_POST['locationIDs'])) {
        $arr = $_POST['locationIDs'];
        $locationIds = array_map("intval", $arr);
    }
    $platform = $_POST['agentPlatform'];
    $newsets = MonitisConf::$settings;
    // PING monitor settings
    $newsets['ping']['interval'] = isset($_POST['interval']) ? intval($_POST['interval']) : $old_ping['interval'];
    $newsets['ping']['timeout'] = isset($_POST['timeout']) ? intval($_POST['timeout']) : $old_ping['timeout'];