Nach Upgrade 1.6 auf 2.0: no Custom Attribute XMPP for CONTACT found at /omd/sites/live/local/share/check_mk/notifications/xmpp.pl line 221

Ich nutze unter Version 2.0.0p17 (CRE) (unter armhf auf Raspi4b) xmpp zur Benachrichtigung. Die Benachrichtigungen werden auch korrekt mittels über das xmpp Plugin zugestellt. Seit dem Update vom der Version 1.6 bekomme ich aber Unmengen von folgenden identischem Fehler: no Custom Attribute XMPP for CONTACT found at /omd/sites/live/local/share/check_mk/notifications/xmpp.pl line 221.
- betreffender Ausschnitt der xmpp.pl :

212     # Further defaults:
213     my $url_prefix = $p{PARAMETER_URL_PREFIX} || undef;
214     my $resource = $p{PARAMETER_RESOURCE} || $ENV{OMD_SITE};
215     my $rcpt_is_room = $p{PARAMETER_CHATROOM} || undef;
216 
217     my $rcpt;
218     if ($p{CONTACT_XMPP}){
219             $rcpt = $p{CONTACT_XMPP};
220     }else{
221             warn "no Custom Attribute XMPP for CONTACT found";
222             exit(2);
223     }

Ein weiterer Fehler meldet bei jedem Ereignis: Use of uninitialized value in numeric gt (>) at /usr/share/perl5/Net/XMPP/Debug.pm line 342. Use of uninitialized value $string in substitution (s///) at /omd/sites/live/local/share/check_mk/notifications/xmpp.pl line 44. -- Use of uninitialized value $string in substitution (s///) at
- betreffender Ausschnitt der xmpp.pl :

 27 sub substitute_context {
 28         my ($string, $pRef, $url_prefix, $html, $debug) = @_;
 29         warn "D-substiture_context: substitute the following string: '" . $string . "'" if $debug;
 30         if ($html){
 31             if ( $url_prefix ){
 32                 my $host_url = $url_prefix . $pRef->{HOSTURL};
 33                 my $service_url = $url_prefix . $pRef->{SERVICEURL};
 34 
 35                 $string =~ s/\$HOSTNAME\$/<a href="${host_url}">\$HOSTNAME\$<\/a>/;
 36                 $string =~ s/\$SERVICEDESC\$/<a href="${service_url}">\$SERVICEDESC\$<\/a>/;
 37             }
 38 
 39             $string =~ s/\$(.*?)\$/<b>\$$1\$<\/b>/mg;
 40             $string =~ s/\n|\\n/<br\/>\n/g;
 41         }
 42         foreach my $key (keys %{$pRef}) {
 43                 my $val = $pRef->{$key};
 44                 $string =~ s/\$$key\$/$val/gm;
 45         }
 46         if ($html){
 47             $string =~ s/(UNREACHABLE|DOWN|CRITICAL|CRIT)/<span style='color: #FF0000;'>$1<\/span>/gm;
 48             $string =~ s/(OK|UP)/<span style='color: #00FF00;'>$1<\/span>/gm;
 49             $string =~ s/(WARNING|WARN)/<span style='color: #FFFFAA;'>$1<\/span>/gm;
 50             $string =~ s/(UNKNOWN|UNKN)/<span style='color: #FFE0A0;'>$1<\/span>/gm;
 51         }
 52 
 53         warn "D-substiture_context: to: '" . $string . "'" if $debug;
 54         return $string;
 55 }
 56 
 57

Leider kann ich per GUI für das Plugin nach dem Update auf 2.0 keine Einstellungen mehr in den ‘notification rule’ finden (siehe Bilder):

Betriebssysteminfos:

cat /etc/debian_version 
11.2
cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"

Ist das ein Bug oder muss ich das xmpp Plugin manuell nachträglich aktualisieren?
Ich bin für jeden Hinweis dankbar :grinning:.
VG Heiko

Wenn ich das richtig sehe im Netz, wurde an dem Plugin seit 5 Jahren nix mehr gemacht/aktualisiert. Letzte offiziell unterstützte Version war 1.4.
Ich würde mir hier eher mal das folgende xmpp Notification Script anschauen und nach den eigenen Bedürfnissen anpassen.

Das schaut aus wie man ein Notification Script so kennt :slight_smile:

Danke für die Info. Das habe ich echt nicht vorab geprüft :no_mouth:
Ob dafür meine Programmierkünste ausreichen, wird sich aber noch zeigen müssen. :thinking:

VG Heiko

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.