Small and humble alerting tool using Warp10 as its data backend

config.sample.yaml 649B

123456789101112131415161718192021222324252627
  1. mail:
  2. sender: foo@bar.baz
  3. recipient: admin@bar.baz
  4. smtp:
  5. host: smtp.bar.baz
  6. port: 465
  7. username: foo@bar.baz
  8. password: hackme
  9. warp10_exec: http://localhost/api/v0/exec
  10. token: READ_TOKEN
  11. scripts:
  12. - key: "temperature"
  13. script: "
  14. NOW 'now' STORE
  15. [
  16. $token
  17. 'sensores.temperature'
  18. { 'room' 'bedroom' }
  19. $now
  20. -1
  21. ] FETCH
  22. VALUES LIST-> DROP LIST-> DROP
  23. "
  24. type: number
  25. threshold: 50
  26. action: http
  27. target: http://localhost:9996/alert