diff --git a/src/charm.py b/src/charm.py index 31972d8..5d149ab 100755 --- a/src/charm.py +++ b/src/charm.py @@ -416,6 +416,7 @@ def _additional_log_configs(self) -> List[Dict[str, Any]]: "targets": ["localhost"], "labels": { "__path__": "/var/log/**/*log", + "job": "varlog", **self._own_labels, }, } @@ -423,7 +424,7 @@ def _additional_log_configs(self) -> List[Dict[str, Any]]: }, { "job_name": "syslog", - "journal": {"labels": self._own_labels}, + "journal": {"labels": {**self._own_labels, **{"job": "syslog"}}}, "pipeline_stages": [ { "drop": { diff --git a/src/grafana_agent.py b/src/grafana_agent.py index 2f5444f..5c7faf5 100644 --- a/src/grafana_agent.py +++ b/src/grafana_agent.py @@ -771,6 +771,7 @@ def _instance_topology(self) -> Dict[str, str]: "juju_model_uuid": self.model.uuid, "juju_application": self.model.app.name, "juju_unit": self.model.unit.name, + "juju_charm": self.meta.name, } @property