Skip to content

gravitee-io-community/gravitee-elasticsearch-ingest-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gravitee.io ingest plugin for ElasticSearch

Description

This plugin allow you to enhance the ElasticSearch data schema with the API name / application name.

The plugin get these additional data from the Gravitee.io Management REST API. A cache mechanism allows to call the API only once as these data not change often. Default time to live is set to 24 hours.

Configuration

From Gravitee.io

As a new ES processor is available, we have to enable it from the gateway configuration on the gravitee.yml:

gravitee.reporters.elasticsearch.pipeline.plugins.ingest=gravitee

From Elasticsearch

First of all you have to install the plugin within ElasticSearch:

/usr/share/elasticsearch/bin/elasticsearch-plugin install file:///path_to_the_plugin/gravitee-elasticsearch-ingest-plugin-${version}.zip

And configure the endpoint information on the elasticsearch.yml:

ingest.gravitee:
  endpoint: https://gravitee_management_host/management
  username: admin
  password: admin
  cache:
    maxElement: 1000
    # 1 hour
    ttl: 3600
  headers:
    - "key: value"
    - "Custom-Header: HeaderValue"

By default the plugin will try to call the REST API on http://localhost:8083/management with username admin and password admin.

Extension points

By default, this plugin provides a Processor to enhance Ingest documents with both API and application names. If you need to enhance Ingest documents with more than those properties, you can extend this plugin to add extra processors:

  • implementing extra io.gravitee.elasticsearch.ingest.plugin.IngestDocumentEnhancer responsible for enhancing Ingest document with some new properties.

  • extending the io.gravitee.elasticsearch.ingest.plugin.EnhanceGraviteeAttributionProcessor.Factory class and overriding initializeDocumentEnhancers() method to initialize extra IngestDocumentEnhancer.

  • extending the io.gravitee.elasticsearch.ingest.plugin.IngestGraviteePlugin class and overriding buildProcessorFactory() to initialize the processor factory.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages