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 30, 2024
2 parents 29d5162 + 29718c1 commit ab4c204
Show file tree
Hide file tree
Showing 83 changed files with 3,563 additions and 965 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ name: Test docs
on:
push:
paths:
- 'keep/**'
- 'keep/poviders/**'
- 'docs/**'
pull_request:
paths:
- 'keep/**'
- 'keep/poviders/**'
- 'docs/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}-${{ github.job }}
Expand All @@ -15,7 +17,7 @@ env:
STORAGE_MANAGER_DIRECTORY: /tmp/storage-manager

jobs:
tests:
tests-docs:
runs-on: ubuntu-latest

steps:
Expand All @@ -28,13 +30,35 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install mintlify and validate docs

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies using poetry
run: poetry install --no-interaction --no-root --with dev

- name: Validate docs for providers
run: |
cd scripts;
poetry run python ./docs_get_providers_list.py --validate
- name: Install deps and validate docs
run: |
npm i -g mintlify
npm i -g mintlify;
cd docs && mintlify broken-links;
cd ../scripts;
./docs_validate_navigation.sh;
python3 docs_get_providers_list.py --validate;
# Todo: validate if openapi schema is matching with the code
2 changes: 1 addition & 1 deletion .github/workflows/test-pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:
EE_ENABLED: true

jobs:
tests:
tests-e2e:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,31 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: chartboost/ruff-action@v1
with:
src: "./keep"

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies using poetry
run: poetry install --no-interaction --no-root
run: poetry install --no-interaction --no-root --with dev

- name: Run unit tests and report coverage
run: |
Expand All @@ -97,6 +102,7 @@ jobs:
- name: Convert coverage results to JSON (for CodeCov support)
run: poetry run coverage json --omit="keep/providers/*"

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions docs/api-ref/topology/create-application.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: post /topology/applications
---
3 changes: 3 additions & 0 deletions docs/api-ref/topology/delete-application.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: delete /topology/applications/{application_id}
---
3 changes: 3 additions & 0 deletions docs/api-ref/topology/get-applications.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: get /topology/applications
---
3 changes: 3 additions & 0 deletions docs/api-ref/topology/update-application.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: put /topology/applications/{application_id}
---
9 changes: 8 additions & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
"providers/documentation/incidentio-provider",
"providers/documentation/incidentmanager-provider",
"providers/documentation/jira-provider",
"providers/documentation/jira-on-prem-provider",
"providers/documentation/kibana-provider",
"providers/documentation/kubernetes-provider",
"providers/documentation/linear_provider",
Expand Down Expand Up @@ -281,7 +282,13 @@
},
{
"group": "topology",
"pages": ["api-ref/topology/get-topology-data"]
"pages": [
"api-ref/topology/get-topology-data",
"api-ref/topology/create-application",
"api-ref/topology/delete-application",
"api-ref/topology/get-applications",
"api-ref/topology/update-application"
]
},
{
"group": "alerts",
Expand Down
2 changes: 1 addition & 1 deletion docs/openapi.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions docs/providers/documentation/azuremonitoring-provider.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
title: "Azure Monitoring"
sidebarTitle: "Azure Monitoring Provider"
description: "Azure Monitoring provider allows you to get alerts from Azure Monitoring via webhooks."
title: "Azure Monitor"
sidebarTitle: "Azure Monitor Provider"
description: "Azure Monitorg provider allows you to get alerts from Azure Monitor via webhooks."
---

## Overview

The Azure Monitoring Provider integrates Keep with Azure Monitoring, allowing you to receive alerts within Keep's platform. By setting up a webhook in Azure, you can ensure that critical alerts are sent to Keep, allowing for efficient monitoring and response.
The Azure Monitor Provider integrates Keep with Azure Monitor, allowing you to receive alerts within Keep's platform. By setting up a webhook in Azure, you can ensure that critical alerts are sent to Keep, allowing for efficient monitoring and response.

## Connecting Azure Monitoring to Keep
## Connecting Azure Monitor to Keep

Connecting Azure Monitoring to Keep involves creating an Action Group in Azure, adding a webhook action, and configuring the Alert Rule to use the new Action Group.
Connecting Azure Monitor to Keep involves creating an Action Group in Azure, adding a webhook action, and configuring the Alert Rule to use the new Action Group.

### Step 1: Navigate an Action Group
1. Log in to your Azure portal.
Expand Down
15 changes: 11 additions & 4 deletions docs/providers/documentation/console-provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,31 @@ description: "Console provider is sort of a mock provider that projects given al
---

## Inputs
- alert_message: The alert message to print to the console

- message: The alert message to print to the console

## Outputs

This provider has no outputs

## Authentication Parameters

This provider has no authentication

## Connecting with the Provider

This provider doesn't require any connection

## Notes
*No information yet, feel free to contribute it using the "Edit this page" link the buttom of the page*

_No information yet, feel free to contribute it using the "Edit this page" link the buttom of the page_

## Useful Links
*No information yet, feel free to contribute it using the "Edit this page" link the buttom of the page*

_No information yet, feel free to contribute it using the "Edit this page" link the buttom of the page_

## Example

```python
config = {
"description": "Console Output Provider",
Expand All @@ -32,7 +39,7 @@ provider = ProvidersFactory.get_provider(
provider_id='mock', provider_type="console", provider_config=config
)
provider.notify(
alert_message="Simple alert showing context with name: {name}".format(
message="Simple alert showing context with name: {name}".format(
name="John Doe"
)
)
Expand Down
20 changes: 10 additions & 10 deletions docs/providers/documentation/grafana_oncall-provider.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Grafana Oncall Provider"
description: "Grafana Oncall Provider is a class that allows to ingest/digest data from Grafana On-Call."
title: "Grafana OnCall Provider"
description: "Grafana Oncall Provider is a class that allows to ingest/digest data from Grafana OnCall."
---

## Inputs
Expand All @@ -21,24 +21,24 @@ Grafana Oncall Provider does not currently support the `query` function.

## Authentication Parameters

The Grafana Oncall Provider uses API token authentication. You need to provide the following authentication parameters to connect to Grafana On-Call:
The Grafana Oncall Provider uses API token authentication. You need to provide the following authentication parameters to connect to Grafana OnCall:

- **token** (required): Your Grafana On-Call API Token.
- **host** (required): The URL of your Grafana On-Call host (e.g., https://keephq.grafana.net).
- **token** (required): Your Grafana OnCall API Token.
- **host** (required): The URL of your Grafana OnCall host (e.g., https://keephq.grafana.net).

## Connecting with the Provider

To connect to Grafana On-Call, you need to create an API Token:
To connect to Grafana OnCall, you need to create an API Token:

1. Log in to your Grafana On-Call account.
1. Log in to your Grafana OnCall account.
2. Go to the **API Tokens** page.
3. Click the **Generate Token** button and provide a name for your token.
4. Copy the token value and keep it secure.
5. Add the token value to the `authentication` section in the Grafana Oncall Provider configuration.

## Notes

- This provider allows you to interact with Grafana On-Call to create or update incidents.
- This provider allows you to interact with Grafana OnCall to create or update incidents.
- The `random_color` function generates a random color for incident labels.
- The `startTime` and `endTime` parameters use ISO-8601 format.
- The `notify` function returns information about the incident created or updated.
Expand Down Expand Up @@ -97,5 +97,5 @@ Payload example:

## Useful Links

- [Grafana On-Call](https://keephq.grafana.net)
- [Grafana On-Call API Documentation](https://keephq.grafana.net/docs/api)
- [Grafana OnCall](https://keephq.grafana.net)
- [Grafana OnCall API Documentation](https://keephq.grafana.net/docs/api)
7 changes: 7 additions & 0 deletions docs/providers/documentation/jira-on-prem-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Jira On-Prem Provider"
sidebarTitle: "Jira On-Prem Provider"
description: "Jira On-Prem Provider is a provider used to query data and creating issues in Jira"
---

Keep supports Jira OnPrem as a provider. Please check [Jira Provider](./jira-provider.md) for documentation.
6 changes: 3 additions & 3 deletions docs/providers/documentation/jira-provider.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Jira Provider"
sidebarTitle: "Jira Provider"
description: "Jira provider is a provider used to query data and creating issues in Jira"
title: "Jira Cloud Provider"
sidebarTitle: "Jira Cloud Provider"
description: "Jira Cloud provider is a provider used to query data and creating issues in Jira"
---

## Inputs
Expand Down
Loading

0 comments on commit ab4c204

Please sign in to comment.