Event Schedule for Seq v1.0.31 - Scheduled months!
We've started to really make use of the newest member of the "EventX Trilogy" to trigger scheduled events. It's really useful to be able to trigger monthly scheduled events for IT maintenance tasks, especially tied to a Seq.App.Atlassian.Jira instance that raises the ticket at the right priority, with the right responder, due date, time estimate, and all the date token goodness!
The joy of this is that we get inbuilt logging for the process - we can see the event being generated, and then being picked up and sent to Jira. Any errors are visible in Seq, and because of the logging approach, it's really easy to test a config and see the result without sending it all the way to Jira.
In some ways, we're finding that of all the capabilities the EventX apps have brought to uplift our Seq monitoring and alerting, Event Schedule has the most potential to transform ongoing maintenance in a meaningful and readily extensible way.
We found that we could then start to contemplate more long range tickets - quarterly, bi-annual, annual. One hitch - Event Schedule didn't support being able to configure specific months to run. Well, until now that is.
I added a new config item to Event Schedule called "Months of year". This is simple enough to use - simply add the months that you want included in the schedule, either as long (January) or short (Jan) month names.
The net result is an ability to specify a config like this:
which will raise the configured log message on the first day of October, January, April, and July. You'll note some use of our date expressions in the template, leveraging the ability to specify the period for the review ticket.
This, along with the existing multi-log token and corresponding responder functionality, means that we can create multiple Jira tickets with different purposes, each with their own assignee, every 3 months when the review is due.
The net result is automated Jira tickets that look like this:
Clear, concise, and accurate!
I updated Lurgle.Dates for this functionality, refining the day of week and adding day of month parsing. You can now pass short weekday names (eg. Tue, Wed) and they will be properly mapped, and the same applies for months. That means I can add the refinement to the other EventX apps, and of course other devs may make use of Lurgle.Dates themselves!
Finally, I also carried the Handlebars templates recently added to Event Timeout over to Event Schedule. While the Handlebars values are slightly different in Event Schedule, this adds a new dimension of functionality and retains the capabilities shown off in the Event TImeout post.
For reference, the Handlebars values that can be used for Event Schedule are;
var payload = (IDictionary<string, object>)ToDynamic(new Dictionary<string, object>
{
{ "AppName", config.AppName },
{ "TimeNow", DateTime.Now.ToLongTimeString() },
{ "DateNowLong", DateTime.Now.ToLongDateString() },
{ "DateNowShort", DateTime.Now.ToShortDateString() },
{ "DateTimeNow", DateTime.Now.ToString("F") },
{ "StartTime", counters.StartTime.ToString("F") },
{ "RepeatSchedule", config.ScheduleInterval.TotalSeconds },
{ "RepeatScheduleMins", config.ScheduleInterval.TotalMinutes.ToString("N2") },
{ "RepeatSuppressTimeHours", config.ScheduleInterval.TotalHours.ToString("N2") },
{ "Tags", string.Join(",", config.Tags) },
{ "Responders", config.Responders ?? "" },
{ "Priority", config.Priority ?? "" },
{ "ProjectKey", config.ProjectKey ?? "" },
{ "DueDate", config.DueDate ?? "" },
{ "InitialTimeEstimate", config.InitialTimeEstimate ?? "" },
{ "RemainingTimeEstimate", config.RemainingTimeEstimate ?? "" }
});
Hopefully others will find Event Schedule as useful as we are!
Seq.App.EventSchedule |
---|
Comments