Event Trending and Data Visualization Timelines

Often our monitoring systems cause so much noise it’s hard to spot any trends in events. We could be witnessing the gradual downfall of a critical system but we’re too busy closing off alerts or deleting the notification emails to see the pattern of events and put the pieces together.

Service Modelling and traditional threshold style monitoring are great for spotting immediate problems, and discovering the depth of impact from an event but they don’t help you see trends in activity.

Read The Full Article Here

Guide To Service Availability Reporting

Being able to put a nice round percentage figure on your critical services availability is a very attractive piece of information for management and overall SLA Management. Having all the latest and greatest monitoring tools and technology is great for keeping the lights on, and assuring uptime, but all this technology mumbo jumbo doesn’t translate into a business compatible language.

Often we have terabytes of data, thousands and thousands of active alerts and performance trending metrics, although we really only need a select few key pieces of information to keep the business happy, the main one being availability.

Availability can be tricky to obtain, and although the formula for actually calculating the figure isn’t a difficult one, the source data and its reliability is where the complexities lie.

Read The Full Article Here

T-SQL Remove Space From Records

I noticed that there was a large subset of data in one of my databases that contained a space at the end of every row, this was screwing up my reporting and the space needed to be removed.

Here’s how:

1
2
UPDATE tableName SET columnName = RTRIM(columnName)
WHERE someOtherColumn = 'criteria'

.NET – ToString() vs Convert.ToString()

Calling ToString() on an object almost seems like second nature, however it can cause errors if the object is null.

Calling ToString() on a null object causes the following error

Object reference not set to an instance of an object

The easiest method around this is to use the Convert.ToString() method instead. This casts the object first before trying to convert to a string.

1
2
3
var something = null;
something.ToString(); // Error
Convert.ToString(something); // Success

Dashboard Rotator Utility

Buy NowDownload Demo

Information

The Dashboard Rotator is a tool that is used to cycle through http URL’s in a full screen browser window.
The list of URL’s can be customized by the end user to display their own specific interests or dashboard pages, these pages can be from any location, including public internet, local intranet etc, anything your browser can view, it can view.

No setup is required to run the program. It runs as a standalone executable.

Common uses for the Dashboard Rotator are

  • Internal monitoring dashboard displays
  • LCD TV displays for commonly accessed web pages
  • Rotating stock market information
  • IT Department monitoring dashboards
  • Pub or club rotating information displays

Features

  • Customizable URL’s lists
  • Customizable page cycle intervals
  • Automatic Internet Explorer memory refreshes (run each hour the application is concurrently run). A splash page will be displayed notifying that Internet Explorer is being restarted. no intervention is required.
  • The option of full screen or windowed mode
  • The option to kill all Internet Explorer instances on Stopping and hourly refresh cycle (this can catch any lingering IE processes that have hung)
  • Automatic browser crash detection.  If internet explorer is closed by a user, or the window crashes whilst the program is running, a new window will be opened and the cycle continued within 5 seconds

Usage

Super easy to use.  Simply download the files, extract them to a directory and run the file  Dashboard Rotator.exe.
Click the edit icon in the top left hand corner and edit the list of URL’s you wish to cycle through.

So Why Not Use A Script ?

Scripts can perform the fundamental rotation functions (Infact iv written one and its listed on this site) although there is one major difference between this tool and a script.  A script, being a script does not handle errors very well, and the inherent problem with scrolling through URL’s using a browser repeatedly is memory consumption, over a period of hours the browser will have bloated in memory consumption, and the process needs to be recycled.

Tearing down the browser process, and reloading does not tend to work well in scripts, iv written many with varying success before, but I solved the problem by  building the solution in a proper application language, and the finished product is the Dashboard Rotator.

After every hour, the Dashboard Rotator tool will tear down the Internet Explorer process and free up memory.  There is also a background thread that runs constantly, checking every 5 seconds to ensure the browser is running and rotating.

Which brings me to another point, if someone happens to close the browser window, or the browser crashes using a script,  the script will crash,  using the dashboard rotator, if the browser window should happen to close for whatever reason,  within 5 seconds the background thread will kick in and restart the rotation cycle.

In short, the Dashboard Rotator brings stability, and of course usability.

Things To Note

  • The software was initially intended for use on a standalone machine, example for an LCD TV screen and an attached PC, how ever if you wish to use the software on your own PC, you might wish to uncheck the “Kill All Internet Explorer Instances” box before clicking ‘Run”.   Leaving this checked will ensure that ALL iexplore.exe processes are terminated during the clean up process, even those you might be using on a secondary monitor.
    Although Its recommended you leave these boxes checked, an alternative solution would be use to use another browser such as Firefox or Chrome for your personal browsing as these will not be effected by the clean up process.
  • The automatic browser crash relaunch will not fire when you have a second browser window open, example if your browsing on a secondary monitor.  This works by scanning for running iexplore.exe processes every 5 seconds, if it doesnt detect any, it will re-launch.

Demo Version

If you would like to test the tool out before you purchase, you can do so by downloading the demo version.  The demo version is restricted to 5 full rotations before It will stop.

Download The Demo Version

Requirements

  • Windows Machine
  • Microsoft .Net Framework 3.5 (Compatible with 2.0 but 3.5 is recommended)
  • Internet Explorer 7 or above

The Author

The Dashboard Rotator tool was written in C# .Net by Cheyne Wallace


$15 AUD

Version 1.1

Payment is made by use of PayPal using the “Buy Now” button above. You can use any credit card or PayPal account to purchase.
Complete the PayPal process and at the end, on the final screen you will be presented with a button to return to this site,  make sure you click this as this will redirect you to the download page where you can access the software.

Should you miss this screen, or have any other issues retrieving the software,  please use the contact form and shoot me an email containing the details you used to make the payment and ill send you your copy.

Debugging A .NET Service With “Attach To Process” In Visual Studio

The tricky thing about building a Windows service is the debugging.   You cant just hit F5 and debug the app from there,  you need to “Attach” to the process.

Thankfully its not very difficult, although some of the guides out there aren’t very clear on this , so follow the following steps and you’ll be debugging in no time.

Continue reading “Debugging A .NET Service With “Attach To Process” In Visual Studio” »

Get Logged In User With ASP.Net

Using the following three ways we can get the User Name using C#

1
2
System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal;
string strName = p.Identity.Name;

1
string strName = HttpContext.Current.User.Identity.Name.ToString();

1
2
string strName = Request.ServerVariables["AUTH_USER"]; //Finding with name
string strName = Request.ServerVariables[5]; //Finding with index

In Above 3 Cases returning string contains DomainName\WinNTLoggedUserName

(for Ex: Microsoft\Bill.Gates. Here Microsoft is domain Bill.Gates is Logger User Name )

Using string operations seperate the DomainName and UserName.

C# .Net – Save Text Box Content To TXT File

A simple way to store the contents of a text box control to a local .txt file

1
2
3
4
5
6
7
8
//Use StreamWriter class.
StreamWriter sw = new StreamWriter("E:\\test.txt");
 
//Use write method to write the text
sw.Write(textBox1.Text);
 
//always close your stream
sw.Close();

Powershell Method – No Screen Output

Do you ever notice that after you run a method in Powershell you often get some screen output that you didn’t want?

Example, calling a StringBuilder’s .Append() method to simply add more text to the string will echo details of the current capacity and remaining capacity of the StringBuilder object to the screen, which ruins your console look if your carefully laying it out

eg.

1
$StringBuilderObject.Append($alert.Name)

Will output capacity and remaining space information relating to the StringBuilder object to the screen.

To fix this, add [Void] before the beginning the the line, so it looks like this:

1
[Void]$StringBuilderObject.Append($alert.Name)

vBulletin To IP.Board – A Short Journey

Cheyne Wallace is a Sydney based Monitoring / Platform Engineer and Availability Manager – http://www.cheynewallace.com
http://www.soundpunk.com is the SMF site mentioned in this article to be converted to IPB

A long time SMF user , iv been growing a community based on an Simple Machines Forum for many years, and I have to say, its been great.
SMF has never given me troubles, I had complete control over my styles and templates, wrote several mods my self without ever really needing to understand the core system.

Upgrading the platform was dead simple, login to your panel one day and it tells you a new update is available, click update, it pulls the files down, checks that it wont break anything and prompts you to continue, all in all about a 1 minute procedure. Simple, (No pun intended)

SMF is great, although like many, the time has come for my community to expand, we often have people writing full length articles and posting in the forum, only to have them be bumped back into oblivion and never seen again, either that or end up with 400 sticky posts which is just messy.

I need a CMS, I need blogging, I need to post articles, and host downloads properly not as attachments. Im not interested in messy WordPress and Joomla bridges , despite the fact a WordPress blog is exactly what I want, iv been down that path before and it always turned out messy.

Fast forward to about December 2009, im looking around for a new solution, iv been a fairly big forum user over the years and I was very aware of vBulletin and its standing in the web community.

I begin investigating vBulletin licensing, my eyes widen as I see a new product is being launched over at vBulletin.com – vBulletin 4.0 Publishing Suite Continue reading “vBulletin To IP.Board – A Short Journey” »

Rotating URL Script – Dashboard Display

** Edit – Iv written a new tool that handles this job better than the script does, you can find it here: http://gazeek.com/software/dashboard-rotator-utility/ **

Iv been looking for a tool that will display web pages for a period of time and then cycle through to the next page,  performing a loop for usage on large LCD TV screen at work,  this is to be used to display IT Service performance information and status reports.

I was unable to find one that did what I wanted,  bar 1, although it suffered from a problem where after a few hours Internet Explorer would start to die, and it had to be restarted.

I decided to write my own script, and so here it is. Continue reading “Rotating URL Script – Dashboard Display” »

Taskkill – Kill All Process’s Of A Certain Name

So you may have run something thats spawned a whole bunch of processes,  iexplore.exe  or cscript.exe ,  you need to kill them all and fast.   Heres how

1
taskkill /F /IM iexplore.exe

Useful Windows Run Commands

A whole bunch of very useful Windows commands Continue reading “Useful Windows Run Commands” »

Task Scheduler – The following error was reported: 2147944309.

This common task scheduler message is cryptic, and means nothing without some digging,  you can see below how we find the true answer to what it means,  but the short answer is:


Account Is Locked Out

Why?
0n2147944309 = 0x80070775
Facility: 8007 = Win32 (it’s a “Win32″ status code)
Status: 0x775 = 0n1909
Q:\>net helpmsg 1909
The referenced account is currently locked out and may not be logged on to.

T-SQL Setting Date Format

Occasionally you need to run a DATEDIFF or DATEADD against some dates that are in a reverse format, ie Day:Month:Year instead of Month:Day:Year, theres a simple way to set this in your query without having to string handle it all, using the SET DATEFORMAT parameter.

1
2
SET DATEFORMAT dmy
SELECT DATEDIFF(MINUTE,'29-01-2010 09:13:18','29-01-2010 09:18:18')

Windows Task Scheduler – Corrupt Image Error Fix

For some reason now with Vista and Windows Server 2008 when ever you seem to create a scheduled task, but close it before saving it, you get a “Corrupt Image” error that will not go away unless you remove the “Corrupt Image” from the registry.

Heres how to fix it

  1. Open The Registry (Start > Run > regedit)
  2. Browse to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache
  3. Under the “Tree” folder, find the scheduled tasks that you are having the error with and delete their folder.

Thats it, now re-open task scheduler and the error should be gone.

Copy your servers PHP.INI

Occasionally you may need to override your hosts or servers PHP.INI config file.  If you do, you’ll want a copy of the original PHP.INI as a basis for your modifications.
You can make a copy of it to your new directory by running a PHP script with the following

1
< ?php system("cp /usr/local/php5/lib/php.ini /home/your-new-path/php.ini"); ?>

Piracy and R18+ Games

So another game has been banned from Australia (Aliens vs Predator), and this time the developers are refusing to censor the content.

And I don’t blame them.

Why spend years developing and testing a game, finally deeming it ready for production only to have some narrow minded Government on the opposite side of the world tell you It needs to be re-edited so a 14 year old can buy it. I know what id tell them. Continue reading “Piracy and R18+ Games” »

Ping Host From VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
' --- ping the ip adress in the string s_ipaddr, and get
'     the response time in the int32 n_response

 
Imports system.net.networkinformation
Dim ping As New System.Net.NetworkInformation.Ping
Dim reply As System.Net.NetworkInformation.PingReply
reply = ping.Send(s_ipaddr)
If reply.Status = IPStatus.Success Then
' --- handle reachable here
MsgBox("ping time " &amp; reply.RoundtripTime)
Else
' --- handle non reachable here
End If

Pinger! – The Mass Host Ping Tool

PLEASE NOTE:
Pinger! Has Found A New Home At TheMonitoringGuy.com,
Please Visit  http://themonitoringguy.com/software/pinger-mass-host-ping-tool/ To Download The Latest Version Of Pinger!

Pinger! is a tiny ping utility (13KB) that is used to quickly ping a large list of hosts and save the resulting successful and failure host lists into a text file.

Why?

When developing scripts and applications that will touch a large number of hosts,  if many of those hosts are offline or no longer exist, the timeouts involved with this can slow down execution time and dramatically slow down your script or application.

In my case, I was presented with a list of 600+ servers that needed to have the exact same script run against them, a successful server took only several milliseconds to finish,  a failed host took around 4 seconds to time out, clearly I needed to find out which servers were alive and which weren’t and further again I needed to list the successful servers in a clean text file, 1 host per line, so I could import this into my application as an array.

And hence Pinger! was born :)

Usage

Very simple, Pinger.exe when run looks for hosts.txt in the same directory. Simply enter in your list of host names in this text file,  one per line and Pinger! will run over them 1 by 1 and output the results.
Simply extract the .zip containing Pinger.exe and hosts.txt to the same directory and open Pinger.exe.

Output

2 files are outputted.  these are:

  • success.txt – The list of successfully pinged hosts, in per line format
  • failure.txt – The list of hosts that failed to ping, in line by line format.

Download Pinger Here!