23 Apr 2020 03:54 PM
I have a problem with the oneagent Plugin code for Windows. Does not send event info, but on Linux it work.
my code is:
import logging
from ruxit.api.base_plugin import BasePlugin
from ruxit.api.selectors import EntityType
logger = logging.getLogger(__name__)
class Teste(BasePlugin):
def query(self, **kwargs):
entities = self.get_monitored_entities(EntityType.HOST)
for entity in entities:
logger.info(entity)
logger.info('Envio de evento')
entity.event_custom_info(description="Users Session Details", title= "User Sessions",
properties={"username":"Teste",
"sessionname":"console",
"session_id":"1",
"state":"on",
"idle_time":".",
"logon_time":"12:30"
}
)
Solved! Go to Solution.
29 Apr 2020 02:06 PM
Does the following construct work for you?
self.results_builder.report_custom_info_event(description="Users Session Details", title="User Sessions", entity_selector=HostSelector(), properties={"username": "Teste", "sessionname": "console", "session_id": "1", "state": "on", "idle_time": ".", "logon_time": "12:30" })
07 May 2020 06:05 PM
Hi @Julius L.
Thanks you for this information. I was successful with this syntax.