diff --git a/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php b/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php index 00756da9d..b2f21a05e 100644 --- a/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php +++ b/modules/monitoring/library/Monitoring/Command/Transport/LocalCommandFile.php @@ -22,6 +22,13 @@ class LocalCommandFile implements CommandTransportInterface */ const TRANSPORT = 'local'; + /** + * The name of the Icinga instance this transport will transfer commands to + * + * @var string + */ + protected $instanceName; + /** * Path to the icinga command file * @@ -51,6 +58,29 @@ class LocalCommandFile implements CommandTransportInterface $this->renderer = new IcingaCommandFileCommandRenderer(); } + /** + * Set the name of the Icinga instance this transport will transfer commands to + * + * @param string $name + * + * @return $this + */ + public function setInstance($name) + { + $this->instanceName = $name; + return $this; + } + + /** + * Return the name of the Icinga instance this transport will transfer commands to + * + * @return string + */ + public function getInstance() + { + return $this->instanceName; + } + /** * Set the path to the local Icinga command file *