KBI 311672 New Feature: Dynamic Email Address And SMS Mobile Numbers

Version

Argent Advanced Technology 5.1A-1807-A and above

Date

Monday, 4 June 2018

Summary

This feature can become very confusing

Feel free to contact Argent Technical Support to learn how to properly use this feature

Email addresses used in Email Alerts are usually hardcoded

However, the user might want to dynamically generated email address based on the actual event

For example, a monitored ISP switch can have many ports that are assigned to different customers and supported by different help desk teams

When a port is down, Email Alert should be sent to the dedicated support team

The IP device (switch) is the smallest entity being monitored

When a condition happens to the device, a down port in this case, it is easy to send the message to all support teams, but very difficult to send to just one of the support teams

Argent Advanced Technology 5.1A-1807-A introduces dynamic email address using VBScript

The VBScript Engine can access Event variables and implement whatever logic to return the desired email addresses

The same feature is implemented for mobile numbers in SMS Alerts too


Note: Though this feature provides the ultimate flexibility to compose email addresses and mobile phone numbers, it should be used lightly due to the complexity

Contact Argent tech support when necessary if the feature must be used

New feature is implemented in Argent Advanced Technology 5.1A-1807-A

Technical Background

The extended VBScript Engine supports one custom property and one custom method

(Custom Property)

RETVAL – Write only

The assigned values are the email addresses or mobile numbers used in the Alert

Multiple email addresses or mobile numbers are separated by semicolons

(Custom Method)

VAR(variable_name) – Read only

The variable name can be Alert Keywords such as ‘%AGNodeName’, ‘%AGBrokenRuleName%’ etc

It can also be an Event specific variable

To find out what are the available Event specific variables, test the Rule or Relator

Following is an example testing Device Magic Rule against a switch

Note the ‘Extra Values’ are the Event specific variables

In this example, the Event include variables ‘IFINDEX’, ‘PROTOCOL’, ‘IFNAME’, ‘PORT’, ‘COMMUNITY’ and ‘IFALIAS’

User has the access to the full VBScript Engine

Combined with the custom property and method, he can implement any imaginable logic

Sample VBScript

IFNAME = VAR(“IFNAME”)

if IFNAME = “Port 6 Gigabit Ethernet” then

RETVAL = “support1@company.com”

else

RETVAL = “support2@company.com”

end if

The logic is obvious

If port interface name is ‘Port 6 Gigabit Ethernet’, use support1@company.com; otherwise, use support2@company.com

Note: CISCO device generally has better port descript in variable IFALIAS

Resolution

Upgrade to Argent Advanced Technology 5.1A-1807-A or above