Skip to content

Commit

Permalink
update slack alert mode (#1177)
Browse files Browse the repository at this point in the history
The notification not print host and service name
  • Loading branch information
kgoul974 authored and cgagnaire committed Oct 19, 2018
1 parent 340ecc1 commit 019b5b5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions notification/slack/mode/alert.pm
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ sub service_message {
my ($self, %options) = @_;

my $url_service = "Host: " . $self->{option_results}->{host_name} . " | Service " . $self->{option_results}->{service_description};
$self->{payload_attachment}->{fallback} = $url_service;
if (defined($self->{option_results}->{link_url}) && $self->{option_results}->{link_url} ne '') {
$url_service = '<' . $self->{option_results}->{link_url} . '|' . $self->{option_results}->{host_name} . '/' . $self->{option_results}->{service_description} . '>';
$self->{payload_attachment}->{fallback} = "Service " . $self->{option_results}->{host_name} . '/' . $self->{option_results}->{service_description};
Expand Down

0 comments on commit 019b5b5

Please sign in to comment.