Part 2 – Apple OSX MP -The compiling and installing of the OMI agent on your Mac

Part 2 – Apple OSX MP -The compiling and installing of the OMI agent on your Mac

After Xcode is installed we can now compile the OMI package, which can be downloaded here: OMI Source 1.0.7. You can also check for the latest version here:


If you downloaded the OMI Package on your MAC, double click the package to unzip the archive. If you are using Windows, you will need something like 7zip (freely available) to unzip the archive.


I unzipped my archive and saved it to Document/omi-1.0.7, but you can choose your own directory. Before we can compile OMI we need to download compile and install the package pkg-config. Pkg-config is used by the OMI package for configuration so we need to satisfy this dependency. The latest pkg-config source can be downloaded here. I have found that some of the newer versions of the pkg-config package do not compile well on a Mac so I use the pkg-config-0.18.1.tar.gz which should also work for you. After downloading the package I unzipped the archive and saved it to Documents/pkg-config-0.18.1. Now open a terminal window (open a finder window and click Applications -> Utilities -> Terminal) and cd into the pkg-config-0.18.1 directory. Once in the directory issue the ./configure command at the command prompt.


If there are no errors creating the configuration, issue the make command.


Now if there are no errors, issue the sudo make install command. This will prompt you for an admin password because it wants to install the compiled files.


We also need to set the pkg-config path so it can find all the libraries:

  • export PKG_CONFIG_PATH=/usr/lib/pkgconfig

Also before compiling, check that the file /usr/lib/pkgconfig/openssl.pc has the same paths as in the screenshot:




Now the OMI package install is not made for OSX, this is why the PAM modules need to be registered manually if we want to use certificates for secure communication. To create the PAM entry, create a file named “omi” in the /etc/pam.d directory. In the omi file ad the following text entries:



# The configuration of omi is generated by the omi installer.

# sshd: auth account password session

auth optional use_kcminit

auth optional try_first_pass

auth optional try_first_pass

auth required try_first_pass

account required

account required sacl_service=ssh

account required





We are now all set to build the OMI package. CD into the omi-1.0.7 directory and issue the commands:

  • ./configure
  • make
  • sudo make install

Note that after issuing the ./configure command you will receive the error “pam script is not supported on Mac-OS yet“. You can safely ignore this error because already we registered the PAM modules manually.

Just like we did with building the pkg-config package, if OMI installed successfully, the output should look something like this:




So let’s test our OMI installation. If you are not logged in as root, su into root (su root). Then cd into /opt/omi-1.0.7/bin and start the OMI server by typing ./omiserver -d You can find all the server commands by running ./omiserver –help Now we can test the omi server by running ./omicli id the output should be something like in the screenshot:



So woohoo! Our OMI server is running on our Mac and accessible by a client. In part 3 of this blog we will explore how to query the OMI server by using Powershell.

Part 2 – Apple OSX MP -The compiling and installing of the OMI agent on your Mac

Part 1 – Apple OSX MP – Configuring your Mac for OMI

So lets get started!

The first thing we need to do is getting our Apple Mac ready for compiling OMI. To compile OMI on a Mac demands some changes in some of the source files of the OMI package. At this point I would like to give credit due to the following post that shows you how to compile OMI for Linux: Managing Linux via OMI: Installation. Before you change the settings on your Mac shown in this blog, please be aware that this might pose a security risk so I would advise against doing this on a production system. Ok Lets get started. The first thing we need to do is make sure we are working with the latest version of OSX. The version that we will be using is OS X 10.8 Mountain Lion.


Next we need to install Xcode (free of charge). Login to the App Store with your Apple ID and install Xcode.


In Xcode we need to change a settings before we can edit/compile/install the omi package. From the menu click Preferences and then the Downloads button. We need to add the Command Line Tools.


Your Mac does not allow you to edit source code downloaded form the internet by default. To change this we must browse to System Preferences -> Security & Privacy and change the Allow applications downloaded from: setting to Anywhere.


We also want to be able to login with SSH, so we enable this System Preferences -> Sharing and checking the Remote Login check box.


OMI expects to run under the root account, so we will want to enable it. To do this you must enable the root user:

  1. Choose Apple menu -> System Preferences, and then click Users & Groups.
  2. Click the lock icon to unlock it, and then type an administrator name and password.
  3. In the Network Account Server section, click Join or Edit.
  4. Click Open Directory Utility.
  5. Click the lock icon to unlock it, and then enter your administrator name and password.
  6. Choose Edit -> Enable Root User, and then enter a root user password in the Password and Verify fields.

Your Mac should now be ready to compile, configure, and install the OMI package as shown in part 2.

Monitoring OS X Mountain Lion (10.8) with OpsMgr 2012 R2

Monitoring OS X Mountain Lion (10.8) with OpsMgr 2012 R2

On of the things I love to do in IT is connect systems that were not designed to communicate with each other. This is one of the reasons that I was pretty exited when Microsoft introduced cross platform capabilities in OpsMgr. Because recently the cross platform agent has been redesigned to work with a super light weight agent (OMI) on UX like systems, I thought it would be a worthwhile exercise to explore it in a bit more detail. Now what would be a fun project for exploring this topic? Well… what about monitoring my girlfriends Apple Mac 🙂

This is the first part of creating a management pack for the latest version of Apple’s OS X (10.8) Mountain Lion. This post will show you how to compile the new OMI agent (Open Management Infrastructure), set up communication with the agent through Powershell and finally create a Management Pack to communicate with the OMI agent.

The following parts will be handled in this series:

Part 1 – Apple OSX MP – Configuring your Mac for OMI

Part 2 – Apple OSX MP -The compiling and installing of the OMI agent on your Mac

Part 3 – Apple OSX MP – Query OMI with Powershell

Part 4 – OSX MP – Creating an OSX Management Pack


New Update for “OpsLogix Oracle Management Pack for SCOM 2012 V1.3.12.1” released.

We are proud to announce a new update release V1.3.12.1 for our Oracle Management Pack on the SCOM 2012 platform. This release has a focus on optimizing the connection usage used for monitoring the Oracle instances. And contains a few minor changes. You can read more about this at the OpsLogix blog:

This update release is completely upgradable with release v1.2.2.532. Please be aware of this: if you have saved templates or overrides into the oracle overrides MP named “OpsLogix IMP – Oracle (Overrides)” please do not import the oracle override MP file (OpsLogix.IMP.Oracle.Overrides.xml) from this update release. Otherwise you will overwrite your changes.

The update is downloadable throughout the customer portal.

For any question please contact us by phone or email.


OpsLogix Sales and Development Team


Part 2 – Apple OSX MP -The compiling and installing of the OMI agent on your Mac

Part 4 – OSX MP – Creating an OSX Management Pack

————————————————————————————– import the certificate into the management server

To import a user certificate and private key into the Windows Certificate Store, it’s easiest if you have them packaged together in PKCS12 format (.pfx or .p12). OpenSSL can combine a separate certificate (usercert.pem or usercert.cer) and private key file (userkey.pem) into PKCS12 format using the pkcs12 command:

openssl pkcs12 -export -out usercert.p12 -in usercert.pem -inkey userkey.pem

sudo openssl pkcs12 -export -out omikey.p12 -in ./omi.pem -inkey ./omikey.pem


$username = “root” $password = “Welkom01!” $secstr = New-Object -TypeName System.Security.SecureString $password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)} $Cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr

$options = New-CimSessionOption -UseSsl -SkipCACheck

$Session = New-CimSession -ComputerName vincents-mac.local -Authentication Basic -Credential $Cred -SessionOption $options Get-CimInstance -CimSession $Session -ClassName OMI_Identify -Namespace root/omi


## Edit the

## End Linux distro function


## Determine Version of Unix Platforms

if [ "${OSName}" = "HP-UX" ]


# Version=`uname -r | awk -FB. '{print $2}'`

Version=`uname -r`


elif [ "${OSName}" = "AIX" ]




Arch=`uname -p`

elif [ "${OSName}" = "SunOS" ]


# Keeping commented code for changing "5.10" to "10"

# Version=`uname -r | awk -F. '{print $2}'`

Version=`uname -r`


Arch=`uname -p`

echo $OSName

# Get OS Name for OSX

elif [ `uname -s` = "Darwin" ];


 OSName="OS X"


 Hostname=`uname -n`

 Version=`sw_vers -productVersion`

 Arch=`uname -m`


## If the OS is Linux, then we need to call the function to get our data

elif [ "${OSName}" = "Linux" ]




echo "Unknown"

exit 0


## Format in XML ouput readable by OpsMgr

echo "${Hostname}${OSName}${OSAlias}${Version}${Arch}${IsLinux}"