EMC Smarts ASL Scripting

Sample IONIX ASL scripts, and information about using ASL to develop custom logic for IONIX (aka Smarts).

ASL Reference Documentation

The EMC/Smarts (aka Ionix) adapter scripting language reference document is available with all the Smarts packages. The document is typically called "asl_ref.pdf", or is available in the main product documentation bundle which can be downloaded from EMC's...

ASL Tutorial

This tutorial is a work in progress. I hope to add a lesson or two to it from time to time until it is complete. I hope this proves useful.  

ASL's "Hello World"

It is traditional for students of any programming language to start by writing a program that prints "Hello world!", to get a basic idea of the syntax and how to compile and execute it. So here's the equivalent for IONIX / Smart's "ASL" (Adapter Scripting ...

Cleaning up a string using Smarts ASL

Someone recently asked how ASL can be used to remove unprintable characters from a string. This example shows one way of editing a string to remove any unwanted characters from it. The specific example shown below can be used in a DXA hook script to clean...

Clearing WAS_ACTIVE notifications in SAM

Notifications in Smarts (aka IONIX) SAM that are flagged as "WAS_ACTIVE" in the EventState attribute appear when the domain that raised them breaks it's connection with SAM. They may hang around in the SAM without being cleared (or at least: being cl...

Discovery time - converted to seconds

In answer to a recent question.. Here's an example ASL script that shows one way to determine the number of seconds it took to discover each system in the IP repository.. START { .. eol } do {     foreach ucsName (getInstances("UnitaryComputerSystem")) { ...

Extracting IP addresses from free-format text with ASL

ASL's pattern matching is a powerful way of verifying text and extracting information from it. In this, it is a little like "perl" and other languages that support regexs. However ASL's parsing logic is very different from that of perl, and you can hit...

Forcing Smarts SAM to archive cleared notifications

The following example ASL script shows how to force SAM to "archive" all cleared notifications immediately. This is not normally required since SAM has it's own configurable archival policy, but from time to time it is useful to do this - for example...

How to start an ASL script

I wrote about how to stop one , but a wise man commented that we should know how to start one first. Maybe I've gone and put the cart-before the horse? How to start a script? Well - there's more than one way to skin that particular cat (no - no ...

How to stop an ASL script

One question keeps coming up in Smarts (aka IONIX) ASL training sessions and discussions... "When do you need to use the 'stop' function?". The answer is quite simple but does highlight one of the oddities (features ?) of the language, which is that...

IONIX ASL Variable Context

Variables in ASL can be declared in a number of ways, and with a number of different "contexts" (meaning: the parts of a script that the variable is visible to). Server-Global Variables Variables declared with the "global" keyword before any rules...

List unreachable IP networks

Here's a Smarts (aka IONIX) ASL script example that lists the unreachable IP sub networks in the AM/PM domain. By "unreachable" I mean that none of the IP address in the subnet can be pinged. This shows the kind of thing that is possible with ASL with...

Redirecting IONIX Hookscript Output

Question Our hook scripts dump all their output to the SAM log file, which can clog that file with info. Is there an easy way to direct hook script output to a separate log file? Answer You cant redirect it as such, but you CAN use operations of...

Smarts sm_config using ASL

I have sometimes worked on distributed EMC Smarts (aka IONIX) deployments where the sm_config command is used to configure the SAM or OI domains, but where the files that they need to load are located or generated on different physical platforms to t...

SNMP get from ASL in IONIX OI or SAM

Following on from a question that I have been asked recently, this posting is an addendum to "SNMP Get from ASL ", and gives an example of invoking SNMP Get from an ASL script running against SAM or OI. This approach uses only the ACT_SNMP class, and...

SNMP Get from IONIX ASL

The IONIX management domains use SNMP extensively for discovery and polling - using highly optimised intelligent mechanisms that result in polls being performed "as required" and bundled into the smallest number of packets possible. Hooking into these m...

Split function for ASL

Perl and other languages include a very useful utility function that splits a string into an array, breaking it up on a specified delimiter string. ASL lacks such a feature, but does include the building blocks needed to provide one. As is often...

String replacement in ASL

The Smarts/IONIX ASL language does not have a built-in function for replacing one sub-string in a string with another. However, this is quite a common requirement. Here's an example of how it can be done. The rule is typically called like this.. str1...

Stripping quotes from a string using ASL.

Here's a simple Smarts (IONIX) ASL rule to remove the quotes from a string... START { .. eol } do {         x = NOQUOTE("Hello \"Smarts\", how are you?");         print(x); } NOQUOTE(s) {         delim = "";         input = s;         local c...

VIM Syntax Colouring for IONIX/Smarts ASL

I spend a lot of my time these days working on ASL scripts to enhance Smarts solutions. Most of that time is spent on Linux, working with "VIM" as the editor of choice. It was therefore a natural step for me to try to configure VIM's syntax colouring...
Scroll to Top