Home » 2009 » March

Monthly Archives: March 2009

Ops Mgr 2007 R2 RC at Connect

Yesterday Microsoft announced the availability of the Ops Mgr 2007 R2 RC (Release Candidate) on Connect.

News in this release are:

-New Power Management MP template (the monitored system must be either Windows Server 2008 R2 or Windows 7)
-Updated branding across all user interfaces, including a new skin (dark/black)
-Improved trace configuration tools to help support issues escalated to Customer Support (if applicable)
-Improved Run As Account Distribution Configuration
-Ability to run in-line tasks for non-Microsoft servers
-Support for upgrade from Beta deployments to the Release Candidate
-New and updated documentation, including the Usage Guide, Design Guide, Deployment Guide, Upgrade Guide, Security Guide, and Operations Guide

The RC should be upgradeable to the RTM version once that is available, but since this is a test version, do not run it in a production environment unless you have made special arrangements with Microsoft.

more info at the team blog here

In the release candidate documents there are also some news for example design documentation how to monitor non Microsoft devices and also info about the new security alternative for accounts. There is a new document named “Reporting Deployment and Usage Troubleshooting”, including several common configuration and usage issues that can cause Operations Manager Reporting errors. This document addresses the most common issues, solutions to those issues and tools that you can use to resolve these problems. The security guide includes some good info about “Authentication and Data Encryption for UNIX and Linux Operating Systems” works, also some good pictures how discovery works for non-Windows machines. The deployment guide has been updated with information how to install on Windows Server 2008 and SQL 2008.

In the “Supported configuration” document there are also some intresting info

Computers other than Windows-based computers per dedicated management server: 200
Computers other than Windows-based computers per management group: 500
Monitorable Operating Systems Other Then Windows
.AIX 5.3 (Power), 6.1 (Power)
.HP-UX 11iv2 (PA-RISC and IA64) and 11iv3 (PA-RISC and IA64)
.Red Hat Enterprise Server 4 (x64 and x86) and 5 (x64 and x86)
.Solaris 8 (SPARC), 9 (SPARC) and 10 (SPARC and X86 versions later than 120012-14)
.SUSE Linux Enterprise Server 9 (x86) and 10 SP1 (x86 and X64)

Operations Manager tools

Last week Savision released a free version of Live Maps for Microsoft Operations Manager 2007. Microsoft Operations Manager administrators everywhere can now benefit from the great visualization capabilities of Live Maps v3. The free version is fully functional and allows IT organizations to create three maps of any type. Download here .

…more demos at Savision webpage.

Tool number two is from Mark Wolzak. He has created a cool Maintenance Mode GUI that you can download here.

Technet Online Seminar about Cross Platform

Welcome to Microsoft TechNet Online Seminar for IT pro. Microsoft Sweden will deliver a number of online seminars for IT pro during this spring. Björn Axell and I will present on of them, at April 23, “Managing non-Microsoft devices with Operations Manager 2007 R2”. We will show you how to monitor your Linux and UNIX machines in Operations Manager the same way as you handle your Windows machines today.

Register here, the seminar will be in Swedish

Logfile Check on Linux

In Operations Manager 2007 R2 we have the possibility to monitor Linux and UNIX machines. There are among with other new features two new management pack templates:

  • Unix/Linux LogFile (monitor a logfile for a specified entry)
  • Unix/Linux Service (monitor a service with a standalone process)

In this post I will show some ideas how to monitor file size on a linux machine. File size monitoring is not a default feature in R2, not on Windows or on Linux machines. On Windows machines I use a two state monitor and a script, describe in this post.

The first step is to create a script on the Linux side. This script checks how big the file is, and if the file is bigger then 100 it will write a warning to a logfile (scriptlog.log).

#!/bin/sh
find /load.sh -printf ‘%s %p\n’ | while read size name; do
if [ “$size” -gt 100 ]; then
echo $(date) WARNING the file is $size >> scriptlog.log
fi
done

The next step is to get Linux to run it automatically, we can do that with cron. Cron is a time-based job scheduler in Linux. Cron is driven by a crontab, a configuration file that specifies what to run and when. My crontab looks like

* * * * * / root/script.sh

It is very simple, I run the script every minute. Configure it with

crontab -e

The next step is to configure a management pack template for the Linux logfile to trigger on WARNING in the scriptlog.log file, configure it to trigger on WARNING. It is also important to keep track of the cron process, fortunately that is monitored with the default SUSE management pack.

You are now monitoring if there is a problem with the file size. The next step is to get the size of the file as performance data in Operations Manager. This can also be done with a script and a collection rule. Create a Collection Rule (Probe Based/Script (Performance)) and run the following script with the rule:

Set objShell = WScript.CreateObject(“WScript.Shell”)
Set objExecObject = objShell.Exec(“cmd /c C:\plink.exe user@192.168.0.71 -pw password stat -c%s / root/script.sh”)
Do While Not objExecObject.StdOut.AtEndOfStream
strText = objExecObject.StdOut.ReadLine()

Dim oAPI,oBAG
Set oAPI = CreateObject(“MOM.ScriptAPI”)
Set oBag = oAPI.CreatePropertyBag()
Call oBag.AddValue(“PerfValue”, 10)
Call oAPI.Return(oBag)
Loop

This script runs plink.exe. Plink (PuTTY Link) is a command-line connection tool. We will use that to execute commands on the Linux side. The script will then collect the result of the command, the file size, and send it back as a performance data value (PerfValue). I have the same kind of script for Windows here.

The next thing we might want to check is if the file exists. We can do that with a two state monitor. In this post you can read how to configure a two state monitor with a script. Use the script below in your monitor

Dim oAPI, oBag
Set oAPI = CreateObject(“MOM.ScriptAPI”)
Set oBag = oAPI.CreatePropertyBag()
Set objShell = WScript.CreateObject(“WScript.Shell”)
Set objExecObject = objShell.Exec(“cmd /c C:\plink.exe user@192.168.0.71 -pw password [ -f / root/thefile.log ] && echo ok || echo bad”)
Do While Not objExecObject.StdOut.AtEndOfStream
strValue = objExecObject.StdOut.ReadLine()

If instr(strValue, “ok”) Then
Call oBag.AddValue(“Status”,”OK”)
Call oAPI.Return(oBag)
End If

If instr(strValue, “bad”) Then
Call oBag.AddValue(“Status”,”Bad”)
Call oAPI.Return(oBag)
End If

Loop

That script checks if thefile.log exists in the root directory. If it does it will send back “ok” else “bad”.

Summary: We use a couple of different scripts and forwards the result to Ops Mgr. One script echo to a logfile that we then pickup with default a Logfile management pack template. Another script is run from inside a two state monitor with the plink.exe tool. In this post I wanted to give you some ideas to get info into Operations Manager 2007 from your Linux machines.