csle_collector.elk_manager package
Submodules
csle_collector.elk_manager.elk_manager module
- class csle_collector.elk_manager.elk_manager.ElkManagerServicer[source]
Bases:
csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerServicer
gRPC server for managing an ELK stack. Allows to start/stop the ELK stack remotely and also to query the state of the ELK stack.
- getElkStatus(request: elk_manager_pb2.GetElkStatusMsg, context: grpc.ServicerContext) elk_manager_pb2.ElkDTO [source]
Gets the state of the ELK server
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
an ElkDTO with the state of the ELK stack server
- startElastic(request: elk_manager_pb2.StartElasticMsg, context: grpc.ServicerContext) elk_manager_pb2.ElkDTO [source]
Starts elasticsearch
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
an ElkDTO with the state of the ELK server
- startElk(request: elk_manager_pb2.StartElkMsg, context: grpc.ServicerContext) elk_manager_pb2.ElkDTO [source]
Starts the ELK stack
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
an ElkDTO with the state of the ELK server
- startKibana(request: elk_manager_pb2.StartKibanaMsg, context: grpc.ServicerContext) elk_manager_pb2.ElkDTO [source]
Starts Kibana
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
an ElkDTO with the state of the ELK server
- startLogstash(request: elk_manager_pb2.StartLogstashMsg, context: grpc.ServicerContext) elk_manager_pb2.ElkDTO [source]
Starts Logstash
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
an ElkDTO with the state of the ELK server
- stopElastic(request: elk_manager_pb2.StartElasticMsg, context: grpc.ServicerContext) elk_manager_pb2.ElkDTO [source]
Stops elasticsearch
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
an ElkDTO with the state of the ELK server
- stopElk(request: elk_manager_pb2.StopElkMsg, context: grpc.ServicerContext) elk_manager_pb2.ElkDTO [source]
Stops the ELK stack
- Parameters
request – the gRPC request
context – the gRPC context
- Returns
an ElkDTO with the state of the ELK stack
- csle_collector.elk_manager.elk_manager.serve(port: int = 50045, log_dir: str = '/', max_workers: int = 10, log_file_name: str = 'elk_manager.log') None [source]
Starts the gRPC server for managing the ELK stack
- Parameters
port – the port that the server will listen to
log_dir – the directory to write the log file
log_file_name – the file name of the log
max_workers – the maximum number of GRPC workers
- Returns
None
csle_collector.elk_manager.elk_manager_pb2 module
Generated protocol buffer code.
csle_collector.elk_manager.elk_manager_pb2_grpc module
Client and server classes corresponding to protobuf-defined services.
- class csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManager[source]
Bases:
object
Interface exported by the server
- static getElkStatus(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startElastic(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startElk(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startKibana(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static startLogstash(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static stopElastic(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- static stopElk(request, target, options=(), channel_credentials=None, call_credentials=None, insecure=False, compression=None, wait_for_ready=None, timeout=None, metadata=None)[source]
- class csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerServicer[source]
Bases:
object
Interface exported by the server
csle_collector.elk_manager.elk_manager_util module
- class csle_collector.elk_manager.elk_manager_util.ElkManagerUtil[source]
Bases:
object
Class with utility functions related to the ELK Manager
csle_collector.elk_manager.query_elk_manager module
- csle_collector.elk_manager.query_elk_manager.get_elk_status(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Queries the server for the ELK stack status
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK stack
- csle_collector.elk_manager.query_elk_manager.start_elastic(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to start Elasticsearch
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK server
- csle_collector.elk_manager.query_elk_manager.start_elk(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to start the ELK stack
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK server
- csle_collector.elk_manager.query_elk_manager.start_kibana(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to start Kibana
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK server
- csle_collector.elk_manager.query_elk_manager.start_logstash(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to start Logstash
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK server
- csle_collector.elk_manager.query_elk_manager.stop_elastic(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to stop Elabticsearch
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK stack
- csle_collector.elk_manager.query_elk_manager.stop_elk(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to stop the whole ELK stack
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK stack
- csle_collector.elk_manager.query_elk_manager.stop_kibana(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to stop Kibana
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK stack
- csle_collector.elk_manager.query_elk_manager.stop_logstash(stub: csle_collector.elk_manager.elk_manager_pb2_grpc.ElkManagerStub, timeout=60) elk_manager_pb2.ElkDTO [source]
Sends a request to the ELK server to stop Logstash
- Parameters
stub – the stub to send the remote gRPC to the server
timeout – the GRPC timeout (seconds)
- Returns
an ElkDTO describing the status of the ELK stack