simianhacker / bunyan-elasticsearch Goto Github PK
View Code? Open in Web Editor NEWA Bunyan stream for saving logs into Elasticsearch.
License: MIT License
A Bunyan stream for saving logs into Elasticsearch.
License: MIT License
I got this error while trying to run this package in newly cloned repository (worked before).
I fixed this by renaming this.closed
to this.closedStream
not sure if I should open pull request, as I am not sure if the problem is only on my system
I'm getting the following error, using the documentation on the readme.
Elasticsearch Stream Error: Error: [mapper_parsing_exception] failed to find type parsed [multi_field] for [name]
I followed the instructions regarding posting the template.json file as well.
I'm targeting the AWS ES service v 5.1
Seems the [path: full]
in Object type mapping is now deprecated.
Elasticsearch Stream Error: [mapper_parsing_exception] Mapping definition for [geoip] has unsupported parameters: [path : full] :: {"path":"/logstash-2016.08.26/api","query":{"op_type":"create"},"body":"{\"name\":\"default\",\"hostname\":\"API-Staging\",\"pid\":8969,\"level\":\"info\",\"v\":0,\"@timestamp\":\"2016-08-26T04:24:17.754Z\",\"message\":\"ApiApps loaded successfully from db!\"}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"mapper_parsing_exception\",\"reason\":\"Mapping definition for [geoip] has unsupported parameters: [path : full]\"}],\"type\":\"mapper_parsing_exception\",\"reason\":\"Failed to parse mapping [_default_]: Mapping definition for [geoip] has unsupported parameters: [path : full]\",\"caused_by\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"Mapping definition for [geoip] has unsupported parameters: [path : full]\"}},\"status\":400}"}
This is fixed here: #3
Error that i receive is
Elasticsearch Stream Error: Error: no handler found for uri [/logs-turing-api-test-2023.03.27/logs] and method [POST] at respond (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/elasticsearch/src/lib/transport.js:289:15) at checkRespForFailure (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/elasticsearch/src/lib/transport.js:248:7) at HttpConnector.<anonymous> (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/elasticsearch/src/lib/connectors/http.js:164:7) at IncomingMessage.wrapper (/Users/ahmedjehanzaib/Simplus/Projects/Turing/turing-api/node_modules/lodash/lodash.js:4991:19) at IncomingMessage.emit (events.js:388:22) at endReadableNT (internal/streams/readable.js:1336:12) at processTicksAndRejections (internal/process/task_queues.js:82:21)
If you do this:
var logger = bunyan.createLogger({
name: "My Application",
streams: [
{ stream: process.stdout },
{ stream: esStream, type: 'raw' }
],
serializers: bunyan.stdSerializers
});
Then bunyan will send you raw JSON objects instead of sending you strings, so you won't have to call JSON.parse() on the log entry that Bunyan just JSON.stringified().
entry['@timestamp'] = entry.time;
please make it an option, since ES deprecared usage of @timestamp. and then I could set it to 'timestamp' easily.
Using this with a web api server (single logger for the application)... when running under load tests (few thousand concurrent users and millions of requests) the RAM usage will grow to several GB. Without this module, it stays under 50mb.
I noticed the underlying elastic node library is deprecated in favor of a new official library, and that may resolve the issue... Also, may want to replace the moment use with specific date-fns module.
I won't be able to re-create or re-test as we've removed this module from our services and relying on output log shipping from the stdout/stderror logs now. Just wanted to report the issue upstream.
I have forked this repo and have setup a updated package on npmjs.
https://www.npmjs.com/package/bunyan-elasticsearch-updated
when @simianhacker comes back we can look at merging the up to date copy of package.json
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.