Seq Reporter v1.0.3 - Who needs email when you can raise a Jira issue?

Reporting all the things

Seq Reporter is the command-line client that can be used to schedule reporting from your Seq structured logs. It drives a number of daily and monthly reports for us and overall, it works well. We just set our query config and time range, schedule it, and away it goes with no fuss!

With the creation of Lurgle.Dates, I included the Seq Reporter date expression logic in this new common date library, so it made it inevitable that I'd update Seq Reporter to use the common library ... but I looked at what else would be useful for us.

A number of our reports are bound for Jira, as part of scheduled monthly SLA reporting. We were emailing them to a Jira mailbox, which would then pick it up and turn it into a ticket. The obvious opportunity here is to instead create the ticket directly from Seq Reporter.

It helped to be using Lurgle.Dates, because we could also leverage the Jira date token logic  that I'd merged into this library. I did add an additional method to Lurgle.Dates that allows conversion of these tokens to a DateTime for the purpose of configuring the optional Due Date field in Jira, so Lurgle.Dates v1.0.7 is now out! 

With v1.0.3, you'll see that the Test.config file now contains additional config items:

    <add key="ValidateTls" value="false" />

  <!-- Email, Jira, EmailAndJira -->
    <add key="ReportDestination" value="Jira" />

  <!-- Mandatory Jira attributes-->
  <add key="JiraUrl" value="https://jira.domain.com" />
  <add key="JiraUsername" value="Bob" />
  <add key="JiraPassword" value="Builder" />
  <add key="JiraProject" value="TEST" />
  <add key="JiraIssueType" value="Task" />
  <add key="JiraPriority" value="Medium" />
  <!-- Optional attributes -->
  <add key="JiraAssignee" value="BBuilder" />
    <add key="JiraLabels" value="Test,Labels" />
  <add key="JiraInitialEstimate" value="1d" />
  <add key="JiraRemainingEstimate" value="1d" />
  <add key="JiraDueDate" value="7d" />

ValidateTls configuration

This is a new config attribute which defaults to true. In v1.0.2, Seq Reporter was always disabling TLS validation because it helped with test scenarios. I've turned that into a configuration because it's generally best practice to validate TLS connections.

If set to false, all TLS validation will be disabled. If set to true - the default - Seq Reporter will validate TLS connections using the standard .NET TLS validation rules.

Jira Properties

There are 6 mandatory and 5 optional Jira configs.

NameDescriptionRequired?
JiraUrlThe URL of your Jira instance with http:// or https:// prefix. Only the FQDN (eg. https://jira.domain.com) is needed.Yes
JiraUsernameA username with permission to logon to Jira and create issues via the REST API.Yes
JiraPasswordPassword for the Jira userYes
JiraProjectThe project key to create an issue underYes
JiraIssueTypeType of issue to create, eg. Task, Service Request, IncidentYes
JiraPriorityPriority of issue, eg. Highest, High, Medium, LowYes
JiraAssigneeA valid Jira username to assign the ticket toNo
JiraLabelsA comma-delimited list of labels to apply to the ticket. Don't put spaces in labels.No
JiraInitialEstimateThe Original Time Estimate field for the Jira issue. If not supported by the project, ticket may fail. No
JiraRemainingEstimateRemaining Time Estimate field for the Jira issue. If configured, JiraInitialTimeEstimate is also required, or time tracking fields won't be added.No
JiraDueDateDue Date expressed as a Jira date expression (eg. 7d)No

If configured correctly, issues will automatically be created with the report attached!

The Templates folder includes an alertJiraTemplate.txt file. This has a Handlebars template that will be used for creating the issue, which allows customisation of the ticket's description.

The Jira issue logic uses the same proxy settings as Seq - so if you disable proxy for Seq, it will be disabled for Jira as well.

Update to QueryTimeout

The QueryTimeout config setting had an error which meant that it wasn't used. I've fixed that, and also ensured that both the Seq query and the underlying HttpClient are set to the QueryTimeout. That should address queries failing before it's expected.

Get Seq Reporter!

As always, you can download the latest version via the below fancy links. I may yet update Seq.Client.Reporter to include delivering reports via SFTP, but I'm happy with this new enhancement!

Latest version of Seq Reporter
 
Total downloads of Seq Reporter

 

Comments

You may also like:

Using Handlebars templates with Seq.App.Atlassian.Jira and Seq.App.OpsGenie

One of the really useful things with Seq.App.Opsgenie was that Nick Blumhardt had integrated Handlebars templates to the app, using Handlebars.NET. I liked it so much that, when I contributed to Ali Özgür's excellent Seq.App.Atlassian.Jira project, I carried it over. There's a few oddities in the JIRA REST API, and...

Seq Reporter - Turn your structured logs into scheduled reports!

Uhh ... You want what? So, you have all your apps logging to Seq, perhaps you have monitoring and alerting using apps like the Seq OpsGenie client, and maybe you're even using Event Timeout to detect events that didn't happen in time. Things are going great, except ... Well, management...

Lurgle.Alerting - a standardised FluentEmail implementation with extra goodies!

Another Lurgle Around the time that I tackled my original Serilog logging implementation, I also looked at our email alerting. Emails can be used for a variety of reasons, and it's not uncommon that they are sent as a simple string that concatenates or formats variables. In this scenario, the...