Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/snippets/providers/base-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
Do not edit it manually, as it will be overwritten */}


Expand Down Expand Up @@ -43,13 +43,14 @@ Check the following workflow examples:
- [elastic_enrich_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/elastic_enrich_example.yml)
- [ifelse.yml](https://github.com/keephq/keep/blob/main/examples/workflows/ifelse.yml)
- [incident-tier-escalation.yml](https://github.com/keephq/keep/blob/main/examples/workflows/incident-tier-escalation.yml)
- [openshift_pod_restart.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_pod_restart.yml)
- [query_victoriametrics.yml](https://github.com/keephq/keep/blob/main/examples/workflows/query_victoriametrics.yml)
- [raw_sql_query_datetime.yml](https://github.com/keephq/keep/blob/main/examples/workflows/raw_sql_query_datetime.yml)
- [webhook_example_foreach.yml](https://github.com/keephq/keep/blob/main/examples/workflows/webhook_example_foreach.yml)
- [workflow_start_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/workflow_start_example.yml)


## Topology
This provider pulls [topology](/overview/servicetopology) to Keep. It could be used in [correlations](/overview/correlation-topology)
and [mapping](/overview/enrichment/mapping#mapping-with-topology-data), and as a context
This provider pulls [topology](/overview/servicetopology) to Keep. It could be used in [correlations](/overview/correlation-topology)
and [mapping](/overview/enrichment/mapping#mapping-with-topology-data), and as a context
for [alerts](/alerts/sidebar#7-alert-topology-view) and [incidents](/overview#17-incident-topology).
9 changes: 6 additions & 3 deletions docs/snippets/providers/console-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ steps:
provider: console
config: "{{ provider.my_provider_name }}"
with:
message: {value}
logger: {value}
severity: {value}
message: {value}
logger: {value}
severity: {value}
```


Expand Down Expand Up @@ -51,6 +51,9 @@ Check the following workflow examples:
- [inputs_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/inputs_example.yml)
- [multi-condition-cel.yml](https://github.com/keephq/keep/blob/main/examples/workflows/multi-condition-cel.yml)
- [mustache-paths-example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/mustache-paths-example.yml)
- [openshift_basic.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_basic.yml)
- [openshift_monitoring_and_remediation.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_monitoring_and_remediation.yml)
- [openshift_pod_restart.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_pod_restart.yml)
- [pattern-matching-cel.yml](https://github.com/keephq/keep/blob/main/examples/workflows/pattern-matching-cel.yml)
- [severity_changed.yml](https://github.com/keephq/keep/blob/main/examples/workflows/severity_changed.yml)
- [webhook_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/webhook_example.yml)
Expand Down
36 changes: 31 additions & 5 deletions docs/snippets/providers/openshift-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
Do not edit it manually, as it will be overwritten */}

## Authentication
Expand All @@ -17,6 +17,25 @@ Certain scopes may be required to perform specific actions or queries via the pr
This provider can be used in workflows.


As "step" to query data, example:
```yaml
steps:
- name: Query openshift
provider: openshift
config: "{{ provider.my_provider_name }}"
with:
command_type: {value} # The type of query to perform. Supported queries are:
- get_logs: Get logs from a pod
- get_events: Get events for a namespace or pod
- get_pods: List pods in a namespace or across all namespaces
- get_node_pressure: Get node pressure conditions
- get_pvc: List persistent volume claims
- get_routes: List OpenShift routes
- get_deploymentconfigs: List OpenShift deployment configs
- get_projects: List OpenShift projects
# Additional arguments for the query.
```


As "action" to make changes or update data, example:
```yaml
Expand All @@ -25,11 +44,18 @@ actions:
provider: openshift
config: "{{ provider.my_provider_name }}"
with:
kind: {value} # The kind of object to restart. Could be deployments, statefulset, daemonset.
name: {value} # The name of the object to restart
project_name: {value} # The project name where the object is located
action: {value} # The action to perform. Supported actions are:
- rollout_restart: Restart a deployment, statefulset, or daemonset
- restart_pod: Restart a pod by deleting it
- scale_deployment: Scale a deployment to specified replicas
- scale_deploymentconfig: Scale a deployment config to specified replicas
# Additional arguments for the action.
```



If you need workflow examples with this provider, please raise a [GitHub issue](https://github.com/keephq/keep/issues).

Check the following workflow examples:
- [openshift_basic.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_basic.yml)
- [openshift_monitoring_and_remediation.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_monitoring_and_remediation.yml)
- [openshift_pod_restart.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_pod_restart.yml)
1 change: 1 addition & 0 deletions docs/snippets/providers/slack-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Check the following workflow examples:
- [new-auth0-users-monitor.yml](https://github.com/keephq/keep/blob/main/examples/workflows/new-auth0-users-monitor.yml)
- [new_github_stars.yml](https://github.com/keephq/keep/blob/main/examples/workflows/new_github_stars.yml)
- [notify-new-trello-card.yml](https://github.com/keephq/keep/blob/main/examples/workflows/notify-new-trello-card.yml)
- [openshift_monitoring_and_remediation.yml](https://github.com/keephq/keep/blob/main/examples/workflows/openshift_monitoring_and_remediation.yml)
- [opsgenie_open_alerts.yml](https://github.com/keephq/keep/blob/main/examples/workflows/opsgenie_open_alerts.yml)
- [permissions_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/permissions_example.yml)
- [posthog_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/posthog_example.yml)
Expand Down
58 changes: 58 additions & 0 deletions examples/workflows/openshift_basic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
workflow:
id: openshift-basic-monitoring
name: OpenShift Basic Monitoring
description: Simple OpenShift monitoring workflow that gets cluster status and pod information
triggers:
- type: manual
steps:
# Get all OpenShift projects
- name: get-projects
provider:
type: openshift
config: "{{ providers.openshift }}"
with:
command_type: get_projects

# Get all pods
- name: get-pods
provider:
type: openshift
config: "{{ providers.openshift }}"
with:
command_type: get_pods

# Get OpenShift routes
- name: get-routes
provider:
type: openshift
config: "{{ providers.openshift }}"
with:
command_type: get_routes

actions:
# Display cluster summary
- name: display-cluster-summary
provider:
type: console
with:
message: |
🔍 OpenShift Cluster Summary:
- Projects: {{ steps.get-projects.results | length }}
- Total Pods: {{ steps.get-pods.results | length }}
- Routes: {{ steps.get-routes.results | length }}

# Show pod status for each namespace
- name: display-pod-status
foreach: "{{ steps.get-pods.results }}"
provider:
type: console
with:
message: "Pod: {{ foreach.value.metadata.name }} | Namespace: {{ foreach.value.metadata.namespace }} | Status: {{ foreach.value.status.phase }}"

# List all projects
- name: list-projects
foreach: "{{ steps.get-projects.results }}"
provider:
type: console
with:
message: "Project: {{ foreach.value.metadata.name }} | Status: {{ foreach.value.status.phase | default('Active') }}"
Loading
Loading