Skip to content

Support alert create/update/remove/enable/disable in the CLI#475

Open
amannix-ro wants to merge 7 commits into
datalust:devfrom
amannix-ro:feat/alert-cli
Open

Support alert create/update/remove/enable/disable in the CLI#475
amannix-ro wants to merge 7 commits into
datalust:devfrom
amannix-ro:feat/alert-cli

Conversation

@amannix-ro

@amannix-ro amannix-ro commented Jul 13, 2026

Copy link
Copy Markdown

This PR adds CRUD CLI support for alerts. Details of what commands are supported are in the updated README.

I haven't added support for fetching alert notifications here, but is something we could consider too.


AI Disclosure: This work was assisted by cloud agentic tooling. I've reviewed and further modified the result.

Assisted-By: Claude:claude-fable-5
Comment thread README.md Outdated
Comment thread src/SeqCli/Cli/Commands/Alert/CreateCommand.cs Outdated
Comment thread src/SeqCli/Cli/Commands/Alert/CreateCommand.cs
Comment thread src/SeqCli/Cli/Commands/Alert/RemoveCommand.cs
Assisted-By: Claude:claude-opus-4.8
Assisted-By: Claude:claude-opus-4.8
@KodrAus

KodrAus commented Jul 14, 2026

Copy link
Copy Markdown
Member

Looks like we'll need to run E2E tests against a preview container for alerts

@KodrAus KodrAus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking better. The Superpower parser needs a closer look

Comment thread build/Build.Linux.ps1 Outdated
Comment thread src/SeqCli/Cli/Commands/Alert/CreateCommand.cs
Comment thread src/SeqCli/Syntax/AliasedExpressionParser.cs Outdated
Assisted-By: Claude:claude-opus-4.8
@KodrAus

KodrAus commented Jul 14, 2026

Copy link
Copy Markdown
Member

Needs a final run through and cleanup now before marking as ready.

@KodrAus KodrAus marked this pull request as ready for review July 15, 2026 00:34
@KodrAus KodrAus changed the title Initial Alert CLI implementation Support alert create/update/remove/enable/disable in the CLI Jul 15, 2026

Options.Add(
"notification-level=",
"The level of the notifications raised by the alert, for example `Warning` or `Error`",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the default documented, I'd always end up specifying this.

var config = RuntimeConfigurationLoader.Load(_storagePath);
var connection = SeqConnectionFactory.Connect(_connection, config);

var toUpdate = _entityIdentity.Id != null ? [await connection.Alerts.FindAsync(_entityIdentity.Id)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Seq UI uses AlertStateEntity, rather than AlertEntity, to retrieve basic summaries of non-shared alerts for all users and thus allow admins to disable a non-shared alert that they do not own (via "removing" the AlertStateEntity).

We don't necessarily need to support the same thing here, but worth noting. (It'd be especially nice, at some point, to support username scoping in cases like this, so that I could disable "nblumhardt/Some Noisy Alert" and not need to split out the username.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants