Author Archives: Rudolf

QuickMon 5.0.1

I’ve added a small but useful piece of functionality (probably long overdue) to the File/Directory collector of QuickMon. You can now specify the last X number of lines of a text file to check for the specified text to search for.

This is specifically intended for checking Text log files where lines of text are appended the whole time.

Download from Github

 

QuickMon 5

Well, the day has come to put the next major version of QuickMon on the street. Version 5.0.0 is now available for download from GitHub -> Version 5

It might not be  100% complete yet as I always have ideas how to possibly enhance or improve it but it is fully working as it is now. Please try it out.

The New

The biggest change from the previous version is in the UI where there is now more details available from the main window. The main window has been reworked to look more modern plus you don’t have to launch a separate(from the details window) editing window for a collector to edit its settings. The collector detail window has been enhanced so you can more easily see what the current and past state of a collector is/was. Then there is the reworked functionality around corrective scripts plus variable inheritance.

What didn’t make the cut

Initially the plan was for to transfer all Version 4 functionality but a few features did not make it. Support for Windows XP has now been dropped (since .Net 4.5 is not supported on it). The BizTalk and Active Directory collectors has not yet been recreated (perhaps later one day…) since they rarely got used as far as I could tell. Also, the ‘details’ table view has been dropped for now since there is now so much other details available per collector.

Collectors

The following Collectors are provided so far:

  • Event log
  • File/Directory
  • Performance counters
  • Ping (ICMP/HTTP/Sockets)
  • PowerShell
  • Registry
  • SQL (including OLEDB)
  • SSH (General query/CPU/Memory/Disk IO and space)
  • Web Services
  • Windows Services
  • WMI

Let’s get started!

Well, don’t waste more time reading about it! Head over to the download and try it out!

QuickMon 5 Beta 2

Another quick note. Beta 2 is now available. Nothing major new to report except some improvements in the UI  for when collectors encounter errors.

[Update]

Ok, it might help to include a link I guess… Ok, Beta 3 has been release since…

https://github.com/RudolfHenning/QuickMon/releases/tag/v5.0.0-Beta.3

QuickMon 5 Beta

This is just a quick note to say that QuickMon 5 has reached Beta status. It is now mostly done with only some minor bug fixes and tweaks that needs left to be done.

Most of the functionality of version 4 was copied over – with a few exceptions. More on that at a later stage. The biggest improvements are around the application GUI to make it easier to see details without drilling down too much.

Download a copy from Github – https://github.com/RudolfHenning/QuickMon/releases

Feedback welcome.

Mess Effect Andromeda – part 2

The following is (just) my opinion about the whole Mass Effect Andromeda mess. You are welcome to disagree or agree but I know for a fact I’m not the only one thinking like I do.

Mass Effect Andromeda had so much potential. No, really, it could have been so much more. In the beginning (before the release) it seemed like this could be all we ever wanted – Continuing the Mass Effect story (minus Sheppard of course), exciting new game play/mechanics etc – in hind sight it was probably over-hyped but still, it could have been so much more…

The Good
As far as I’m concern the game itself wasn’t too bad – actually, it was pretty good. Sure, it had its share of issues – bugs, weird graphics anomalies and so on but those are all things that are easily fixable (and BioWare did fix some, perhaps most of them). Most of the characters were good or perhaps just ok (except Liam but that’s another story). Drack was/is still my favorite – perhaps better than old Wrex/Grunt.

The Bad
The biggest ‘issue’ I have is with the attitude EA/BioWare seems to have towards the game’s future and more importantly, how they treated us (or the lack thereof) – the fans of the game/series. It is also not like they gave up just at the end. Even shortly after the game was released there were already internal rumblings, cracks in the matrix… staff being moved around and away from working on Mass Effect. Then there is also the lack of feedback during all this and especially the time that people were complaining or asking for updates about the Quarian ark story line. The complete silence gives a distinct impression that they never intended to actually complete the game. It feels like they purposely abandoned everything just because it is convenient or they had another agenda from the start. This lack of feedback and support is insulting, they might as well have spit in our faces. At the end of the day ‘we’ did not get the basic thing we wanted – a true and a completed story of Mass Effect. If they came back to us saying it will take some time complete the Quarian ark story line that would have been still acceptable. I would have happily waited for it to be finished and then paid money when it was released. But no, that did not happen….

And this leads us to…
The result of this is a big distrust in EA/BioWare and their ability to deliver anything of value. The ending of Mass Effect 3 was not ideal… okay it was bad enough… and now they further insult us by abandoning something before it was even complete or even had a chance to redeem the mess they made.

I for one will be very careful in the future buying anything from EA/BioWare. I thought I could give them the benefit of the doubt after ME3 but sadly I was wrong. They never really planned to deliver anything good. Even Anthem might be just another over-hyped, money sucking black hole created only to make them rich which they’ll happily abandon when it suits them. This is not how you treat your customers.

From one unhappy Child0fThessia.

The Mess of Mass Effect Andromeda

Well, let me start by stating I’m a huge fan of the Mass Effect universe so I’m just throwing a couple of thoughts down here on my blog. I have been playing Mass Effect ever since ME2 came out (somehow missed ME1 when it came out) but I quickly got ME1 and since have lost count how many times I’ve replayed the trilogy over and over and over again…

So of course when Andromeda came along I was as excited as any Mass Effect fan would be. I went full out and preordered the super deluxe version… because.. it’s Mass Effect why not!

Anyway, once released I immediately start playing and… shocker… I actually like it! Yes, the title of this blog entry make it seems like I’m going to moan how bad it is and so on but… no, I actually like Mass Effect Andromeda. Sure, it has it faults like the laggy multiplayer, sound track that is ‘different’ and a few little bugs (like quests getting stuck) but mostly I like it.

The problem with it though is this: lots of other people that didn’t like it and started giving the general impression that this Mass Effect game is bad. So much so that it seems even the developers/creators of it seems to be in retreat, giving up or running away (well that is the impression I’m getting). Why am I saying this:

  1. The downsizing of the development studio that created Andromeda. Yes, it may be normal some times to do this after a release of a game to have people starting to work on other projects but the timing of all of this seems a bit suspicious.
  2. Previously there were talks of a DLC/sequel related to the Quarian ark – even at the end of the game it is hinted that this must be coming. However, since then it has become awfully quiet and seems all talk about a DLC/sequel has disappeared. Perhaps they are busy with it somewhere is secret but the silence plus downsizing together… is making us fans start to worry a bit.

Well, lets hope I’m wrong to worry about this and there will be some more (new) Mass Effect in the future. We would like to know what happen to our Pathfinder and the team plus what the Quarians are up to! Please Bioware, don’t disappoint!

Child0fThessia

CodePlex shutting down

So with all good things in life I recently learned that CodePlex is shutting down. This is of course a huge bummer for me as a number of my projects have source code that is hosted there.

Particularly QuickMon would be affected. I’ve already moved the source code repository over to GitHub (https://github.com/RudolfHenning/QuickMon) and will be moving the rest over the coming weeks until the whole project is live there. There is also the problem that all current versions of QuickMon 4 points to CodePlex for checking for new version updates but I’ll release one last version or version 4 pointing to the new repository – hopefully soon.

The rest of my projects will be moved as well as time permits. Wish me luck…

SSH from PowerShell

I’ve been playing with more non Microsoft technologies recently and even have a few Linux VMs running here and there. In the process I’ve learned a lot about interacting between the two worlds/environments using technologies like SSH and even running the Powershell Alpha previews on my Linux VMs. Then I got ‘bored’ and looked for a way to programmatically interact with my VMs (for monitoring) and discovered the open source project SSH.Net which I now have incorporated into even QuickMon. Then I got even more bored and started looking for a way to use SSH from Powershell and came across the SSH-Sessions module which incidentally also use SSH.Net to give Powershell a way to call/connect using SSH.

No PassPhrase

This all works nicely except… SSH-Sessions had one shortcoming.. which I just had to fix. The creator(s) of this module implements a way to specify a key file when connecting to an SSH server but does not provide a way to specify the ‘PassPhrase’ at all! WHY?

Any way, I knew the SSH.Net library does support it since I actually make use of this functionality in QuickMon. Then I started digging inside the SSH-Session script files and made a few adjustments…

Fix

To enable PassPhrase functionality I simply had to add the following code in the ‘New-SshSession’ function:

Change the function header to:

function New-SshSession {
    param([Parameter(Mandatory=$true)][string[]] $ComputerName,
          [Parameter(Mandatory=$true)][string]   $Username,
          [string] $KeyFile = '',
          [string] $PassPhrase = 'blankPassphrase',
          [string] $Password = 'SvendsenTechDefault', # I guess allowing for a blank password is "wise"...          
          [int] $Port = 22,
          [switch] $Quiet
    )

and then inside the function:

if ($KeyFile -ne '') {
        if (-not $Quiet) {
            "Key file specified. Will override password. Trying to read key file..."
        }
        if ($PassPhrase -eq 'blankPassphrase') {
            $SecurePassPhrase = Read-Host -AsSecureString "key provided. Please enter pass phrase for $KeyFile"
            $PassPhrase = ConvertFrom-SecureToPlain $SecurePassPhrase
        }
        if (Test-Path -PathType Leaf -Path $Keyfile) {
            $Key = New-Object Renci.SshNet.PrivateKeyFile( $Keyfile, $PassPhrase ) -ErrorAction Stop
        }
        else {
            "Specified keyfile does not exist: '$KeyFile'."
            return
        }   
    }

Example

And with the you can now use the module to connect to SSH using a Key file that has a PassPhrase. If you don’t specify the PassPhrase the script will prompt you for one. If you actually don’t have a PassPhrase at all then pass an empty string as the value of PassPhrase (not tested but it should work).

Import-Module SSH-Sessions
New-SshSession -Computer mySSHServer -Username me  -KeyFile 'c:\mykeys\mykey.key' -PassPhrase 'somePhrase'
Invoke-SshCommand  -ComputerName mySSHServer -Command "cat /proc/cpuinfo | grep processor" -Quiet
Remove-SshSession -RemoveAll -Quiet

How to install Powershell on Ubuntu 16.10

I recently tried installing the latest Alpha of Powershell (Alpha 12) on the newly released Ubuntu 16.10 and discovered that the install failed because of a dependency on the library libicu55 which has been replaced in the new version of Ubuntu (libicu57). Actually, the whole .Net Core install fails because of this.

Fortunately this is easy to fix by manually installing the old library from http://cz.archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb

Then you can download the latest Powershell version (Alpha 12 as of this writing) from https://github.com/PowerShell/PowerShell/releases

Hopefully the creators of the Powershell packages will release an updated version that is natively compatible with Ubuntu16.10.

 

SCOM agent Info script

When you have a case where you start integrating your in house SCOM 2012 R2 environment with VMs that are hosted in Azure and ‘other’ people keep on screwing up your SCOM agents with the OMS version you need a way to track what version is actually installed on a machine – plus whether the original SCOM 2012 R2 config is still in tact – which is  not the case since the upgrade process from SCOM 2012 R2 agent to the OMS version totally screws up the SCOM 2012 R2 config (like in F*ing deletes it !!!)

Therefore I had to create a little Powershell script to help check suspected machines if they have been affected by this issue. From the SCOM console side it just appears the Agent is ‘dead’ even though if you check manually it is still running (but of course the config is gone).

if ($args.count -ne 0) {
    $ComputerName = $args[0]    
}
else {
    $ComputerName = Read-Host -Prompt 'Computer Name'
}

$pingTest = (Test-Connection $ComputerName -Count 1 -TTL 255 -ErrorAction SilentlyContinue) 
if ($pingTest -ne $null -and $pingTest.IPV4Address -ne $null){
    write-host "IP Address : " $pingTest.IPV4Address.IPAddressToString -foregroundcolor "green"
    $serviceDetails = Get-Service -ComputerName $ComputerName | where DisplayName -Like 'Microsoft Monitoring Agent'
    if ($serviceDetails -ne $null ) {
        write-host "Health Service state: " $serviceDetails.Status.ToString() -foregroundcolor "green"

        $Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $ComputerName)
        $AgentGroupKeys = $Reg.OpenSubKey("SYSTEM\CurrentControlSet\Services\HealthService\Parameters\Management Groups")
        write-host "Groups: " $AgentGroupKeys.SubKeyCount.ToString() -foregroundcolor "green"
        $AgentGroupKeys.GetSubKeyNames() | % {
            if ($_ -like "AOI*") {
                write-host " OMS" -foregroundcolor "yellow"
            } else {
                write-host " $_" -foregroundcolor "green"
            }            
        }        
        
        $VersionNo = "NOT found!"
        $RegKeyProducts = $Reg.OpenSubKey("SOFTWARE\Classes\Installer\Products")
        $RegKeyProducts.GetSubKeyNames() | % {
            $RegKeyProduct = $Reg.OpenSubKey("SOFTWARE\Classes\Installer\Products\" + $_)
            if ($RegKeyProduct.GetValue('ProductName') -eq "Microsoft Monitoring Agent") {
                $VersionNo = $RegKeyProduct.GetValue('Version').ToString("X")
            }
        }

        if ($VersionNo -ne "NOT found!") {
            write-host "Agent version" $VersionNo -foregroundcolor "green"
        }
        else {
            write-host "Agent version not found!" -foregroundcolor "red"
        }

    }
    else {
        write-host "Health service NOT found!" -foregroundcolor "red"
    }
}
else {
    write-host "$ComputerName is not pingable!" -foregroundcolor "red"
}

This script first checks whether the machine (VM) is pingable, if it is then whether the HealthService service is installed, if so what state it is in and what version it is. It also lists the management groups the agent reports to including OMS.

Have fun kidz…