Revision 527 – Improved FileSystem Layout Detection

internal: the detection of filesystem layout and file relative locations was all twisted, and was flakey. So I’m ripping it out. It’s mostly refactored, but in order to leverage it sooner, there are currently both methods active. The flakey one will finish dying very soon, but in the meantime, only most of the code benefits from this structure change rather than all of it.

The way I’m doing it now is a straight Booch-ian method of taking multiple objects and using them to encapsulate the logic. They are interchangeable. The most applicable will be chosen by — you guessed it — voting. Whichever one looks most likely will be used. This allows me to abstract off discovery of pathnames and locations as they change from live server, PortalLogs, and database backup without huge changes in code and whackloads of if/else loops.

The behavior I wanted to leverage more quickly is the reading of summarymon log to check performance at the database insertion side.

Revision 521 – Dump-Config for ESX HBAs to Check PHC

In revision 521, I added the ability to dump out the esx hbas as esxhbas.csv, esxhbas.xml, vminventoryraw.csv, or vminventoryraw.xml similar to dumping roving.xml and roving.csv. The outputs are self-documenting in #comments in the CSV, or as XML self-documents already. The benefit of this function is that when the PHC seems to miscalculate the HBA speeds in phc-vm.csv, the raw data can be debugged. Note that the XML has no whitespace, so “xmllint -format esxhbas.xml” is your friend.

For example:

(typically running locally: the MySQL is configured to only accept local connections)

java -jar vict.jar -D esxhbas.csv

or

java -jar vict.jar -D esxhbas.xml

…and in long-options too:

java -jar vict.jar --dump-config esxhbas.xml

…but since the JRE is typically hidden below the VirtualWisdom directory, use vict.bat:

VICT.BAT -D esxhbas.xml

VICT.BAT --dump-config esxhbas.xml

Revision 516 – Added parsing of OnCommand Data for Nicknames

In revision 516, the basic capability to ask an OnCommand/NetApp management console for the Nickname/WWPN mapping has been added. This allows the reuse of the information it has collected by various device-specific methods to add meaning and facility to VirtualWisdom.

The ability to avoid re-polling and re-querying data essentially reduces the load to the devices polled and reduces the management effort: re-using the effort already expressed to configure one tool means that no additional effort is required — so long as the information is usable.

In this case, the same parser logic is used as was added for BNA in BNA Query later expanded to both “pools” in BNA. Like the BNA work, the OnCommand query simply reformats a query and sends it through the array of parsers to vote upon:

java -jar vict.jar --nickname=osmsql://user:pass@server:port/ --nicknameout=\VirtualWisdomData\DeviceNickname\nicknames.csv

Default user/pass are not accurate, so that still needs to be resolved. Like the BNA parser, this method hits the underlying database directly, so it needs (firewalls/filters) direct access to the server, and is vulnerable to schema changes.

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.

Revision 502 – Obsessive Parser Retry

I’m not proud of this one. Please bear with be:

In revision 493, I wrote about how the parser for “–nickname=” actually pushes content to three separate parsers, and simply chooses the one with the best results. That was all about not trying to guess the content, but leave the guessing to the parsers. Whichever one gets the most, it wins. Too easy, and extremely scalable.

Problem is, the underlying Apache lib used to fork-off the incoming stream — to avoid downloading a file multiple times to parse it — that doesn’t always seem to work.

I put a lot of time and concern into trying to figure out why, but in the end, I just added a retry-counter.

When all parsers return a “shoot, I dunno” response, we simply run it again. And again. And again. …not so obsessive because we give up after 3 times, but you’re free to make it as psychotic/obsessive as you want.

To describe this, I verbosely wrote “add retries to the parsing so that we can thrash on a file if we need to just-get-it-done”

I promise to do better design in the future, but for now, this will only re-download a file for each full retry cycle. This doesn’t matter at all for file:// URLs, but for ftp://, bnapsql://, and http://, it will show up as multiple tries.

Revision 492 – second skew-check

It seems that someone is creating Demo Databases rather than use mine (which are cleaned up by Nick).

They’re broken. Specifically, they have extra data appended at some point. HINT: if the data in your five-minute summary ends at 2011-11-16, but your last interval is 2012-04-17, you have the broken one.

PHC now detects that, using both the packages and the final summary.

Revision 476 – Added Auto Mode to PHC

For revision 476, I wrote “made PHC “do the right thing” a bit better by dropping out some config in the bat file and activating an “auto” mode; may have issues in a “-h uri” mode”

In short, there it is: the PHC becomes “Automatic-er” and allows me to be lazier. Avoiding possible user-error is merely a stretch-goal 🙂

Consider the 7 characters:

PHC.BAT

What this does is:

  1. find your java.exe in a list of 12 most likely places
  2. if PHC-XLSX.jar is available, use it; otherwise, use PHC.jar
  3. runs it in “-A” or “–auto” mode

Auto Mode

Auto Mode simply does the smarter things for you, so that fewer choices are necessary:

  1. if PHC-XLSX.jar has enabled XLSX creation, build phc.xlsx
  2. if any OUIs are missing, look them up, and create phc-OUISignatureList.xml which can be used as the basis of edits to OUISignatureList.xml
  3. if VMs are present, and some HBAs are not set, produce phc-vm.csv which can define HBA speeds based on having all HBAs under ProbeSW
  4. pri

Revision 368 – Kerberos Config Helper

Due to frustration on people updating Kerberos config data without actually, well, being correct, I’ve added a helper to vict.jar: “Created a quick tool to dump out Kerberos config information in text and XML format to help reduce ambiguity in documented AD authentication via Kerberos”.

I hope this avoids further misguided dependence on Jambons who just cannot check a detail.

Try it out on your server:

java -jar vict.jar --kerberos

There’s an article (How to Enable Active Directory Authentication via Kerberos) describing the process of adding a Kerberos user, but this output accelerates the process.