Loading

×Sorry to interrupt
This page has an error. You might just need to refresh it.
[NoErrorObjectAvailable] Uncaught ReferenceError: addCTracking is not defined
Failing descriptor: {markup://c:KM_ArticleThemeLayout}

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

VMWare Smart Assurance SAM: How can I extract a field out of Availability Manager and into UserDefined field for a SAM event with a hook script? (319385)

Last Updated: 9/26/2023Categories: How toTotal Views: 2416Language:
English

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Symptoms

How can I extract a field out of VMWare Smart Assurance Availability Manager and into UserDefined field for a SAM event with a hook script?
How can I get OSVersion or any other attributes that are not available in VMWare Smart Assurance Service Assurance Manager (SAM) into the UserDefined1 field or any other UserDefined field within HookScript?

How can I get OSVersion attribute into the VMWare Smart Assurance SAM Topology by editing dxa-conn.conf?

Resolution

To populate the desired information from AM into a SAM event, complete the following steps:

Determine which hookscript SAM is using to manipulate incoming notifications from the underlying AM domain manager as follows:

Open up the Global Manager Administration Console.

Attach to the SAM Domain Manager.

Expand the ICS_Configuration tree.

Expand the Domain Types tree.

Select the domain type for the underlying domain manager (INCHARGE-AM-PM-SUITE, INCHARGE-AM-SUITE, and so on).

Once the correct domain type is selected, the hookscript that is used will display on the right pane.

The default hookscript is ics/dxa-sample-hook.asl (see Note statement). This article will use the default script to illustrate how the OSVersion attribute can be pulled in from the underlying AM domain, and populated into the UserDefined1 field of a notification in SAM.

Open this script for editing. This script is found in the following directory:

<BASEDIR>/SAM/smarts/bin/sm_edit rules/ics/dxa-sample-hook.asl

Find the section "/* Customizations go here ... */ ". This is the section where modifications must be made. (See Sample Hook script section below).

Restart your SAM server to apply the changes made to the sample hookscript. Or, as an alternative to a server restart, you can run the ICS_RemoteConfig.asl script, which will will force an event that will update the UserDefined1 field. This script is found here:

<BASEDIR>/SAM/smarts/bin/sm_adapter -s INCHARGE-SA ics/ICS_RemoteConfig.asl

Related Information

Sample Hook script
Below is the sample hook script (dxa-sample-hook.asl).

============================== cut here ==========================================

/* dxa-sample-hook.asl - Hook adapter for InCharge Consolidation Server

*

* Copyright (c) 1997-2002, System Management ARTS (SMARTS)

* All Rights Reserved

*

* RCS $Id: dxa-sample-hook.asl,v 1.1 2002/05/22 16:15:57 eo1 Exp $

*

*/

default NotificationName = "";

default MessageType = "";

START {

.. eol

} do {

if (NotificationName == "") {

print("InternalError: ".this->Name." did not receive NotificationName!");

return;

}

eventObj = self->object(NotificationName);

/* Customizations go here ... */

if ( !eventObj->isNull() )

{

deviceObj = object(eventObj->OccurredOn);

if (! deviceObj->isNull() ) {

eventObj->UserDefined1 = deviceObj->OSVersion;

eventObj->changed();

}

}

return;

}

/*

* These variables describe the formatting of this file. If you don't like the

* template defaults, feel free to change them here (not in your .emacs file).

*

* Local Variables:

* mode: C++

* comment-column: 32

* c-basic-offset: 4

* fill-column: 79

* End:

*/

============================== cut here ==========================================

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

No results for undefined

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

Related Versions:

VMware Smart Assurance - SMARTS

Take Our Survey

Support Assistant