X-Pack Alerting is not free, you need a license to run it. Search Guard Alerting and also ElastAlert are free products which you can use at no cost. ElastAlert is a Python application that runs outside Elasticsearch. Search Guard Alerting runs as an Elasticsearch plugin.