diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index 58bd9c921..78496fb39 100644 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -700,6 +700,7 @@ sub substituteTags { my $url = $Config{ZM_URL}; $text =~ s/%ZP%/$url/g; + $text =~ s/%MID%/$Monitor->{Id}/g if $Monitor; $text =~ s/%MN%/$Monitor->{Name}/g if $Monitor; if ($Summary) { $text =~ s/%MET%/$Summary->{TotalEvents}/g; @@ -718,6 +719,7 @@ sub substituteTags { $text =~ s/%EPI%/$url?view=event&mode=still&mid=$Event->{MonitorId}&eid=$Event->{Id}/g; $text =~ s/%EPATH%/$Event->Path()/g; $text =~ s/%EI%/$Event->{Id}/g; + $text =~ s/%EID%/$Event->{Id}/g; $text =~ s/%EN%/$Event->{Name}/g; $text =~ s/%EC%/$Event->{Cause}/g; $text =~ s/%ED%/$Event->{Notes}/g; @@ -849,7 +851,7 @@ sub substituteTags { $text =~ s/%FP%/$url?view=filter&filter_name=$filter_name/g; return $text; -} # end subsitituteTags +} # end substituteTags sub sendSummaryEmail { my $filter = shift; @@ -1185,7 +1187,7 @@ sub executeCommand { my $Event = shift; my $command = $filter->{AutoExecuteCmd}; - if ($command =~ /%\w+.%/) { + if ($command =~ /%\w+%/) { $command = substituteTags($command, $filter, $Event); } else { $command .= ' '.$Event->Path();