Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Jina.ai API key to speed up fetching the AI assistant content #42

Merged
merged 3 commits into from
Jun 13, 2024
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
2 changes: 2 additions & 0 deletions .github/workflows/ai-assistant-fetch-content.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
git checkout -b ${{ env.BRANCH_NAME }}

- name: Fetch content
env:
AI_ASSISTANT_FETCH_CONTENT_API_KEY: ${{ secrets.AI_ASSISTANT_FETCH_CONTENT_API_KEY }}
run: |
cd ./hack/assistant-setup
npm install
Expand Down
2 changes: 2 additions & 0 deletions hack/assistant-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ To use your own assistant, modify the `devConfig` in the `index.ts` file.
### Refetch content for file search

The process uses [Jina.AI Reader API](https://github.com/jina-ai/reader) and usually takes a few minutes.
A free API token is recommended, to increase the API rate limits, and, in a result, speed up the process. You can get if from the [Jina.AI website](https://jina.ai/reader/).
To scrap the content from the latest Botkube website and Botkube Docs, run the following command:

```sh
export AI_ASSISTANT_FETCH_CONTENT_API_KEY="jina_..." # get it from https://jina.ai/reader/
npm run fetch-content
```

Expand Down
17 changes: 15 additions & 2 deletions hack/assistant-setup/content-fetcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ const (
docsSitemapURL = "https://docs.botkube.io/sitemap.xml"
processingAPIURL = "https://r.jina.ai"
contentDir = "content"
maxRetries = 10
maxRetries = 15
retryInterval = 1 * time.Second
httpCliTimeout = 1 * time.Minute
purgeAllContentEnv = "PURGE_ALL_CONTENT"
apiKeyEnv = "AI_ASSISTANT_FETCH_CONTENT_API_KEY"
)

var excludedDocsPagesRegex = regexp.MustCompile(`^https:\/\/docs\.botkube\.io\/(?:\d+\.\d+|next)\/.*`)
Expand All @@ -39,11 +40,19 @@ func main() {
Formatter: "text",
})

pageFetchHeaders := map[string]string{
"Content-Type": "text/event-stream",
}
if os.Getenv(apiKeyEnv) != "" {
pageFetchHeaders["Authorization"] = fmt.Sprintf("Bearer %s", os.Getenv(apiKeyEnv))
}

fetcher := &contentFetcher{
log: log,
httpCli: &http.Client{
Timeout: httpCliTimeout,
},
headers: pageFetchHeaders,
}

shouldPurgeAllContent := os.Getenv(purgeAllContentEnv) == "true"
Expand Down Expand Up @@ -149,6 +158,7 @@ func removeFrequentlyUpdatedContent(log logrus.FieldLogger) error {
type contentFetcher struct {
log logrus.FieldLogger
httpCli *http.Client
headers map[string]string
}

type sitemapURLSet struct {
Expand Down Expand Up @@ -195,7 +205,10 @@ func (f *contentFetcher) fetchAndSavePage(inURL, filePath string) error {
if err != nil {
return fmt.Errorf("while creating request for page %q: %w", pageURL, err)
}
req.Header.Set("Content-Type", "text/event-stream")

for key, val := range f.headers {
req.Header.Set(key, val)
}

res, err := f.httpCli.Do(req)
if err != nil {
Expand Down
185 changes: 152 additions & 33 deletions hack/assistant-setup/content/botkube.io.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Title: Collaborative Kubernetes Troubleshooting Platform | Botkube
Title: Collaborative Kubernetes AI Assistant | Botkube

URL Source: https://botkube.io/

Expand All @@ -8,32 +8,62 @@ A virtual SRE, powered by AI

Botkube, the AI-Powered Kubernetes Troubleshooting Platform

[![Image 1: Monitoring Kubernetes notifications in chat platforms](https://assets-global.website-files.com/633705de6adaa38599d8e258/642da9080827c967a39b0043_automation_new.gif)](https://botkube.io/solutions/enabling-developers)
Botkube Helps Teams From Error to Resolution
--------------------------------------------

Empowering DevOps
-----------------
### Alert

Error to resolution in one thread: Centralize alerting and troubleshooting in one platform.
#### Respond faster with AI-Enhanced Kubernetes Alerts

Botkube integrates essential notifications, with context, and troubleshooting tools directly into your chat platform. Powered by artificial intelligence and automation, it allows teams to tackle common issues without wasting time on repetitive tasks.
DevOps teams can easily set up Kubernetes alerts and notifications in your chat platforms. The Kubernetes AI Assistant gives context with each alert and through customizable automated actions. Teams receive prompt alerts and can swiftly address issues. Customize alert rules based on specific criteria — cutting the noise and ensuring the right people receive the right alerts to react immediately.

Developer Self-Service
----------------------
### Investigate

#### Accelerate investigations with Botkube Assistant’s AI-powered troubleshooting

Investigate errors with a click of a button. The AI-powered Botkube Assistant uses your tools to find the cause of issues and gather information about your resources automatically. 
The Kubernetes AI Assistant also provides troubleshooting suggestions
in natural language, identifies root causes, and suggests advanced commands for complex issues. Developers can easily troubleshoot their own applications without needing CLI access or involving DevOps/SREs for simple issues. No more need 
to make application developers into Kubernetes experts.

### Remediate

#### Get recommended fixes and generate post-mortem documentation effortlessly

Botkube provides precise remediation steps and can even create suggested K8s manifests to resolve issues. Set up automated runbooks for guided troubleshooting and run health checks 
to confirm fixes. After resolving incidents,  use Botkube Assistant to automatically compile relevant data—incident timelines, actions taken, and impact analysis—into comprehensive Root Cause Analysis or post mortem reports. Botkube Assistant save hours of tedious labour.

[![Image 1: Monitoring Kubernetes notifications in chat platforms](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/6658ae107c0a774c694ed7e8_Screenshot_Template_Botkube%20(1).webp)](https://botkube.io/solutions/enabling-developers)

### Centralize alerting and troubleshooting

Botkube integrates essential notifications, with context, 
and troubleshooting tools directly into your chat platform. 
Powered by artificial intelligence and automation, it allows teams 
to tackle common issues without wasting time on repetitive tasks.

[Learn more](#)

### Developers aren’t Kubernetes experts, and they don’t have to be

Botkube integrates essential notifications, with context, 
and troubleshooting tools directly into your chat platform. 
Powered by artificial intelligence and automation, it allows teams 
to tackle common issues without wasting time on repetitive tasks.

[Learn more](https://botkube.io/solutions/enabling-developers)

[![Image 2: Monitoring Kubernetes notifications in chat platforms](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/642da9080827c967a39b0043_automation_new.gif)](https://botkube.io/solutions/enabling-developers)

![Image 3: Monitoring Kubernetes notifications in chat platforms](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/654d0856e99da8d8bd98bf27_flux-diff-1.gif)

### Botkube gives you reliable Kubernetes monitoring in minutes, not days

Developers aren’t Kubernetes experts, and they don’t have to be!
Botkube integrates essential notifications, with context, 
and troubleshooting tools directly into your chat platform. 
Powered by artificial intelligence and automation, it allows teams 
to tackle common issues without wasting time on repetitive tasks.

Botkube empowers developers to self-service and solve Kubernetes problems from the comfort of their existing chat platforms without extensive K8s knowledge. Our AI assistant provides actionable insights and recommendations directly to developers, enabling quick problem resolution without heavy reliance on support teams.
[Learn more](#)

[![Image 2: Monitoring Kubernetes notifications in chat platforms](https://assets-global.website-files.com/633705de6adaa38599d8e258/654d07eb1993ada26a1f17b1_Enabling_Developers.gif)](https://botkube.io/solutions/enabling-developers)
Integrate & automate with an growing list of Kubernetes tools
-------------------------------------------------------------

![Image 3: Monitoring Kubernetes notifications in chat platforms](https://assets-global.website-files.com/633705de6adaa38599d8e258/654d0856e99da8d8bd98bf27_flux-diff-1.gif)
Botkube for Teams & Enterprises
-------------------------------

Improving Reliability
---------------------
#### Simplify Multi-Cluster with Botkube

Botkube gives you reliable Kubernetes monitoring in minutes, not days.
#### Tailored plans to manage and tame multiple cluster environments at scale

With powerful filtering, Botkube gets the right notifications to the right teams. Lighten their workload by automating responses to common problems. Accelerate mean time to recovery by receiving alerts, troubleshooting, and resolving issues all in the same place — the chat platform where you already spend much of your time.
![Image 4](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/6650b4df0a0940fc1e07c36b_botkube-cloud-blue.png)![Image 5](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/6650b519468e39bbf04b087c_botkube-cloud-blue-pink.png)

Why our users love Botkube: Case Study
--------------------------------------
Expand All @@ -54,67 +84,156 @@ Join Maria, Developer Advocate for Botkube, in an insightful workshop that lever

Speakers:

![Image 4: Mateusz Stostok, Botkube Backend Engineer](https://assets-global.website-files.com/634fabb21508d6c9db9bc46f/6408ed63e5b48fed17e54625_SE6Pjp9PW9TaOwePHJXRaxaLQgYdT2HX_5PYASmvIx8.jpeg)
![Image 6: Mateusz Stostok, Botkube Backend Engineer](https://cdn.prod.website-files.com/634fabb21508d6c9db9bc46f/6408ed63e5b48fed17e54625_SE6Pjp9PW9TaOwePHJXRaxaLQgYdT2HX_5PYASmvIx8.jpeg)

Maria Ashby

Developer Advocate

Botkube

![Image 5: Kubeshop developer](https://botkube.io/)
![Image 7: Kubeshop developer](https://botkube.io/)

![Image 6: Kubeshop Product manager](https://botkube.io/)
![Image 8: Kubeshop Product manager](https://botkube.io/)

![Image 7: Kubeshop Product manager](https://botkube.io/)
![Image 9: Kubeshop Product manager](https://botkube.io/)

Latest Blogposts
----------------

![Image 8](https://assets-global.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)![Image 9](https://assets-global.website-files.com/634fabb21508d6c9db9bc46f/664fa05091368be18015f77e_Kubetoolslogo.jpg)
What Others Are Saying
----------------------

![Image 10](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

Botkube: Because DevOPS are not Kubernetes expert and also because OPS have to work!

![Image 11: John-Phillip Reignier](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

John-Phillip Reignier

Administrateur Sytèmes

Net Performance Unlimited

![Image 12](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

Botkube gives DevOps, SREs, and developers fast, simple, and secure access to their clusters right from your chat and collaboration platform.

![Image 13: Xin-Kuan (Leo) Yeh](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Xin-Kuan (Leo) Yeh

Cloud Infrastructure Architect

Delta Electronics

![Image 14](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

BotKube works by monitoring events and logs from Kubernetes resources and forwarding them to the messaging platform of your choice. With BotKube, you can set up alerts and notifications for various events, such as pod creation or deletion, node status changes, and more.

![Image 15: Ajeet Singh Raina](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Ajeet Singh Raina

Developer Advocate

Docker

![Image 16](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

Botkube: An app that helps you monitor your Kubernetes cluster, debug critical deployments & gives recommendations for standard practices

![Image 17: Reza Rezaei](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Reza Rezaei

Co-Founder

Intellectera

![Image 18](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

✅ Botkube is a fantastic addition to your Kubernetes toolkit, providing enhanced visibility and timely alerts for a smoother operational experience. Dive in, explore, and empower yourself with the insights Botkube brings to your Kubernetes clusters! 🚢💡

![Image 19: Mohd Imran](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Mohd Imran

Community Builder

AWS

![Image 20](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

I tried an amazing tool called as Botkube that allows you to chat with your Kubernetes Cluster

![Image 21: Rohit Ghumare](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Rohit Ghumare

CNCF Ambassador

CNCF

![Image 22](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

My current workflow makes patching new helmcharts for an infinite amount of clusters the same process while allowing for customizability per deployment.

![Image 23: Shawn Garret](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Shawn Garret

Ambassador

Civo

![Image 24](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

BotKube: The Ultimate Tool for #Kubernetes Alerts and Notifications

![Image 10: Kubeshop CTO Ole Lensmar](https://botkube.io/)
![Image 25: Kube Tools](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Kube Tools

Kubernetes Tool Rating Site

![Image 11](https://assets-global.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)![Image 12](https://assets-global.website-files.com/634fabb21508d6c9db9bc46f/664f9effad81585bbb1ac0c1_quadanow_logo.jpg)
Kube Tools

![Image 26](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

I love Botkube! I've used it since I can remember!

![Image 13: Kubeshop CTO Ole Lensmar](https://botkube.io/)
![Image 27: Arton Demaku](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Arton Demaku

DevOps Engineer

American Association for Accreditation of Ambulatory Surgery Facilities (AAAASF)

![Image 14](https://assets-global.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)![Image 15](https://botkube.io/)
![Image 28](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

For me, monitoring health and performance of the infrastructure in realtime was done with the help of Botkube. Botkube provided me security features such as unauthorized access attempts.

![Image 16: Kubeshop CTO Ole Lensmar](https://botkube.io/)
![Image 29: Nilesh S.](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

![Image 17](https://assets-global.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)![Image 18](https://botkube.io/)
![Image 30](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

The advantages of BotKube are its versatility and efficiency in managing and monitoring Kubernetes clusters. It offers seamless integration with various messaging platforms and provides real-time alerts and notifications. Its appeal is enhanced by Its user-friendly interface, and extensive customization options
The advantages of BotKube are its versatility & efficiency in managing & monitoring K8s clusters. It offers seamless integration w/various messaging platforms & provides real-time alerts & notifications. Its appeal is enhanced by Its user-friendly interface, & extensive customization options.

![Image 19: Kubeshop CTO Ole Lensmar](https://botkube.io/)
![Image 31: Aaditya S](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

![Image 20](https://assets-global.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)![Image 21](https://botkube.io/)
![Image 32](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/64dbb86f74cb6622225312c2_quote-icon.svg)

Perfect! When i have the repo i will write here, thank you very much for the support! I really like this project!
Perfect! When i have the repo i will write here, thank you very much for the support! I really like this project!

![Image 22: Kubeshop CTO Ole Lensmar](https://botkube.io/)
![Image 33: I.A.](https://cdn.prod.website-files.com/plugins/Basic/assets/placeholder.60f9b1840c.svg)

Stay in the Loop
----------------

![Image 23: Kusk Kubernetes ](https://assets-global.website-files.com/633705de6adaa38599d8e258/636d3117b8612105c60e0bd9_botkube-front-right.svg)
![Image 34: Kusk Kubernetes ](https://cdn.prod.website-files.com/633705de6adaa38599d8e258/636d3117b8612105c60e0bd9_botkube-front-right.svg)

Join the Botkube Community in one of these channels

Expand Down
Loading
Loading