Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
i have a log file i only need to load the error message in qvw . i used table files button to load it but i'm getting everything i just want the error message that is generated by this log file so that i can display it on dashboard if it fails to reload . loaded the log file as attachement
Thank you in advance
ErrorsInLog:
LOAD [@1:20] AS Time,
[@21:26] AS Line,
[@27:n] AS Message
FROM
[IT Service Desk - Incidents.qvw.log]
(fix, unicode, no labels)
WHERE WILDMATCH([@27:n], '*ERROR:*');
In order to get to the error message, you will have to load everything in any case, as it is often the last thing written to the log file. Text files are not databases, they must be read sequentially.
Create a LOAD statement that parses the first 25 characters and puts them in a Date + Time + (optionally) Linenumber field. Put the remainder in a fourth field called "Message" or something. Then add a WHERE clause that skips all lines that don't have the word "Error:" after the 25th character.
thank you very much for your response may you please show me via an example ?
ErrorsInLog:
LOAD [@1:20] AS Time,
[@21:26] AS Line,
[@27:n] AS Message
FROM
[IT Service Desk - Incidents.qvw.log]
(fix, unicode, no labels)
WHERE WILDMATCH([@27:n], '*ERROR:*');
thank you very much this is what i was looking for