[Xymon] Graph has broken link
Foster Patch
Foster.Patch at accuweather.com
Thu Jun 16 16:00:50 CEST 2016
Hello,
I created a script that monitors connection traffic on a server, called "aspnethealth". Unfortunately, the graphs on the monitor are broken... I've attached a picture displaying this. My script is also attached, and also pasted below. (Also here http://pastebin.com/Pdnq6AnA) I've been looking at the rrd and also http://xymon.sourceforge.net/xymon/help/howtograph.html but am clueless as to what I need to do. I am a dummy when it comes to Linux. Any assistance with this would be much appreciated!
Thanks,
Foster Patch
Web Server Technician
AccuWeather
$MAX_RUN_TIME = 300
$TIME_Exceeded = $false
$STATUS = "green"
$STATUSCODE = "&green Everything is looking just fine! &green"
$TEST_FILE = "${env:ProgramFiles(x86)}\BBWin\tmp\aspnethealth"
$CurrSTATUS = "&green"
$ExeSTATUS = "&green"
$WaitSTATUS = "&green"
$QueueSTATUS = "&green"
$TimeSTATUS = "&green"
$Source = @"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace ASPNETPerformance
{
public static class Query
{
public static IntPtr userHandle = new IntPtr(0);
public static string hostName = ".";
public static string categoryName = "ASP.NET Applications";
public static string instanceName = "__Total__";
public static float CurrentConnections()
{
string counterName = "Current Connections";
PerformanceCounter counter = new PerformanceCounter("Web Service", counterName, "_Total", hostName);
return counter.NextValue();
}
public static float RequestsExecuting()
{
string counterName = "Requests Executing";
PerformanceCounter counter = new PerformanceCounter(categoryName, counterName, instanceName, hostName);
return counter.NextValue();
}
public static float RequestWaitTime()
{
string counterName = "Request Wait Time";
PerformanceCounter counter = new PerformanceCounter(categoryName, counterName, instanceName, hostName);
return counter.NextValue();
}
public static float RequestsInApplicationQueue()
{
string counterName = "Requests In Application Queue";
PerformanceCounter counter = new PerformanceCounter(categoryName, counterName, instanceName, hostName);
return counter.NextValue();
}
public static float RequestExecutionTime()
{
string counterName = "Request Execution Time";
PerformanceCounter counter = new PerformanceCounter(categoryName, counterName, instanceName, hostName);
return counter.NextValue();
}
}
}
"@
try{
Add-Type -TypeDefinition $Source -Language CSharp
}
catch
{
}
$CurrentConnections = [ASPNETPerformance.Query]::CurrentConnections()
$RequestsExecuting = [ASPNETPerformance.Query]::RequestsExecuting()
$RequestWaitTime = [ASPNETPerformance.Query]::RequestWaitTime()
$RequestsInApplicationQueue = [ASPNETPerformance.Query]::RequestsInApplicationQueue()
$RequestExecutionTime = [ASPNETPerformance.Query]::RequestExecutionTime()
if ($TIME_Exceeded) {
$STATUS = "yellow"
$STATUSCODE = "Something is wrong with this test reporting to Hobbit"
}
if(($CurrentConnections -gt 15000) -and (!($CurrentConnections -gt 16000)))
{
$CurrSTATUS = "&yellow"
$STATUSCODE = "&yellow Current Connections exceed 15000 &yellow"
}
if($CurrentConnections -gt 16000)
{
$CurrSTATUS = "&red"
$STATUSCODE = "&red Current Connections exceed 16000 &red"
}
if(($RequestsExecuting -gt 3000) -and (!($RequestsExecuting -gt 5000)))
{
$ExeSTATUS = "&yellow"
$STATUSCODE = "&yellow Requests Executing exceeds 3000 &yellow"
}
if($RequestsExecuting -gt 5000)
{
$ExeSTATUS = "&red"
$STATUSCODE = "&red Requests Executing exceeds 5000 &red"
}
if(($RequestWaitTime -gt 60000) -and (!($RequestWaitTime -gt 70000)))
{
$WaitSTATUS = "&yellow"
$STATUSCODE = "&yellow Request Wait Time exceeds 60000 &yellow"
}
if($RequestWaitTime -gt 70000)
{
$WaitSTATUS = "&red"
$STATUSCODE = "&red Requests Wait Time exceeds 70000 &red"
}
if(($RequestsInApplicationQueue -gt 20) -and (!($RequestsInApplicationQueue -gt 50)))
{
$QueueSTATUS = "&yellow"
$STATUSCODE = "&yellow Requests in Queue exceed 20 &yellow"
}
if($RequestsInApplicationQueue -gt 50)
{
$QueueSTATUS = "&red"
$STATUSCODE = "&red Requests in Queue exceed 50 &red"
}
if(($RequestExecutionTime -gt 60000) -and (!($RequestExecutionTime -gt 70000)))
{
$TimeSTATUS = "&yellow"
$STATUSCODE = "&yellow Request Execution Time exceeds 60000 &yellow"
}
if($RequestExecutionTime -gt 70000)
{
$TimeSTATUS = "&red"
$STATUSCODE = "&red Request Execution Time exceeds 70000 &red"
}
if(($CurrSTATUS -eq "&yellow") -or ($ExeSTATUS -eq "&yellow") -or ($WaitSTATUS -eq "&yellow") -or ($QueueSTATUS -eq "&yellow") -or ($TimeSTATUS -eq "&yellow"))
{
$STATUS = "yellow"
}
if(($CurrSTATUS -eq "&red") -or ($ExeSTATUS -eq "&red") -or ($WaitSTATUS -eq "&red") -or ($QueueSTATUS -eq "&red") -or ($TimeSTATUS -eq "&red"))
{
$STATUS = "red"
}
$end = Get-Date
$STATUS = "$STATUS $end"
$STATUS | out-file -Encoding ASCII $TEST_FILE -Force
$Herp = "ASP.NET Application Information `n" | out-file -Encoding ASCII $TEST_FILE -Append
$skeep = "$STATUSCODE`n`n" | out-file -Encoding ASCII $TEST_FILE -Append
$Derp = $CurrSTATUS + " Current Connections: " + $CurrentConnections | out-file -Encoding ASCII $TEST_FILE -Append
$Merp = $ExeSTATUS + " Requests Executing: " + $RequestsExecuting | out-file -Encoding ASCII $TEST_FILE -Append
$Cherp = $WaitSTATUS + " Request Wait Time: " + $RequestWaitTime | out-file -Encoding ASCII $TEST_FILE -Append
$Berp = $QueueSTATUS + " Requests In Queue: " + $RequestsInApplicationQueue | out-file -Encoding ASCII $TEST_FILE -Append
$Flerp = $TimeSTATUS + " Request Exec Time: " + $RequestExecutionTime | out-file -Encoding ASCII $TEST_FILE -Append
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160616/7eb23675/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled.png
Type: image/png
Size: 15906 bytes
Desc: Untitled.png
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160616/7eb23675/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aspnethealth.ps1
Type: application/octet-stream
Size: 5741 bytes
Desc: aspnethealth.ps1
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160616/7eb23675/attachment.obj>
More information about the Xymon
mailing list