Category Archives: Uncategorized

Creating a Single Server Test Environment for Squared Up

Hi everyone,

Recently I was directed to a piece of software called Squared Up, which promises HTML 5 Dashboards for Microsoft System Center Operations Manager, and I could hardly refuse the opportunity for a free trial!

Unfortunatley, its not every day that you keep an Operations Manager environment in your back pocket, and the sheer amount of configuration that can go into a multi server setup, just for a lab is mind boggling! In answer to this, I decided to attempt a single server setup for Operations Manager and Squared Up, and share it with the internet.

Now I know what you are saying, the point of Ops Manager is to monitor servers – you are going to have to set them up anyway ?! While this is true, I wanted to play with some of the more interesting management packs, and not self reference the monitoring environment – and in this instance, I will need all the free RAM I can get to spin up those servers!

Lets take a look at the software…

Company: Squared Up
Vitals: Based in Marlow UK
Licencing: Named User & Feature Based (Brilliant for a powerful tool like this!)
Support: Web KB & Phone
Website: https://squaredup.com/

ExampleDash
F
ig 1 – An Example Squared Up Dashboard

And now today’s tutorial…

What ? 
Configure a single server Operations Manager environment, onto which we can install the Squared Up Trial.

Why ? 
Creating and running a distributed Operations Manager environment on a single PC with Hyper-V is a big ask, this will allow us to play with Squared Up and create some separate monitored servers, despite our lack of RAM/CPU.

Caveats
– Performance is going to be degraded, mostly that of Operations Manager
– This is about as far from a Microsoft Supported Configuration as you will get, and it may go wrong!
– Operations Manager will warn you this isn’t a sustainable environment during install, and its right!

Knowledge and Technical Level
Complex – I am going to assume you know the basics and a little more, of all the technology we are using. This tutorial will only address directly the complexities of an all in one install.

Eg. I am not going to step by step through setting up a basic domain!

Now to the tutorial…

Section One – Create A Hyper-V Guest Server 

To begin this process, you will of course need a Virtual Server. I configured mine extremely simply, 2048MB of RAM & Single Core.

HyperV
F
ig 2 – Hyper-V Guest Config

I have also added two network connections:

External Internet – This is shared with my host, and provides web access.
SquaredUpNet – This is an internal adapter, which I can open ports against to allow access to the console.

Once the server is setup, install Windows Server 2012 R2 (or preferred version!) and continue!

Server2012
F
ig 3 – Server 2012 R2

 Section Two – Configure A Basic Domain 

When you have installed Server 2012, go ahead and use the server role manager to turn it into a Domain Controller, with a brand new forest a single domain.

This step is relatively simple, and you can neglect DHCP Scope Config, and accept defaults for DNS Config – as there is very little network to look after.

I used the following settings,

Domain: squaredup.local
NETBIOS: SQUAREDUP

Section Three – Install SQL Server

In order to use Operations Manager, you must install a SQL database. In this case we will use Microsoft SQL Server 2014 Enterprise.

You can begin the installer in the usual way, and continue with default settings until feature selection.

Warning : You will be strongly advised not to install this on a DC, in this case – we know the risks, so continue anyway.

When you reach feature selection, take the options below – they are the minimum you will need for Operations Manager.

SQL-Install-Feature-1
F
ig 4 – SQL Feature Selection 1

SQL-Install-Rules-2
Fig 5 – SQL Feature Selection 2

Now, allow the installation to continue – until the configuration steps!

Big Important Step Below

This is one of the most important parts of the SQL installation!

During configuration, you will be asked to supply user credentials for the database engine and local support. DO NOT allow the setup to continue with defaults, you must enter an Administrators (who has power over this PC) DOMAIN DETAILS and password.

Because we are on a DC, creation of the local accounts will fail if left up to the installer, as it can’t access the local device user groups and permissions, due to the way they are suppressed on the DC.

I used SQUAREDUP\Administrator, my domain admin – as this is a sandbox trial system – really , don’t do this for real!

Section Four – SQL Reporting Services

If the above wizard completes successfully, your reporting services should be installed and configured automatically. I have included my settings pages below however – should you need to make any changes.

SQL-Config-NamesPipes-1
F
ig 6 – SQL Reporting needs named pipe access, switch this on in SQL Server Configuration Manager if needed.

SQLRS-Config-URL-1
F
ig 7 – Configure the RS URL using defaults, by clicking “Apply”

SQLRS-Config-DB-3
Fig 8 – Provide SQL RS with database connection data, make sure you specify the instance!

SQLRS-Config-URL-2
Fig 9 – Configure the report manager URL using default settings by clicking “Apply”

 Section Five – Install Operations Manager 

Now we have everything in place, we can install Ops Mgr on the server!

As before, begin the installer and work through with default steps, until you reach database configuration.

Warning - Again, Operations Manager will complain about being in an unsuitable environment, we know the risks.

OPM-Install-SQL-1
F
ig 10 – Specify the database connection details, and don’t forget the instance name!

OPM-Install-SQL-2
Fig 11 – Do the same for the data warehouse database config.

OPM-Install-SQL-3
Fig 12 – For reporting services, you instance will be pre-filled!

Important Step Alert!

This is another part of the install, that again can be problematic because we are on a domain controller. Use the same, or another similarly configured account for all SCOM components as before – or they will fail to start!

OPM-Install-SQL-5
F
Ig 13 – Specify domain credentials for Admin with local power on DC.

OPM-Install-SQL-6
F
ig 14 – Your setup should now complete, don’t worry about the warning – its because we are running under a trial licence.

Section Six – What Next ? 

By now, we have a functioning SCOM environment, with all the tools and parts required to begin using Squared Up.

The only problem with this, is there is nothing in it! Before you continue, use the snapshot you took of the fresh 2012 install to create some servers to be monitored! (You did take one, right..!)

Manually configure these servers, and use the Operations Manager media to install the agent, and begin to collect some data goodness!

Warning: You will need to allow manual agent installs from Global Settings in SCOM before this will work!

Section Seven – Install Squared Up

If you are still with me at this point, well done for reading through the entire post! I will give you a break now, as for the installation of Squared Up, I have created a Video tutorial. Head over to my YouTube channel to see it!

 

Some Helpful Links

Here are a few things I used along the way, thanks to their authors!

https://squaredup.com/free-trial

https://www.techsmith.com/snagit.html

http://blogs.msdn.com/b/karthick_pk/archive/2011/03/05/initializing-the-fallback-certificate-failed-with-error-code-1-state-1-error-number-2146893788.aspx

http://dba.stackexchange.com/questions/71797/wait-on-the-database-engine-recovery-handle-failed-check-the-sql-server-error-l

 

 

 

 

My thanks to RADARC & Members

Recently, I gained my foundation amateur radio licence with the help of the fantastic Reading & District Amateur Radio Club. Their course was practical and not too formal, with a great sense of what was required, and what was “required hoop jumping”.

There is broad membership, young to old and a good community feel – and certainly enough anecdotes to keep anyone busy.

I am looking forward to attending some meetings, and moving on to intermediate in the future, for now, I need to wait for Ofcom to update their database so I can claim a callsign!

Tech : GMail EAS Changes

For longer than I can remember I have been a GMail user. Initially I was scared of it – putting all my mail on the web seemed like a crazy plan, but eventually I signed up and dropped by ISP’s email account for a GMail address. Ever since, I have happily enjoyed my email anywhere, labeling and archive, a host of free space and even piece of mind offered by two factor authentication. I have seen no reason whatsoever to doubt my decisions, until news broke  last night that Google were planning to drop EAS support for Individual GMail accounts (http://www.wpcentral.com/google-drops-exchange-activesync-what-s-it-mean-windows-phone).

Like many users, I choose my loyalty to products based on the best one available at the time. Typically this means that I use services or products from several companies at the same time, basing each decision on its merits not brand allegiance. Unfortunately I seem to have picked my poison in this war by buying into the Windows Phone mobile environment. My reasons are simple, I prefer the interface, speed and simplicity of the WP devices – I have no need for a  powerhouse uberhacker device in my pocket, I just like my phone to do what I need, when I need in the easiest way possible. I had an android phone, a symbian Nokia device , iPads and iPhones and this is where I have ended up, its just what I prefer – comparisons, features, reviews, and out and out hardware battles aside.

Inconveniently  for me it seems that my personal tastes have landed me right in the “EAS Switchoff” firing line. In a battle between ancient and bitter rivals, the true looser will not be a brand name, a sales figure or a jarring comment at a tech expo – its me, the customer. Standing to lose functionality on my Windows Phone device, because to Google , EAS is a “dead” technology.

I am sure Microsoft will update the Mail app to support whichever method becomes the next favorite, but for now I can’t help but look at other options for my email account, before the floor falls away under my feet – after all, I am not about to can an expensive phone, just to chase a feature rich email experience.

 

Hints : Accepting iCal Appts In Outlook When You Are The Organiser

A case I have been working on has highlighted to me just how little information there is about this rather useful knowlegebase article – so i decided I would quickly knock something up to make sure I can remember next time this little solution is needed.

If you have a centrally run system which spits out iCal files left right and centre, this might be right up your street. The issue occurs when you attempt to accept an appointment that you are listed as the organiser of. Assuming your system doesn’t automatically add the appointment to your calendar, you will be faced by two confliciting messages.

“As the meeting organizer, you do not need to respond to this meeting”

and

“This meeting could not be found in your calendar”

Up until Outlook 2007, as the organiser you would be able to accept the meeting – which would add it to your calendar, but now this is not possible – as OL 2007 and up attempt to prevent duplicate items with this handy message. The only issue being this stops your centrally generated iCal ever making it into your Caledar, and in turn messes up your ability to track responses.

The solution to this is a handy registry entry contained in the article : http://support.microsoft.com/kb/940403

This entry means that when you open up an iCal file – in which you are listed as the organiser, Outlook automatically adds the event to your caledar if its not already there. Allowing you the full benefits of having the meeting within Outlook, without having to create the iCal in Outlook/Exchange.

Useful Integration Tip !

Fingers crossed this helps someone out :)

Understanding : The Police API – The Perfect Introduction To API Programming (Part 1)

When I found myself gazing at the news during lunch the other day, my attention was suddenly caught by the announcement of an iPhone application which can tell you about the crime history of your current location.

Like any developer, as soon as I saw this my first response was “Wow, the police have an API”. And so they do, http://www.police.uk/api/docs/ . The police API is a RESTFul JSON Web service that uses HTTP GET requests to fetch JSON formatted data about a multitude of (historical) crime and police related information, this being said the data seems to only be about a month behind. The API is authenticated, using an API key you must apply for, and then BASIC HTTP Authentication.

At this point I decided I didn’t want to let the side down, and should probably build a Windows Phone 7 “Crime Hunter” app. As always its my belief that things done in mobile environments are always harder than on the desktop , you will see later why they aren’t with Phone 7, but this didn’t stop me from making a desktop application first.

While looking through the details of the API fo r this, I realised – this really is as simple as a web API gets – which makes it a perfect introduction for those who have never worked with a web API like this before. Nice simple and clean.

Desktop Proof Of Concept
This is a simple class with a single function that prints out the HTTP response. This serves simply to ensure that the API is working and returning Data. Pop in your API password and it should work straight away.

using System;
using System.Text;
using System.Net;
using System.IO;
using System.Web;

    class UkPoliceInterface
    {
        // API Credentials - Pass in by constructor in common use
        private string apiUsername = "";
        private string apiPassword = "";

        public string AuthorisedRequest(String requestUrl)
        {

            // Create a new WebRequest to the URL Passed
            WebRequest dataRequest = WebRequest.Create(requestUrl);

            // Add a BASIC Authentication header to the data request, using the API Username and Password
            dataRequest.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(apiUsername + ":" + apiPassword));

            // Wrap to catch errors
            try
            {
                // Request the response object and save it locally
                WebResponse dataResponse = dataRequest.GetResponse();

                // Get the response stream and wrap it in a stream reader
                StreamReader dataStreamReader = new StreamReader(dataResponse.GetResponseStream(), Encoding.UTF8);

                // Return the string
                return dataStreamReader.ReadToEnd();
            }
            catch (Exception ee)
            {
                // If Something went wrong, throw a generic exception at this time
                throw new Exception("Could Not Complete Web Query ("+ee.Message+")");
            }
        }
}

This function simply creates a new .NET WebRequest object, this neat little object encapsulates the process of making a request to a URI and provides a few methods for getting the response.

In the case, its sister object WebReponse takes the response and allows us to write it down to a stream, with the help of the StreamReader class , this means we can now write the stream down to a local string, and voila , theres the response. Some Lovely JSON…

[
    {
        "category": "vehicle-crime",
        "id": 1976260,
        "location": {
            "latitude": "52.6240688",
            "street": {
                "id": 165758,
                "name": "On or near Godsons Hill"
            },
            "longitude": "-1.4157945"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "burglary",
        "id": 1976261,
        "location": {
            "latitude": "52.6240688",
            "street": {
                "id": 165758,
                "name": "On or near Godsons Hill"
            },
            "longitude": "-1.4157945"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "vehicle-crime",
        "id": 2013093,
        "location": {
            "latitude": "52.6241922",
            "street": {
                "id": 203088,
                "name": "On or near Hillside"
            },
            "longitude": "-1.4153054"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "anti-social-behaviour",
        "id": 2019201,
        "location": {
            "latitude": "52.6260645",
            "street": {
                "id": 209891,
                "name": "On or near Horseshoe Close"
            },
            "longitude": "-1.4212784"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "other-crime",
        "id": 2245928,
        "location": {
            "latitude": "52.6233953",
            "street": {
                "id": 436377,
                "name": "On or near Warwick Lane"
            },
            "longitude": "-1.4033061"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "burglary",
        "id": 2245929,
        "location": {
            "latitude": "52.6233953",
            "street": {
                "id": 436377,
                "name": "On or near Warwick Lane"
            },
            "longitude": "-1.4033061"
        },
        "context": "",
        "month": "2011-06"
    }
]

Now I knew that the API works as expected, on to coding it up for Windows Phone 7, See my part 2 Post on how!