fix URI on local hostnames (#2694)
This commit is contained in:
parent
b0b55a27cc
commit
a7edea5d60
|
@ -104,6 +104,7 @@ sub build_options_for_httplib {
|
||||||
} else {
|
} else {
|
||||||
$self->{option_results}->{hostname} = $self->{hostname};
|
$self->{option_results}->{hostname} = $self->{hostname};
|
||||||
}
|
}
|
||||||
|
$self->{option_results}->{environment_id} = $self->{environment_id};
|
||||||
$self->{option_results}->{port} = $self->{port};
|
$self->{option_results}->{port} = $self->{port};
|
||||||
$self->{option_results}->{proto} = $self->{proto};
|
$self->{option_results}->{proto} = $self->{proto};
|
||||||
$self->{option_results}->{ssl_opt} = $self->{ssl_opt};
|
$self->{option_results}->{ssl_opt} = $self->{ssl_opt};
|
||||||
|
@ -148,7 +149,10 @@ sub request_api {
|
||||||
sub internal_problem {
|
sub internal_problem {
|
||||||
my ($self, %options) = @_;
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
my $status = $self->request_api(method => 'GET', url_path => (($self->{hostname} eq 'live.dynatrace.com') ? '' : '/e') . '/api/v1/problem/feed?relativeTime=' . $self->{option_results}->{relative_time});
|
my $status = $self->request_api(
|
||||||
|
method => 'GET',
|
||||||
|
url_path => (($self->{hostname} eq 'live.dynatrace.com') ? '' : '/e/' . $self->{option_results}->{environment_id}) . '/api/v1/problem/feed?relativeTime=' . $self->{option_results}->{relative_time}
|
||||||
|
);
|
||||||
return $status;
|
return $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue