Revision 640 – Filter or Replace Nicknames

In this revision, the FAE tools gain the ability to filter or replace automatically-provided nicknames in the imported nicknames. This includes:

  • Nicknames that look like FCIDs (which are automatically provided for devices logged into F-ports)
  • Nicknames that look like WWPNs (which are typically ISLs: something attached, but no FLOGI)
  • Nicknames ending in “(ISL)” which tend to be completed ISLs (discover both sides)

Filter (-f) removes these nicknames, allowing a cleaned-up nickname file to be imported without accidentally setting generated nicknames to be user-provided (hence “sticky”).

Replace (-S, for Suggested) swaps with Suggested Nicknames (SNICKs) — nicknames based on well known patterns of WWPNs by deliberate manufacturer habit or design.

Nicknames that do not look like predictable/default nicknames are not affected: this is intended for cleaning up a Portal Service export that includes all sorts of additional information.

Revision 634 – Use External Opensource XPathTool

To reduce the level of obscure code, and to allow the collection of XPath-based XML tools cross-language into a single repos, the external XPathTool project will be used for XPath -based XML get/set of XML values. Samples are in testsuite.at in that repository.

This code has appeared in the last 4 years of my projects based on some C code I used from a test case. The Pure-Java was used to emulate that same result without having to cross-compile where Windows has a kinda crazy build environment and significant effort-cost plus license cost to maintain a build server. I’m no “rah rah Pure-Java yay!”, but I like that I can send one jar file, and it works on Unix (and variants), Windows, Linux (and variants).

Revision 563 – TestCases

Few specific changes in this release, but a couple of little ones:

  1. In debugging some WBDCopyByFilter issues, some testcases were added for UDC2FilterLaconic and WBDCopyByFilterPrefixed which unfortunately show that the WBDs produced have the right filters applied, but no help in why the filters don’t appear in WBD
  2. version-bump to 3.4.4: VR grabs the newer version
  3. version-bump to 3.4.4: PortalHealthcheck knows the correct 3.4.4 DV to check against an ER-414

Revision 513 – UDC2FilterLaconic

Added a UDC2FilterLaconic.xsl to create filters from UDCs with shorter names; in past, the filters created are “UDCName = UDCValue”, such as “ArraySW = DMX001901” or (in the , Filters for VirtualWisdom UDC) “Application_SW = SVCS Analysis Cluster”.

This variant only produces filters named for the value: “DMX001901” or “SVCS Analysis Cluster”. I’ve called it “Laconic” because it is clearly less verbose that its model.

Revision 512 – Vict Nickname Now Parses Cisco Device-Alias Database

The vict (VI Client Tool) “nickname” action now understands the output of a “show device-alias database” command on cisco.

In past, customers and users generate these files either by running the command in a plink.exe or ssh session (ie: the simplest way), or by capturing a log from their ssh session and running the command manually (ie the more-work way). Unfortunately, in the awk-based parser, replacing spaces with tabs blows away the parser, so this smarter parser should be able to handle that now.

My commit note was simply “Added basic parser for output of Cisco ‘show device-database alias’ behind VIClientTool’s –nickname= option”, and that says it all to ME, but to expand for others, this is what that means:

Recall that with multi-column CSVs, Brocade “alishow”, and Brocade “zoneshow”, a user can ignore the format of the file and just send it in with a “nickname” long-option or “N” for the short-option aficionados.

Now, if you give VICT a cisco “show device-alias database” output, it’ll make sense of that too.

The logic is the same: throw the content scattered at all the parsers, and see who gets the most results.

Although this and other parsers will get the reformatted output from a BNA ext ration (and soon, NetApp), only the basic parser ever gets results form those, so this new parser shouldn’t affect anything adversely. ..but without much forethought, the user gets another format to use.

Quickly Create Filters for VirtualWisdom UDC Values

The UDC capability in VirtualWisdom enables quite a powerful ability to group fabric entities based on a number of parameters, but creating the filters to use a large UDCs can be a bit cumbersome. UDC is VirtualWisdom’s User-Defined Context, allowing a virtual metric value to be defined within summaries, calculated based on powerful expressions.

Typically, UDCs are used to separate and group entities such as:

  • Physical Datacenter to filter physical-layer alerts (such as CRCs) to the correct ticket queue for inspection
  • Business Unit (BU) UDCs to filter performance alerts (such as response-time) against Business-Unit -specific thresholds (i.e. Oracle requires 12ms response time, but the NFS filer accepts 20ms)
  • Port/Blade/ASIC calculations
  • Grouping a SuperDome’s ports or an Array’s ports for filtered reports

As well, UDCs are used for “what-if” calculations: What if the SCSI traffic from a certain HBA was zoned to a different storage port, which it overload the Queue and link speed? What-if UDCs are an extremely powerful tool to prove capacity based on historical use, but somewhat out-of-scope for this article.

My content in Virtual Instruments’ SAN Best Practices tend to be of the how-to nature; in this article, I’d like to share a simple method of creating all the “X = Y” filters for a specific UDC programmatically, which can reduce the time-to-value in new installs or changing environments. When linked with other generation how-to articles (such as nickname collection, or generating UDC by transform), this can further reduce the effort of managing a very large SAN.

Process Overview

For this process, our workflow will look like the following:

As you can see, the starting file “UDCExport.udc” can be either exported from the VirtualWisdom Portal itself, or can be generated by other means. The file is converted using xsltproc using a “program” or “script” UDC2Filter.xsl, resulting in Filters.xml which can be imported manually to VirtualWisdom.

Overview

UDC Files in VirtualWisdom are a specific schema of XML file; as such, standard easily-available license-free tools such as xpathget, xmllint, or xsltproc can be used to interrogate, validate, or convert the starting XML to a different format, even generating CSV or simple text in the process.

XSLT is the XML Stylesheet Translations; XSL is a Stylesheet for XML, similar to CSS describing the stype of a free-form HTML page. In essence, XSL can be considered an CSS in XML, but rather than markup content — such as type facing and style for large printed content — XSL can also transform and convert content. XSLT is the act of using XSL markup in a standalone processor (xsltproc) to create content based on XML content. In many cases, this is XML generating XML, but can be used to write TSV, CSV, JSON, etc.

VirtualWisdom Filters are exported as another schema of XML file, and can be similarly manipulated by standard XML tools. Even though this XML is a text-based format, trying to edit it with a text editor can be prone to human-error. We can read XML for debugging (xmllint -format), but as the size of the content gets larger, to use it as thought XML is an opaque binary format, which again leads us to the free tool “XSLT”.

In our case, a specific XSLT file is used to manipulate a UDC definition into a list of Filter definitions: UDC2Filter.xsl guides the conversion of UDC Values to Filters which match them.

Running the Script

xsltproc is available on most non-Windows platforms as an installable RPM, SSO, .deb, .pkg, or similar pre-packaged open source project; on Windows, it can be installed per SageHill’s Instructions; a file xsltproc.zip is easily obtained from any VI FAE to accelerate your install process.

Running it is quite simple:

xsltproc.exe -o Filters.xml UDC2Filter.xsl UDCExport.udc

There’s no output: all generated content goes directly to the output filter file.

Complete Example

In order to show how the full process, in case I’ve left out some details or some details seem implied, this is a full example based on data in our demo databases (which we use for demos and training):

Given the following UDC:

UDC that we start with for our example UDC2Filter

We export this UDC to Application_SW.udc, run the XSL Transform as follows:

xsltproc.exe -o Application_SW_Filters.xml UDC2Filter.xsl Application_SW.udc

The result we get in Application_SW_Filters.xml looks like this:

Clearly this example is only a few filters, no big deal. The benefit comes in when there are more than a half-dozen to build (recently, a 212-value UDC was tested). As well, if the UDC is edited (perhaps based on automated processes) then the administrator must go through and check that every value has a filter.

Unfortunately, there is no schedule-action for Filter import.