diff --git a/tardis/plugins/telegrafmonitoring.py b/tardis/plugins/telegrafmonitoring.py index 3f7ea6f1..9232cd77 100644 --- a/tardis/plugins/telegrafmonitoring.py +++ b/tardis/plugins/telegrafmonitoring.py @@ -50,6 +50,7 @@ async def notify(self, state: State, resource_attributes: AttributeDict) -> None tags = dict( site_name=resource_attributes.site_name, machine_type=resource_attributes.machine_type, + drone_uuid=resource_attributes.drone_uuid, ) self.client.metric(self.metric, data, tags=tags) await self.client.close() diff --git a/tests/plugins_t/test_telegrafmonitoring.py b/tests/plugins_t/test_telegrafmonitoring.py index a1a1f139..e1eeafcc 100644 --- a/tests/plugins_t/test_telegrafmonitoring.py +++ b/tests/plugins_t/test_telegrafmonitoring.py @@ -49,6 +49,7 @@ def test_notify(self): test_param = AttributeDict( site_name="test-site", machine_type="test_machine_type", + drone_uuid="test_drone_uuid", created=datetime.now(), updated=datetime.now(), ) @@ -59,7 +60,9 @@ def test_notify(self): updated=datetime.timestamp(test_param.updated), ) test_tags = dict( - site_name=test_param.site_name, machine_type=test_param.machine_type + site_name=test_param.site_name, + machine_type=test_param.machine_type, + drone_uuid=test_param.drone_uuid, ) run_async(self.plugin.notify, test_state, test_param) self.mock_aiotelegraf.Client.assert_called_with(