Skip to content

Commit

Permalink
Fix for sni#1331 add $HOSTBACKENDID$
Browse files Browse the repository at this point in the history
Added $HOSTBACKENDID$ and $SERVICEBACKENDID$
  • Loading branch information
ketra committed Jun 19, 2024
1 parent faabeca commit c6504d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Thruk/Backend/Manager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1467,6 +1467,7 @@ sub _set_host_macros {
if($peer) {
$macros->{'$HOSTBACKENDNAME$'} = (defined $peer->{'name'}) ? $peer->{'name'} : '';
$macros->{'$HOSTBACKENDADDRESS$'} = (defined $peer->{'addr'}) ? $peer->{'addr'} : '';
$macros->{'$HOSTBACKENDID$'} = (defined $peer->{'key'}) ? $peer->{'key'} : '';
}

my $prefix = (defined $host->{'host_custom_variable_names'}) ? 'host_' : '';
Expand Down Expand Up @@ -1515,6 +1516,7 @@ sub _set_service_macros {
if($peer) {
$macros->{'$SERVICEBACKENDNAME$'} = (defined $peer->{'name'}) ? $peer->{'name'} : '';
$macros->{'$SERVICEBACKENDADDRESS$'} = (defined $peer->{'addr'}) ? $peer->{'addr'} : '';
$macros->{'$SERVICEBACKENDID$'} = (defined $peer->{'key'}) ? $peer->{'key'} : '';
}

# service user macros...
Expand Down

0 comments on commit c6504d0

Please sign in to comment.