Skip to content

Commit

Permalink
feat: merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
shahargl committed Sep 26, 2024
2 parents 9e7283d + 788c388 commit 2ddfd62
Show file tree
Hide file tree
Showing 307 changed files with 20,384 additions and 5,509 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release-step.outputs.version }}
tag: "v${{ steps.release-step.outputs.version }}"
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="${{ steps.release-step.outputs.version }}" \
--title="v${{ steps.release-step.outputs.version }}" \
--target="release/${{ steps.release-step.outputs.version }}" \
--generate-notes
7 changes: 4 additions & 3 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: Tests
on:
push:
paths:
- 'keep/**'
- "keep/**"
pull_request:
paths:
- 'keep/**'
- "keep/**"
workflow_dispatch:
permissions:
actions: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
Expand All @@ -21,7 +23,6 @@ env:
jobs:
tests:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:5.7
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,8 @@ playwright_dump_*.html
playwright_dump_*.png

ee/experimental/ai_temp/*
!ee/experimental/ai_temp/.gitkeep
,e!ee/experimental/ai_temp/.gitkeep

oauth2.cfg
scripts/keep_slack_bot.py
keepnew.db
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ repos:
language: system
types: [python]
require_serial: true
# - id: yamllint
# name: yamllint
# description: This hook runs yamllint.
# entry: yamllint
# language: python
# types: [file, yaml]
- id: end-of-file-fixer
name: Fix End of Files
entry: end-of-file-fixer
Expand All @@ -38,10 +32,17 @@ repos:
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
args: [--fix]
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v2.1.1
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
args: [] # optional: list of Conventional Commits types to allow e.g. [feat, fix, ci, chore, test]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
types_or:
[javascript, jsx, ts, tsx, json, yaml, css, scss, html, markdown]
args: [--write]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ Workflow triggers can either be executed manually when an alert is activated or
          
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/prometheus-icon.png?raw=true"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/sumologic-icon.png?raw=true"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/victoriametrics-icon.png?raw=true"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/zabbix-icon.png?raw=true"/>
Expand Down Expand Up @@ -147,6 +149,8 @@ Workflow triggers can either be executed manually when an alert is activated or
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/postgres-icon.png?raw=true"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/snowflake-icon.png?raw=true"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/clickhouse-icon.png?raw=true"/>
</p>
<h3 align="center">Communication platforms</h2>
<p align="center">
Expand Down
29 changes: 29 additions & 0 deletions docs/deployment/provision/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "Overview"
---

Keep supports various deployment and provisioning strategies to accommodate different environments and use cases, from development setups to production deployments.

### Provisioning Options

Keep offers two main provisioning options:

1. [**Provider Provisioning**](/deployment/provision/provider) - Set up and manage data providers for Keep.
2. [**Workflow Provisioning**](/deployment/provision/workflow) - Configure and manage workflows within Keep.

Choosing the right provisioning strategy depends on your specific use case, deployment environment, and scalability requirements. You can read more about each provisioning option in their respective sections.

### How To Configure Provisioning

<Tip>
Some provisioning options require additional environment variables. These will be covered in detail on the specific provisioning pages.
</Tip>

Provisioning in Keep is controlled through environment variables and configuration files. The main environment variables for provisioning are:

| Provisioning Type | Environment Variable | Purpose |
|-------------------|----------------------|---------|
| **Provider** | `KEEP_PROVIDERS` | JSON string containing provider configurations |
| **Workflow** | `KEEP_WORKFLOWS_DIRECTORY` | Directory path containing workflow configuration files |

For more details on each provisioning strategy, including setup instructions and implications, refer to the respective sections.
58 changes: 58 additions & 0 deletions docs/deployment/provision/provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: "Providers Provisioning"
---

<Tip>For any questions or issues related to provider provisioning, please join our [Slack](https://slack.keephq.dev) community.</Tip>

Provider provisioning in Keep allows you to set up and manage data providers dynamically. This feature enables you to configure various data sources that Keep can interact with, such as monitoring systems, databases, or other services.

### Configuring Providers

To provision providers, set the `KEEP_PROVIDERS` environment variable with a JSON string containing the provider configurations. Here's an example:

```json
{
"keepVictoriaMetrics": {
"type": "victoriametrics",
"authentication": {
"VMAlertHost": "http://localhost",
"VMAlertPort": 1234
}
},
"keepClickhouse1": {
"type": "clickhouse",
"authentication": {
"host": "http://localhost",
"port": 1234,
"username": "keep",
"password": "keep",
"database": "keep-db"
}
}
}
```

Spin up Keep with this `KEEP_PROVIDERS` value:
```json
# ENV
KEEP_PROVIDERS={"keepVictoriaMetrics":{"type":"victoriametrics","authentication":{"VMAlertHost":"http://localhost","VMAlertPort": 1234}},"keepClickhouse1":{"type":"clickhouse","authentication":{"host":"http://localhost","port":"4321","username":"keep","password":"1234","database":"keepdb"}}}
```

### Supported Providers

Keep supports a wide range of provider types. Each provider type has its own specific configuration requirements.
To see the full list of supported providers and their detailed configuration options, please refer to our comprehensive provider documentation.


### Update Provisioned Providers

Provider configurations can be updated dynamically by changing the `KEEP_PROVIDERS` environment variable.

On every restart, Keep reads this environment variable and determines which providers need to be added or removed.

This process allows for flexible management of data sources without requiring manual intervention. By simply updating the `KEEP_PROVIDERS` variable and restarting the application, you can efficiently add new providers, remove existing ones, or modify their configurations.

The high-level provisioning mechanism:
1. Keep reads the `KEEP_PROVIDERS` value.
2. Keep checks if there are any provisioned providers that are no longer in the `KEEP_PROVIDERS` value, and deletes them.
3. Keep installs all providers from the `KEEP_PROVIDERS` value.
36 changes: 36 additions & 0 deletions docs/deployment/provision/workflow.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "Workflow Provisioning"
---

<Tip>For any questions or issues related to workflow provisioning, please join our [Slack](https://slack.keephq.dev) community.</Tip>

Workflow provisioning in Keep allows you to set up and manage workflows dynamically. This feature enables you to configure various automated processes and tasks within your Keep deployment.

### Configuring Workflows

To provision workflows, follow these steps:

1. Set the `KEEP_WORKFLOWS_DIRECTORY` environment variable to the path of your workflow configuration directory.
2. Create workflow configuration files in the specified directory.

Example directory structure:
```
/path/to/workflows/
├── workflow1.yaml
├── workflow2.yaml
└── workflow3.yaml
```
### Update Provisioned Workflows

On every restart, Keep reads the `KEEP_WORKFLOWS_DIRECTORY` environment variable and determines which workflows need to be added, removed, or updated.

This process allows for flexible management of workflows without requiring manual intervention. By simply updating the workflow files in the `KEEP_WORKFLOWS_DIRECTORY` and restarting the application, you can efficiently add new workflows, remove existing ones, or modify their configurations.

The high-level provisioning mechanism:
1. Keep reads the `KEEP_WORKFLOWS_DIRECTORY` value.
2. Keep lists all workflow files under the `KEEP_WORKFLOWS_DIRECTORY` directory.
3. Keep compares the current workflow files with the previously provisioned workflows:
- New workflow files are provisioned.
- Missing workflow files are deprovisioned.
- Updated workflow files are re-provisioned with the new configuration.
4. Keep updates its internal state to reflect the current set of provisioned workflows.
2 changes: 1 addition & 1 deletion docs/deployment/stress-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The primary parameters that affect the specification requirements for Keep are:
3. **High Volume (100,000 - 1,000,000 total alerts, 5000's of alerts per day)**:
- **Setup**: Deploy Keep with Elasticsearch for storing alerts as documents.
- **Expectations**: The system should maintain performance levels despite the large alert volume, with increased resource usage managed through scaling strategies.
4. **Very High Volume (> 1,000,000 total alerts, 10k's of alerts per day)
4. **Very High Volume (> 1,000,000 total alerts, 10k's of alerts per day)**:
- **Setup**: Deploy Keep with Elasticsearch for storing alerts as documents.
- **Setup #2**: Deploy Keep with Redis and with ARQ to use Redis as a queue.

Expand Down
4 changes: 2 additions & 2 deletions docs/development/external-url.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Keep with Internet URL"
sidebarTitle: "Keep with Internet URL"
title: "Keep with an external URL"
sidebarTitle: "Keep with an external URL"
---

## Introduction
Expand Down
Loading

0 comments on commit 2ddfd62

Please sign in to comment.