cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed event_custom_info method in Oneagent Plug-in for Windows

maborin
Participant

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"
}
)



2 REPLIES 2

Julius_Loman
DynaMight Legend
DynaMight Legend

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" })

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Hi @Julius L.

Thanks you for this information. I was successful with this syntax.

Featured Posts