geonode_logstash.logstash
Attributes
Classes
Dispatcher of GeoNode metric data for Logstash server |
|
Extends AsynchronousLogstashHandler to allow gzip compression |
|
Extends LogstashFormatter to allow gzip compression |
|
Extends TcpTransport to avoid loss of messages |
|
Extends LogProcessingWorker to use GeonodeDatabaseCache |
|
Extends DatabaseCache to have more method |
Module Contents
- class geonode_logstash.logstash.LogstashDispatcher[source]
Bases:
objectDispatcher of GeoNode metric data for Logstash server
- static _get_centralized_server()[source]
Get the Centralized Server instance :return: Centralized Server
- static get_socket_timeout()[source]
Configuring the SOCKET_TIMEOUT from the model :return: SOCKET_TIMEOUT
- static get_queue_check_interval()[source]
Configuring the QUEUE_CHECK_INTERVAL from the model :return: QUEUE_CHECK_INTERVAL
- static get_queue_events_flush_interval()[source]
Configuring the QUEUED_EVENTS_FLUSH_INTERVAL from the model :return: QUEUED_EVENTS_FLUSH_INTERVAL
- static get_queue_events_flush_count()[source]
Configuring the QUEUED_EVENTS_FLUSH_COUNT from the model :return: QUEUED_EVENTS_FLUSH_COUNT
- static get_queue_events_batch_size()[source]
Configuring the QUEUED_EVENTS_BATCH_SIZE from the model :return: QUEUED_EVENTS_BATCH_SIZE
- static get_logstash_db_timeout()[source]
Configuring the DATABASE_TIMEOUT from the model :return: DATABASE_TIMEOUT
- _get_message(data_type)[source]
Retrieving data querying the MetricValue model :param data_type: field mapping to keep only interesting information :return: data dictionary
- static _build_data(item, key)[source]
Extract interesting data from the query result :param item: query result item :param key: interesting key :return: interesting value
- class geonode_logstash.logstash.GeonodeAsynchronousLogstashHandler(*args, **kwargs)[source]
Bases:
logstash_async.handler.AsynchronousLogstashHandlerExtends AsynchronousLogstashHandler to allow gzip compression
- _start_worker_thread()[source]
Super method override to use GeonodeLogProcessingWorker :return: None
- class geonode_logstash.logstash.GeonodeLogstashFormatter(gzip=False, *args, **kwargs)[source]
Bases:
logstash_async.formatter.LogstashFormatterExtends LogstashFormatter to allow gzip compression
- format(record)[source]
Super method overriding to allow json compression :param record: message :return: gzip compressed message :ref: https://stackoverflow.com/questions/8506897/how-do-i-gzip-compress-a-string-in-python
- class geonode_logstash.logstash.GeonodeTcpTransport[source]
Bases:
logstash_async.transport.TcpTransportExtends TcpTransport to avoid loss of messages