03 Oct 2024 09:24 AM
Issue | Question/Comments |
entities = self.get_monitored_entities() | Is this function usable in new Extension framework ? |
from ruxit.api.selectors import EntityType entity.type == EntityType.HOST: | We have this code in Extension. Is EntityType valid in new Framework ? If no, how to import EntityType in new framework |
from ruxit.api.selectors import HostSelector self.results_builder.report_custom_info_event(description="One or more processes are unavailable", title="Host Unhealthy", entity_selector=HostSelector()) | We have this code in Extension. Is HostSelector valid in new Framework ? If no, how to import HostSelector in new framework |
Solved! Go to Solution.
03 Oct 2024 11:07 AM
HostSelector and EntitySelector objects along with ResultsBuilder and TopologyBuilder no longer exist in the new framework. For OneAgent extensions, the data ingested is automatically linked to the OneAgent host.
For reporting an info event (based on the API documented here) you can use the `self.report_dt_event` function.
To find out the entity ID of the host running the extension you can use the OneAgent virtual file as documented here. When the OneAgent detects this file being read it will populate it with entity IDs for the host and monitored processes.