dxlconsole.modules.monitor.module module

class dxlconsole.modules.monitor.module.MonitorModule(app)

Bases: dxlconsole.module.Module

CLIENT_RETENTION_MINUTES = 30
SERVICE_REGISTRY_QUERY_TOPIC = '/mcafee/service/dxl/svcregistry/query'
SERVICE_REGISTRY_REGISTER_EVENT_TOPIC = '/mcafee/event/dxl/svcregistry/register'
SERVICE_REGISTRY_UNREGISTER_EVENT_TOPIC = '/mcafee/event/dxl/svcregistry/unregister'
SERVICE_UPDATE_INTERVAL = 60
clear_messages(client_id)

Clears the pending messages for the given client.

Parameters:client_id -- the client to clear messages for
client_config
client_keep_alive(client_id)
content
get_dxl_client(client_id)

Retrieves the DxlClient for the given request. If there is not one associated with the incoming request it creates a new one and saves the generated client_id as a cookie

Parameters:client_id -- The client identifier
Returns:the DxlClient specific to this "session"
get_message_topic(message)

Determines the topic for the provided message. Replaces the response channel in responses with the topic of the original request

Parameters:message -- The DXL message
Returns:The topic to use
get_messages(client_id)

Retrieves the messages pending for the given client. This does not clear the queue after retrieving.

Parameters:client_id -- the client to retrieve messages for
Returns:a List of messages for the client
handlers
io_loop

Returns the Tornado IOLoop that the web console uses

Returns:The Tornado IOLoop instance
message_id_topics
notify_web_sockets()

Notifies all web sockets that there are pending service updates

queue_message(message, client_id)

Adds the given message to the pending messages queue for the give client.

Parameters:
  • message -- the message to enqueue
  • client_id -- the client the message is intended for
remove_service(service_event)

Removes a stored service using the provided DXL service event

Parameters:service_event -- the DXL service event containing the service to be removed
services
update_service(service_event)

Replaces a stored service data with the one from the provided DXL service event

Parameters:service_event -- the DXL service event containing the service