Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
reshma_km
Partner - Creator III
Partner - Creator III

Email alerts on Reload task failure - Qlik sense

Hi,

I am trying to configure email alerts whenever a reload task fails using SmtpAppender. I am using Qlik sense November 2017 version. I found various discussions on this topic, but wasn't able to achieve it yet. Please find the code I am using for LocalLogConfig xml file below.

<?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="myname@domain.com" />

  <param name="from" value="myname@domain.com" />

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

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

  <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>

Could you please guide me?

kevincaseelizabethbamberltu

30 Replies
kevincase
Creator II
Creator II

Reshma,

I have not migrated to November 2017 release so I have not tested it there yet.  Here is the link to the help section for the November 2017 release.  https://help.qlik.com/en-US/sense/November2017/Subsystems/PlanningQlikSenseDeployments/Content/Deplo...

It's important to make sure the port and mail server address are correct.  You also need to make sure the file is placed in the correct folder.  For me, that folder is c:\programdata\qlik\sense\scheduler.  It must also be named correctly which it looks as though you should be OK.

Hope this helps.

reshma_km
Partner - Creator III
Partner - Creator III
Author

Hi,

Everything you mentioned seems ok. But its not sending any mails

reshma_km
Partner - Creator III
Partner - Creator III
Author

I am using the same email address for the below parameters. Will that be an issue?

  <param name="to" value="myname@domain.com" />

  <param name="from" value="myname@domain.com" />

kevincase
Creator II
Creator II

reshma,

Make sure the 'to' parameter is your actual email address.  The 'from" parameter should be able to be anything.  For example, I use Qlik@MyQlikServerName.com  You may want to check with your email administrator to verify that they do not restrict the sending of emails internally form invalid domain names.  Many times there are internal rules to prevent spam emails.  Also verify that the email port is correct.

Since I do not have a Qlik environment running a newer release, I can not verify that the LoggerName is correct.  I have the following: <logger name="System.Scheduler.Scheduler.Slave.Tasks.ReloadTask">

You may need to open a ticket with support to get the exact name as I do not know if this has changed since version 3.2.  This may have changed with shared persistence.

Kevin .....

reshma_km
Partner - Creator III
Partner - Creator III
Author

dwforest

Hi,

Could you please help me out?

dwforest
Specialist II
Specialist II

I suppose you read

https://help.qlik.com/en-US/sense/April2018/Subsystems/PlanningQlikSenseDeployments/Content/Deployme...

Check the the config file is in the correct directory.

Verify that you can send mail from your server and the port is not blocked.

Some companies have it set up to require authentication or need to have valid from email address. Check with your tech group.

reshma_km
Partner - Creator III
Partner - Creator III
Author

The config file is in the correct directory. And I guess the port is not blocked because I am able to send mails via notification connector and the email alerts utility from Qlik branch. But, smtpAppender is not working.

dwforest
Specialist II
Specialist II

The only difference in my config is that I don't have is:

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

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

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

  </filter>

Not an expert on log4 Appenders,so not sure what this is supposed to do. I just used what was provided by Qlik in the Help.

Maybe this is preventing matches?

reshma_km
Partner - Creator III
Partner - Creator III
Author

Which version of QlikSense are you using?