From f6cc7555a3ace8e78597593820093171b94a4542 Mon Sep 17 00:00:00 2001 From: Austin Miller Date: Mon, 9 Sep 2024 14:49:22 -0700 Subject: [PATCH] Allow PRTG hook to use the test (#123) --- app/models/pager_tree/integrations/prtg/v3.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/pager_tree/integrations/prtg/v3.rb b/app/models/pager_tree/integrations/prtg/v3.rb index 3a2d333..48ddcde 100644 --- a/app/models/pager_tree/integrations/prtg/v3.rb +++ b/app/models/pager_tree/integrations/prtg/v3.rb @@ -25,7 +25,8 @@ def adapter_thirdparty_id def adapter_action status = adapter_incoming_request_params.dig("status").to_s.downcase - if status == "down" + # %status is a special value that PRTG uses to indicate that will be used in the test webhook + if status == "down" || status == "%status" :create elsif status.include?("now: up") :resolve