IBM Storage Insights is an observability and AIOps platform for storage systems which helps administrators and SRE to monitor and manage their storage fleet.
This is an open-source chatbot created by the IBM Storage Insights team to enable natural language interactions. It enables users to interact & chat with IBM Storage Insights in natural language form to assist in easy observability and monitoring. By leveraging large language models (LLMs) and advanced prompt engineering, the bot intelligently detects user intent, extracts relevant entities, and seamlessly makes IBM Storage Insights API calls to fulfil user queries.
Powered by IBM Watsonx and utilizing both Granite and Llama (Built with Llama) LLMs, this chatbot provides a conversational, intuitive approach for managing and accessing storage data and insights.
- Natural Language Understanding: Utilizes LLMs to process user queries and convert them into actionable API calls.
- Entity Recognition: Extracts storage-specific entities from user input to ensure accurate API interactions.
- REST API Integration: Directly interacts with Storage Insights APIs to retrieve storage system alerts, metrics, notifications, and more.
This chatbot currently supports the following IBM Storage Insights APIs:
- Storage system alerts
- Storage system metrics
- Storage system notifications
- Storage system list
- Tenant alerts
- Tenant notifications
- Storage system volumes
- Storage system details
Note: This is a sample Do-It-Yourself (DIY) GenAI-enabled observability chatbot for IBM Storage Insights, provided on an as-is basis. The functionality currently includes a limited set of IBM Storage Insights REST API capabilities, as listed above. Users are encouraged to extend and adapt this project to incorporate additional REST API endpoints as desired. This is a community-driven project, and IBM does not offer formal support.
Before installing the chatbot, ensure you have the following prerequisites:
-
Sign up for IBM watsonx as a Service: Sign up for IBM watsonx as a Service.
Select
DALLAS
region as the LLM availability differs from region to region.You get 50,000 free tokens per month with your Lite account, consider upgrading to a
pay-as-you-go
account where you get $200 free credits which are valid for 30 days. For more information, visit Upgrading your account -
Create a watsonx API key: Setup your watsonx machine learning instance by following Steps 1 to 9 in this document Create a watsonx API key .
Keep note of the generated
Watsonx Project ID
.Keep note of the generated
Watsonx API key
. -
Storage Insights API Key: Refer section Generating a REST API key.
External Rest APIs can only be accessed with IBM Storage Insights Pro license.
This IBM Storage Insights External Rest API key will be used during login.
-
Podman: Install Podman.
- You can then verify the installation information using:
podman info
- If podman is setup correctly, you will be able to see detailed information about your host.
- You can then verify the installation information using:
-
Install Git: Install Git.
-
Install OpenSSL : Install OpenSSL
OpenSSL comes pre-installed on many Unix-based operating systems, such as Linux and macOS. Run below command to check if OpenSSL is already installed on your system
openssl version
If OpenSSL is installed, this command will display the version of OpenSSL installed, like:
OpenSSL 3.1.1 30 May 2023 (Library: OpenSSL 3.1.1 30 May 2023)
-
Clone the GitHub repo:
https://github.com/ibmstorage/ibm-storageinsights-chatbot.gitgit clone https://github.com/ibmstorage/ibm-storageinsights-chatbot.git
-
Go to directory
ibm-storageinsights-chatbot/
.cd ibm-storageinsights-chatbot/
-
Generate a secret key using the script generate_key.sh. This secret is required to encrypt/decrypt the Storage Insights API key during all communications.
- Make the script executable using the command:
chmod +x generate_key.sh
- Run the script:
./generate_key.sh
- The key will be printed on the terminal. Copy the key as it will be used in next step.
- Make the script executable using the command:
-
To start an HTTPS server, generate self-signed certificates using the provided script generate_certificates.sh.
-
Make the script executable:
chmod +x generate_certificates.sh
-
Run the script:
./generate_certificates.sh
-
The script will prompt you to enter some details. Fill in the required information to proceed.
-
The generated certificates will be stored in:
frontend/certificates/
backend/certificates/
Note: Self-signed certificates work only with Google Chrome. For other browsers, manually copy the CA-certified certificates to the
frontend/certificates/
andbackend/certificates/
directories as needed. -
-
Set environment variables:
-
Go to
frontend/
.cd frontend/
-
Open
dockerfile.frontend
in a text editor and add values forREACT_APP_BACKEND_BASE_URL
andREACT_APP_SECRET_KEY
:REACT_APP_BACKEND_BASE_URL
: Backend server URL where the backend APIs are hosted. If your are running the chatbot on a Host with IP9.200.34.201
, the URL will behttps://9.200.34.201:9508/chatbot
. Please change the Host IP according to your infrastructure.REACT_APP_SECRET_KEY
: Refer to Step 3 for copying the newly generated secret key.
-
After setting up the necessary variables, go pack to the parent directory using below command:
cd ..
- Go to
backend/
.cd backend/
- Open
dockerfile.backend
in a text editor and add values for the following variables:WATSONX_APIKEY
: Refer to Prerequisites, point 4 for copying the API key.PROJECT_ID
: Refer to Prerequisites, point 3 for copying the Project ID.WATSONX_HOSTED_SERVICE
: This is watsonx endpoint URl and depends on the region you selected while setting up the account. Refer Endpoint URLs section for possible values.ORIGIN
: URL where the frontend is hosted. If your are running the chatbot on a Host with IP9.200.34.201
, the URL will behttps://9.200.34.201:9502
. Please change the Host IP according to your infrastructure.SECRET_KEY
: Refer to step 3 for copying the newly generated secret key.
-
-
Go back to parent directory
ibm-storageinsights-chatbot/
.cd ..
-
You will find an install script
install_si_chatbot.sh
. Some values are pre-configured but can be changed as per your infrastructure. These values are:FRONTEND_IMAGE_TAG
BACKEND_IMAGE_TAG
VOLUME_NAME
BACKEND_PORT
FRONTEND_PORT
-
Make the script executable using the command:
chmod +x install_si_chatbot.sh
-
Run the script:
./install_si_chatbot.sh
-
Access the frontend UI from the link:
https://<host>:9502/chatbot/
-
If you encounter below error
Error: creating container storage: the container name "frontend" is already in use
Run below commands and execute
install_si_chatbot.sh
script againpodman stop backend podman stop frontend podman rm backend podman rm frontend
- Video guide for IBM Watsonx as a service
- Video guide for Chatbot Installation
- User guide for Chatbot Features Overview
See AUTHORS.md