diff --git a/charmcraft.yaml b/charmcraft.yaml index 47e7e9f..a9cd3a3 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -28,8 +28,6 @@ links: requires: database: interface: mysql_client - fluentbit: - interface: fluentbit provides: slurmctld: diff --git a/lib/charms/fluentbit/v0/fluentbit.py b/lib/charms/fluentbit/v0/fluentbit.py deleted file mode 100644 index aa68450..0000000 --- a/lib/charms/fluentbit/v0/fluentbit.py +++ /dev/null @@ -1,203 +0,0 @@ -r"""Fluentbit charm libraries. - -This library contains two main classes: `FluentbitProvider` and -`FluentbitClient`. `FluentbitProvider` class is instantiated in the Fluentbit -Server charm, and receives configuration data through a relation to other -charms. `FluentbitClient` class should be instantiated in any charm that wants -to ship logs via Fluentbit. - -## Forwarding logs using Fluentbit - -To forward logs from your charm to a centralized place using Fluentbit, -instantiate the `FluentbitClient()` class and handle the `relation_created` -event in your main charm code. In this event, your charm must pass all the -configuration parameters necessary to configure Fluentbit: the inputs, the -parsers, and the filters. - -For example: - -```python -class MyCharm(CharmBase): - def __init__(self, *args): - super().__init__(*args) - - self._fluentbit = FluentbitClient(self, "fluentbit") - - self.framework.observe(self.on.fluentbit.relation_created, - self._fluentbit_relation_created) - - def _fluentbit_relation_created(self, event): - cfg = [{"input": [("name", "tail"), - ("path", "/var/log/foo/bar.log"), - ("path_key", "filename"), - ("tag", "foo"), - ("parser", "bar")]}, - {"parser": [("name", "bar"), - ("format", "regex"), - ("regex", "^\[(?