Home > OpsMgr > OpsMgr Command line notification problem and fixes

OpsMgr Command line notification problem and fixes

When I use a notification command channels to run scripts that forward alert information to external system, the command line includes several alert parameters.

The annoying thing is that when an alert is missing one parameter, the notification command is not executed and event 21409 is logged in the opsmgr log.

I bump into this problem after when a customer asked me to create several alertsmonitors using the SCOM GUI. This rulesmonitors used to check simple event log parameters.

When alert was raised because of these rules i noticed that the "ManagedEntityPath" is empty!!!

and if the channel for this command notification use the "Alert Source" as a notification parameter it includes two parameters "$Data/Context/DataItem/ManagedEntityPath$ $Data/Context/DataItem/ManagedEntityDisplayName$".

The first parameter is empty and the notification fails.

“The process could not be started because some of the data items could not be resolved…”

I found 2 useful workarounds.

The first one is to include only the "$Data/Context/DataItem/ManagedEntityDisplayName$" on a dedicated channel and subscription for a specific rules and monitors.

the second (and a better approach) is to set a default for the problematic parameter as i found here:


$Data[Default=’ ’]/Context/DataItem/ManagedEntityPath$$Data/Context/DataItem/ManagedEntityDisplayName$

You can set it as space, just like the above example, or any other string you like.

Categories: OpsMgr Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: