Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

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

Smarts SAM: How do I add an extra Varbind to traps being sent by the Trap Notifier? (318877)

Last Updated: 3/22/2024Categories: How toTotal Views: 2413Language:
English

Subscribe to get an email
newsletter with new updates

Please provide article feedback:

Resolution

How do I add an extra Varbind to traps being sent by the Smarts SAM Trap Notifier?

By default, the Smarts SAM Trap Notifier has nine Varbinds in the trap that is sent. These Varbinds have corresponding MIBs in the SMARTS-MIB.my file (Smarts Enterprise MIBs). These Varbinds are defined as follows in the trap-custom.asl or in the trap-notifier.asl file (depending on whether you are using the default or custom traps):

smNotifTimestamp   = smGenericNotify.".1.0";
smNotifServer      = smGenericNotify.".2.0";
smNotifClass       = smGenericNotify.".3.0";
smNotifInstance    = smGenericNotify.".4.0";
smNotifEventName   = smGenericNotify.".5.0";
smNotifInstanceID  = smGenericNotify.".6.0";
smNotifDescription = smGenericNotify.".7.0";
smNotifCertainty   = smGenericNotify.".8.0";
smNotifSeverity    = smGenericNotify.".9.0";

The traps that are sent from the Smarts SAM Trap Notifier in their default form include nine Varbinds relating to the above MIB definitions: "Timestamp", "Server", "Class", "Instance", "EventName", "InstanceID", "Description", "Certainty" and "Severity".

Other possible Varbind attributes
There are many other attributes of a Smarts Notification that could be sent as a Varbind such as "Impact" or "Acknowledged". The following section of this Fix statement explains how to add the attribute for Impact as a tenth Varbind to a trap. A list of the attributes and the relevant variables that Smarts can send as a Varbind can be seen in the notifier.asl file:

currentEvent->icType = "TIMER_ALARM";
currentEvent->icDisplayType = "UNKNOWN";
currentEvent->icServerName = "";
currentEvent->icId = "";
currentEvent->icClass = "";
currentEvent->icInstance = "";
currentEvent->icEvent = "";
currentEvent->icSourceDomainName = "";
currentEvent->icSourceEventType = "UNKNOWN" ? IGNORE;
currentEvent->icClassDisplayName = "";
currentEvent->icInstanceDisplayName = "";
currentEvent->icEventDisplayName = "";
currentEvent->icCertainty = 0;
currentEvent->icTimestamp = 0;
currentEvent->icEventDescription = "";
currentEvent->icEventType = "";
currentEvent->icSystemName = "";
currentEvent->icSystemType = "";
currentEvent->icSystemDescription = "";
currentEvent->icActive = FALSE;
currentEvent->icAcknowledged = FALSE;
currentEvent->icSeverity = 0;
currentEvent->icImpact = 0;
currentEvent->icFirstNotifiedAt = 0;
currentEvent->icLastNotifiedAt = 0;
currentEvent->icLastClearedAt = 0;
currentEvent->icLastChangedAt = 0;
currentEvent->icOccurrenceCount = 0;
currentEvent->icInMaintenance = FALSE;
currentEvent->icTroubleTicketId = "";
currentEvent->icOwner = "";
currentEvent->icCategory = "";
currentEvent->icElementClassName = "";
currentEvent->icElementName = "";
currentEvent->icIsRoot = FALSE;
currentEvent->icIsProblem = FALSE ? IGNORE;
currentEvent->icUserDefined1 = "";
currentEvent->icUserDefined2 = "";
currentEvent->icUserDefined3 = "";
currentEvent->icUserDefined4 = "";
currentEvent->icUserDefined5 = "";
currentEvent->icUserDefined6 = "";
currentEvent->icUserDefined7 = "";
currentEvent->icUserDefined8 = "";
currentEvent->icUserDefined9 = "";
currentEvent->icUserDefined10 = "";
currentEvent->icNotificationName = "";
currentEvent->icNLObjectName = "";
currentEvent->filterMe = FALSE;
currentEvent->sentByCustom = TRUE;

Adding the attribute for Impact as a tenth Varbind to a Smarts SAM trap
Any of the attributes in the notifier.asl file can easily be included as a Varbind in a trap sent by the Smarts SAM Trap Notifier. The following explains how to add the attribute for Impactas a tenth varbind to a trap:

To use the trap-custom.asl file to define the custom varbinds, you must set the sentByCustom parameter to TRUE in the notify.asl file as follows:

currentEvent->sentByCustom = TRUE;

Add the MIB definitions for the new attributes to the Smarts Enterprise MIB file (SMARTS-MIB.my). For the Impact attribute, this would be done as follows:

smNotifImpact OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS accessible-for-notify
STATUS current
DESCRIPTION
"The certainty of the event.  Floating-point number in the
range 0-100, stored as a string."
::= { smGenericNotify 10 }

In the trap-custom.asl file, define the Smarts MIB variable for the new attribute. For the Impact attribute (smNotifImpact), this would be done as follows:

smNotifImpact  = smGenericNotify.".10.0";

Add the Varbinds for the trap to the "ADD_VARBINDS()" function in the trap-custom.asl file. The following example shows //Impact and //Acknowledged Varbinds added:

// Timestamp
varbinds->addhi(smNotifTimestamp,
"smiCounter32", string(currentEvent->icTimestamp));
// Server
varbinds->addhi(smNotifServer,
"smiOctetString", notifier->serverName);
// Class
varbinds->addhi(smNotifClass,
"smiOctetString", currentEvent->icClassDisplayName);
// Instance
varbinds->addhi(smNotifInstance,
"smiOctetString", currentEvent->icInstanceDisplayName);
// Event Name
varbinds->addhi(smNotifEventName,
"smiOctetString", currentEvent->icEventDisplayName);
// Instance ID; "class::instance"
varbinds->addhi(smNotifInstanceID,
"smiOctetString",
currentEvent->icClass."::".currentEvent->icInstance);
// Description
varbinds->addhi(smNotifDescription,
"smiOctetString", currentEvent->icEventDescription);
// Certainty
varbinds->addhi(smNotifCertainty,
"smiOctetString", string(currentEvent->icCertainty));
// Severity
if (glob("NL_*", string(currentEvent->icType))) {
varbinds->addhi(smNotifSeverity,
"smiInteger32",
severities[numeric(currentEvent->icSeverity)]);
} else {
// 1 is the default
varbinds->addhi(smNotifSeverity,
"smiInteger32", "1");
}
// Impact
varbinds->addhi(smNotifImpact,
"smiOctetString", string(currentEvent->icImpact));
// Acknowledged
varbinds->addhi(smNotifAcknowledged,
"smiOctetString", string(currentEvent->icAcknowledged));
}

Note: The severities for "Severity" must be added to the trap-custom.asl file for the above to fully function.

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