Git Product home page Git Product logo

winston-splunk-httplogger's People

Contributors

adityak74 avatar adrianhall avatar delaguilaluis avatar dependabot[bot] avatar e2he avatar razzdrawon avatar semantic-release-bot avatar th1nkful avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

winston-splunk-httplogger's Issues

Splunksettings should have url instead of host

I tried to setup a splunk logger but with host, it was not configurable. I checked the settings with the Splunk.Logger settings and found that it used url. I configured it like that and it worked.

Winston 3.x.x Support

Howdy! Thanks for maintaining this package.

I am starting to use this package on a Winston 3.x.x project, and I get a lot of legacy API warnings due to the transport class not being updated with 3.x.x support. I am happy to submit a PR that provides that support.

I was wondering what the appetite is for continuing support for Winston 2.x.x? Would it be okay to abandon 2.x.x? Users could pin their winston-splunk-httplogger if they were unable to move to Winston 3.x.x (which was released over 6 months ago).

The automated release is failing 🚨

🚨 The automated release from the main branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the main branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot 📦🚀

using splunk w/o port number on url

hi, I am using this module to log data into splunk. For some reason i have a proxy server to transfer trafic to splunk event collector, my proxy have no port number on url, but it will be added on run time. Am I doing something wrong?

var splunkSettings = { token: 'mySplunkToken', url : "https://somedomainwithoutportnumber.com/services/collector" };
but at run time i see winston try to contract with https://somedomainwithoutportnumber.com:8088/services/collector

Uncaught Exceptions are logged at 'info' level, not 'error'

This seems to happen because exceptionsLevel is not set in SplunkStreamEvent construction.

Just calling winston.Transport.call() (from which SplunkStreamEvent is inherited) constructor function fixes this.

Or is there a reason not to call the constructor? For example Console and DailyRotateFile transports do it.

Crash under heavy load

I know this isn't actively being developed, but I have been seeing a crash of the following sort under heavy load. Not sure if anyone else has seen of if there's a solution available, but wanted to put it out there.

2020-02-06 14:54 -05:00: ERROR: { Error: connect ECONNRESET 10.1.1.10:8088
2020-02-06 14:54 -05:00:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
2020-02-06 14:54 -05:00: ---------------------------------------------
2020-02-06 14:54 -05:00:     at TLSSocket.Readable.on (_stream_readable.js:772:35)
2020-02-06 14:54 -05:00:     at tickOnSocket (_http_client.js:650:10)
2020-02-06 14:54 -05:00:     at onSocketNT (_http_client.js:680:5)
2020-02-06 14:54 -05:00:     at _combinedTickCallback (internal/process/next_tick.js:139:11)
2020-02-06 14:54 -05:00:     at process._tickCallback (internal/process/next_tick.js:181:9)
2020-02-06 14:54 -05:00: ---------------------------------------------
2020-02-06 14:54 -05:00:     at ClientRequest.onSocket (_http_client.js:668:11)
2020-02-06 14:54 -05:00:     at handleSocketCreation_Inner (_http_agent.js:351:15)
2020-02-06 14:54 -05:00:     at oncreate (_http_agent.js:224:5)
2020-02-06 14:54 -05:00:     at Agent.createSocket (_http_agent.js:229:5)
2020-02-06 14:54 -05:00:     at Agent.addRequest (_http_agent.js:185:10)
2020-02-06 14:54 -05:00:     at new ClientRequest (_http_client.js:268:16)
2020-02-06 14:54 -05:00:     at Object.request (http.js:39:10)
2020-02-06 14:54 -05:00:     at Object.request (https.js:245:15)
2020-02-06 14:54 -05:00:     at Request.start (/home/api/node_modules/request/request.js:751:32)
2020-02-06 14:54 -05:00:     at Request.write (/home/api/node_modules/request/request.js:1497:10)
2020-02-06 14:54 -05:00:     at end (/home/api/node_modules/request/request.js:549:18)
2020-02-06 14:54 -05:00:     at Immediate._onImmediate (/home/api/node_modules/request/request.js:578:7)
2020-02-06 14:54 -05:00:     at runCallback (timers.js:810:20)
2020-02-06 14:54 -05:00:     at tryOnImmediate (timers.js:768:5)
2020-02-06 14:54 -05:00:     at processImmediate [as _immediateCallback] (timers.js:745:5)

host not passed

hi, I am using this module to log data into splunk. For some reason the host name is not getting pushed to splunk but the payload is seen correctly. Am I doing something wrong?

var splunkSettings = {
token: config.splunkToken,
url: config.splunkUrl,
host: 'my host name'
};

Meta objects do not get added to the event payload

I add metadata to the winston log entries using a rewriter as documented here:

https://www.npmjs.com/package/winston#filters-and-rewriters

winston-splunk-httplogger checks the length of meta before adding it to the payload:

if (meta) {
        if (meta instanceof Error) {
            payload.message.meta = {
                error: meta.message,
                name: meta.name,
                stack: meta.stack
            };
        } else if (meta.length) {
            payload.message.meta = meta;
        }
    }

meta.length is undefined, so it never gets added to the message.

Happy to submit a pull request to fix this, but I wanted to check with you to make sure this wasn't by design, i.e. expecting meta to be an array instead of an object.

Not able to change index in metadata for splunk

Im trying to configure a different source, sourceType, and index when sending to splunk but Im not able to change the index.
I put the "index" property in my splunkSettings object but I saw in the code from the library that it is not taking that property to replace it in the metadata for splunk.

Is it possible to add this feature?

Captura de pantalla 2019-04-23 a la(s) 17 40 40

Default index overrides token settings on Splunk server

I noticed an issue when updating from 2.0.0 to 2.3.3. The newer version sets a default index to winston-index. That is a breaking change for anyone whose index is not winston-index (almost all projects I assume). It looks like setting a default index was added in #10, though not the explicit goal of that change.

In our setup almost all our tokens have indexes automatically applied and access is limited to those indexes. Most of our code therefore does not set the index since creation and management of the tokens is not under our control. Unlike other splunk metadata if there is no index called winston-index or the token doesn't have access to that index then the logs are "lost" as only an admin will be able to see the ingestion errors.

Obviously, setting the index manually is a workaround, but because it will most likely to not work out of the box, I think that makes it an "unreasonable default" so to speak and would prefer index not to be set unless set by the user.

Getting Error While logging

Error: Incorrect index

{"message":{"msg":"Queue :: #45 Removed Processed Job","functionName":"removeProcessedJob"},"level":"info"}
ERROR: Error: Incorrect index

CONTEXT { message: '{"source":"winston","sourcetype":"winston-splunk-logger","index":"winston-index","time":"1578488973.582","event":{"message":{"msg":{"msg":"Queue ' + ':: #45 Removed Processed ' + 'Job","functionName":"removeProcessedJob"},"meta":{"message":{"msg":"Queue ' + ':: #45 Removed Processed ' + 'Job","functionName":"removeProcessedJob"},"level":"info"}},"severity":"info"}}', severity: 'info', metadata: {} }

ECONNRESET winston-splunk-httplogger

Hey guys

When trying to log, I get the following error

odis-server |     at connResetException (node:internal/errors:704:14)
odis-server |     at TLSSocket.socketCloseListener (node:_http_client:454:25)
odis-server |     at TLSSocket.emit (node:events:525:35)
odis-server |     at node:net:757:14
odis-server |     at TCP.done (node:_tls_wrap:584:7) {
odis-server |   code: 'ECONNRESET'
odis-server | }  CONTEXT {
odis-server |   message: '{"source":"winston","sourcetype":"CoLoDa-dev","index":"pr_localization_nonprod","time":"1664831868.802","event":{"message":{"msg":"hello","meta":{"message":"hello","level":"info","service":"odis"}},"severity":"info"}}',
odis-server |   severity: 'info',
odis-server |   metadata: {}
odis-server | }

How can we skip the certificate part using winston-splunk-httplogger

I don't see any config possible in the settings

Thanks much

Batching with winston-splunk-httplogger don’t seem to be implemented or documented right

Hi, thanks for maintaining this package :)

I’m trying to batch my logging requests,
I’ve debugged Winston and this package and I’ve tried few things, I understood that putting the
batchInterval, maxBatchCount Inside splunk object works (your documentation says different), maxBatchCount is not implemented (also after putting value in to it it’s still setting to default - 0)
So I put it artificially with server.config.maxBatchCount = value

Ended up with no logging at all
I would like to see an example of use of batching or a solution to my problem please :)

I’m using Winston 3.3.3, winston-splunk-httplogger 2.3.3

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.