{"id":21374,"library":"genie-telemetry","title":"Genie Telemetry","description":"Genie Telemetry is part of the Cisco Genie framework, providing libraries for telemetry collection, monitoring, and triggering actions on network devices. It wraps pyATS/Genie testbed infrastructure to enable real-time telemetry data extraction and event-driven automation. Current version 26.3. Release cadence is periodic, tied to Genie/pyATS ecosystem updates.","status":"active","version":"26.3","language":"python","source_language":"en","source_url":"https://github.com/CiscoTestAutomation/genie-telemetry","tags":["cisco","genie","pyats","telemetry","network-automation"],"install":[{"cmd":"pip install genie-telemetry","lang":"bash","label":"PyPI install"},{"cmd":"pip install genie-telemetry[full]","lang":"bash","label":"Install with extra dependencies"}],"dependencies":[{"reason":"Core Genie framework for testbed and device abstractions","package":"genie","optional":false},{"reason":"pyATS testbed and connection management","package":"pyats","optional":false},{"reason":"gRPC support for telemetry streaming (e.g., gRPC Dial-out)","package":"grpcio","optional":true}],"imports":[{"note":"Main collector class for creating telemetry jobs","wrong":"","symbol":"TelemetryCollector","correct":"from genie.telemetry import TelemetryCollector"},{"note":"Agent is exported directly from genie.telemetry; incorrect submodule import may fail in v25+","wrong":"from genie.telemetry.agent import Agent","symbol":"Agent","correct":"from genie.telemetry import Agent"},{"note":"Class for pushing telemetry data to collectors","wrong":"","symbol":"PushTelemetry","correct":"from genie.telemetry import PushTelemetry"}],"quickstart":{"code":"from pyats.topology import loader\nfrom genie.telemetry import TelemetryCollector, Agent\n\n# Load testbed\ntestbed = loader.load('testbed.yaml')\ndevice = testbed.devices['router1']\ndevice.connect()\n\n# Create telemetry collector\ncollector = TelemetryCollector(device=device)\ncollector.add_agent(Agent(device=device, what='cpu'))\ncollector.start()\nresults = collector.stop()\nprint(results)","lang":"python","description":"Basic usage: load testbed, connect to device, create telemetry collector, add a CPU agent, collect data."},"warnings":[{"fix":"Use 'from genie.telemetry import Agent' instead of 'from genie.telemetry.agent import Agent'.","message":"In genie-telemetry v25+, the 'Agent' class is no longer importable from 'genie.telemetry.agent'; import directly from 'genie.telemetry'.","severity":"breaking","affected_versions":">=25.0"},{"fix":"Always call collector.stop() in a try/finally block or use context manager if available.","message":"The 'TelemetryCollector' must be started and stopped explicitly; forgetting to stop can leave orphaned processes.","severity":"gotcha","affected_versions":"all"},{"fix":"Migrate to gNMI collectors using 'from genie.telemetry.gnmi import GnmiCollector'.","message":"Support for older telemetry protocols (e.g., MDT over gRPC) is being phased out in favor of gNMI.","severity":"deprecated","affected_versions":">=26.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'from genie.telemetry import Agent'.","cause":"Import path changed in v25+; Agent is now directly in genie.telemetry.","error":"ModuleNotFoundError: No module named 'genie.telemetry.agent'"},{"fix":"Ensure device.connect() is called before creating TelemetryCollector or Agent.","cause":"Device not connected before adding agent.","error":"genie.telemetry.exceptions.AgentError: Agent 'cpu' failed: 'Device' object has no attribute 'connected'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}