Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Qlik Sense Task Failure Notifications

Hi,

Is there a verifiable solution for configuring task failure notifications/emails? I have seen a few posts about this in the past, but haven't come across anyone having success.

15 Replies
barry_stevens
Contributor II

Re: Qlik Sense Task Failure Notifications

I asked this a couple of days ago and this was the response...

Task Failure notifications

Seems not an out of the box solution and to utilise Qlik Branch solutions (see answers to my Question)

Appears to be a common request - hopefully added to a release soon

Barry

Re: Qlik Sense Task Failure Notifications

I have amended this http://www.johndaniel.com/index.php/qlik-sense-task-failure-notifications-solved/ to provide me a solution to a similar requirement.

Not applicable

Re: Qlik Sense Task Failure Notifications

Bill, do you have more information on this? What did you amend? did you use the same script in this link? I tried the script as a first step, and it did not work.

Monica

Re: Qlik Sense Task Failure Notifications

What kind of not work ?

kevincase
Contributor II

Re: Qlik Sense Task Failure Notifications

Monica,

There is an out of the box solution for this!  Re: Alerts in Qlik Sense

You can use the SMTPAppender to do this.  The link above gives an example of how to implement this.  I was able to configure this on both our test and production environments.  And it works great.

Search the community or Qlik Help for SMTPAppender

Not applicable

Re: Qlik Sense Task Failure Notifications

Hi Kevin,

Thank you for your reply, and I am glad to hear that you got the notifications to work! I searched through the community for smtp appender discussions and stumbled across a few that you have been a part of. , I am new to Qlik Sense/developing. so, a lot of the information went over my head. Would you be able to help outline the steps that I would need to go through to get this configured (this will help others searching for the same solution)? I appreciate your help!

barry_stevens
Contributor II

Re: Qlik Sense Task Failure Notifications

now i am following this with interest

kevincase
Contributor II

Re: Qlik Sense Task Failure Notifications

Monica,

Here are the steps:

  1. Open Notepad or some other editor and copy the following xml code:

 

<?xml version="1.0"?>

<configuration>

<!-- Mail appender-->

<appender name="MailAppender" type="log4net.Appender.SmtpAppender">

  <filter type="log4net.Filter.StringMatchFilter">

    <param name="stringToMatch" value="ReloadResult" />

    <param name="acceptOnMatch" value="false" />

  </filter>

  <filter type="log4net.Filter.LevelRangeFilter">

    <param name="levelMin" value="ERROR" />

  </filter>

  <filter type="log4net.Filter.DenyAllFilter" />

  <evaluator type="log4net.Core.LevelEvaluator">

    <param name="threshold" value="ERROR"/>

  </evaluator>

  <param name="to" value="kevin@MyEmail.com" />

  <param name="from" value="Qlik@MyQlikServer.com" />

  <param name="subject" value="Qlik Job Failure" />

  <param name="smtpHost" value="MySMTPAddress" />

  <param name="port" value="25" />

  <param name="bufferSize" value="0" /> <!-- Set this to 0 to make sure an email is sent on every error -->

  <param name="lossy" value="true" />

  <layout type="log4net.Layout.PatternLayout">

    <param name="conversionPattern" value="%newline%date %-5level %newline%property{TaskName}%newline%property{AppName}%newline%message%newline%newline%newline" />

  </layout>

</appender>

<!--Send mail on task failure-->

<logger name="System.Scheduler.Scheduler.Slave.Tasks.ReloadTask">

  <appender-ref ref="MailAppender" />

</logger>

</configuration>

</configuration>

 

  1. Modify Line 16. This should be the email address of who will receive the email.  Probably your email address.
  2. Modify line 17. This should be set to who is sending the email.
  3. Modify line 19. Set this value to the SMTP host used to send email.  Your network admin should be able to supply you with this information.
  4. Modify Line 20. Set this to the correct SMPT Port. This should also be supplied by your network admin.
  5. Save the file with the following name: LocalLogConfig.xml
  6. You then need to copy this file to your Qlik Sense server Scheduler folder.  The location of this file is important.  For me, I have a straightforward installation so my files are installed in the default locations.   This is my location for the Scheduler folder: c:\ProgramData\Qlik\Sense\Scheduler

    

Now, whenever you have a job failure, an email will be sent to the recipient.

 

Re: Qlik Sense Task Failure Notifications

Kevin

Many thanks for posting that - I'll give it a go.