def __init__(self,
ctx: CephadmContext,
fsid: str, daemon_id: Union[int, str],
- image=DEFAULT_IMAGE) -> None:
+ image: str = DEFAULT_IMAGE) -> None:
self.ctx = ctx
self.fsid = fsid
self.daemon_id = daemon_id
return AuthEntity(f'client.{self.TYPE}.{host}')
elif self.TYPE == 'mon':
return AuthEntity('mon.')
- elif self.TYPE in ['mgr', 'osd', 'mds']:
+ elif self.TYPE in ['mgr', 'osd', 'mds', 'ceph-exporter']:
return AuthEntity(f'{self.TYPE}.{daemon_id}')
else:
raise OrchestratorError("unknown daemon type")
with with_host(cephadm_module, 'test'):
with with_service(cephadm_module, MonitoringSpec('node-exporter')) as _, \
+ with_service(cephadm_module, ServiceSpec('ceph-exporter')) as _, \
with_service(cephadm_module, MonitoringSpec('prometheus')) as _:
y = dedent("""
labels:
instance: 'test'
+ - job_name: 'ceph-exporter'
+ static_configs:
+ - targets:
+ - '[1::4]:9926'
+
""").lstrip()
_run_cephadm.assert_called_with(