Hi @ns102 To get you started, here is something you can do to achieve a table of information you want. There'll be better ways to do it, but this yields what you are after. This is assuming, you are seeing 2 jobs as a single event. Ideally, each job should be treated as a separate event with its own timestamp. This can be done by updating the sourcetype configuration in props.conf, as part of the data ingestion process. Secondly, to speed things up I would suggest extracting fields during ingestion period, rather than doing it on search time. For the ENV value, I would suggest creating a lookup, that checks the jobname and returns the environment value. Furthermore, you can setup an automatic lookup so that ENV field is already present even during search time. This way you can just update and maintain the lookup values to accommodate more environments and jobs as and when you have. Also, while building dashboards I would recommend building a base-search and using those to get primary set of information to design panels and get insights out of. It will reduce the number of searches with field extractions and get you results as fast as it could. source="xml.log" host="Beast" sourcetype="test-xml"
| rex field=_raw "APPLICATION\=\"(?P<app>.*)\""
| rex mode=sed "s/[\r\n]+/ /g"
| rex mode=sed "s/[\%]+//g"
| eval job=trim(split(_raw,"<JOB"))
| fields _time job
| stats values(_time) as _time by job
| rex field=job "JOBNAME=\"(?P<JOBNAME>[\w\-]+)"
| rex field=job "NODEID=\"(?P<NODEID>[\w\-]+)"
| rex field=job "FTP\-ACCOUNT\"\sVALUE\=\"(?P<LCON>[\w]+)\+(?P<RCON>[\w]+)"
| rex field=job "FTP\-LHOST\"\sVALUE\=\"(?P<LHOST>[\w]+)"
| rex field=job "FTP\-RHOST\"\sVALUE\=\"(?P<RHOST>[\w]+)"
| rex field=job "FTP-LPATH1\"\sVALUE\=\"(?P<LPATH1>[\w]+)\"\/\>\s\<VARIABLE\sNAME\=\"FTP-RPATH1\"\sVALUE\=\"(?P<RPATH1>[\w]+)\"\/\>"
| rex field=job "FTP-LPATH2\"\sVALUE\=\"(?P<LPATH2>[\w]+)\"\/\>\s\<VARIABLE\sNAME\=\"FTP-RPATH2\"\sVALUE\=\"(?P<RPATH2>[\w]+)\"\/\>"
| fillnull LPATH2,RPATH2 value=null
| eval LPATH = LPATH1+","+LPATH2
| eval LPATH =replace(LPATH,",null","")
| eval RPATH = RPATH1+","+RPATH2
| eval RPATH =replace(RPATH,",null","")
| eval ENV=if(JOBNAME="T-JOBA","TST",if(JOBNAME="A-JOBB","ACC","OTHER_ENV"))
| table ENV JOBNAME NODEID LCON LHOST LPATH RCON RHOST RPATH
| where isnotnull(JOBNAME) ~ If the reply helps, an upvote would be appreciated.
... View more