Understanding the Ping MP’s “Target Host Ping Check” Monitor parameters

Understanding the Ping MP’s “Target Host Ping Check” Monitor parameters

In the past I have gotten a lot of questions on the overridable parameters for the “Target Host Ping Check” Monitor in the Ping Management Pack, this is reason for the blog entry “Understanding the Ping MP’s “Target Host Ping Check” Monitor parameters”.

By default the monitor pings a target once a minute and turns to critical if it doesn’t get a reply if the target doesn’t reply to the second ping. For various reasons some organizations don’t always want the monitor to turn to critical right after only one ping response was missed.


To influence this behavior there are a couple of parameters you can override:

  • Interval
  • NumberOfNoRepliesAllowed

 


 

For example let’s say that we want to ping a target, but only want the monitor to turn critical after three responses have been missed. In this case we set the NumberOfNoRepliesAllowed
to 3. This setting will result in the monitor only turning to critical after four minutes if three consecutive pings are missed.

Now if four minutes is too long for the monitor to turn critical, you can adjust the Interval
parameter. The Interval parameter controls the amount of time between the pings. If in the same example you would like the monitor to turn to critical after two minutes, you should adjust the Interval parameter to 30. This would mean the following for this example:

  • The monitor pings every 30 seconds
  • The monitor is allowed to miss three consecutive pings and if the fourth ping is missed to it turns to a critical state
  • 30 seconds * 4 = 2 minutes

 


KB0005 – Ping IMP Configuration Dashboard Crashes due to a”blank ping target”

KB0005 – Ping IMP Configuration Dashboard Crashes due to a”blank ping target”

If the Ping IMP Configuration Dashboard crashes unexpectedly, this might be due to a “blank ping target” entry in the OpsMgrDB database.

The “blank ping target” is caused by a bug in the csv import function of the Ping IMP Configuration Dashboard, when you leave a blank line (carriage return) at the end of the csv file. The easiest way to resolve this issue is to export the targets and remove the ping hosts to which the “blank ping target” was added. Wait for an hour or so and re-add the ping host and import the ping targets, making sure you leave no blank line (carriage return) at the end of the csv file.

If you do not want to remove the ping host, an unsupported way of removing the “blank ping target” is by using the SQL statements shown below on the OpsMgr database.

CAUTION: As always make sure you have a current backup of your OpsMgrDB database. Because the method of deleting instances directly from the OpsMgrDB database is not supported by Microsoft, we cannot be held responsible for any damage that might occur as a result of running the SQL statements.

The sql statements below are an adaptation of the SQL statement from the blog post: http://basementjack.com/uncategorized/remove-stubbornstuck-computer-objects-from-ms-scom/

  1. Open SQL Management Studio and connect to the OpMgrDB
  2. First check if there are any blank entries for the source host name by running the following sql statement:

    Select * from basemanagedentity where Path
    like ‘<Source Host name>%’
    and Name is null
    and DisplayName =

  3. Then if you are sure you have the correct instance (source host) run the following:

    Update BaseManagedEntity Set Isdeleted=1 where Path
    like ‘<Source Host name>%’
    and Name is null
    and DisplayName =

After the SQL statements are run, the “blank ping target” should no longer exist in the Ping IMP Configuration Dashboard.

 

VMware Management Pack for Operations Manager 2012 – v1.2.0.1 Release

VMware Management Pack for Operations Manager 2012 – v1.2.0.1 Release

A new release v1.2.0.1 for the OpsLogix VMware Management Pack for Operations Manager 2012 is available. This version of the Management Pack is not upgrade compatible with the previous release (v1.1.0.84). If you have already purchased the Management Pack and have a valid support contract, you can logon to the customer download area and download this version.

Version 1.2.0.1 contains the following changes:

– All monitors and alert rules are performance optimized by making use of module cookdown
– Caching for monitors and alert rules is replaced by module cookdown
– Bug in configuration dashboard that falsely states that the licence is expired is fixed
– Datastore Free GB performance rule is added
– Datastore Used GB performance rule is added
– Datastore Percent Free GB performance rule is added
– Datastore Percent Used GB performance rule is added
– Performance rules for ESX servers are disabled by default
– Performance rules for Virtual Machines are disabled by default

Adding and assigning a license in SCOM 2012

Adding and assigning a license in SCOM 2012

In order to import a license you should have received a valid license key from OpsLogix. If you did not receive a valid license key please contact support@opslogix.com or sales@opslogix.com to obtain a license key.

 

  1. In the OpsLogix License Manager in the Monitoring section of the Operations Console click the Add License button.
    OpsLogix License Manager

 

  1. In the Add License popup box paste the license key you received (taking care that there are no trailing spaces, empty lines, or carriage returns) and click the Import License(s) button. The license is now imported.
    Add License

 

  1. Select the Assign tab and select the management pack you wish to assign a license for from the dropdown box. Check the objects for which you would like to use the license and click the Update button.
    Assign licenses
Part 3 – Apple OSX Management Pack – Querying OMI with Powershell

Part 3 – Apple OSX Management Pack – Querying OMI with Powershell

In part 2 (Part 2 – Apple OSX MP -The compiling and installing of the OMI agent on your Mac) we got the OMI agent running on our Apple Mac and were able to query it with the OMI client. No we will go one step further and do some cross-platform querying with Powershell.

First of all make sure you are running at lease Powershell version 3.0. Earlier versions of Powershell do not contain the Get-CimInstance commandlet which we need to query OMI.

We also need to make sure we can resolve our Mac by FQDN. In my test lab I just added the my Mac to the hosts file so that I can resolve and ping demos-mac.local.

So lets try to connect to OMI by using the following Powershell script:

$username = “root”

$password = “*********”

$secstr = New-Object -TypeName System.Security.SecureString

$password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}

 

$Cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr

 

$Session = New-CimSession -ComputerName demos-Mac.local -Authentication Basic -Credential $Cred

Get-CimInstance -CimSession $Session -ClassName OMI_Identify -Namespace root/omi

 

Personally I like to use the Poweshell ISE that comes standard with Windows, so I plugged the code into the code Window and hit run.


… Oh dear, Powershell spat out lots of angry red errors at us. At this point we have a few options:

1. Allow encrypted traffic from the Windows Computer from which we are running the Powershell Script.

2. Import the certificates generated by the OMI Agent.

3. Generate your own certificates.

In this blog I will go for the second option, and import the Certificates generated by the OMI agent. To import the certificates from the OMI agents we need to convert and export them from the machine on which the OMI agent is installed.

First browse to the directory in which OIM is installed, in my case /opt/omi1.0.7/etc/ssl/certs

OpenSSL can combine a separate certificate (usercert.pem or usercert.cer) and private key file (userkey.pem) into PKCS12 format using the pkcs12 command:

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


After executing the previous command you should have a new omikey.p12 file.

On the Windows machine open a certificate mmc snapin which displays the certificates for the computer account.


Import the omikey.p12 into the Trusted Root Certification Authoroties.


Before we run the Powershell script again we need to make a few changes. First add the line:

$options = New-CimSessionOption -UseSsl -SkipCACheck

and add -SessionOption $options to the end of the following line:

$Session = New-CimSession -ComputerName demos-Mac.local -Authentication Basic -Credential $Cred

The script now looks like:

$username = “root”

$password = “*********”

 

$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 demos-Mac.local -Authentication Basic -Credential $Cred -SessionOption $options

Get-CimInstance -CimSession $Session -ClassName OMI_Identify -Namespace root/omi

 

Lets see what the output is of this script:


Awsome! We just connected to our Mac using WinRM!