Sample nodejs web application to receive AirVantage alerts thru a webhook
💡 Nodejs >= 4.x required
- Install the dependencies
npm i
- Check or update
config.js
file - Start the server
npm start
- Go to http://localhost:3000/ and prepare to watch the alerts coming
- Test by posting content on http://localhost:3000/alert
curl -H "Content-Type: application/json" -X POST -d '{"name":"event.alert.rule.triggered","date":1473091118798,"content":{"alert.uid":"e3cf3fed7d9c41beb33facbffaca6504","rule.uid":"35b00600117d4cb58437eccd0935a305","target.uid":"88e085b6012a408f9e2582b89a3b7161"}}' http://localhost:3000/alert
- Deploy this application on any public infrastructure
- Or use https://ngrok.com/ for faster testing
- Check out AirVantage user documentation https://doc.airvantage.net/av/reference/configure/ to setup the webhook
- And the API documenation https://doc.airvantage.net/av/reference/cloud/API/#API-Alert-Rule-v1/ (see Configure Notification Hooks / Subscriber API) for more details on what will be posted.