Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add prometheus exporter manager #20

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

NucciTheBoss
Copy link
Member

Adds the PrometheusExporterManager class for managing the operations of the Slurm prometheus exporter bundled with the Slurm snap.

PrometheusExporterManager inherits from ServiceManager so that it can enable, disable, and restart the exporter service. The exporter is exposed through the exporter attribute of SlurmManagerBase. This way we can use something like the following block of code to turn on the exporter after we have connected a COS deployment to Charmed HPC:

def _on_integration(self, _: Event) -> None:
    """Handler for when COS is integrated into cluster."""
    # staging operations for setting up observability.
    ...
    self._manager.exporter.enable()

One thing we'll likely need to do in the future is that once we determine how we want to configure the prometheus exporter, we'll need to expose a config interface.

Fixes #19

Signed-off-by: Jason C. Nucciarone <[email protected]>
@NucciTheBoss NucciTheBoss requested a review from jedel1043 July 16, 2024 20:29
@NucciTheBoss NucciTheBoss added the enhancement New feature or request label Jul 16, 2024
Copy link
Contributor

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This will make it really easy to integrate COS into all the charms.

Signed-off-by: Jason C. Nucciarone <[email protected]>
@NucciTheBoss NucciTheBoss merged commit 4188e5c into charmed-hpc:main Jul 16, 2024
3 checks passed
@NucciTheBoss
Copy link
Member Author

Let's go! I'll bump the LIBPATCH version and then merge.

@NucciTheBoss NucciTheBoss deleted the add-prometheus-component branch September 17, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: Add component to manage prometheus exporter
2 participants