Coder Social home page Coder Social logo

Comments (3)

samugi avatar samugi commented on May 26, 2024

hi @gzOne2Free, thanks for opening this issue. It looks like this may be related with your Elasticsearch mapping, I found this stackoverflow which seems related.

In short:

instead of declaring the whole array as an object, speficy the array entries' data type (text) directly

"consumer": {
(unchanged)
  "properties": {
    "tags": {
      "type": "text"
    }
(unchanged)

Also, you may consider using keyword instead of text.

Could you give it a try and let me know if it works for you?

from kong.

gzOne2Free avatar gzOne2Free commented on May 26, 2024

@samugi
When I create a new index with desired mapping and update http-log endpoint, new kong access logs can send to ES correctly. Thanks~

But how can I get/prepare the full http-log fields definition when initial a new http-log stream to ES? As I seen in access log through file-log plugin, every access log record has vary/different section(such as service, route, cosumer etc.) by each other. So I don't know how to get/generate a FULL list of access log fields. Any idea?

from kong.

samugi avatar samugi commented on May 26, 2024

Hi @gzOne2Free, I'm really glad that helped!

The http-log plugin uses the Kong PDK log serializer to produce access log records. More information on the available fields can be found in our docs, also the relevant source code is here.

For more information about how to generate the Elasticsearch mappings my advice would be to refer to the Elasticsearch official docs. I believe mappings do not define fields as required so in this case it should be enough to include all the fields that you may expect coming from the http-log plugin output as you say.

I'm closing this issue as resolved since your original problem was addressed. Please feel free to open up a new issue or discussion if you have any questions regarding Kong or its plugins. Thank you!

from kong.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.