Seq.Input.AzureLogAnalytics
1.1.1
dotnet add package Seq.Input.AzureLogAnalytics --version 1.1.1
NuGet\Install-Package Seq.Input.AzureLogAnalytics -Version 1.1.1
<PackageReference Include="Seq.Input.AzureLogAnalytics" Version="1.1.1" />
<PackageVersion Include="Seq.Input.AzureLogAnalytics" Version="1.1.1" />
<PackageReference Include="Seq.Input.AzureLogAnalytics" />
paket add Seq.Input.AzureLogAnalytics --version 1.1.1
#r "nuget: Seq.Input.AzureLogAnalytics, 1.1.1"
#:package Seq.Input.AzureLogAnalytics@1.1.1
#addin nuget:?package=Seq.Input.AzureLogAnalytics&version=1.1.1
#tool nuget:?package=Seq.Input.AzureLogAnalytics&version=1.1.1
Seq.Input.AzureLogAnalytics
A Seq input app that polls Azure Log Analytics / Application Insights telemetry and emits events into Seq as CLEF.
What it does
- Queries Azure on a timer.
- Reads rows from either:
- Workspace schema (
AppTraces,AppExceptions, etc.), or - Application Insights resource schema (
traces,exceptions, etc.).
- Workspace schema (
- Converts each row into a Seq event.
- Tracks a cursor so only new rows are ingested on subsequent polls.
Current behavior (important)
- KQL Query has a visible default value:
union isfuzzy=true AppTraces, AppExceptions
- If you use Resource ID and keep that default unchanged, the app maps it to:
union isfuzzy=true traces, exceptions
- The app automatically appends cursor filtering and ordering to your KQL.
- Every event gets a default property:
Seq.Input = "AzureLogAnalytics"
Configuration
Configure this app in Seq input settings.
Required target setting
Set one of these:
- Workspace ID (GUID) for Log Analytics workspace queries, or
- Resource ID (full ARM ID) for Application Insights resource queries.
Do not set both.
Authentication
Two modes are supported:
- Service principal
Tenant IDClient IDClient Secret
- DefaultAzureCredential (if the above are not all provided)
- Supports local
az login, managed identity, and other DAC sources.
- Supports local
Settings reference
| Setting | Default | Effect |
|---|---|---|
| Workspace ID | (empty) | Target workspace GUID for QueryWorkspaceAsync. |
| Resource ID | (empty) | Target App Insights resource for QueryResourceAsync. Also switches default schema to traces/exceptions. |
| Tenant ID | (empty) | Used only for service principal auth. |
| Client ID | (empty) | Used only for service principal auth. |
| Client Secret | (empty) | Used only for service principal auth. |
| KQL Query | union isfuzzy=true AppTraces, AppExceptions |
Base query used for polling. If Resource ID is set and this value is unchanged, it maps to union isfuzzy=true traces, exceptions. Cursor filter/order is appended automatically. |
| Poll Interval (seconds) | 60 |
How often Azure is polled for new rows. |
| Initial Lookback (minutes) | 5 |
Used only when no cursor exists yet. |
| Source Label | (empty) | Adds SourceLabel property to every ingested Seq event. |
| Diagnostic Log Level | Warning |
Verbosity of this input app's internal diagnostics. Off disables diagnostic output. |
Cursoring and incremental ingestion
Cursor state is persisted in the app storage path (cursor.json) as:
- last timestamp, and
- last event id.
The app appends a predicate equivalent to:
timestamp > lastTimestamp, or- if equal timestamp, only rows with lexicographically larger event id.
This avoids re-reading identical rows while still handling same-timestamp ties.
If you want a backfill replay, stop the input and delete/reset cursor.json.
Event mapping into Seq
For each row, the app maps:
@t:TimeGenerated(workspace) ortimestamp(AI schema)@m: preferred message column (OuterMessage, thenInnermostMessage, thenMessage)@mt: extracted fromProperties.MessageTemplateorprop__{OriginalFormat}@l: mapped from severity integer (0..4⇒ Verbose..Fatal)@x: exceptionDetailscolumn when present- missing template tokens are backfilled as
"(null)"so rendered messages don't show unresolved placeholders
It also flattens:
Properties/CustomDimensions/customDimensionsMeasurements/CustomMeasurements/customMeasurements
Plus:
Seq.Input = AzureLogAnalytics(always)SourceLabel(if configured)
KQL guidance
- Do not add your own timestamp window/cursor filter in KQL; the app appends one.
- Your query should return rows compatible with either
TimeGeneratedortimestamp. - Add any custom filtering (for example on
SourceContext) directly in your KQL.
Troubleshooting
Either Workspace ID or Resource ID must be provided.- Set one target setting.
- No events after startup
- Check cursor position and
Initial Lookback. - Set
Diagnostic Log LeveltoDebugtemporarily.
- Check cursor position and
- KQL semantic errors
- Validate custom KQL in Azure Logs first.
- Ensure required timestamp column exists in query output.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Azure.Identity (>= 1.17.1)
- Azure.Monitor.Query (>= 1.7.1)
- Seq.Apps (>= 2023.4.0)
- Serilog (>= 3.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.