Uniquely identifying linux vms in azure WADMetric tables -
we developing software in c++ retrieve linux network information azure wadmetrics tables. using azure rest apis this.
however problem have wadmetric table can contain data multiple vms, , know host value. maps host name in guest, , it's possible it's not unique.
the deploymentid in tables uniquely identifies machine, there doesn't seem way via rest api.
is there way identify virtual machines data if host value duplicated across machines?
thanks, peter
the deployment id not present in these tables.
all azure resources identified azure resource manager (arm) resource id. value comes user input in windows azure diagnostics (wad) or linux diagnostic extension (lde) vm extension configuration. can see value if perform on https://management.azure.com/{resourceid}
the partitionkey set encoded arm resource id of vm.
partitionkey = escapekey ( arm resource id)
private static string escapestoragecharacter(char character) { var ordinalvalue = (ushort)character; if (ordinalvalue < 0x100) { return string.format(cultureinfo.invariantculture, ":{0:x2}", ordinalvalue); } else { return string.format(cultureinfo.invariantculture, "::{0:x4}", ordinalvalue); } } public static string escapekey(string storagekey) { stringbuilder escapedstoragekey = new stringbuilder(storagekey.length); foreach (char c in storagekey) { if (!char.isletterordigit(c)) { escapedstoragekey.append(escapestoragecharacter(c)); } else { escapedstoragekey.append(c); } } return escapedstoragekey.tostring(); } wrt rowkey, each metric value written twice 2 different indexes :
1) [encodedmetricname]__[utcticks_descendingorder]
2) [utcticks_descendingorder]__[encodedmetricname]
where utcticks_descendingorder datetime.maxvalue.ticks - datetime.utcnow.ticks padded 19 digits.
if trying read metric data time, should use index #2.
Comments
Post a Comment