host = $host; $this->service = $service; } protected function getImageBaseUrl() { return Url::fromPath('graphite/graph/service'); } protected function getDummyImageBaseUrl() { return Url::fromPath('graphite/graph-dummy/service'); } protected function filterImageUrl(Url $url) { return $url->setParam('host.name', $this->host)->setParam('service.name', $this->service); } protected function designedForMyMonitoredObjectType(Template $template) { foreach ($template->getCurves() as $curve) { if (in_array('service_name_template', $curve[0]->getMacros())) { return true; } } return false; } protected function getMonitoredObjectFilter() { return ['host.name' => $this->host, 'service.name' => $this->service]; } }