| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/Mail Enable/Bin/NETWebAdmin/Mondo/lang/sys/Forms/ |
Upload File : |
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SystemMonitor.aspx.vb" Inherits="MailEnable.Clients.WebAdmin.SystemMonitor" %>
<%@ Register TagPrefix="uc1" TagName="uscStyleHeader" Src="../Controls/uscStyleHeader.ascx" %>
<%@ Register TagPrefix="ucScriptsInclude" TagName="ScriptsInclude" Src="../Controls/ScriptsInclude.ascx" %>
<%@ Register TagPrefix="uc2" TagName="uscLanguageTokenMondo" Src="../Controls/uscLanguageToken.ascx" %>
<uc2:uscLanguageTokenMondo id="uscToken" runat="server"></uc2:uscLanguageTokenMondo>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MailEnable</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<meta http-equiv="Expires" content="0"/>
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<uc1:uscstyleheader id="UscStyleHeader1" runat="server"></uc1:uscstyleheader>
<ucScriptsInclude:ScriptsInclude id="ScriptsInclude1" runat="server"></ucScriptsInclude:ScriptsInclude>
<!--[if lt IE 9]><script type="text/javascript" language="javascript" src="../Scripts/excanvas.js"></script><![endif]-->
<script type="text/javascript" src="../Scripts/jquery-min.js"></script>
<script type="text/javascript" src="../Scripts/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="../Scripts/jqplot.dateAxisRenderer.js"></script>
<script type="text/javascript" src="../Scripts/LIBCommon.js"></script>
<style type="text/css">
.plotcontainer {margin:5px;}
.plotarea {height:400px; width:500px; margin:5px;float:left}
.plotarea_wide {height:400px; width:800px; margin:5px;float:left;vertical-align:top;border:1px;solid}
</style>
<link rel="stylesheet" type="text/css" href="<%=GetSkinFolder()%>jquery.jqplot.css" />
<script type="text/javascript">
var g_opt={}; g_opt['ME_VALIDATIONTOKEN'] = '<%=Session.Item("ME_VALIDATIONTOKEN")%>'; //could be moved to masterpage
var jqPlotObjects = new Array();
var MemoryCounterNames = ['IMAPServiceMemory',
'SMTPConnectorMemory',
'PostofficeConnectorMemory',
'POPServiceMemory',
'IndexingServiceMemory',
'MailTransferAgentMemory'];
var ConnectionCounterNames = ['IMAPConnections',
<%If ShowHTTPIISCounters() Then%>
'HTTPConnections',
'HTTPIISConnections',
<%End If%>
'POPConnections',
'SMTPInboundConnections',
'SMTPOutboundConnections'];
var CPUCounterNames = ['SystemProcessor',
'IMAPServiceProcessor',
'SMTPConnectorProcessor',
'PostofficeConnectorProcessor',
'POPServiceProcessor',
<%If ShowIndexingCounters() Then%>
'IndexingServiceProcessor',
<%End If%>
'MailTransferAgentProcessor'];
var QueueCounterNames = ['SMTPOutboundQueueLengthDisplay',
'SMTPInboundQueueLengthDisplay',
'PostofficeInboundQueueLengthDisplay',
'PostofficeOutboundQueueLengthDisplay',
'ListInboundQueueLengthDisplay',
'ListOutboundQueueLengthDisplay'];
var SpamCounterNames = ['DKIM',
'DNSBlacklist',
'URLBlacklist',
<%If ShowSpamCounters() Then%>
'Greylisting',
'SPF',
'Bayesian',
'SpamAssassin',
'Antivirus',
<%End If%>
'PTRRecord'];
function UpdateChartPlots(data, targetdiv, MemoryCounterNames,ChartTitle) {
// now that we have the counters, show any aggregates
{
var counterdata = null;
var labelnames = null;
for (var key in MemoryCounterNames) {
var keyName = MemoryCounterNames[key];
if (MemoryCounterNames.hasOwnProperty(key)) {
if ((data['Counters'][keyName] != null) && data['Counters'][keyName].Values) {
if (counterdata == null) {
counterdata = [data['Counters'][keyName].Values];
}
else {
counterdata = counterdata.concat([data['Counters'][keyName].Values]);
}
if (labelnames == null)
{
labelnames = [data['Counters'][keyName].Title];
}
else
{
labelnames.push(data['Counters'][keyName].Title);
}
}
}
}
if (jqPlotObjects[keyName])
{
jqPlotObjects[keyName].destroy();
delete jqPlotObjects[keyName];
}
if (counterdata) {
var plotSeries = $.jqplot(targetdiv, counterdata,
{
title: ChartTitle,
axes:
{
xaxis:
{
renderer: $.jqplot.CategoryAxisRenderer,
min: 0,
tickOptions:
{
showGridline: false,
show: false,
showMark: false
}
},
yaxis:
{
min: 0,
tickOptions:
{
showGridline: true,
showMark: true
}
}
},
seriesDefaults:
{
rendererOptions: {
smooth: true
}
},
legend: {
show: true,
placement: 'insideGrid',
labels: labelnames,
location: 'nw',
rowSpacing: '0px'
},
/*
series: [
{
// Change our line width and use a diamond shaped marker.
lineWidth: 2,
markerOptions: { style: 'diamond' }
},
{
// Don't show a line, just show markers.
// Make the markers 7 pixels with an 'x' style
showLine: false,
markerOptions: { size: 7, style: "x" }
}
]
*/
}
);
plotSeries.replot();
jqPlotObjects[keyName] = plotSeries;
$('#' + targetdiv).show();
}
else {
$('#' + targetdiv).hide();
}
}
}
function UpdateCounterPlots(data) {
if (data) {
for (var key in data['Counters']) {
if (data['Counters'].hasOwnProperty(key))
{
if (data['Counters'][key]['Values'].length > 0)
{
var isNewPlotObject = false;
if ($("#chart_" + key).length == 0)
{
//lets create the plot container
$("#divCounters").append('<div id="chart_' + key + '" class="plotarea"></div>');
isNewPlotObject = true;
}
else
{
//destroy the old plot
if (jqPlotObjects[key])
{
jqPlotObjects[key].destroy();
delete jqPlotObjects[key];
}
}
var Plotter = $.jqplot('chart_' + key, [data['Counters'][key]['Values']], {
title: data['Counters'][key].Title
, axes: {
xaxis: {
renderer: $.jqplot.CategoryAxisRenderer,
min: 0,
tickOptions:
{
showGridline: false,
show: false,
showMark: false
}
},
yaxis:
{
min: 0,
numberTicks: data['Counters'][key].NumTicksY,
max: data['Counters'][key].MaxValue,
tickOptions:
{
showGridline: true,
formatString: data['Counters'][key].formatStringY,
showMark: true
}
}
}
});
Plotter.replot();
jqPlotObjects[key] = Plotter;
}
}
}
}
}
function doPoll()
{
var sAction = "GET-SYSTEM-MONITORS&Format=JSON";
$.ajax({
type: 'GET',
url: getAppServletURL() + "?Cmd=" + sAction + '&ME_VALIDATIONTOKEN=' + getTopAppWindow().g_opt['ME_VALIDATIONTOKEN'],
dataType: 'json',
cache: false,
success: function (data) {
if (data) {
if ($( "#divCounters" ).length)
{
UpdateCounterPlots(data);
}
else
{
UpdateChartPlots(data,'divMemory',MemoryCounterNames, 'Service Memory Usage');
UpdateChartPlots(data,'divCPU',CPUCounterNames, 'Service Processor Usage');
UpdateChartPlots(data,'divConnections',ConnectionCounterNames, 'Service Connections');
UpdateChartPlots(data,'divQueues',QueueCounterNames, 'Message Delivery Queue Lengths');
UpdateChartPlots(data,'divSpam',SpamCounterNames, 'Spam Detection');
}
}
else {
alert('Monitoring agent is not running');
}
},
complete: function (result) {
setTimeout(doPoll, 5000);
}
});
}
$(document).ready(function () {
doPoll();
});
</script>
</head>
<body>
<%If ParseRequestArgument("View") = "Detail" Then%>
<div id="divCounters">
<%Else %>
<div class="plotcontainer">
<div id="divCPU" class="plotarea_wide"></div>
<div id="divMemory" class="plotarea_wide"></div>
<div id="divConnections" class="plotarea_wide"></div>
<div id="divQueues" class="plotarea_wide"></div>
<div id="divSpam" class="plotarea_wide"></div>
</div>
<%End If %>
</div>
</body>
</html>