When a task fails, you really would love to receive a notification in your inbox so you can quickly fix the problem.
When a task fails, you really would love to receive a notification in your inbox so you can quickly fix the problem.
When a task fails, you really would love to receive an email notification in your inbox so you can quickly fix the problem. Using the Operations Monitor is not the ideal solution. In QlikView there’s a QMC setting that enables all failed tasks to send an email alert. In Qlik Sense this feature is oddly enough missing. But it’s actually super simple to enable. The only thing you need is to add an xml file that configures the Log4net framework to send email alerts. Here’s a step by step guide:
<?xml version=”1.0″?> <configuration> <!– Mail appender–> <appender name=”MailAppender” type=”log4net.Appender.SmtpAppender”> <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=”[email protected]” /> <param name=”from” value=”[email protected]” /> <param name=”subject” value=”Qlik Sense Task Alert” /> <param name=”smtpHost” value=”smtp.domain.com” /> <param name=”port” value=”25” /><!– 25, 465, 567 –> <param name=”EnableSsl” value=”false” /> <!– True False –> <param name=”Authentication” value=”none” /> <!– None Basic NTML –> <param name=”username” value=”yourloging” /> <param name=”password” value=”yourpassword” /> <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=”The Task ‘%property{TaskName}’ failed at %date with the Errorlevel ‘%-5level’ %newline%newlineThe App Name is ‘%property{AppName}’ %newline%newlineThe Message was ‘%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> |
If you’re running a cluster, then you need to add this file to any node that reloads apps.
Enjoy your email notifications!