From e7ef1826b747d2278f6856b98d34fc119cb78a01 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 29 Oct 2014 10:00:59 +0100 Subject: [PATCH] monitoring: Don't translate exception messages in the remote command file --- .../Command/Transport/RemoteCommandFile.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php b/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php index fad4eb0a2..613e66a84 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/RemoteCommandFile.php @@ -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) );