Skip to content

Commit

Permalink
Don't let it set event severity to unclassified
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-eisenhart committed Feb 6, 2024
1 parent 1cc8fa7 commit fe7ce3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pd2zabbix.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,10 @@ sub zabbix_event_update_priority {

my $pd_priority = $event->{'data'}{'priority'}{'summary'};
my $zabbix_severity = $priorities{$pd_priority} || ZABBIX_SEV_NOTCLASSIFIED;
if($zabbix_severity == ZABBIX_SEV_NOTCLASSIFIED) {
warn("Couldn't figure out mapping for PD-priority to Zabbix-severity");
die("Refusing to set Zabbix event severity to Not Classified");
}
my $message = "PD Priority changed to $pd_priority";
if ( defined $who ) {
$message .= " by $who";
Expand Down

0 comments on commit fe7ce3c

Please sign in to comment.