The easiest way to develop BotKube with Elasticsearch notifier enabled is to install Elasticsearch on your local Kubernetes cluster.
Install Elasticsearch:
helm repo add elastic https://helm.elastic.co
helm install elasticsearch elastic/elasticsearch --set replicas=1 --set resources.requests.cpu="100m" --set resources.requests.memory="512M" --wait
Install BotKube with Elasticsearch, according to the Elasticsearch installation instruction, where:
ELASTICSEARCH_USERNAME
is elastic
,ELASTICSEARCH_PASSWORD
is changeme
,ELASTICSEARCH_ADDRESS
is http://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