Closed acchen97 closed 7 years ago
Added high level requirements for this feature, would love your input @wiibaa @untergeek @jordansissel @suyograo
Closing in favor of https://github.com/elastic/logstash/issues/6502.
@wiibaa we discussed this today - we'll keep this plugin in its current functionality here and get it merged in. LRU caching could be a nice feature add. The requirements specified in this particular issue have been moved to the issue above, which will result in a separate plugin which caches the full query result set locally in LS for faster lookups.
Outlining some requirements to ship v1. For reference purposes, the meta issue is here.
Currently as-is, the plugin will execute a SQL query per event, and store the full result set in a new field. This requires a query and network round trip for each event, which isn't ideal. We should make this more dynamic...
Goals
Enable the ability to lookup and enrich events from relational databases, commonly needed for users running CMDBs or using traditional data warehousing.
Features
When Logstash first starts up, it should automatically query the DB and load the result set locally in cache. For fast retrieval, each row can probably be hashed by the primary or composite key. Since we always know the key for every event, it should be O(1) access.
Configuration
Failure Handling
If lookups fail, we can tag it "_jdbclookupfailure".