> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/devx/5.5/user-guide/cli/admin/alert-channels.md).

# Alert Channels

## List alert channels <a href="#list-alert-channels" id="list-alert-channels"></a>

```bash
lenses-cli alertchannels
```

## View details of all alert channels <a href="#view-details-of-all-alert-channels" id="view-details-of-all-alert-channels"></a>

```bash
lenses-cli alertchannels --details
```

## List alert channels with possible flags <a href="#list-alert-channels-with-possible-flags" id="list-alert-channels-with-possible-flags"></a>

```bash
lenses-cli alertchannels \
--page=1 \
--pageSize=10 \
--sortField="name" \
--sortOrder="asc" \
--templateName="test" \
--channelName="slack"
```

## Create a new alert channel <a href="#create-new-alert-channel" id="create-new-alert-channel"></a>

```bash
lenses-cli alertchannels create \
--name "my-slack-channel" \
--connectionName="my-slack-connection" \
--templateName="Slack" \
--properties="[{\"key\":\"username\",\"value\":\"@johndoe\"},{\"key\":\"channel\",\"value\":\"company-slack-channel\"}]"

```

Create a new alert channel using a YAML file:

```yaml
name: "My alert channel"
templateName: "Slack"
connectionName: "slackconn"
   properties:
   - key: "username"
     value: "George"
   - key: "channel"
     value: "#dev-ops"
```

```bash
lenses-cli alertchannels create alert_chann.yml
```

## Update an alert channel <a href="#update-an-alert-channel" id="update-an-alert-channel"></a>

```bash
lenses-cli alert setting set \
    --id 1000 \
    --enable=false \
    --channels="143315dd-80bf-4833-a13a-394be06dd
    --channels="f9d6140c-4823-4157-a93c-5147aa0e2f29"

```

Update the settings of an alert channel from a file:

```yaml
id: 1000
enable: false
channels:
- "f9d6140c-4823-4157-a93c-5147aa0e2f29"
- "143315dd-80bf-4833-a13a-394be06dda87"
```

```bash
lenses-cli alert setting set alert_sett.yaml
```

## Delete an alert channel <a href="#delete-an-alert-channel" id="delete-an-alert-channel"></a>

```bash
lenses-cli alertchannels \
    delete channelID="f9d6140c-4823-4157-a93c-5147aa0e2f29"
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lenses.io/latest/devx/5.5/user-guide/cli/admin/alert-channels.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
