Skip to content

Plug-in apps that act on event streams in the Seq log server

License

Notifications You must be signed in to change notification settings

chuseman/seq-app-htmlemail

 
 

Repository files navigation

Seq.App.EmailPlus Build status NuGet tag

Send log events and alerts as HTML email messages when they arrive at Seq.

HTML email app icon

HTML email templates

The app uses Handlebars.Net for email templating. Check out the Handlebars Guide for information on the Handlebars syntax.

Event types and properties

All templates can access the following special properties:

  • $DateTimeFormat — the date/time format string defined in the app's settings
  • $EventType — the numeric event type assigned to the event
  • $EventUri — a link to the event in the Seq UI (not valid for alerts)
  • $Exception — the exception associated with the event, if any
  • $Id — the Seq event id
  • $Instance — the Seq server's instance name, if any
  • $Level — the event's level as a string
  • $LocalTimestamp — the timestamp of the event, in the server's time zone (deprecated)
  • $Message — the event's fully-rendered message
  • $MessageTemplate — the event's message template
  • $Properties — a dictionary containing all first-class event properties (see below)
  • $ServerUri — the Seq server's base URL
  • $TimeZoneName — the time zone name defined in the app's settings
  • $UtcTimestamp — the timestamp of the event

The event's first-class properties do not use prefixed $ names, so if an event carries a RequestId property, this is accessed in the template as {{RequestId}}, not {{$RequestId}}.

Notifications for Alerts can use the properties listed in the Seq documentation.

Built-in helper functions

The app makes the following helper functions available in templates.

Name Description Example usage
datetime Format a date time, optionally specifying a time zone {{datetime $SliceStart 'o' 'Australia/Brisbane'}}
if_eq Compare two values for equality and optionally execute a specified block {{#if_eq $Level 'Error'}} Oops! {{/if_eq}}
pretty Pretty-print a value, converting arrays and objects to JSON {{pretty Results}}
substring Compute a substring given start index and optional length {{substring Uri 0 5}}

Helpers are defined here.

Other Seq apps

This repository originally included the following apps from Datalust, each now in their own dedicated repositories:

About

Plug-in apps that act on event streams in the Seq log server

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 70.4%
  • HTML 24.9%
  • PowerShell 4.7%