Skip to content

Commit

Permalink
feat: add prometheus exporter manager
Browse files Browse the repository at this point in the history
Signed-off-by: Jason C. Nucciarone <[email protected]>
  • Loading branch information
NucciTheBoss committed Jul 16, 2024
1 parent b72ce34 commit 374c01a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/charms/hpc_libs/v0/slurm_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class ServiceType(Enum):
"""Type of Slurm service to manage."""

MUNGED = "munged"
PROMETHEUS_EXPORTER = "slurm-prometheus-exporter"
SLURMD = "slurmd"
SLURMCTLD = "slurmctld"
SLURMDBD = "slurmdbd"
Expand Down Expand Up @@ -285,13 +286,21 @@ def generate_key(self) -> None:
_mungectl("key", "generate")


class PrometheusExporterManager(ServiceManager):
"""Manage `slurm-prometheus-exporter` service operations."""

def __init__(self) -> None:
self._service = ServiceType.PROMETHEUS_EXPORTER


class SlurmManagerBase(ServiceManager):
"""Base manager for Slurm services."""

def __init__(self, service: ServiceType) -> None:
self._service = service
self.config = ConfigurationManager(service.config_name)
self.munge = MungeManager()
self.exporter = PrometheusExporterManager()

@property
def hostname(self) -> str:
Expand Down

0 comments on commit 374c01a

Please sign in to comment.