I would like an email notification every time a completed workspacehad an error within the log. Is this possible and how do I set this up within our FME Server.
Hi @olly_egw ,
I'm unaware of a way to get notified anytime a workspace has an error in the log. However, you could be notified if any job fails.
FME Server has System Events that can be used to trigger an automation. The Error Message Logged Event will let you know anytime an error message is logged to the fmeserver.log, this includes workspace failures.
Using a workspace you can take this JSON and filter it to get only workspace failure and then set up an email with either the log attached or the link to the job provided in the Event.
Please let me know if you have any questions.
You can attach an email action to a workpace failed in an Automation, but just like the solution @siennaatsafe proposes that only catches a complete workspace failure. There may very well be cases where there are errors in the log but the workspace itself does not fail.
For those I guess you can set up an event where completion of such a job (assuming you don't want to do this for every workspace you run) triggers a workspace that reads that job log and searches for keywords such as "ERROR". If you do that, make sure the workspace that processes the log does not trigger itself because otherwise you'll create an endless loop of workspaces 😅
Many thanks for the response @siennaatsafe and @Hans van der Maarel .
As @Hans van der Maarel suggests, our workspaces are completing successfully, however some errors are still generated within the workspace log. These are the ones I would like to track for all recently executed workspaces. I am currently migrating our desktop workspaces to server and would like a simple single error handler rather than lots of email notification thru out the many workspaces. The hope was to use the logger to throw errors in the log and have the system report workspaces.
Is there a transformer that can cause the workspace to fully fail ?
I will review your suggestion and see if I can implement an elegant solution that is not endless.
Any other options/suggestions greatly appreciated.
Many thanks for the response @siennaatsafe and @Hans van der Maarel .
As @Hans van der Maarel suggests, our workspaces are completing successfully, however some errors are still generated within the workspace log. These are the ones I would like to track for all recently executed workspaces. I am currently migrating our desktop workspaces to server and would like a simple single error handler rather than lots of email notification thru out the many workspaces. The hope was to use the logger to throw errors in the log and have the system report workspaces.
Is there a transformer that can cause the workspace to fully fail ?
I will review your suggestion and see if I can implement an elegant solution that is not endless.
Any other options/suggestions greatly appreciated.
Is there a transformer that can cause the workspace to fully fail? Yep, you can try the Terminator for that.
Hi @olly_egw ,
I'm unaware of a way to get notified anytime a workspace has an error in the log. However, you could be notified if any job fails.
FME Server has System Events that can be used to trigger an automation. The Error Message Logged Event will let you know anytime an error message is logged to the fmeserver.log, this includes workspace failures.
Using a workspace you can take this JSON and filter it to get only workspace failure and then set up an email with either the log attached or the link to the job provided in the Event.
Please let me know if you have any questions.
Hi @siennaatsafe
I have reviewed the System events as suggested above, however all the events when opened have an error: The log file for job ID 'n,nnn' does not exist. Is this a problem with our system as it will be make review errors impossible.
Hi @siennaatsafe
I have reviewed the System events as suggested above, however all the events when opened have an error: The log file for job ID 'n,nnn' does not exist. Is this a problem with our system as it will be make review errors impossible.
Hi @olly_egw ,
That is odd. Can you see the logs through the UI? If you get the same error when you try to open the log in the UI, it's likely due to a lack of space on your system and the system cleanup task aggressively cleaning up your logs.
If you can see the logs in the UI, I do not know what would cause this error in the System Events. That would likely take a support case to figure out what is going wrong.
Hi @siennaatsafe
I have reviewed the System events as suggested above, however all the events when opened have an error: The log file for job ID 'n,nnn' does not exist. Is this a problem with our system as it will be make review errors impossible.
I can confirm it is an aggressive policy on the system clean up. The logs for the older events have in fact been purged. I have relaxed the rule and current logs are still there.
tyvm for the assist.😀
Update:
I have created a workspace that reads the logs created/updated within the last hour ( scheduled to execute hourly ) . If it finds an error a notification is then sent. This is working well and does not appear to tax the server resources. I can now inject errors on my workspaces using the logger and receive a single notification .
Thankyou for your suggestions.