ElasticSearch notifier development
The easiest way to develop Botkube with Elasticsearch notifier enabled is to install Elasticsearch on your local Kubernetes cluster.
Steps​
Install Elasticsearch:
helm repo add elastic https://helm.elastic.co
helm install elasticsearch elastic/elasticsearch --version 7.17.3 --set replicas=1 --set resources.requests.cpu="100m" --set resources.requests.memory="512M" --waitInstall Botkube with Elasticsearch, according to the Elasticsearch installation instruction, where:
ELASTICSEARCH_USERNAME
iselastic
,ELASTICSEARCH_PASSWORD
ischangeme
,ELASTICSEARCH_ADDRESS
ishttp://elasticsearch-master.default:9200
.
You don't need to set index name, type, shards and replicas.
To review if the events are properly saved in Elasticsearch, follow these steps:
Do port forward:
kubectl port-forward svc/elasticsearch-master 9200
Fetch Elasticsearch indices:
curl http://localhost:9200/_cat/indices
Copy the index name with the
botkube-
prefix and export it as environment variable. For example:export INDEX_NAME="botkube-2022-06-06"
See Elasticsearch index details with logged events:
curl http://localhost:9200/$INDEX_NAME/_search\?pretty