On a Windows server i have a file directory where the logs from 2 different processes are being stored.
After each run these processes generate a separate .log file. One process runs 2 times every day, while the other runs 1 time per week. The exact hours vary widely.
I need to monitor only the newest .log files and search for certain keyword in them.
I read through documentation and some old discussions and attempted to create and Item Key like this (note: for testing purposes i tried to implement the log monitoring for just 1 of the 2 processes):
log[C:\temp\Jumis[A-Za-z]{5}\s-\s[A-Za-z]{5}\sfrom\s[A-Z]{4}\sto\s[A-Z]{3}\s[A-Z0-9_]{15,25}\([a-z0-9]{15}\).log,Failed,,,skip]
However, this resulted in error: "Cannot update item. Invalid key".
I verified in regex101.com that "Jumis[A-Za-z]{5}\s-\s[A-Za-z]{5}\sfrom\s[A-Z]{4}\sto\s[A-Z]{3}\s[A-Z0-9_]{15,25}\([a-z0-9]{15}\).log" matches all the sample log file names that i tested.
I tried various minor adjustments, like putting around the commas, etc. but it did not help.
So what would be the correct way to capture the log file name that is subject to change with every new generation?
After each run these processes generate a separate .log file. One process runs 2 times every day, while the other runs 1 time per week. The exact hours vary widely.
I need to monitor only the newest .log files and search for certain keyword in them.
I read through documentation and some old discussions and attempted to create and Item Key like this (note: for testing purposes i tried to implement the log monitoring for just 1 of the 2 processes):
log[C:\temp\Jumis[A-Za-z]{5}\s-\s[A-Za-z]{5}\sfrom\s[A-Z]{4}\sto\s[A-Z]{3}\s[A-Z0-9_]{15,25}\([a-z0-9]{15}\).log,Failed,,,skip]
However, this resulted in error: "Cannot update item. Invalid key".
I verified in regex101.com that "Jumis[A-Za-z]{5}\s-\s[A-Za-z]{5}\sfrom\s[A-Z]{4}\sto\s[A-Z]{3}\s[A-Z0-9_]{15,25}\([a-z0-9]{15}\).log" matches all the sample log file names that i tested.
I tried various minor adjustments, like putting around the commas, etc. but it did not help.
So what would be the correct way to capture the log file name that is subject to change with every new generation?
Comment