mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-23 13:54:26 +02:00
monitoring: Don't translate exception messages in the remote command file
This commit is contained in:
parent
1cc1521607
commit
e7ef1826b7
@ -17,6 +17,11 @@ use Icinga\Module\Monitoring\Command\Renderer\IcingaCommandFileCommandRenderer;
|
||||
*/
|
||||
class RemoteCommandFile implements CommandTransportInterface
|
||||
{
|
||||
/**
|
||||
* Transport identifier
|
||||
*/
|
||||
const TRANSPORT = 'remote';
|
||||
|
||||
/**
|
||||
* Remote host
|
||||
*
|
||||
@ -175,13 +180,11 @@ class RemoteCommandFile implements CommandTransportInterface
|
||||
}
|
||||
$commandString = $this->renderer->render($command, $now);
|
||||
Logger::debug(
|
||||
sprintf(
|
||||
mt('monitoring', 'Sending external Icinga command "%s" to the remote command file "%s:%u%s"'),
|
||||
$commandString,
|
||||
$this->host,
|
||||
$this->port,
|
||||
$this->path
|
||||
)
|
||||
'Sending external Icinga command "%s" to the remote command file "%s:%u%s"',
|
||||
$commandString,
|
||||
$this->host,
|
||||
$this->port,
|
||||
$this->path
|
||||
);
|
||||
$ssh = sprintf('ssh -o BatchMode=yes -p %u', $this->port);
|
||||
// -o BatchMode=yes for disabling interactive authentication methods
|
||||
@ -197,10 +200,7 @@ class RemoteCommandFile implements CommandTransportInterface
|
||||
exec($ssh, $output, $status);
|
||||
if ($status !== 0) {
|
||||
throw new TransportException(
|
||||
mt(
|
||||
'monitoring',
|
||||
'Can\'t send external Icinga command "%s": %s'
|
||||
),
|
||||
'Can\'t send external Icinga command "%s": %s',
|
||||
$ssh,
|
||||
implode(' ', $output)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user