handlers.tf 747 B

1234567891011121314151617181920
  1. locals {
  2. victorops_team = var.environment == "test" ? "test" : "engineering"
  3. }
  4. resource "sensu_handler" "handler_keepalive" {
  5. name = "keepalive"
  6. type = "set"
  7. namespace = "default"
  8. handlers = [ "victorops", ]
  9. }
  10. resource "sensu_handler" "handler_victorops" {
  11. name = "victorops"
  12. type = "pipe"
  13. namespace = "default"
  14. handlers = [ "victorops", ]
  15. filters = [ "is_incident", "not_silenced", "handler-delay", ]
  16. runtime_assets = [ "sensu-plugins-victorops", "sensu-ruby-runtime", ]
  17. command = "handler-victorops.rb --map_go_event_into_ruby -a https://alert.victorops.com/integrations/generic/20131114/alert/864a1b38-4243-4137-8baa-b587ba5f300b/ -r ${local.victorops_team}"
  18. }