monitoring: Don't translate exception messages in the remote command file

This commit is contained in:
Eric Lippmann 2014-10-29 10:00:59 +01:00
parent 1cc1521607
commit e7ef1826b7

View File

@ -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)
);