ソースを参照

Enables a Mutator to Filter VictorOps Alerts

Need to decide if we like it.
Fred Damstra [afs macbook] 3 年 前
コミット
1e53223708
1 ファイル変更6 行追加0 行削除
  1. 6 0
      base/sensu-configuration/handlers.tf

+ 6 - 0
base/sensu-configuration/handlers.tf

@@ -2,6 +2,11 @@ locals {
     victorops_team = var.environment == "test" ? "test" : "engineering"
 }
 
+resource "sensu_mutator" "mutator_xdr" {
+  name    = "xdr_mutator"
+  command = "/usr/local/bin/xdr_mutator.py"
+}
+
 resource "sensu_handler" "handler_keepalive" {
   # No victorops in test at all pl0x
   count     = var.environment == "test" ? 0 : 1
@@ -16,6 +21,7 @@ resource "sensu_handler" "handler_victorops" {
   type           = "pipe"
   namespace      = "default"
   handlers       = [ "victorops", ]
+  mutator        = sensu_mutator.mutator_xdr.id
   filters        = [ "is_incident", "not_silenced", "handler-delay", ]
   runtime_assets = [ "sensu-plugins-victorops", "sensu-ruby-runtime", ]
   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}"