Add host temperature telemetry and history

This commit is contained in:
2026-10-13 23:39:04 -04:00
parent 09396ab584
commit 171f657876
28 changed files with 1466 additions and 32 deletions
+6
View File
@@ -778,6 +778,12 @@ class AgentTests(unittest.TestCase):
else:
self.assertEqual(inventory["cpuUsagePercent"], usage)
def test_inventory_reports_optional_temperature_capability_and_empty_samples(self):
with patch.object(self.agent, "temperatures", return_value=[]):
inventory = self.agent.inventory()
self.assertEqual(inventory["temperatures"], [])
self.assertIn("host.temperatures", inventory["capabilities"])
def resource_container(self):
return {"Name": self.agent.container_name(INSTANCE, 1),
"Config": {"Labels": {module.LABEL + ".managed": "true", module.LABEL + ".instance": INSTANCE, module.LABEL + ".generation": "1"}},