The query doesn't give me anything and that's likely because it's searching for the word "Module", that's not actually part of the events. It also doesn't seem to account for the double quotes... I only used the ModuleA/B/C names just to show that they are different. The Module names are completely different from each other. Let me give you a better example.
This is a direct copy/paste of an event. (I did change the email address and server names for security reasons.)
"01","[emailaddress@email.com]-[9/20/2018 9:26:19 AM]",""
"02","SERVER05APWPD","2018-09-20","09:26:19"
"03","0","0","0","0","0","1","0"
"04","Email Import",""
"05","2018-09-20","09:26:19","2018-09-20","09:26:21","Scan","64","SERVER05APWPD","0","","0","0","0","0","0","0"
"05","2018-09-20","09:26:22","2018-09-20","09:26:30","KTM Server","64","SERVER14APWPD","0","","0","0","0","0","0","0"
"05","2018-09-20","09:26:31","2018-09-20","09:26:40","KTM Server 2","64","SERVER13APWPD","0","","0","0","0","0","0","0"
"05","2018-09-20","10:19:12","2018-09-20","10:19:31","KTM Validation","8","CITRIXSERVER:Sess 3","0","","0","0","0","0","0","0"
"05","2018-09-20","10:19:33","2018-09-20","10:19:40","KTM Validation","64","CITRIXSERVER:Sess 3","0","","0","0","0","0","0","0"
"05","2018-09-20","10:19:41","2018-09-20","10:19:41","Export","32","SERVER03APWPD","0","Export Error: [Could not identify document.]","0","0","0","0","0","0"
"05","2018-09-20","10:20:56","2018-09-20","10:20:58","Batch Manager","2","SERVER18APWPD:Sess 9","0","","0","0","0","0","0","0"
"05","2018-09-20","10:21:07","2018-09-20","10:21:17","Scan","64","SERVER18APWPD:Sess 9","0","","0","0","0","0","0","0"
"05","2018-09-20","10:21:18","2018-09-20","10:21:29","KTM Server","64","SERVER15APWPD","0","","0","0","0","0","0","0"
"05","2018-09-20","10:21:29","2018-09-20","10:21:37","KTM Server 2","64","SERVER13APWPD","0","","0","0","0","0","0","0"
"05","2018-09-20","10:21:46","2018-09-20","10:24:45","KTM Validation","64","CITRIXSERVER:Sess 6","0","","0","0","0","0","0","0"
I think what you gave me would likely work if adapted to find the events correctly, I would have to change several pieces of the query here to adapt it. such as setup each search with escape characters to pick up the double quotes as well.
However, the fact that there are spaces in the module names will likely throw that off, probably needing to be replaced by underscores or just eliminated altogether.
What I've done so far is to do field extraction based on just the first instance. (In most cases, there is only one, so this works fairly well, but ends up being inaccurate as there are some times that have more than one entry...)
Example extraction here:
"05","(?P<ExportStartDate>[^"]+)","(?P<ExportStartTime>[^"]+)","(?P<ExportFinishDate>[^"]+)","(?P<ExportFinishTime>[^"]+)","Export","(?P<ExportResult>[^"]+)","(?P<ExportHost>[^"]+)","\d+","(?P<ExportError>[^"]*)"
I created the same as above for each Module type. (Replacing "Export" with the corresponding Module name)
This seems to work fairly well, but these, again, only capture the first instance of these results. With knowing that, I'm working through this and determining whether or not that will be "enough" to get what I'm being asked for out of this data.
I took it a little further and extracted even more fields by using the status codes, since I know that the Result Code generally dictates whether or not I'll see duplicated runs through other modules, I can extract fields and name them similarly just with the word "Error" on them based on seeing that "32" Result Code. The use case where it would be a problem is if I have to report on time spent on a Module that ended up being repeated in a single event. Example is like the above event, you see it went through "KTM Server" multiple times, it didn't get an error on them (as they have a result of 64 each time), but this is where using those fields I extracted starts giving inaccurate data, as if I were to do a start to finish query on that, it wouldn't be capturing everything properly.
I'm still getting the requirements panned out as to what I'll be asked to provide, right now I'm just proof of concepting.
I'm playing around with it still, but these queries, I'm seeing quickly, can get very complex.
... View more