From 6a54712339ac314ff1f2a7af14b8fc32b50381bf Mon Sep 17 00:00:00 2001 From: Eric Eisenhart Date: Fri, 28 Jul 2023 15:32:06 -0700 Subject: [PATCH] Remove the attempt to validate the pdmergeaction option; it wasn't working and doesn't add enough value to be worth digging into further (anything other than `merge` or `resolve` gets treated same as `ignore`). And a tiny bit more debugging. --- pd2zabbix.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pd2zabbix.cgi b/pd2zabbix.cgi index e2bdb41..842d2e8 100755 --- a/pd2zabbix.cgi +++ b/pd2zabbix.cgi @@ -82,7 +82,6 @@ our $config = AppConfig->new( pdmergeaction => { DEFAULT => 'ignore', ARGCOUNT => ARGCOUNT_ONE, - VALIDATE => qr/^(merge|ignore|resolve)$/, }, ); @@ -232,6 +231,7 @@ sub pagerduty_handle_webhook { # Special case: merged incidents if ( $event_type eq 'incident.resolved' && $event->{'data'}{'resolve_reason'}{'type'} eq 'merge_resolve_reason' ) { warn("PD events merged...\n") if $DEBUG >= 1; + warn("pdmergeaction=".$config->get('pdmergeaction')."\n") if $DEBUG >= 2; if ( $config->get('pdmergeaction') eq 'merge' ) { warn("Merging this incident into another\n") if $DEBUG >= 1;