Package org.logevents.observers
Class HumioLogEventObserver
- java.lang.Object
-
- org.logevents.core.AbstractFilteredLogEventObserver
-
- org.logevents.observers.AbstractBatchingLogEventObserver
-
- org.logevents.observers.ElasticsearchLogEventObserver
-
- org.logevents.observers.HumioLogEventObserver
-
- All Implemented Interfaces:
LogEventObserver
public class HumioLogEventObserver extends ElasticsearchLogEventObserver
Publishes asynchronously to Humio Elasticsearch Bulk APISample configuration
observer.humio=HumioLogEventObserver observer.humio.elasticsearchUrl=http://localhost:9200 observer.humio.elasticsearchUrlPath=api/v1/ingest/elastic-bulk observer.humio.elasticsearchAuthorizationHeader=repositoryId injectApiToken observer.humio.index=my-test-index observer.humio.idleThreshold=PT2S observer.humio.cooldownTime=PT1S observer.humio.maximumWaitTime=PT30S observer.humio.suppressMarkers=PERSONAL_DATA observer.humio.formatter.excludedMdcKeys=secret
Elasticsearch configuration
elasticsearchUrl
should point to where the elasticsearch API lives. It should contain an URI scheme and authority.elasticsearchUrlPath
should point to the http path where the Elasticsearch Bulk API lives.
Authorization
The configurable
elasticsearchAuthorizationHeader
is the value the client will include as Authorization header when communicating withelasticsearchUrl
. It is not to be confused by Basic authentication. If you need basic authentication you need to remember to provide its configuration value as 'Basic base64encodedValueHere
'.- See Also:
- RFC3986 #section3 about URI syntax
-
-
Field Summary
-
Fields inherited from class org.logevents.observers.AbstractBatchingLogEventObserver
defaultBatcher, executor, scheduledExecutorService, shutdownHook
-
-
Constructor Summary
Constructors Constructor Description HumioLogEventObserver(Map<String,String> properties, String prefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getDefaultPath()
protected List<String>
parseBulkApiResponse(Map<String,Object> response)
-
Methods inherited from class org.logevents.observers.ElasticsearchLogEventObserver
configureProxy, formatMessage, getIndex, getIndexHeader, getUrl, processBatch
-
Methods inherited from class org.logevents.observers.AbstractBatchingLogEventObserver
configureBatching, configureMarkers, createBatcher, createMdcBatcher, createProcessor, doLogEvent, getBatcher, getBatcherFactory, getDefaultBatcher, getMarkerBatcher, processBatch, toString
-
Methods inherited from class org.logevents.core.AbstractFilteredLogEventObserver
configureFilter, filteredOn, getCondition, getThreshold, isEnabled, logEvent, setCondition, setFilter, setThreshold, shouldLogEvent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.logevents.LogEventObserver
isEnabled, stream, toList
-
-
-
-
Method Detail
-
getDefaultPath
protected String getDefaultPath()
- Overrides:
getDefaultPath
in classElasticsearchLogEventObserver
-
parseBulkApiResponse
protected List<String> parseBulkApiResponse(Map<String,Object> response) throws IOException
- Overrides:
parseBulkApiResponse
in classElasticsearchLogEventObserver
- Throws:
IOException
-
-